diff --git a/.gitignore b/.gitignore
index 6772de412..c2890967b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,10 @@ src/rcsim
src/gui/version.h
src/nhttpd/nhttpd.conf
src/mdev_helper
+local_build_config.h
+
+### system generated stuff
+# dolphin
+.directory
+# kate
+*-swp
diff --git a/acinclude.m4 b/acinclude.m4
index 2d55c53c2..4eea0e04a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -157,14 +157,14 @@ TUXBOX_APPS_DIRECTORY_ONE(plugindir,PLUGINDIR,libdir,/lib,/tuxbox/plugins,
TUXBOX_APPS_DIRECTORY_ONE(luaplugindir,LUAPLUGINDIR,libdir,/lib,/tuxbox/luaplugins,
[--with-luaplugindir=PATH ],[where to find Lua plugins])
-TUXBOX_APPS_DIRECTORY_ONE(ucodedir,UCODEDIR,localstatedir,/var,/tuxbox/ucodes,
- [--with-ucodedir=PATH ],[where to find the ucodes])
+TUXBOX_APPS_DIRECTORY_ONE(localedir,LOCALEDIR,datadir,/share, /tuxbox/neutrino/locale,
+ [--with-localedir=PATH ],[where to find the locale])
TUXBOX_APPS_DIRECTORY_ONE(themesdir,THEMESDIR,datadir,/share,/tuxbox/neutrino/themes,
- [--with-themesdir=PATH ],[where to find the themes (don't change)])
+ [--with-themesdir=PATH ],[where to find the themes])
TUXBOX_APPS_DIRECTORY_ONE(iconsdir,ICONSDIR,datadir,/share,/tuxbox/neutrino/icons,
- [--with-iconsdir=PATH ],[where to find the icons (don't change)])
+ [--with-iconsdir=PATH ],[where to find the icons])
TUXBOX_APPS_DIRECTORY_ONE(private_httpddir,PRIVATE_HTTPDDIR,datadir,/share,/tuxbox/neutrino/httpd,
[--with-private_httpddir=PATH ],[where to find the the private httpd files])
@@ -185,7 +185,7 @@ AC_SUBST(LIBDIR)
AC_SUBST(MNTDIR)
AC_SUBST(PLUGINDIR)
AC_SUBST(LUAPLUGINDIR)
-AC_SUBST(UCODEDIR)
+AC_SUBST(LOCALEDIR)
AC_SUBST(THEMESDIR)
AC_SUBST(ICONSDIR)
AC_SUBST(PRIVATE_HTTPDDIR)
diff --git a/configure.ac b/configure.ac
index f427f0ee6..c15742e85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,7 @@ TUXBOX_APPS_LIB_PKGCONFIG_CHECK(OGG,ogg)
if test -z "$OGG_CFLAGS" ; then
TUXBOX_APPS_LIB_PKGCONFIG(OGG,ogg)
fi
+TUXBOX_APPS_LIB_PKGCONFIG(SWRESAMPLE,libswresample)
else
TUXBOX_APPS_LIB_PKGCONFIG(SWRESAMPLE,libswresample)
fi
@@ -164,6 +165,10 @@ AC_ARG_ENABLE(freesatepg,
[ --enable-freesatepg enable Freesat EPG code (experimental)],
[AC_DEFINE(ENABLE_FREESATEPG,1,[enable Freesat EPG code])])
+AC_ARG_ENABLE(viasatepg,
+ [ --enable-viasatepg enable ViaSat EPG code (experimental)],
+ [AC_DEFINE(ENABLE_VIASATEPG,1,[enable ViaSat EPG code])])
+
AC_ARG_ENABLE(giflib,
AS_HELP_STRING(--enable-giflib,use giflib instead of libungif),
,[enable_giflib=no])
@@ -173,6 +178,17 @@ if test "$enable_giflib" = "yes"; then
AC_DEFINE(ENABLE_GIFLIB,1,[use giflib instead of libungif])
fi
+### USE_PUGIXML
+AC_ARG_ENABLE(pugixml,
+ AS_HELP_STRING(--enable-pugixml,use pugixml instead of xmltree),
+ ,[enable_pugixml=no])
+
+AM_CONDITIONAL(USE_PUGIXML,test "$enable_pugixml" = "yes")
+if test "$enable_pugixml" = "yes"; then
+ AC_DEFINE(USE_PUGIXML,1,[use pugixml instead of xmltree])
+fi
+
+
# FLAC - Free Lossless Audio Codec
AC_ARG_ENABLE(flac,
AS_HELP_STRING(--enable-flac,include FLAC support),
@@ -289,6 +305,7 @@ lib/libeventserver/Makefile
lib/libmd5sum/Makefile
lib/libnet/Makefile
lib/xmltree/Makefile
+lib/jsoncpp/Makefile
lib/sectionsdclient/Makefile
lib/timerdclient/Makefile
lib/libcoolstream/Makefile
@@ -305,7 +322,6 @@ src/nhttpd/web/scripts/Makefile
src/nhttpd/web/languages/Makefile
src/nhttpd/web/styles/Makefile
src/nhttpd/tuxboxapi/Makefile
-src/nhttpd/tuxboxapi/coolstream/Makefile
src/nhttpd/yhttpd_core/Makefile
src/nhttpd/yhttpd_mods/Makefile
src/nhttpd/nhttpd.conf
@@ -317,6 +333,7 @@ src/driver/Makefile
src/gui/Makefile
src/gui/bedit/Makefile
src/gui/components/Makefile
+src/gui/lua/Makefile
src/gui/widget/Makefile
src/system/Makefile
src/system/mtdutils/Makefile
diff --git a/data/cables.xml b/data/cables.xml
index b60fd0001..0e54cd3d8 100644
--- a/data/cables.xml
+++ b/data/cables.xml
@@ -221,8 +221,14 @@
+
+
+
+
+
+
@@ -270,6 +276,11 @@
+
+
+
+
+
@@ -286,17 +297,14 @@
+
+
+
-
-
-
-
-
-
@@ -487,11 +495,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -503,7 +511,7 @@
-
+
@@ -511,7 +519,7 @@
-
+
@@ -519,6 +527,7 @@
+
@@ -548,44 +557,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index e1166af54..3224dad8e 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,4 +1,4 @@
-installdir = $(DATADIR)/neutrino/icons
+installdir = $(ICONSDIR)
locale = \
locale/deutsch.png \
@@ -107,6 +107,7 @@ install_DATA += \
hint_media.png \
hint_movie.png \
hint_network.png \
+ hint_next.png \
hint_osd.png \
hint_personalize.png \
hint_picview.png \
diff --git a/data/icons/hint_next.png b/data/icons/hint_next.png
new file mode 100644
index 000000000..a33703c27
Binary files /dev/null and b/data/icons/hint_next.png differ
diff --git a/data/locale/Makefile.am b/data/locale/Makefile.am
index b85891696..39a1cee6f 100644
--- a/data/locale/Makefile.am
+++ b/data/locale/Makefile.am
@@ -1,4 +1,4 @@
-installdir = $(DATADIR)/neutrino/locale
+installdir = $(LOCALEDIR)
locale = \
nederlands.locale \
diff --git a/data/locale/_readme.txt b/data/locale/_readme.txt
index 8c47c902f..0d417fdcb 100644
--- a/data/locale/_readme.txt
+++ b/data/locale/_readme.txt
@@ -8,7 +8,7 @@ any empty lines.
Destination of .locale files:
-----------------------------
-directory: /var/tuxbox/config/locale or /share/tuxbox/neutrino/locale
+directory: /var/tuxbox/locale or /share/tuxbox/neutrino/locale
Master file:
------------
diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale
index e9d06bab9..7ca96135f 100644
--- a/data/locale/deutsch.locale
+++ b/data/locale/deutsch.locale
@@ -20,6 +20,8 @@ EPGPlus.scroll_mode Scroll-Modus
EPGPlus.stretch_mode Stretch-Modus
EPGPlus.swap_mode Blättern
EPGPlus.view_mode Modus
+GENRE.ALL aus
+GENRE.ARTS Kultur
GENRE.ARTS.0 Kunst/Kultur
GENRE.ARTS.1 Darstellende Künste
GENRE.ARTS.10 Kunst-/Kultur-Magazin
@@ -32,12 +34,14 @@ GENRE.ARTS.6 Film/ Kino
GENRE.ARTS.7 Experimental Film/Video
GENRE.ARTS.8 Rundfunk/Presse
GENRE.ARTS.9 Neue Medien
+GENRE.CHILDRENs_PROGRAMMES Kinder
GENRE.CHILDRENs_PROGRAMMES.0 Kinder/Jugendprogramm
GENRE.CHILDRENs_PROGRAMMES.1 Programm für Vorschulkinder
GENRE.CHILDRENs_PROGRAMMES.2 Unterhaltungsprogramm für 6 bis 14-Jährige
GENRE.CHILDRENs_PROGRAMMES.3 Unterhaltungsprogramm für 10 bis 16-Jährige
GENRE.CHILDRENs_PROGRAMMES.4 Informations- und Bildungsprogramm
GENRE.CHILDRENs_PROGRAMMES.5 Trickfilm
+GENRE.DOCUS_MAGAZINES Magazin
GENRE.DOCUS_MAGAZINES.0 Doku/Magazin
GENRE.DOCUS_MAGAZINES.1 Natur/Tiere/Umwelt
GENRE.DOCUS_MAGAZINES.2 Naturwissenschaft und Technik
@@ -46,6 +50,7 @@ GENRE.DOCUS_MAGAZINES.4 Ausland/Expeditions
GENRE.DOCUS_MAGAZINES.5 Sozial- und Geisteswissenschaften
GENRE.DOCUS_MAGAZINES.6 Weiterbildung
GENRE.DOCUS_MAGAZINES.7 Sprachen
+GENRE.MOVIE Spielfilm
GENRE.MOVIE.0 Spielfilm/Drama
GENRE.MOVIE.1 Kriminalfilm/Thriller
GENRE.MOVIE.2 Abenteuerfilm/Western/Kriegsfilm
@@ -55,6 +60,7 @@ GENRE.MOVIE.5 Soap/Melodram/Folklore
GENRE.MOVIE.6 Romantik
GENRE.MOVIE.7 klassischer/religiöser/historischer Film/Drama
GENRE.MOVIE.8 Erwachsenen Film/Drama
+GENRE.MUSIC_DANCE Musik
GENRE.MUSIC_DANCE.0 Musik/Ballet/Tanz
GENRE.MUSIC_DANCE.1 Rock/Pop
GENRE.MUSIC_DANCE.2 Klassik
@@ -62,19 +68,23 @@ GENRE.MUSIC_DANCE.3 Volksmusik
GENRE.MUSIC_DANCE.4 Jazz
GENRE.MUSIC_DANCE.5 Musical/Oper
GENRE.MUSIC_DANCE.6 Ballet
+GENRE.NEWS Nachrichten
GENRE.NEWS.0 Nachrichten
GENRE.NEWS.1 Nachrichten/Wetter
GENRE.NEWS.2 Nachrichtenmagazin
GENRE.NEWS.3 Dokumentation
GENRE.NEWS.4 Diskussion/Interview/Debatte
+GENRE.SHOW Show
GENRE.SHOW.0 Show/ Gameshow
GENRE.SHOW.1 Gameshow/Quiz
GENRE.SHOW.2 Varietee
GENRE.SHOW.3 Talkshow
+GENRE.SOCIAL_POLITICAL Sozial
GENRE.SOCIAL_POLITICAL.0 Sozial & Politikereignisse/Wirtschaft
GENRE.SOCIAL_POLITICAL.1 Magazin/Report/Dokumentation
GENRE.SOCIAL_POLITICAL.2 Wirtschaft und Soziales
GENRE.SOCIAL_POLITICAL.3 Besondere Menschen
+GENRE.SPORTS Sport
GENRE.SPORTS.0 Sport
GENRE.SPORTS.1 Großereignisse (Olympische Spiele, Weltmeisterschaften usw.)
GENRE.SPORTS.10 Reiten
@@ -87,6 +97,7 @@ GENRE.SPORTS.6 Leichtathletik
GENRE.SPORTS.7 Motorsport
GENRE.SPORTS.8 Wassersport
GENRE.SPORTS.9 Wintersport
+GENRE.TRAVEL_HOBBIES Freizeit
GENRE.TRAVEL_HOBBIES.0 Reise & Freizeit
GENRE.TRAVEL_HOBBIES.1 Reisen und Tourismus
GENRE.TRAVEL_HOBBIES.2 Handwerk
@@ -255,6 +266,7 @@ channellist.sats Satelliten
channellist.show_channellogo Senderlogos zeigen
channellist.show_channelnumber Kanalnummern zeigen
channellist.show_empty_favs Zeige leere Favoriten-Bouquets
+channellist.show_infobox Sendungsfenster anzeigen
channellist.since seit
channellist.start Start
ci.clock CI Takt (Mhz)
@@ -266,8 +278,11 @@ ci.inserted CAM im Slot
ci.removed CAM entfernt -> Slot
ci.reset Reset
ci.reset_standby Reset nach Standby
+ci.save_pincode Jugendschutz-PIN speichern
ci.settings Zugangskontrolle
ci.timeout CAM antwortet nicht
+ci.tuner Nutze CI nur mit Tuner:
+ci.use Erlaube CI
ci.waiting Warte auf CAM-Antwort
clock_background Hintergrund anzeigen
clock_seconds Sekunden anzeigen
@@ -299,6 +314,7 @@ colormenusetup.menuhead Titelleiste
colorstatusbar.text Infobar
colorthememenu.head Theme auswählen
colorthememenu.head2 Themes laden
+colorthememenu.menu_hints Hinweisfenster
colorthememenu.name Themename
colorthememenu.neutrino_theme Neutrino Theme
colorthememenu.question Aktuelles Theme beibehalten?
@@ -349,6 +365,8 @@ epgviewer.genre Genre
epgviewer.length Spieldauer (Min.)
epgviewer.nodetailed Keine ausführlichen Informationen verfügbar
epgviewer.notfound Keine Programminformationen (EPG) gefunden
+eventfinder.fsk Altersfreigabe Filter
+eventfinder.genre Genre Filter
eventfinder.head EPG-Suche
eventfinder.history Frühere Suchen
eventfinder.keyword Suche nach Textpassage
@@ -568,9 +586,11 @@ flashupdate.copy_image Kopiere Image in den Arbeitsspeicher
flashupdate.createimage Image speichern
flashupdate.createimage_add_env 'env' hinzufügen
flashupdate.createimage_add_kernel 'kernel' hinzufügen
+flashupdate.createimage_add_root1 Partition 'root1' sichern
flashupdate.createimage_add_spare 'spare' hinzufügen
flashupdate.createimage_add_u_boot 'u-boot' hinzufügen
flashupdate.createimage_add_uldr 'uldr' hinzufügen
+flashupdate.createimage_add_var Datenpartition 'var' sichern
flashupdate.createimage_menu Aktuelle Software sichern
flashupdate.createimage_options Einstellungen
flashupdate.createimage_other Image für %s STB erstellen
@@ -586,19 +606,19 @@ flashupdate.fileis0bytes die Dateigröße ist 0 Byte
flashupdate.fileselector Datei-Auswahl
flashupdate.flashreadyreboot Das Image wurde erfolgreich geflasht.\nIhre Box wird jetzt neu gestartet.
flashupdate.getinfofile lade Versioninfo
-flashupdate.getinfofileerror kann Info nicht laden
+flashupdate.getinfofileerror Kann Aktualisierungs-Info nicht laden!
flashupdate.getupdatefile lade Update
-flashupdate.getupdatefileerror kann Update nicht laden
+flashupdate.getupdatefileerror Kann Aktualisierung nicht laden!
flashupdate.globalprogress Gesamtstatus:
flashupdate.head Aktualisierung
flashupdate.md5check Imageprüfung
flashupdate.md5sumerror Das Image ist fehlerhaft
flashupdate.menu_apply_kernel Kernel flashen
flashupdate.menu_apply_settings Settingsübernahme erlauben
-flashupdate.mkfs_create_image Image erstellen
+flashupdate.mkfs_create_image Backup erstellen
flashupdate.mkfs_preparing_files Dateien und Verzeichnisse vorbereiten
flashupdate.mkfs_using_sumtool Benutze Sumtool
-flashupdate.msgbox Es wurde folgendes neues File gefunden:\nDatum: %s, %s\nBasisImage: %s\nTyp: %s\n\nWollen Sie diese Version jetzt herunterladen\nund installieren?
+flashupdate.msgbox Es wurde folgende neue Datei gefunden:\nDatum: %s, %s\nBasisImage: %s\nTyp: %s\n\nWollen Sie diese Version jetzt herunterladen und installieren?
flashupdate.msgbox_manual Es wurde ein neues Image gefunden:\nDatum: %s, %s\nBasisImage: %s\nImageTyp: %s\n\nWollen Sie diese Version jetzt installieren?
flashupdate.mtdselector Partitions-Auswahl
flashupdate.namemode1 Dateiname Settingsfile
@@ -686,6 +706,14 @@ fontsize.menu_hint Menü-Hilfe
fontsize.menu_info Menüinfo
fontsize.menu_title Menütitel
fontsize.subtitles Text Untertitel
+fsk.all aus
+fsk.from_12 ab 12
+fsk.from_16 ab 16
+fsk.from_18 ab 18
+fsk.from_7 ab 7
+fsk.to_12 bis 12
+fsk.to_16 bis 16
+fsk.to_7 bis 7
hdd_10min 10 min.
hdd_1min 1 min.
hdd_20min 20 min.
@@ -716,7 +744,7 @@ hdd_set_recdir Diesen Datenträger für die Aufnahme nutzen?
hdd_settings Laufwerke
hdd_sleep Ausschalten nach...
hdd_slow Langsam
-hdd_statfs Füllstands-Abfrage
+hdd_statfs Füllstandsabfrage
hdd_statfs_always immer
hdd_statfs_recording nur während Aufnahme
hdd_umount Aushängen
@@ -843,6 +871,9 @@ lua.boolparam_deprecated3 für einen Boolean Parameter ist veraltet.\n
lua.function_deprecated1 Achtung!
lua.function_deprecated2 Die Funktion
lua.function_deprecated3 ist veraltet,\n bitte nutzen Sie
+lua.parameter_deprecated2 Der Parameter
+lua.versionscheck1 Ihre Lua API Version ist zu alt
+lua.versionscheck2 Erforderlich ist mindestens
mainmenu.audioplayer Audioplayer
mainmenu.channels Kanalliste
mainmenu.clearsectionsd Lösche EPG Cache
@@ -924,7 +955,6 @@ menu.hint_cec_mode CEC-Modus
menu.hint_cec_standby CEC-Standby
menu.hint_cec_view_on CEC view ON
menu.hint_channellist_additional Definiert, ob zusätzliche Informationen im Hauptfenster angezeigt werden sollen
-menu.hint_channellist_colored Definiert, ob die aktuelle oder nächste Sendung in einer anderen Farbe dargestellt werden soll
menu.hint_channellist_epg_align Legen Sie fest, wie der Text für das EPG in der Liste rechts vom Programmnamen ausgerichtet wird
menu.hint_channellist_extended Bei aktivierter Funktion wird vor dem Sendernamen ein Balken eingeblendet, der den Sendungsfortschritt anzeigt
menu.hint_channellist_fonts Ändern Sie die Schriftgrößen in der Kanalliste
@@ -935,6 +965,7 @@ menu.hint_channellist_setup Wählen Sie die Anzeigeoptionen für die Kanalliste
menu.hint_channellist_show_channellogo Zeigt Senderlogos in der Kanalliste.
menu.hint_channellist_show_channelnumber Zeigt Kanalnummer in der Kanalliste.
menu.hint_channellist_show_empty_favs Zeigt oder versteckt leere Bouquets in den Favoriten
+menu.hint_channellist_show_infobox Zeigt oder versteckt das untere Sendungsfenster
menu.hint_channels Kanalliste öffnen
menu.hint_ci Conditional-Access-Menü zum Einrichten Ihres CI-Moduls oder der eingebetteten Conax-Karte
menu.hint_clock_background Lassen Sie die Uhr mit Hintergrund anzeigen
@@ -943,6 +974,8 @@ menu.hint_clock_seconds Legen Sie fest, ob die Sekunden angezeigt werden sollen
menu.hint_clock_size Stellen Sie die Größe der Uhr ein
menu.hint_clock_textcolor Konfigurieren Sie die Farbe der Ziffern
menu.hint_color_gradient Schaltet Farbverläufe für verschiedene Menüelemente ein/aus
+menu.hint_colored_events Definiert, ob die aktuelle oder nächste Sendung in einer anderen Farbe dargestellt werden soll
+menu.hint_colored_events_textcolor Ändern Sie die Farbe für farbige Events in der Kanalliste und der Infobar
menu.hint_colors Konfigurieren Sie die Menü-Farben
menu.hint_content_back Ändern Sie die Hintergrundfarbe für den Fensterinhalt
menu.hint_content_textcolor Ändern Sie die Textfarbe für den Fensterinhalt
@@ -963,7 +996,6 @@ menu.hint_epg_save_mode Speichert die EPG-Daten nur für Sender, die in die Favo
menu.hint_epg_save_standby Speichert die EPG-Daten auch, wenn in den Standby-Modus geschalten wird
menu.hint_epg_scan Zu scannende Bouquets wählen. Aktuelles Bouquet beim Umschalten, markierte Bouquets oder alle Favoriten
menu.hint_epg_scan_mode Aktivieren Sie den Hintergrundscan der EPG-Daten, wenn ein freier Tuner vorhanden ist
-menu.hint_event_textcolor Ändern Sie die Farbe für farbige Events in der Kanalliste und der Infobar
menu.hint_eventlist_additional Definiert, ob zusätzliche Informationen im Hauptfenster angezeigt werden sollen
menu.hint_eventlist_fonts Ändern Sie die Schriftgröße in der Event-Liste
menu.hint_eventlist_setup Wählen Sie die Anzeigeoptionen für die Event-Liste
@@ -998,12 +1030,14 @@ menu.hint_inactive_textcolor Ändern Sie die Textfarbe für deaktivierte Fenster
menu.hint_inet_radio Internetradio
menu.hint_info Informationen über das Image, CPU, Arbeitsspeicher und Stream und mehr
menu.hint_infobar_back Ändern Sie die Hintergrundfarbe für die Infobar
-menu.hint_infobar_casys ein: zeigt alle Aktiven farbig, Mini: einzelnes Symbol ob gespeert, Diskret: alle Aktiven CA-Systeme
-menu.hint_infobar_colored_event Verwenden Sie unterschiedliche Farben für die aktuelle oder nächste Sendung in der Infobar
+menu.hint_infobar_casys ein: zeigt alle Aktiven farbig, Mini: einzelnes Symbol ob gesperrt, Diskret: alle Aktiven CA-Systeme
+menu.hint_infobar_casys_color Ändern Sie die Hintergrundfarbe für die CA-Systemanzeige der Infobar
+menu.hint_infobar_casys_dotmatrix ein: CA-Systemanzeige mit Punktematrix im Hintergrund
+menu.hint_infobar_casys_frame ein: CA-Systemanzeige mit Rahmen
menu.hint_infobar_dd Zeigt ein Dolby Digital Icon bei Verfügbarkeit
menu.hint_infobar_filesys Zeigen den vom Flash- und einer HDD verwendeten Speicherplatz
menu.hint_infobar_fonts Ändern Sie die Schriftgrößen in der Infobar
-menu.hint_infobar_logo Logo- und Signal-Optionen
+menu.hint_infobar_logo Logo-, Kanalnummer- und Signal-Anzeige; Optionen in [Klammern] erscheinen in der kleinen Infobox
menu.hint_infobar_logo_dir Wählen Sie das Verzeichnis für die Senderlogos
menu.hint_infobar_on_epg Zeigt einen Hinweis bei EPG-Änderungen
menu.hint_infobar_radiotext Zeigt Radiotext in einen Fenster, wenn verfügbar
@@ -1141,6 +1175,8 @@ menu.hint_net_ushare Freigabe verbundener Datenträger über UPnP
menu.hint_net_xupnpd Freigabe von Live Channels über UPNP
menu.hint_network IP-Adresse, Gateway, DNS, Zeit-Sync, Netzwerk-Freigaben, Dienste und mehr
menu.hint_new_zap_mode Aktiviert Quickzap in der Kanalliste. Nach Betätigen der Mute-Taste wird mit den Hoch/Runter-Tasten direkt umgeschalten
+menu.hint_next Weiter zum nächsten Menü.\nDie Taste 'Menü' schließt alle Menüs
+menu.hint_next_brief Weiter zum nächsten Menü
menu.hint_numeric_adjust Bei numerischer Programmwahl die Kanalliste am neu gewählten Programm ausrichten
menu.hint_opkg Hier können Sie neue Software-Pakete installieren oder vorhandene aktualisieren
menu.hint_opkg_upgrade Aktualisiert alle installierten Pakete auf die neueste verfügbare Version
@@ -1371,7 +1407,7 @@ menu.hint_window_size Kanalliste, EPG-Infos und einige andere Fenster werden mit
menu.hint_ytplay Wiedergabe von ausgewählten Youtube Feeds
menu.hint_ytplay_setup Konfigurieren Sie YouTube-spezifische Optionen wie maximale Ergebnisse bei Suchen oder Cache-Verzeichnis
menu.hint_zap_cycle Wählen Sie, ob nur innerhalb des aktiven Bouquets umgeschaltet werden kann
-menu.next Weiter (Menü zum Beenden)
+menu.next Weiter
messagebox.back Zurück
messagebox.cancel Abbruch
messagebox.discard Wollen Sie die Änderungen verwerfen?
@@ -1381,11 +1417,13 @@ messagebox.no Nein
messagebox.ok OK
messagebox.yes Ja
miscsettings.channellist Kanalliste
-miscsettings.channellist_colored_events Sendung farbig
miscsettings.channellist_epgtext_align Event-Text ausrichten
+miscsettings.colored_events Sendung hervorheben
miscsettings.colored_events_0 keine
miscsettings.colored_events_1 aktuelle
miscsettings.colored_events_2 nächste
+miscsettings.colored_events_channellist In der Kanalliste
+miscsettings.colored_events_infobar In der Infobar
miscsettings.energy Energieverbrauch
miscsettings.epg_cache EPG-Cache (Tage)
miscsettings.epg_cache_hint1 EPG-Daten im Voraus zwischenspeichern?
@@ -1417,25 +1455,28 @@ miscsettings.epg_scan_standby Im Standby Modus
miscsettings.general Allgemein
miscsettings.head Erweitert
miscsettings.infobar Infobar
-miscsettings.infobar_casystem_display CA-System Anzeige
+miscsettings.infobar_casystem_display CA-Systemanzeige
+miscsettings.infobar_casystem_dotmatrix CA-Anzeige mit Punktematrix
+miscsettings.infobar_casystem_frame CA-Anzeige mit Rahmen
miscsettings.infobar_casystem_mini Mini
miscsettings.infobar_casystem_mode Diskret
-miscsettings.infobar_colored_events Sendung farbig
-miscsettings.infobar_disp_0 Kein Logo
-miscsettings.infobar_disp_1 Logo in der Nummernbox
-miscsettings.infobar_disp_2 Logo/Kanalnummer
-miscsettings.infobar_disp_3 Logo+Kanalname/Signalbalken
-miscsettings.infobar_disp_4 Logo+Kanalname/Kanalnummer
-miscsettings.infobar_disp_5 Logo/Signalbalken
-miscsettings.infobar_disp_6 Logo+Kanalnummer/Signalbalken
-miscsettings.infobar_disp_log Logo
-miscsettings.infobar_logo_hdd_dir Logo-Verz.
+miscsettings.infobar_disp Logo-Anzeige
+miscsettings.infobar_disp_0 Kanalname [Kanalnummer]
+miscsettings.infobar_disp_1 Kanalnummer, Kanalname [Logo]
+miscsettings.infobar_disp_2 Logo [Kanalnummer]
+miscsettings.infobar_disp_3 Logo, Kanalname [Signalbalken]
+miscsettings.infobar_disp_4 Logo, Kanalname [Kanalnummer]
+miscsettings.infobar_disp_5 Logo [Signalbalken]
+miscsettings.infobar_disp_6 Kanalnummer, Logo [Signalbalken]
+miscsettings.infobar_gradient_bottom Farbverlauf unten
+miscsettings.infobar_gradient_top Farbverlauf oben
+miscsettings.infobar_logo_hdd_dir Logo-Verzeichnis
miscsettings.infobar_sat_display Kabel-/Satellitenanbieter
miscsettings.infobar_show Info bei EPG Änderungen
miscsettings.infobar_show_dd_available DD-Verfügbarkeit anzeigen
miscsettings.infobar_show_res Auflösung anzeigen
miscsettings.infobar_show_res_simple einfach
-miscsettings.infobar_show_sysfs_hdd Füllstandanzeige (sysFS & hdd)
+miscsettings.infobar_show_sysfs_hdd Füllstandsanzeige (SysFS und HDD)
miscsettings.infobar_show_tuner Aktiven Tuner anzeigen
miscsettings.infoclock Uhr
miscsettings.progressbar Fortschrittsbalken
@@ -1534,6 +1575,7 @@ moviebrowser.copying Kopiere Sprungmarken, bitte warten ...
moviebrowser.cut Schneide Sprungmarken aus dem Film?
moviebrowser.cut_failed Fehler beim Schneiden. Sind Sprungmarken und genug freier Speicher vorhanden?
moviebrowser.cutting Schneide Film, bitte warten ...
+moviebrowser.delete_all Alle markierten Filme ohne weitere Nachfrage löschen?
moviebrowser.delete_info Lösche Dateien, bitte warten...
moviebrowser.delete_screenshot Lösche Screenshot?
moviebrowser.dir Pfad
@@ -1558,11 +1600,15 @@ moviebrowser.head_filter Filme nach Kategorie filtern:
moviebrowser.head_playlist Zuletzt gesehen:
moviebrowser.head_recordlist Zuletzt aufgenommen:
moviebrowser.hide_series Verstecke Serien
+moviebrowser.hint_copy_onefile
+moviebrowser.hint_copy_several
+moviebrowser.hint_cut
moviebrowser.hint_jumpbackward Rücksprung in 5 s\n '0' zum Weitersehen
moviebrowser.hint_jumpforward Werbung überspringen in 5 s\n '0' zum Ansehen
moviebrowser.hint_movieend Filmende in 5 s\n '0' zum Weitersehen
moviebrowser.hint_newbook_backward Neue Wiederholung\n 'blue' für Endposition
moviebrowser.hint_newbook_forward Neuer Werbesprung\n 'blue' für Endposition
+moviebrowser.hint_truncate
moviebrowser.info_audio Audio
moviebrowser.info_channel Kanal
moviebrowser.info_file Datei
@@ -1594,6 +1640,10 @@ moviebrowser.info_videoformat Bildformat
moviebrowser.last_play_max_items Zeilen 'zuletzt aufgenommen'
moviebrowser.last_record_max_items Zeilen 'zuletzt gesehen'
moviebrowser.load_default Lade Voreinstellung
+moviebrowser.menu_copy_onefile Film kopieren
+moviebrowser.menu_copy_several Film kopieren und teilen
+moviebrowser.menu_cut Film schneiden
+moviebrowser.menu_cut_head Kopieren, Schneiden und Kürzen
moviebrowser.menu_directories_head Verzeichnisse/Freier Speicher
moviebrowser.menu_help_head Hilfe
moviebrowser.menu_main_bookmarks Markierungen
@@ -1607,6 +1657,7 @@ moviebrowser.menu_parental_lock_head Jugendschutz
moviebrowser.menu_parental_lock_rate_head Filme sperren ab
moviebrowser.menu_save Veränderungen speichern
moviebrowser.menu_save_all Starte Übernahme in allen sichtbaren Filminfos
+moviebrowser.menu_truncate Film kürzen
moviebrowser.option_browser Anzeigeoptionen
moviebrowser.reload_at_start Filminfos neu laden bei Start
moviebrowser.remount_at_start Filmdepot verbinden bei Start
@@ -1672,6 +1723,7 @@ moviebrowser.yt_recently_featured Vor kurzem empfohlen
moviebrowser.yt_region Region
moviebrowser.yt_related Passende Videos
moviebrowser.yt_search Suche nach Stichwort
+moviecut.cancel Bearbeiten des Filmes abbrechen?
movieplayer.bookmark Bookmarks
movieplayer.bookmarkname Bookmark Name
movieplayer.bookmarkname_hint1 Geben Sie den Namen für das neue Lesezeichen ein
@@ -2191,7 +2243,7 @@ timerlist.repeatcount Wiederholungen
timerlist.repeatcount.help1 Anzahl der Timerausführungen
timerlist.repeatcount.help2 0 für unbegrenzte Anzahl
timerlist.save Timer speichern
-timerlist.standby SB Modus
+timerlist.standby Aktion
timerlist.standby.off Aufwachen aus Standby
timerlist.standby.on In Standby gehen
timerlist.stoptime Stoppzeit
diff --git a/data/locale/english.locale b/data/locale/english.locale
index 5f78efb16..2dd21602b 100644
--- a/data/locale/english.locale
+++ b/data/locale/english.locale
@@ -20,6 +20,8 @@ EPGPlus.scroll_mode Scroll Mode
EPGPlus.stretch_mode Stretch Mode
EPGPlus.swap_mode swap mode
EPGPlus.view_mode view mode
+GENRE.ALL off
+GENRE.ARTS Arts
GENRE.ARTS.0 arts / culture
GENRE.ARTS.1 performing arts
GENRE.ARTS.10 arts/culture magazines
@@ -32,12 +34,14 @@ GENRE.ARTS.6 film/cinema
GENRE.ARTS.7 experimental film/video
GENRE.ARTS.8 broadcasting/press
GENRE.ARTS.9 new media
+GENRE.CHILDRENs_PROGRAMMES children
GENRE.CHILDRENs_PROGRAMMES.0 children / juvenile program
GENRE.CHILDRENs_PROGRAMMES.1 pre-school children's programmes
GENRE.CHILDRENs_PROGRAMMES.2 entertainment programmes for 6 to 14
GENRE.CHILDRENs_PROGRAMMES.3 entertainment programmes for 10 to 16
GENRE.CHILDRENs_PROGRAMMES.4 informational/educational/school programmes
GENRE.CHILDRENs_PROGRAMMES.5 cartoons/puppets
+GENRE.DOCUS_MAGAZINES documentation
GENRE.DOCUS_MAGAZINES.0 documentation / magazine
GENRE.DOCUS_MAGAZINES.1 nature/animals/environment
GENRE.DOCUS_MAGAZINES.2 technology/natural sciences
@@ -46,6 +50,7 @@ GENRE.DOCUS_MAGAZINES.4 foreign countries/expeditions
GENRE.DOCUS_MAGAZINES.5 social/spiritual sciences
GENRE.DOCUS_MAGAZINES.6 further education
GENRE.DOCUS_MAGAZINES.7 languages
+GENRE.MOVIE movie
GENRE.MOVIE.0 movie/drama
GENRE.MOVIE.1 detective/thriller
GENRE.MOVIE.2 adventure/western/war
@@ -55,6 +60,7 @@ GENRE.MOVIE.5 soap/melodrama/folkloric
GENRE.MOVIE.6 romance
GENRE.MOVIE.7 serious/classical/religious/historical movie/drama
GENRE.MOVIE.8 adult movie/drama
+GENRE.MUSIC_DANCE music
GENRE.MUSIC_DANCE.0 music / ballet / dance
GENRE.MUSIC_DANCE.1 rock/pop
GENRE.MUSIC_DANCE.2 serious music/classical music
@@ -62,19 +68,23 @@ GENRE.MUSIC_DANCE.3 folk/traditional music
GENRE.MUSIC_DANCE.4 jazz
GENRE.MUSIC_DANCE.5 musical/opera
GENRE.MUSIC_DANCE.6 ballet
+GENRE.NEWS news
GENRE.NEWS.0 news
GENRE.NEWS.1 news/weather report
GENRE.NEWS.2 news magazine
GENRE.NEWS.3 documentary
GENRE.NEWS.4 discussion/interview/debate
+GENRE.SHOW Show
GENRE.SHOW.0 Show / Gameshow
GENRE.SHOW.1 game show/quiz/contest
GENRE.SHOW.2 variety show
GENRE.SHOW.3 talk show
+GENRE.SOCIAL_POLITICAL social
GENRE.SOCIAL_POLITICAL.0 social & politic events / business
GENRE.SOCIAL_POLITICAL.1 magazines/reports/documentary
GENRE.SOCIAL_POLITICAL.2 economics/social advisory
GENRE.SOCIAL_POLITICAL.3 remarkable people
+GENRE.SPORTS sports
GENRE.SPORTS.0 sports
GENRE.SPORTS.1 special events (Olympic Games,World Cup etc.)
GENRE.SPORTS.10 equestrian
@@ -87,6 +97,7 @@ GENRE.SPORTS.6 athletics
GENRE.SPORTS.7 motor sports
GENRE.SPORTS.8 water sports
GENRE.SPORTS.9 winter sports
+GENRE.TRAVEL_HOBBIES Leisure
GENRE.TRAVEL_HOBBIES.0 travel & recreation
GENRE.TRAVEL_HOBBIES.1 tourism/travel
GENRE.TRAVEL_HOBBIES.2 handicraft
@@ -255,6 +266,7 @@ channellist.sats Satellites
channellist.show_channellogo Show channel logos
channellist.show_channelnumber Show channel numbers
channellist.show_empty_favs Show empty favorites bouquets
+channellist.show_infobox Show bottom infobox
channellist.since since
channellist.start starts
ci.clock CI clock (Mhz)
@@ -266,8 +278,11 @@ ci.inserted CAM inserted in slot
ci.removed CAM removed from slot
ci.reset Reset
ci.reset_standby Reset after standby
+ci.save_pincode Save pincode
ci.settings Conditional access
ci.timeout Timeout waiting CI menu ready
+ci.tuner Use CI only with tuner:
+ci.use Enable CI
ci.waiting Waiting for CI answer
clock_background Show background
clock_seconds Show seconds
@@ -275,6 +290,7 @@ clock_size_height Display height
clock_switch_off Clock off
clock_switch_on Clock on
color.gradient Color gradient
+color.gradient_c2c Color to color gradient
colorchooser.alpha alpha
colorchooser.blue blue
colorchooser.green green
@@ -299,6 +315,7 @@ colormenusetup.menuhead Header
colorstatusbar.text Infobar
colorthememenu.head Select theme
colorthememenu.head2 Load themes
+colorthememenu.menu_hints Hint box
colorthememenu.name Theme name
colorthememenu.neutrino_theme Neutrino Theme
colorthememenu.question Use selected theme?
@@ -349,6 +366,8 @@ epgviewer.genre Genre
epgviewer.length Length (min.)
epgviewer.nodetailed No detailed informations available
epgviewer.notfound No EPG found
+eventfinder.fsk Age rating Filter
+eventfinder.genre Genre-Filter
eventfinder.head Search in EPG
eventfinder.history Search history
eventfinder.keyword Keyword
@@ -568,9 +587,11 @@ flashupdate.copy_image Copy Image to main memory
flashupdate.createimage Save image
flashupdate.createimage_add_env Add 'env' to image
flashupdate.createimage_add_kernel Add 'kernel' to image
+flashupdate.createimage_add_root1 Add 'root1' to image
flashupdate.createimage_add_spare Add 'spare' to image
flashupdate.createimage_add_u_boot Add 'u-boot' to image
flashupdate.createimage_add_uldr Add 'uldr' to image
+flashupdate.createimage_add_var Add 'var' to image
flashupdate.createimage_menu Save current software
flashupdate.createimage_options Options
flashupdate.createimage_other Create image for %s STB
@@ -586,16 +607,16 @@ flashupdate.fileis0bytes the filesize is 0 Bytes
flashupdate.fileselector File-Selector
flashupdate.flashreadyreboot The image was successfully flashed.\nThe box will be rebooted now.
flashupdate.getinfofile getting versioninfo
-flashupdate.getinfofileerror can't get versioninfo
+flashupdate.getinfofileerror Can't get update versioninfo!
flashupdate.getupdatefile getting update
-flashupdate.getupdatefileerror can't get update
+flashupdate.getupdatefileerror Can't get update!
flashupdate.globalprogress Global Progress:
flashupdate.head Software Update
flashupdate.md5check checking image
flashupdate.md5sumerror image has errors
flashupdate.menu_apply_kernel Flashing kernel
flashupdate.menu_apply_settings Allow apply settings
-flashupdate.mkfs_create_image Create image
+flashupdate.mkfs_create_image Create backup
flashupdate.mkfs_preparing_files Preparing files and directories
flashupdate.mkfs_using_sumtool Using sumtool
flashupdate.msgbox Found the following new file:\nDate: %s, %s\nBaseImage: %s\nType: %s\n\nDo you want to download and install this version now?
@@ -686,6 +707,14 @@ fontsize.menu_hint Menu hints
fontsize.menu_info Menu Info
fontsize.menu_title Menu Title
fontsize.subtitles Text subtitles
+fsk.all off
+fsk.from_12 from 12
+fsk.from_16 from 16
+fsk.from_18 from 18
+fsk.from_7 from 7
+fsk.to_12 to 12
+fsk.to_16 to 16
+fsk.to_7 to 7
hdd_10min 10 min.
hdd_1min 1 min.
hdd_20min 20 min.
@@ -843,6 +872,9 @@ lua.boolparam_deprecated3 for a Boolean parameter is deprecated.\n
lua.function_deprecated1 Caution!
lua.function_deprecated2 Function
lua.function_deprecated3 is deprecated,\n please use
+lua.parameter_deprecated2 Parameter
+lua.versionscheck1 Your Lua API version is too old
+lua.versionscheck2 This requires at least
mainmenu.audioplayer Audioplayer
mainmenu.channels Channels
mainmenu.clearsectionsd Clear EPG Cache
@@ -924,7 +956,6 @@ menu.hint_cec_mode CEC mode
menu.hint_cec_standby CEC standby
menu.hint_cec_view_on CEC view ON
menu.hint_channellist_additional Show additional informations\nin main box
-menu.hint_channellist_colored Use different color for current or next event
menu.hint_channellist_epg_align EPG event align
menu.hint_channellist_extended Show current event progress bar
menu.hint_channellist_fonts Change channel list font sizes
@@ -935,6 +966,7 @@ menu.hint_channellist_setup Configure channel list GUI options
menu.hint_channellist_show_channellogo Show channel logos in channel list
menu.hint_channellist_show_channelnumber Show channel number in channel list
menu.hint_channellist_show_empty_favs Show / hide empty bouquets in favorites
+menu.hint_channellist_show_infobox Show or hide bottom infobox of channellist
menu.hint_channels Open channel list
menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card
menu.hint_clock_background Show clock with theme's background color
@@ -943,6 +975,9 @@ menu.hint_clock_seconds Show time format with seconds
menu.hint_clock_size Set the size of the info clock
menu.hint_clock_textcolor Configure digit colors
menu.hint_color_gradient Switches color gradients for various menu items on/off
+menu.hint_color_gradient_c2c Switches smooth gradient between 2 colors and one-color gradient
+menu.hint_colored_events Use different color for current or next event
+menu.hint_colored_events_textcolor Change color for colored events in channellist and infobar
menu.hint_colors Configure GUI colors
menu.hint_content_back Change GUI window background color
menu.hint_content_textcolor Change GUI window text color
@@ -963,7 +998,6 @@ menu.hint_epg_save_mode Cache EPG only for channels present in favorite bouquets
menu.hint_epg_save_standby Save EPG on soft standby mode
menu.hint_epg_scan Select bouquets to scan epg, current on zap,\nall or selected favorites
menu.hint_epg_scan_mode Enable background epg scan using free tuner
-menu.hint_event_textcolor Change event color for colored-event options\nin channel list and infobar
menu.hint_eventlist_additional Show additional informations\nin main box
menu.hint_eventlist_fonts Change event list font sizes
menu.hint_eventlist_setup Configure event list GUI options
@@ -998,12 +1032,14 @@ menu.hint_inactive_textcolor Change inactive item text color
menu.hint_inet_radio Internet radio
menu.hint_info Information about image, box cpu and storage,\nstream information
menu.hint_infobar_back Change infobar background color
-menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-sys
-menu.hint_infobar_colored_event Use different color for current or next event
+menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-systems
+menu.hint_infobar_casys_color Change CA-System background color
+menu.hint_infobar_casys_dotmatrix on: CA-System with dot matrix in background
+menu.hint_infobar_casys_frame on: CA-System with frame
menu.hint_infobar_dd Show DD icon
menu.hint_infobar_filesys Show flash and HDD used space levels
menu.hint_infobar_fonts Change infobar font sizes
-menu.hint_infobar_logo Logo / signal options
+menu.hint_infobar_logo Logo, channelnumber and signal display; Options in [brackets] will be displayed in small infobox
menu.hint_infobar_logo_dir Select directory to search for channels logo
menu.hint_infobar_on_epg Show infobar on current EPG event change
menu.hint_infobar_radiotext Show radiotext window
@@ -1141,6 +1177,8 @@ menu.hint_net_ushare Share connected HDD over uPnp
menu.hint_net_xupnpd Share live channels over UPNP
menu.hint_network IP address, gateway, DNS, Time sync\nNetwork shares and services
menu.hint_new_zap_mode Allow channel switch while browsing\n(toggle mode with 'mute' in channel list)
+menu.hint_next Continue to next menu\nPress menu key to close all menus
+menu.hint_next_brief Continue to next menu
menu.hint_numeric_adjust Adjust channel list mode on numeric zap
menu.hint_opkg Install or update software packages
menu.hint_opkg_upgrade Updates all installed packages to the most recent version available
@@ -1371,7 +1409,7 @@ menu.hint_window_size Channellist, EPG-infos and some other windows are scaled b
menu.hint_ytplay Play selected youtube feeds
menu.hint_ytplay_setup Configure YouTube-specific options, e.g. an upper limit for search results
menu.hint_zap_cycle When swithing channels, stay in current bouquet
-menu.next Next (press Menu to quit)
+menu.next Next
messagebox.back Back
messagebox.cancel Cancel
messagebox.discard Discard changes?
@@ -1381,11 +1419,13 @@ messagebox.no No
messagebox.ok Ok
messagebox.yes Yes
miscsettings.channellist Channellist
-miscsettings.channellist_colored_events Program colored
miscsettings.channellist_epgtext_align Programtext Align
+miscsettings.colored_events Program colored
miscsettings.colored_events_0 none
miscsettings.colored_events_1 current
miscsettings.colored_events_2 next
+miscsettings.colored_events_channellist In channellist
+miscsettings.colored_events_infobar In infobar
miscsettings.energy Energy
miscsettings.epg_cache EPG-Cache (Days)
miscsettings.epg_cache_hint1 How long will EPG-Data in the future cached?
@@ -1417,25 +1457,28 @@ miscsettings.epg_scan_standby Standby
miscsettings.general General
miscsettings.head Extended settings
miscsettings.infobar Infobar
-miscsettings.infobar_casystem_display CA-System Display
+miscsettings.infobar_casystem_display CA-System display
+miscsettings.infobar_casystem_dotmatrix CA display with dot matrix
+miscsettings.infobar_casystem_frame CA display with frame
miscsettings.infobar_casystem_mini mini
miscsettings.infobar_casystem_mode discreet
-miscsettings.infobar_colored_events Program colored
-miscsettings.infobar_disp_0 without Logo
-miscsettings.infobar_disp_1 Logo in number box
-miscsettings.infobar_disp_2 Logo+channel number
-miscsettings.infobar_disp_3 Logo+channel name+signal
-miscsettings.infobar_disp_4 Logo+channel name/number
-miscsettings.infobar_disp_5 Logo+signal
-miscsettings.infobar_disp_6 Logo+channel number+signal
-miscsettings.infobar_disp_log Logo
-miscsettings.infobar_logo_hdd_dir Logo dir
+miscsettings.infobar_disp Logo display
+miscsettings.infobar_disp_0 Channelname [Channelnumber]
+miscsettings.infobar_disp_1 Channelnumber, Channelname [Logo]
+miscsettings.infobar_disp_2 Logo [Channelnumber]
+miscsettings.infobar_disp_3 Logo, Channelname [Signal]
+miscsettings.infobar_disp_4 Logo, Channelname [Channelnumber]
+miscsettings.infobar_disp_5 Logo [Signal]
+miscsettings.infobar_disp_6 Channelnumber, Logo [Signal]
+miscsettings.infobar_gradient_bottom Gradient bottom
+miscsettings.infobar_gradient_top Gradient top
+miscsettings.infobar_logo_hdd_dir Logo directory
miscsettings.infobar_sat_display Satellite display on infobar
miscsettings.infobar_show show Info on EPG change
miscsettings.infobar_show_dd_available show DD availability
miscsettings.infobar_show_res show resolution on infobar
miscsettings.infobar_show_res_simple simple
-miscsettings.infobar_show_sysfs_hdd Fill level (sysFS & hdd)
+miscsettings.infobar_show_sysfs_hdd Fill level (SysFS and HDD)
miscsettings.infobar_show_tuner Display active tuner
miscsettings.infoclock Clock
miscsettings.progressbar Progressbar
@@ -1534,6 +1577,7 @@ moviebrowser.copying Coping, please wait ...
moviebrowser.cut Cut jumps from movie?
moviebrowser.cut_failed Cut failed, are there jump bookmarks and enough free space?
moviebrowser.cutting Cutting movie, please wait ...
+moviebrowser.delete_all Delete all selected movies without any questions?
moviebrowser.delete_info Delete files, please wait...
moviebrowser.delete_screenshot Delete screenshot?
moviebrowser.dir Path
@@ -1558,11 +1602,15 @@ moviebrowser.head_filter Filter movies by category:
moviebrowser.head_playlist Last played:
moviebrowser.head_recordlist Last recorded:
moviebrowser.hide_series Hide series
+moviebrowser.hint_copy_onefile
+moviebrowser.hint_copy_several
+moviebrowser.hint_cut
moviebrowser.hint_jumpbackward Jump back in 5 s\n '0' to cancel
moviebrowser.hint_jumpforward Jump forward in 5 s\n '0' to cancel
moviebrowser.hint_movieend Film end in 5 s\n '0' to cancel
moviebrowser.hint_newbook_backward New jump back\n 'blue' for endposition
moviebrowser.hint_newbook_forward New jump forward\n 'blue' for endposition
+moviebrowser.hint_truncate
moviebrowser.info_audio Audio
moviebrowser.info_channel Channel
moviebrowser.info_file File
@@ -1594,6 +1642,10 @@ moviebrowser.info_videoformat Picture
moviebrowser.last_play_max_items Number of lines last play
moviebrowser.last_record_max_items Number of lines last record
moviebrowser.load_default Load default settings
+moviebrowser.menu_copy_onefile Copy movie
+moviebrowser.menu_copy_several Copy and split movie
+moviebrowser.menu_cut Cut movie
+moviebrowser.menu_cut_head Copy, cut and truncate
moviebrowser.menu_directories_head Paths
moviebrowser.menu_help_head Help
moviebrowser.menu_main_bookmarks Bookmarks
@@ -1607,6 +1659,7 @@ moviebrowser.menu_parental_lock_head Parental Lock
moviebrowser.menu_parental_lock_rate_head Lock movies from
moviebrowser.menu_save Save changes
moviebrowser.menu_save_all Start update of movie info files
+moviebrowser.menu_truncate Truncate movie
moviebrowser.option_browser Browser Options
moviebrowser.reload_at_start Reload movie info at start
moviebrowser.remount_at_start Remount at start
@@ -1672,6 +1725,7 @@ moviebrowser.yt_recently_featured Recently featured
moviebrowser.yt_region Region
moviebrowser.yt_related Related videos
moviebrowser.yt_search Search keyword
+moviecut.cancel Cancel movie editing?
movieplayer.bookmark Bookmarks
movieplayer.bookmarkname Bookmarkname
movieplayer.bookmarkname_hint1 Enter a name for your new bookmark
@@ -2191,7 +2245,7 @@ timerlist.repeatcount repeats
timerlist.repeatcount.help1 amount of timer repeats
timerlist.repeatcount.help2 0 for unlimited repeats
timerlist.save Save timer
-timerlist.standby SB mode
+timerlist.standby Action
timerlist.standby.off Leave standby
timerlist.standby.on Enter standby
timerlist.stoptime Stop time
diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale
index f55ee681c..123687d45 100644
--- a/data/locale/nederlands.locale
+++ b/data/locale/nederlands.locale
@@ -10,7 +10,7 @@ EPGPlus.bypage_mode Per pagina
EPGPlus.head Programmagids overzicht (EPG Plus)
EPGPlus.next_bouquet Volgende favorietenlijst
EPGPlus.options Opties
-EPGPlus.page_down Pagina omlaag
+EPGPlus.page_down Pagina omlaag
EPGPlus.page_up Pagina omhoog
EPGPlus.prev_bouquet Vorige favorietenlijst
EPGPlus.record Opnemen
@@ -294,6 +294,7 @@ colormenusetup.menuhead Menu kop
colorstatusbar.text Infobalk
colorthememenu.head Selecteer thema
colorthememenu.head2 Thema's laden
+colorthememenu.menu_hints Hint box
colorthememenu.name Naam thema
colorthememenu.neutrino_theme Neutrino Thema
colorthememenu.question Geselecteerde thema gebruiken?
@@ -731,7 +732,7 @@ infoviewer.motor_moving Schotel positionering
infoviewer.next Volgende
infoviewer.nocurrent Geen informatie beschikbaar over huidige programma
infoviewer.noepg EPG is niet beschikbaar
-infoviewer.notavailable Kanaal niet beschikbaar
+infoviewer.notavailable Geen of slecht antennesignaal
infoviewer.now Nu
infoviewer.selecttime Tijd selectie
infoviewer.streaminfo Mogelijkheden
@@ -865,7 +866,7 @@ mainsettings.lcd Voorpaneel instellingen
mainsettings.manage Beheer instellingen
mainsettings.misc Diverse instellingen
mainsettings.multimedia Multimedia
-mainsettings.network Netwerk
+mainsettings.network Netwerk instellingen
mainsettings.osd OSD instellingen
mainsettings.recording Opnemen
mainsettings.savesettingsnow Instellingen opslaan
@@ -910,7 +911,6 @@ menu.hint_cec_mode CEC mode
menu.hint_cec_standby CEC stand-by
menu.hint_cec_view_on CEC view ingeschakeld
menu.hint_channellist_additional Extra informatie weergeven in hoofdvenster
-menu.hint_channellist_colored Gebruik andere kleur voor huidige of volgende programma
menu.hint_channellist_epg_align EPG evenement uitlijnen
menu.hint_channellist_extended Programma voortgang balk weergeven
menu.hint_channellist_fonts Verander lettertype grote kanalenlijst
@@ -928,6 +928,8 @@ menu.hint_clock_seconds Toon tijdsformaat met secondes
menu.hint_clock_size Stel grootte van de info klok in
menu.hint_clock_textcolor Configureer digit kleuren
menu.hint_color_gradient Schakel kleur verloop van menu items aan/uit
+menu.hint_colored_events Gebruik andere kleur voor huidige of volgende programma
+menu.hint_colored_events_textcolor Wijzig programma kleur voor gekleurde programma opties in kanalenlijst en infobalk.
menu.hint_colors Configureer GUI-kleuren
menu.hint_content_back Wijzig venster achtergrond kleur
menu.hint_content_textcolor Wijzig venster tekst kleur
@@ -945,7 +947,6 @@ menu.hint_epg_save Cached EPG informatie opslaan op opslagmedium \nen laad de in
menu.hint_epg_save_standby EPG opslaan in soft standby modus.
menu.hint_epg_scan Selecteer te scannen EPG-bouquetten, tijdens zap,\nalle of geselecteerde favorieten
menu.hint_epg_scan_mode Achtergrond EPG-scan door vrije tuner inschakelen
-menu.hint_event_textcolor Wijzig programma kleur voor gekleurde \nprogramma opties in kanalenlijst en infobalk.
menu.hint_eventlist_additional Toon additionale infos\nin mainbox
menu.hint_eventlist_fonts Wijzig lettertype grote in programma lijst
menu.hint_eventlist_setup Configureer eventlijst GUI opties
@@ -981,7 +982,6 @@ menu.hint_inet_radio Internet radio
menu.hint_info Informatie over firmware, ontvanger CPU,\nopslag en stream informatie
menu.hint_infobar_back Wijzig achtergrond kleur van de infobalk
menu.hint_infobar_casys Aan: display all with colored active, mini: single\nlocked icon, descreet: all active ca-sys
-menu.hint_infobar_colored_event Gebruik andere kleur voor huidige programma en komende programma
menu.hint_infobar_dd Dolbydigital icoon weergeven
menu.hint_infobar_filesys Gebruikte schijfruimte van Flashgeheugen en HDD weergeven
menu.hint_infobar_fonts Wijzig lettertype grote van de infobalk
@@ -1111,9 +1111,9 @@ menu.hint_net_proxypass Proxy wachtwoord\n(indien autorisatie vereist is)
menu.hint_net_proxyserver Proxy servernaam
menu.hint_net_proxyuser Proxy gebruikersnaam\n(indien autorisatie vereist is)
menu.hint_net_services Configureer netwerkdiensten\n(Telnet, FTP, uPNP)
-menu.hint_net_setupnow Huidige instellingen toepassen
-menu.hint_net_setuponstartup Start netwerk tijdens het opstarten
-menu.hint_net_show Huidige netwerk instellingen weergeven
+menu.hint_net_setupnow Netwerk herstarten
+menu.hint_net_setuponstartup Netwerk interface
+menu.hint_net_show Netwerk instellingen weergeven
menu.hint_net_ssid SSID van draadloos netwerk waarmee u \nverbinding wilt maken invoeren
menu.hint_net_ssid_scan Zoek beschikbare WLAN netwerken
menu.hint_net_telnet Telnet login op uw ontvanger inschakelen
@@ -1353,11 +1353,13 @@ messagebox.no Nee
messagebox.ok Ok
messagebox.yes Ja
miscsettings.channellist Kanalenlijst
-miscsettings.channellist_colored_events Gekleurde programma's
miscsettings.channellist_epgtext_align Uitlijning programma tekst
+miscsettings.colored_events Gekleurde programma's
miscsettings.colored_events_0 Geen
miscsettings.colored_events_1 Huidige
miscsettings.colored_events_2 Straks
+miscsettings.colored_events_channellist In Kanalenlijst
+miscsettings.colored_events_infobar In Informatiebalk
miscsettings.energy Energie
miscsettings.epg_cache EPG-Cache (Dagen)
miscsettings.epg_cache_hint1 Hoe ver in de toekomst wordt EPG informatie bewaard.
@@ -1389,15 +1391,14 @@ miscsettings.infobar Infobalk
miscsettings.infobar_casystem_display CA-System weergeven
miscsettings.infobar_casystem_mini mini
miscsettings.infobar_casystem_mode discreet
-miscsettings.infobar_colored_events Gekleurde programma's
-miscsettings.infobar_disp_0 Zonder Logo
-miscsettings.infobar_disp_1 Logo in nummerbox
-miscsettings.infobar_disp_2 Logo + kanaalnummer
-miscsettings.infobar_disp_3 Logo + kanaalnaam + signaal
-miscsettings.infobar_disp_4 Logo + kanaalnaam/nummer
-miscsettings.infobar_disp_5 Logo + signaal
-miscsettings.infobar_disp_6 Logo + kanaalnummer + signaal
-miscsettings.infobar_disp_log Logo
+miscsettings.infobar_disp Logo display
+miscsettings.infobar_disp_0 Kanaalnaam [Kanaalnummer]
+miscsettings.infobar_disp_1 Kanaalnummer, Kanaalnaam [Logo]
+miscsettings.infobar_disp_2 Logo [Kanaalnummer]
+miscsettings.infobar_disp_3 Logo, Kanaalnaam [Signaal]
+miscsettings.infobar_disp_4 Logo, Kanaalnaam [Kanaalnummer]
+miscsettings.infobar_disp_5 Logo [Signaal]
+miscsettings.infobar_disp_6 Kanaalnummer, Logo [Signaal]
miscsettings.infobar_logo_hdd_dir Logo directory
miscsettings.infobar_sat_display Satelliet weergeven op de infobalk
miscsettings.infobar_show show Info wanneer EPG verandert
@@ -1666,18 +1667,18 @@ mpkey.subtitle Ondertitels
mpkey.time Tijd weergeven
networkmenu.apply_settings Wijzigingen worden toegepast...
networkmenu.apply_settings_now Wilt u de instellingen toepassen?
-networkmenu.broadcast Uitzending
+networkmenu.broadcast broadcast adres
networkmenu.dhcp DHCP
networkmenu.error_no_address Adres ontbreekt
networkmenu.gateway Standaard gateway
-networkmenu.hostname Hostname
+networkmenu.hostname Hostnaam
networkmenu.hostname_hint1 Hostnaam invoeren
networkmenu.hostname_hint2 Opnieuw opstarten na wijzigingen
networkmenu.inactive_network Netwerk inactief!
networkmenu.ipaddress IP adres
-networkmenu.mount Bewerk netwerk locaties
+networkmenu.mount Beheer netwerklocaties
networkmenu.nameserver Naamserver
-networkmenu.netmask Netmasker
+networkmenu.netmask Subnetmasker
networkmenu.ntpenable Synchronisatie via
networkmenu.ntprefresh NTP/DVB verversen
networkmenu.ntprefresh_hint1 NTP/DVB-Time-Sync in minuten
@@ -1685,20 +1686,20 @@ networkmenu.ntprefresh_hint2 Ontvanger dient herstart te worden of EPG gereset
networkmenu.ntpserver NTP-Server
networkmenu.ntpserver_hint1 NTP-Server voorbeeld: ntp1.ptb.de
networkmenu.ntpserver_hint2 Ontvanger dient herstart te worden of EPG gereset
-networkmenu.ntptitle Time-Synchronisatie
+networkmenu.ntptitle Tijd-Synchronisatie
networkmenu.password Pre-Shared Key (PSK)
networkmenu.reset_settings_now Wilt u de vorige instellingen herstellen?
networkmenu.select_if Interface
networkmenu.services Netwerk diensten
-networkmenu.setupnow Netwerk instellingen toepassen
-networkmenu.setuponstartup Netwerk bij het opstarten instellen
-networkmenu.show Actieve Netwerk instellingen weergeven
+networkmenu.setupnow Netwerk herstarten
+networkmenu.setuponstartup Netwerk interface
+networkmenu.show Netwerk instellingen tonen
networkmenu.ssid Netwerk naam (SSID)
-networkmenu.ssid_scan WLAN netwoek scan
+networkmenu.ssid_scan WLAN netwerk scan
networkmenu.ssid_scan_error Geen WLAN netwerken gevonden.
networkmenu.ssid_scan_wait WLAN netwerk scan is bezig...
-networkmenu.test Netwerk nu testen
-neutrino_starting Neutrino wordt opgestart...
+networkmenu.test Netwerktest uitvoeren
+neutrino_starting Een moment geduld a.u.b...
nfs.alreadymounted directory reeds gekoppeld
nfs.automount Koppelen tijdens het opstarten
nfs.dir directory/locatie
@@ -2024,7 +2025,7 @@ screenshot.tv TV resolutie
screenshot.video Video in de achtergrond
servicemenu.getplugins Herlaad plugins
servicemenu.getplugins_hint Plugins worden geladen,\nmoment geduld alstublieft.
-servicemenu.head Installatie
+servicemenu.head Installatie / Software update
servicemenu.imageinfo Firmware info
servicemenu.reload Herlaad kanalenlijst
servicemenu.reload_hint Kanalenlijst wordt geladen,\nmoment geduld alstublieft.
@@ -2239,7 +2240,7 @@ videomenu.pip PiP instelling
videomenu.pip_error PiP start mislukt
videomenu.saturation Verzadiging
videomenu.scart Scart
-videomenu.screensetup Scherm instellicingen
+videomenu.screensetup Scherm instellingen
videomenu.sdosd SD OSD
videomenu.sharpness Scherpheid
videomenu.tv-scart Video
diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale
index bc204ce83..cfbcba1a3 100644
--- a/data/locale/slovak.locale
+++ b/data/locale/slovak.locale
@@ -20,6 +20,8 @@ EPGPlus.scroll_mode pretáčanie
EPGPlus.stretch_mode rozšírenie
EPGPlus.swap_mode Zmena stránkovania
EPGPlus.view_mode Spôsob zobrazenia
+GENRE.ALL vypnuté
+GENRE.ARTS umelecké
GENRE.ARTS.0 umenie/kultúra
GENRE.ARTS.1 divadlo
GENRE.ARTS.10 umelecké/kultúrne maazíny
@@ -30,14 +32,16 @@ GENRE.ARTS.4 ľudové umenie
GENRE.ARTS.5 literatúra
GENRE.ARTS.6 film/kino
GENRE.ARTS.7 experimentálny film /video
-GENRE.ARTS.8 vysielanie/tlač
+GENRE.ARTS.8 prenosy/tlačovky
GENRE.ARTS.9 nové média
+GENRE.CHILDRENs_PROGRAMMES detské
GENRE.CHILDRENs_PROGRAMMES.0 programy pre deti a mládež
GENRE.CHILDRENs_PROGRAMMES.1 programy pre deti predškolského veku
GENRE.CHILDRENs_PROGRAMMES.2 zábavné programy pre ľudí vo veku 6 – 14 rokov
GENRE.CHILDRENs_PROGRAMMES.3 zábavné programy pre ľudí vo veku 10 – 16 rokov
GENRE.CHILDRENs_PROGRAMMES.4 informačné a náučné školské programy
GENRE.CHILDRENs_PROGRAMMES.5 animované programy
+GENRE.DOCUS_MAGAZINES dokumentárne
GENRE.DOCUS_MAGAZINES.0 dokumenty/magazíny
GENRE.DOCUS_MAGAZINES.1 príroda/zvieratá/životné prostredie
GENRE.DOCUS_MAGAZINES.2 technológie/prírodné vedy
@@ -46,6 +50,7 @@ GENRE.DOCUS_MAGAZINES.4 zahraničie/výpravy
GENRE.DOCUS_MAGAZINES.5 spoločenské/humanitné vedy
GENRE.DOCUS_MAGAZINES.6 osveta
GENRE.DOCUS_MAGAZINES.7 jazyky
+GENRE.MOVIE filmové
GENRE.MOVIE.0 kinofilm/dráma
GENRE.MOVIE.1 kriminálny/napínavý
GENRE.MOVIE.2 dobrodružný/western/vojenský
@@ -55,6 +60,7 @@ GENRE.MOVIE.5 telenovela/melodráma/folklór
GENRE.MOVIE.6 romantika
GENRE.MOVIE.7 vážna dráma/klasika/náboženský/historický
GENRE.MOVIE.8 filmy pre dospelých
+GENRE.MUSIC_DANCE hudobné
GENRE.MUSIC_DANCE.0 hudba/tanec
GENRE.MUSIC_DANCE.1 rock/pop
GENRE.MUSIC_DANCE.2 vážna/klasická hudba
@@ -62,24 +68,28 @@ GENRE.MUSIC_DANCE.3 národná/ľudová hudba
GENRE.MUSIC_DANCE.4 jazz
GENRE.MUSIC_DANCE.5 muzikál/opera
GENRE.MUSIC_DANCE.6 balet
+GENRE.NEWS spravodajské
GENRE.NEWS.0 správy
GENRE.NEWS.1 správy/počasie
GENRE.NEWS.2 spravodajský magazín
GENRE.NEWS.3 dokument
GENRE.NEWS.4 diskusia/rozhovor/rokovanie
+GENRE.SHOW estrádne
GENRE.SHOW.0 estráda/telehra
GENRE.SHOW.1 telehra/kvíz/súťaž
GENRE.SHOW.2 varieté
GENRE.SHOW.3 debata
+GENRE.SOCIAL_POLITICAL spoločenské
GENRE.SOCIAL_POLITICAL.0 spoločenské a politické udalosti/obchod
GENRE.SOCIAL_POLITICAL.1 magazíny/reportáže/dokumenty
GENRE.SOCIAL_POLITICAL.2 ekonomické/spoločenské poradenstvo
GENRE.SOCIAL_POLITICAL.3 významný ľudia
+GENRE.SPORTS športové
GENRE.SPORTS.0 šport
GENRE.SPORTS.1 mimoriadne udalosti (olimpiady, majstrovstvá sveta...)
GENRE.SPORTS.10 jazdectvo
-GENRE.SPORTS.11 vojenské športy
-GENRE.SPORTS.2 športové magazíny
+GENRE.SPORTS.11 vojenský šport
+GENRE.SPORTS.2 športový magazín
GENRE.SPORTS.3 futbal
GENRE.SPORTS.4 tenis
GENRE.SPORTS.5 skupinové športy
@@ -87,6 +97,7 @@ GENRE.SPORTS.6 atletika
GENRE.SPORTS.7 motorizmus
GENRE.SPORTS.8 vodné športy
GENRE.SPORTS.9 zimné športy
+GENRE.TRAVEL_HOBBIES voľné chvíle
GENRE.TRAVEL_HOBBIES.0 cestovanie a odych
GENRE.TRAVEL_HOBBIES.1 turistika/cestovanie
GENRE.TRAVEL_HOBBIES.2 plavba
@@ -173,7 +184,6 @@ audioplayer.receiving_list Načítavam zoznam, čakaj...
audioplayer.repeat_on Spusti režim opakovania
audioplayer.rewind pretoč dozadu
audioplayer.save_playlist ulož zoznam
-audioplayer.screensaver_timeout Vypnutie obrazu (v minútach, 0=vypnuté)
audioplayer.select_title_by_name Vyber titul podľa názvu (SMS)
audioplayer.show_playlist Zobraz zoznam
audioplayer.shuffle náhodne
@@ -256,6 +266,7 @@ channellist.sats Satelity
channellist.show_channellogo Zobraziť logo staníc
channellist.show_channelnumber Zobraziť čísla kanála
channellist.show_empty_favs Zobraziť aj prázdne obľúbené
+channellist.show_infobox Zobraziť spodný InfoBox
channellist.since od
channellist.start spúšťa
ci.clock CI taktovanie (MHz)
@@ -267,8 +278,11 @@ ci.inserted Vložený modul do šachty
ci.removed Odstránený modul zo šachty
ci.reset Resetnúť
ci.reset_standby Resetovať po spustení
+ci.save_pincode Uložiť PIN kód
ci.settings Podmienený prístup
ci.timeout Čas čakania uplynul,\nvraciam sa do menu
+ci.tuner Použiť CI len s tunerom:
+ci.use Použiť CI
ci.waiting Čakám na odpoveď
clock_background Zobraziť pozadie
clock_seconds Zobraziť sekundy
@@ -276,6 +290,7 @@ clock_size_height Výška zobrazenia
clock_switch_off Skryť hodiny
clock_switch_on Zobraziť hodiny
color.gradient Farebný gradient
+color.gradient_c2c Farba farebného gradienta
colorchooser.alpha Priehľadnosť
colorchooser.blue Modrý
colorchooser.green Zelený
@@ -300,6 +315,7 @@ colormenusetup.menuhead Hlavička
colorstatusbar.text Text stavového riadku
colorthememenu.head Výber vzhľadu
colorthememenu.head2 Nahraj vzhľad
+colorthememenu.menu_hints Tipy boxu
colorthememenu.name Názov vzhľadu
colorthememenu.neutrino_theme Neutrino
colorthememenu.question Použiť vybraný vzhľad?
@@ -350,6 +366,8 @@ epgviewer.genre Žáner
epgviewer.length Dĺžka (min.)
epgviewer.nodetailed Detailné informácie sú nedostupné
epgviewer.notfound Nenájdené programové informácie (EPG)
+eventfinder.fsk Filtrovať vek
+eventfinder.genre Filtrovať žáner
eventfinder.head Hľadaj v EPG
eventfinder.history Hľadať históriu
eventfinder.keyword Slovo
@@ -569,9 +587,11 @@ flashupdate.copy_image Kopítrovať Image do hlavnej pamäte
flashupdate.createimage Uložiť Image
flashupdate.createimage_add_env Pridať "env"
flashupdate.createimage_add_kernel Pridať "kernel"
+flashupdate.createimage_add_root1 Pridať "root1"
flashupdate.createimage_add_spare Pridať "spare"
flashupdate.createimage_add_u_boot Pridať "u-boot"
flashupdate.createimage_add_uldr Pridať "uldr"
+flashupdate.createimage_add_var Pridať "var"
flashupdate.createimage_menu Uložiť aktuálny softvér
flashupdate.createimage_options Nastavenia
flashupdate.createimage_other Vytvorenie Image pre %s STB
@@ -687,6 +707,14 @@ fontsize.menu_hint Popis menu
fontsize.menu_info Informačné menu
fontsize.menu_title Titulok menu
fontsize.subtitles Text titulkov
+fsk.all Vypnuté
+fsk.from_12 od 12
+fsk.from_16 od 16
+fsk.from_18 od 18
+fsk.from_7 od 7
+fsk.to_12 do 12
+fsk.to_16 do 16
+fsk.to_7 do 7
hdd_10min 10 minút
hdd_1min 1 minúta
hdd_20min 20 minút
@@ -844,6 +872,9 @@ lua.boolparam_deprecated3 pre Boolean parameter je zastarané.\n
lua.function_deprecated1 Upozornenie!
lua.function_deprecated2 Funkcia
lua.function_deprecated3 je kritická,\n prosím použiť
+lua.parameter_deprecated2 Parameter
+lua.versionscheck1 Vaša Lua API veryia je zastaralá
+lua.versionscheck2 Je vyžadovaná novšia
mainmenu.audioplayer Prehrávač hudby
mainmenu.channels Zoznam kanálov
mainmenu.clearsectionsd Vyčistenie EPG zachytávania
@@ -888,6 +919,7 @@ menu.back späť
menu.cancel zrušiť
menu.hint_a_pic Nastavenie prehrávača hudby a obrázkového prehliadača
menu.hint_aplay Prehrávanie zvukových súborov
+menu.hint_aplay_setup Zmena zobrazenia titulu, východzieho adresára, šetriča a ďaľšieho
menu.hint_audio Audio výstup, DD, SRS TrueVolume \nVoľby
menu.hint_audio_adjust_vol_ac3 Špecifické nastavenie hlasitosti pre AC3 prúdy
menu.hint_audio_adjust_vol_clear Vyčistenie všetkých uložených hodnôt pre PCM a AC3 prúdy
@@ -901,7 +933,7 @@ menu.hint_audio_srs SRS TruVolume ovládanie hlasitosti \npoužitím zmien obsah
menu.hint_audio_srs_algo Účinnosť ovládania, jemná alebo klasická
menu.hint_audio_srs_nmgr Potlačovač šumu
menu.hint_audio_srs_volume Referenčná úroveň citlivosti
-menu.hint_audio_volstart Vždy naství zvolenú hodnotu hlasitosti pri spustení
+menu.hint_audio_volstart Vždy nastaví zvolenú hodnotu hlasitosti pri spustení
menu.hint_audio_volstep Zvýšenie/zníženie kroku pre klávesy VOL +/-
menu.hint_audioplayer_defdir Prednastavený adresár prehrávača hudby
menu.hint_audioplayer_follow Pohyb vybraného ukazovateľa zoznamu prehrávania\nna aktuálne hrajúcu pieseň
@@ -910,7 +942,6 @@ menu.hint_audioplayer_order Zmena triedenia zonamu prehrávania
menu.hint_audioplayer_playlist Zobrazenie položiek zoznamu prehrávania
menu.hint_audioplayer_repeat Použiť opakovanie zoznamu prehrávania pri dosiahnutí konca
menu.hint_audioplayer_sc_metadata Použije extrakciu meta-dát z prehrávaného zvuku
-menu.hint_audioplayer_screensaver Nastavenie času šetriča, v minútach
menu.hint_audioplayer_title Použije SMS štýl vyhľadávania titulov v zozname prehrávania
menu.hint_auto_lang Automatické prepnutie zvuku na preferovaný jazyk
menu.hint_auto_subs Automatické spustenie titulkov pre preferovaný jazyk
@@ -925,7 +956,6 @@ menu.hint_cec_mode CEC režim
menu.hint_cec_standby Ováldanie externými CEC príkazami v pripravenosti
menu.hint_cec_view_on Ovládanie externými CEC príkazami pri sledovaní
menu.hint_channellist_additional Zobrazenie doplnkových informácií\nv hlavnom boxe
-menu.hint_channellist_colored Použitie rozdielnej farby pre aktuálnu a nasledujúcu udalosť
menu.hint_channellist_epg_align Zarovnanie EPG udalostí
menu.hint_channellist_extended Grafické zobrazenie aktuálnej udalosti
menu.hint_channellist_fonts Zmena veľkosti písma zoznamu kanálov
@@ -936,6 +966,7 @@ menu.hint_channellist_setup Konfigurácia GUI volieb zonamu kanálov
menu.hint_channellist_show_channellogo Zobrazenie loga staníc v zozname kanálov
menu.hint_channellist_show_channelnumber Zobrazenie čísla kanála v zozname kanálov
menu.hint_channellist_show_empty_favs Zobrazenie / skrytie prázdnych buketov v obľúbených
+menu.hint_channellist_show_infobox Zobrazenie / skrytie dolneho InfoBoxu zo zoznamu kanálov
menu.hint_channels Otvorí zoznam kanálov
menu.hint_ci Nastavovacie menu podmieneného pristupu\npre váš CI CAM alebo vloženú Conax kartu
menu.hint_clock_background Zobrazenie hodín s farbami témy vzhľadu
@@ -944,6 +975,9 @@ menu.hint_clock_seconds Zobraenie formátu času so sekundami
menu.hint_clock_size Nastavenie veľkosti informačných hodín.
menu.hint_clock_textcolor Nastavenie ferieb číslic
menu.hint_color_gradient Prepne farebné prechody pre rôzne položky ponuky Zap/Vyp
+menu.hint_color_gradient_c2c Prepne prechody medzi 2 farbami a jednofarebným gradientom
+menu.hint_colored_events Použije inú farbu pre aktuálnu alebo ďaľšiu udalosť
+menu.hint_colored_events_textcolor Zmena farby pre farebné udalosti v zozname kanálov a infolištu
menu.hint_colors Konfigurácia farieb GUI
menu.hint_content_back Zmena farby podkladu GUI okna
menu.hint_content_textcolor Zmena farby textu GUI okna
@@ -960,10 +994,10 @@ menu.hint_epg_old_events Hodiny po skončení udalosti aby sa označilo\nako sta
menu.hint_epg_read Načíta uložené EPG údaje po zavedení z externého zariadenia
menu.hint_epg_save Uloženie zachyteného EPG na disk alebo usb\na načítanie po spustení
menu.hint_epg_save_frequently Uloženie zachyteného EPG v pravidelných intervaloch na externé zariadenie
+menu.hint_epg_save_mode Kešovať EPG len pre kanály prítomné v obľúbených buketoch
menu.hint_epg_save_standby Uloženie EPG v režime pripravenosti
menu.hint_epg_scan Povolenie prehľadávania EPG na pozadí ak je voľný tuner
menu.hint_epg_scan_mode Výber výsledku príjmača pre spustenie prehľadania EPG
-menu.hint_event_textcolor Zmena farby udalosti pre nastavenia farebnosti udalosti\nv zozname kanálov a stavovom riadku
menu.hint_eventlist_additional Zobrazí podrobnejšie informácie\nv hlavnom okne
menu.hint_eventlist_fonts Zmena veľkosti písma zoznamu udalostí
menu.hint_eventlist_setup Konfigurácia GUI volieb zoznamu udalostí
@@ -999,7 +1033,9 @@ menu.hint_inet_radio Internetové rádia
menu.hint_info Informácia o IMAGE, systéme, streame a podmienenom prístupe
menu.hint_infobar_back Zmena farby podkladu informačnej lišty
menu.hint_infobar_casys áno: zobrazí všetko farebne,\n CA mini: jedna ikona zámku, CA mód: len aktívne systémy, nie: nezobrazí
-menu.hint_infobar_colored_event Použije inú farbu pre aktuálnu alebo nasledujúcu udalosť
+menu.hint_infobar_casys_color Zmena farby pozadia CA-Systému
+menu.hint_infobar_casys_dotmatrix Ihličkový CA-Systém v pozadí
+menu.hint_infobar_casys_frame áno: CA-Systém s rámom
menu.hint_infobar_dd Zobrazenie DolbyDigital ikony
menu.hint_infobar_filesys Zobrazenie úrovne obsadenia pamäte a disku
menu.hint_infobar_fonts Zmena veľkosti fontu informačnej lišty
@@ -1104,6 +1140,7 @@ menu.hint_misc_filebrowser Kódovanie súborového systemu, oprávnenia súboru,
menu.hint_misc_general Spustenie do pripravenosti, zachytávanie teletextu, hdd adresár doplnkov,\núroveň debugovania
menu.hint_misc_zapit Východzie TV/Radio kanály
menu.hint_movie Prehrávanie filmov
+menu.hint_moviebrowser_setup Nastavenie výberu a volieb zobrazenia.
menu.hint_movieplayer_plugin Výber doplnku pre overenie s jedným potvrdením klávesy v režime prehrávača
menu.hint_net_broadcast Zadanie adresy vysielania, ak netušíte použite IP adresu s koncom .255
menu.hint_net_dhcp Použije DHCP server pre automatickú konfiguráciu
@@ -1140,6 +1177,8 @@ menu.hint_net_ushare Zdielanie pripojeného HDD cez uPnp
menu.hint_net_xupnpd Zdielanie "Živých kanálov" cez uPnp
menu.hint_network IP adresa, brána, DNS, Synch. času\nSieťové zdielanie a služby
menu.hint_new_zap_mode Povoliť prepnutie kanála počas prehliadania\n(prepnuť režim s 'MUTE' v zozname kanálov)
+menu.hint_next Pokračovať na ďaľšie menu\nStlačenie MENU tlačítka zatvorí všetky ponuky
+menu.hint_next_brief Pokračovať na ďaľšej ponuke
menu.hint_numeric_adjust Nastavenie režimu zoznamu kanálov na číselné prepnutie
menu.hint_opkg Inštalovať alebo aktualizovať programové balíčky
menu.hint_opkg_upgrade Aktualizuje všetky inštalované balíčky na poslednú dostupnú verziu
@@ -1155,6 +1194,7 @@ menu.hint_parentallock_prompt Konfigurácia keď sa Neutrino opýta na PIN kód
menu.hint_personalize Povolenie/zakázanie alebo Položky menu zabezpečenia\nKonfigurácia farebných tlačítok uživateľských ponúk
menu.hint_pictureviewer_defdir Východzí adresár prehliadača obrázkov
menu.hint_pictureviewer_scaling Algoritmus mierky obrázku
+menu.hint_pictureviewer_setup Konfigurácia správania sa prehliadača obrázkov
menu.hint_pictureviewer_slide_time Interval zmeny obrázka, v sekundách
menu.hint_picview Sledovanie obrázkov
menu.hint_plugin_type_games Zobrazí hry v uživateľskom menu pri výbere 'Typy doplnkov'
@@ -1287,6 +1327,10 @@ menu.hint_scan_usalsall Nastavenie USALS označenia pre všetky satelity
menu.hint_scan_useusals Použije USALS pre\ntento satelit
menu.hint_scrambled_message Zobrazenie správy kódovania, pokiaľ kanál nebol dekódovaný
menu.hint_screen_setup Konfigurácia okrajov obrazu
+menu.hint_screensaver_delay Nastavte čas (v minútach), po ktorom sa šetrič obrazovky spustí alebo vypne
+menu.hint_screensaver_dir Vyberte adresár v ktorom sa šetrič obrazovky spustí
+menu.hint_screensaver_setup Konfigurácia možností šetríča obrazovky pre zvukový prehrávač a rádio režim
+menu.hint_screensaver_timeout Zvoľte časový interval zmeny obrazovky v šetriči obrazovky
menu.hint_screenshot_count Pokiaľ žiadny GUI na obrazovke, môže byť uložených 1-5\nsériových zosnímaní
menu.hint_screenshot_cover ZAP: Pokiaľ prehráva nahrávky, prepíše jedno\nzachytenie do zobrazenia v Prehliadači filmov
menu.hint_screenshot_dir Výber adresára pre uloženie zachyteného obrázku
@@ -1363,6 +1407,7 @@ menu.hint_volume_size Výber výšky indikátora hlasitosti
menu.hint_webtv_setup Tu nakonfigurované WebTV kanály budú k dispozícii v štandartnom zozname kanálov
menu.hint_window_size Zoznam kanálov, EPG-Infp a niektoré iné okná sú zmenšené týmto faktorom
menu.hint_ytplay Prehrávanie vybraných youtube videí
+menu.hint_ytplay_setup Konfigurácia špecifických možností YouTube, napr. horná hranica výsledkov vyhľadávania
menu.hint_zap_cycle Pri prepínaní kanálov zotrvať v aktuálnom bukete
menu.next ďaľej (MENU ukončí)
messagebox.back späť
@@ -1374,11 +1419,13 @@ messagebox.no nie
messagebox.ok ok
messagebox.yes áno
miscsettings.channellist Nastavenia zoznamu kanálov
-miscsettings.channellist_colored_events Udalosť farebne
miscsettings.channellist_epgtext_align Zarovnaj EPG text
+miscsettings.colored_events Farebnosť udalostí
miscsettings.colored_events_0 žiadny
miscsettings.colored_events_1 aktuálny
miscsettings.colored_events_2 nasledujúci
+miscsettings.colored_events_channellist V zozname kanálov
+miscsettings.colored_events_infobar V info lište
miscsettings.energy Energia
miscsettings.epg_cache Zachytávanie EPG (dni)
miscsettings.epg_cache_hint1 Ako dlho uchovávať dáta EPG v budúcnosti?
@@ -1397,6 +1444,7 @@ miscsettings.epg_old_events_hint2 Nastavenie v hodinách.
miscsettings.epg_read Obnoviť EPG pri zavádzaní
miscsettings.epg_save Ulož/Obnov EPG po reštarte
miscsettings.epg_save_frequently Periodické ukladanie EPG
+miscsettings.epg_save_mode Len obľúbené
miscsettings.epg_save_standby Ulož EPG pri soft standby
miscsettings.epg_scan Prehľadávanie EPG
miscsettings.epg_scan_always Vždy
@@ -1410,9 +1458,11 @@ miscsettings.general Hlavné nastavenia
miscsettings.head Rôzne nastavenia
miscsettings.infobar Inforiadok
miscsettings.infobar_casystem_display Zobrazenie CA-Systému
+miscsettings.infobar_casystem_dotmatrix Ihličkové zobrazenie CA
+miscsettings.infobar_casystem_frame Orámované zobrazenie CA
miscsettings.infobar_casystem_mini CA mini
miscsettings.infobar_casystem_mode CA mód
-miscsettings.infobar_colored_events Farebné udalosti
+miscsettings.infobar_disp Zobrazovanie loga
miscsettings.infobar_disp_0 bez Loga
miscsettings.infobar_disp_1 Logo v číselnom boxe
miscsettings.infobar_disp_2 Logo+číslo kanála
@@ -1420,7 +1470,8 @@ miscsettings.infobar_disp_3 Logo+názov kanála+signál
miscsettings.infobar_disp_4 Logo+názov+číslo kanála
miscsettings.infobar_disp_5 Logo+signál
miscsettings.infobar_disp_6 Logo+číslo kanála+signál
-miscsettings.infobar_disp_log len Logo
+miscsettings.infobar_gradient_bottom Spodok gradientu
+miscsettings.infobar_gradient_top Vrch gradientu
miscsettings.infobar_logo_hdd_dir Adresár loga
miscsettings.infobar_sat_display Zobrazenie satelitu v stavovom riadku
miscsettings.infobar_show Zobraziť Info pri zmene EPG
@@ -1508,6 +1559,7 @@ moviebrowser.book_movieend Koniec filmu:
moviebrowser.book_moviestart Žačiatok filmu:
moviebrowser.book_name Názov:
moviebrowser.book_new Nová záložka
+moviebrowser.book_no_end Nedefinovaný koniec záložky
moviebrowser.book_position Pozícia:
moviebrowser.book_type Skok (<0 vzad , >0 vpred):
moviebrowser.book_type_backward Opakovať
@@ -1518,7 +1570,16 @@ moviebrowser.browser_row_item Položka stĺpca
moviebrowser.browser_row_nr Počet stĺpcov
moviebrowser.browser_row_width Šírka stĺpca [%]
moviebrowser.cache_dir Adresár cache
+moviebrowser.copies Kopírovať skoky z filmu do nových súborov?
+moviebrowser.copy Kopírovať skoky z filmu do nového súboru?
+moviebrowser.copy_failed Kopírovanie zlyhalo, je tam skok záložiek a dostatok voľného miesta?
+moviebrowser.copying Kopírovanie, prosím čakajte ...
+moviebrowser.cut Vystrihnúť skoky z filmu?
+moviebrowser.cut_failed Vystrihovanie zlyhalo, je tam skok záložiek a dostatok voľného miesta?
+moviebrowser.cutting Strihanie, prosím čakajte ...
+moviebrowser.delete_all Zmazať všetky vybrané filmy bez akýchkoľvek otázok?
moviebrowser.delete_info Mazanie súborov, prosim čakajte...
+moviebrowser.delete_screenshot Zmazať obrázok obrazovky?
moviebrowser.dir Adresár
moviebrowser.dir_head Doplnkové adresáre
moviebrowser.edit_book Zmeň záložku
@@ -1541,11 +1602,15 @@ moviebrowser.head_filter Filtrovanie filmov podľa kategórie:
moviebrowser.head_playlist Posledné pustený:
moviebrowser.head_recordlist Posledne nahraný:
moviebrowser.hide_series Skryť serialy
+moviebrowser.hint_copy_onefile 11111
+moviebrowser.hint_copy_several 22222
+moviebrowser.hint_cut 33333
moviebrowser.hint_jumpbackward Skok vzad o 5s\n '0' zruš
moviebrowser.hint_jumpforward Skok vpred o 5s\n '0' zruš
moviebrowser.hint_movieend Ukončenie sledovania za 5 s\n '0' zruš
moviebrowser.hint_newbook_backward Nový skok vzad \n 'MODRÝ' na koniec
moviebrowser.hint_newbook_forward Nový skok vpred\n 'MODRÝ' na koniec
+moviebrowser.hint_truncate 44444
moviebrowser.info_audio Zvuk
moviebrowser.info_channel Kanál
moviebrowser.info_file Súbor
@@ -1555,6 +1620,7 @@ moviebrowser.info_genre_minor Vedľajší žáner
moviebrowser.info_head Informácia o filme
moviebrowser.info_head_update Ulož zmeny vo všetkých informačných súboroch filmu
moviebrowser.info_info1 Info 1
+moviebrowser.info_info2 Info 2
moviebrowser.info_length Dĺžka (Min)
moviebrowser.info_parental_lockage Rodičovský zámok
moviebrowser.info_parental_lockage_0year vždy
@@ -1576,6 +1642,10 @@ moviebrowser.info_videoformat Obraz
moviebrowser.last_play_max_items Počet liniek posledného prehrávania
moviebrowser.last_record_max_items Počet liniek posledného nahrávania
moviebrowser.load_default Nahrať prednastavené nastavenia
+moviebrowser.menu_copy_onefile Kopírovať film
+moviebrowser.menu_copy_several Kopírovať a rozdeliť film
+moviebrowser.menu_cut Vystrihnúť film
+moviebrowser.menu_cut_head Kopírovať, vystrihnúť a skrátiť
moviebrowser.menu_directories_head Adresáre
moviebrowser.menu_help_head Nápoveda
moviebrowser.menu_main_bookmarks Záložky
@@ -1589,6 +1659,7 @@ moviebrowser.menu_parental_lock_head Blokovanie
moviebrowser.menu_parental_lock_rate_head Blokovať film z ...
moviebrowser.menu_save Ulož zmeny
moviebrowser.menu_save_all Spusti aktualizáciu informácií o súbore
+moviebrowser.menu_truncate Skrátiť film
moviebrowser.option_browser Možnosti prehliadača
moviebrowser.reload_at_start Načítanie informácie o filme pri štarte
moviebrowser.remount_at_start Pripoj pri štarte
@@ -1618,6 +1689,10 @@ moviebrowser.short_size Veľkosť
moviebrowser.short_title Titul
moviebrowser.start_head Pozerať film od:
moviebrowser.start_record_start Začiatok filmu
+moviebrowser.truncate Orezať film?
+moviebrowser.truncate_failed Orezanie zlyhalo.
+moviebrowser.truncate_failed_playing Nemožné orezať prehrávanie filmu.
+moviebrowser.truncating Orezávanie, čakajte prosím ...
moviebrowser.ts_only Zobraziť iba nahrávky
moviebrowser.update_if_dest_empty_only Kopírovať len ak je cieľové miesto prázdne
moviebrowser.use_dir Použi adresár
@@ -1650,6 +1725,7 @@ moviebrowser.yt_recently_featured Nedávno odporúčané
moviebrowser.yt_region Región
moviebrowser.yt_related Podobné videá
moviebrowser.yt_search Hľadať slovo
+moviecut.cancel Zrušiť editovanie filmu?
movieplayer.bookmark Záložky
movieplayer.bookmarkname Názov záložky
movieplayer.bookmarkname_hint1 Vloženie názvu
@@ -2038,6 +2114,11 @@ scants.startnow Spusti prehľadávanie
scants.test Otestovanie signálu
scants.transponders Transpondéry:
scrambled_channel Kódovaný kanál
+screensaver.delay Oneskorenie
+screensaver.dir Adresár
+screensaver.menu Šetrič obrazovky
+screensaver.off Vypnutie šetriča
+screensaver.timeout Zmena obrázkov
screensetup.lowerright zelený = dolný, pravý okraj
screensetup.upperleft červený = horný, ľavý oraj
screenshot.count Počet
@@ -2098,7 +2179,7 @@ streaminfo.framerate Snímková rýchlosť
streaminfo.framerate_unknown Snímková rýchlosť: neznáma
streaminfo.head Technické informácie
streaminfo.not_available nedostupné
-streaminfo.resolution Rolíšenie
+streaminfo.resolution Rozlíšenie
streaminfo.signal Parametre signálu
streaming.busy Nahrávací proces aktívny.\nAk sa správa zobrazuje a nie je nič nahrávané,\nreštartujte Neutrino.
streaming.dir_not_writable Do nahrávacieho adresára nie je možné nahrávať.\nNahrávanie nebude pracovať.
@@ -2109,7 +2190,6 @@ stringinput.backspace Naspäť
stringinput.caps veľké/malé znaky
stringinput.clear všetko zmaž
stringinput.insert Vložiť
-stringinput.layout Rozloženie
stringinput.save Uložiť
subtitles.charset Znaková sada
subtitles.head Titulky
diff --git a/data/locale/unmaintained/polski.locale b/data/locale/unmaintained/polski.locale
index 1f6d1e0dc..d98f24acd 100644
--- a/data/locale/unmaintained/polski.locale
+++ b/data/locale/unmaintained/polski.locale
@@ -2,11 +2,11 @@ AUDIOSelectMenue.head Ścieżka audio i napisy
EPGMenu.epgplus Multi EPG
EPGMenu.eventinfo Opis programu
EPGMenu.eventlist Lista programów
-EPGMenu.head EPG
+EPGMenu.head Informacja o programie - EPG
EPGMenu.streaminfo Informacje o strumieniu
EPGPlus.actions Akcje
-EPGPlus.bybouquet_mode bukietami
-EPGPlus.bypage_mode stronami
+EPGPlus.bybouquet_mode wg bukietów
+EPGPlus.bypage_mode wg stron
EPGPlus.head Multi EPG
EPGPlus.next_bouquet Następny bukiet
EPGPlus.options Opcje
@@ -15,7 +15,7 @@ EPGPlus.page_up Następna strona
EPGPlus.prev_bouquet Poprzedni bukiet
EPGPlus.record Nagraj
EPGPlus.refresh_epg Odśwież
-EPGPlus.remind Przełącz
+EPGPlus.remind Przełącz
EPGPlus.scroll_mode przewijanie
EPGPlus.stretch_mode rozciąganie
EPGPlus.swap_mode Rodzaj przewijania
@@ -54,7 +54,7 @@ GENRE.MOVIE.4 komedia
GENRE.MOVIE.5 opera mydlana/melodramat/folklor
GENRE.MOVIE.6 film romantyczny
GENRE.MOVIE.7 film/dramat poważny/klasyczny/religijny/historyczny
-GENRE.MOVIE.8 film/dramat dla dorosłych
+GENRE.MOVIE.8 film dla dorosłych/dramat
GENRE.MUSIC_DANCE.0 muzyka/balet/taniec
GENRE.MUSIC_DANCE.1 rock/pop
GENRE.MUSIC_DANCE.2 muzyka poważna/klasyczna
@@ -68,7 +68,7 @@ GENRE.NEWS.2 magazyn informacyjny
GENRE.NEWS.3 dokument
GENRE.NEWS.4 dyskusja/wywiad/debata
GENRE.SHOW.0 widowisko / teleturniej
-GENRE.SHOW.1 teleturniej/kwiz
+GENRE.SHOW.1 teleturniej/quiz
GENRE.SHOW.2 rewia
GENRE.SHOW.3 talk-show
GENRE.SOCIAL_POLITICAL.0 wydarzenia społeczne i polityczne / gospodarka
@@ -96,11 +96,13 @@ GENRE.TRAVEL_HOBBIES.5 gotowanie
GENRE.TRAVEL_HOBBIES.6 zakupy
GENRE.TRAVEL_HOBBIES.7 ogród
GENRE.UNKNOWN nieznana kategoria
+adzap AdZap
apidselector.head Ścieżka audio i napisy
-audio.srs_algo Rodzaj algorytmu
-audio.srs_algo_light lekki
+audio.srs_algo Typ
+audio.srs_algo_heavy mocny
+audio.srs_algo_light słaby
audio.srs_algo_normal normalny
-audio.srs_iq Algorytm SRS TruVolume
+audio.srs_iq Głośność rzeczywista
audio.srs_nmgr Zarządzanie głośnością
audio.srs_volume Głośność początkowa
audiomenu.PCMOffset Zmniejszenie głośności PCM
@@ -110,9 +112,12 @@ audiomenu.auto_lang Automatyczny wybór ścieżki audio
audiomenu.auto_subs Automatyczny wybór napisów
audiomenu.avs avs
audiomenu.avsync Synchronizacja audio-wideo
-audiomenu.avsync_am główne audio
+audiomenu.avsync_am Główne audio
+audiomenu.clockrec Zegar nagrywania
audiomenu.dolbydigital Preferowanie ścieżki Dolby Digital
audiomenu.hdmi_dd Dolby Digital przez HDMI
+audiomenu.hdmi_dd_auto auto
+audiomenu.hdmi_dd_force wymuszony
audiomenu.monoleft mono lewy kanał
audiomenu.monoright mono prawy kanał
audiomenu.pref_lang Preferowany język audio
@@ -122,13 +127,19 @@ audiomenu.pref_subs Preferowany język napisów
audiomenu.pref_subs_head Preferencje napisów
audiomenu.spdif_dd Dolby Digital przez SPDIF
audiomenu.stereo stereo
+audiomenu.volume_adjust Regulacja głośności, w %
+audiomenu.volume_adjustment Regulacja głośności kanału
+audiomenu.volume_adjustment_ac3 AC-3 streams
+audiomenu.volume_adjustment_clear Wyczyść zapamiętrane wartości
+audiomenu.volume_adjustment_pcm PCM streams
+audiomenu.volume_start Głośność początkowa
audiomenu.volume_step Skok regulacji głośności
audioplayer.add Dodaj
audioplayer.add_ic Icecast
-audioplayer.add_loc Lokalna
+audioplayer.add_loc Lokalna lista
audioplayer.add_sc Shoutcast
audioplayer.artist_title wykonawca, tytuł
-audioplayer.building_search_index Tworzenie indeksu wyszukiwania...
+audioplayer.building_search_index Tworzenie indeksu wyszukiwania...
audioplayer.button_select_title_by_id wg ID
audioplayer.button_select_title_by_name wg nazwy
audioplayer.defdir Katalog startowy
@@ -140,11 +151,11 @@ audioplayer.fastforward Do przodu
audioplayer.follow Zaznaczanie odtwarzanego utworu
audioplayer.head Lista odtwarzania
audioplayer.highprio Wysoki priorytet dekodowania
-audioplayer.jump_backwards Skocz wstecz
+audioplayer.jump_backwards Skocz do tyłu
audioplayer.jump_dialog_hint1 Wpisz względną wartość,
audioplayer.jump_dialog_hint2 skoku wyrażoną w sekundach.
audioplayer.jump_dialog_title Przeskocz do...
-audioplayer.jump_forwards Skocz do przodu
+audioplayer.jump_forwards Skocz do przodu
audioplayer.keylevel Zmień funkcje przycisków
audioplayer.load_radio_stations Lista stacji internetowych
audioplayer.name Odtwarzacz audio
@@ -154,26 +165,24 @@ audioplayer.playing Bieżący utwór
audioplayer.playlist_fileerror_msg Nie można utworzyć pliku:
audioplayer.playlist_fileoverwrite_msg Czy chcesz nadpisać ten plik:
audioplayer.playlist_fileoverwrite_title Nadpisać?
-audioplayer.playlist_name Nazwa pliku listy odtwarzania
-audioplayer.playlist_name_hint1 Podaj nazwę pliku listy odtwarzania.
+audioplayer.playlist_name Nazwa pliku listy odtwarzania
+audioplayer.playlist_name_hint1 Podaj nazwę pliku listy odtwarzania.
audioplayer.playlist_name_hint2 Rozszerzenie "m3u" zostanie dodane automatycznie.
audioplayer.reading_files Odczytywanie meta-danych...
audioplayer.receiving_list Pobieranie listy stacji, proszę czekać...
audioplayer.repeat_on Tryb powtarzania
audioplayer.rewind Do tyłu
audioplayer.save_playlist Zapisz listę odtw.
-audioplayer.screensaver_timeout Wygaszacz ekranu (min, 0-wył)
audioplayer.select_title_by_name Wybieranie przez wpisywanie
audioplayer.show_playlist Pokazywanie listy odtwarzania
audioplayer.shuffle Sortuj losowo
-audioplayer.spectrum Analizator widma
+audioplayer.spectrum Analizator widma
audioplayer.stop Zatrzymaj
audioplayer.title_artist tytuł, wykonawca
-audioplayerpicsettings.general Przeglądarka i odtwarzacz audio
-bookmarkmanager.delete Usuń
-bookmarkmanager.name Zakładki
+bookmarkmanager.delete Usuń
+bookmarkmanager.name Zakładki
bookmarkmanager.rename Zmień nazwę
-bookmarkmanager.select Wybierz
+bookmarkmanager.select Wybierz
bouqueteditor.add Dodaj
bouqueteditor.bouquetname Nazwa bukietu
bouqueteditor.delete Usuń
@@ -182,6 +191,7 @@ bouqueteditor.discardingchanges Zmiany zostaną odrzucone. Proszę czekać...
bouqueteditor.hide Ukryj
bouqueteditor.lock Blokuj
bouqueteditor.move Przenieś
+bouqueteditor.move_to Przenieś do
bouqueteditor.name Zarządzanie bukietami
bouqueteditor.newbouquetname Nowa nazwa bukietu
bouqueteditor.rename Zmień nazwę
@@ -191,44 +201,91 @@ bouqueteditor.savingchanges Trwa zapisywanie zmian, proszę czekać...
bouqueteditor.switch dodaj/usuń kanał
bouqueteditor.switchmode TV / Radio
bouquetlist.head Bukiety
+bouquetname.hdtv Kanały HD
+bouquetname.new Nowe kanały
+bouquetname.other Nieznany dostawca
+bouquetname.removed Usunięte kanały
+bouquetname.webtv Kanały WebTV
+buildinfo.compiled_on Budowanie Hosta
+buildinfo.compiled_with Wersja kompilatora
+buildinfo.compiler_flags Flagi kompilatora
+buildinfo.creator Autor
+buildinfo.kernel Wersja kernela
+buildinfo.menu Informacje o kompilacji
cablesetup.provider Dostawca telewizji kablowej
+channellist.additional Dodatkowe informacje
+channellist.additional_off wył.
+channellist.additional_on wł.
+channellist.additional_on_minitv wł. (z MiniTV)
channellist.current_tp Bieżący transponder
channellist.edit Edycja
channellist.epgtext_align_left do lewej
channellist.epgtext_align_right do prawej
channellist.extended Pasek postępu
+channellist.extended_colored kolorowy pasek postepu
+channellist.extended_simple prosty pasek postpu
channellist.favs Ulubione
channellist.foot Informacje o kanale
channellist.foot_freq parametry
channellist.foot_next nast. audycja
channellist.foot_off wyłączone
-channellist.head Wszystkie kanały
+channellist.foot_sort_alpha sortowanie[alpha]
+channellist.foot_sort_chnum sortowanie[numer]
+channellist.foot_sort_freq sortowanie[freq]
+channellist.foot_sort_sat sortowanie[sat]
+channellist.head Wszystko
channellist.history Historia
+channellist.keep_numbers Stałe numery kanałów
channellist.make_hdlist Bukiet z kanałami HD
+channellist.make_newlist Utwórz listę z nowymi kanałami
+channellist.make_removedlist Utwórz listę z usuniętymi kanałami
+channellist.make_webtvlist Utwórz listę z kanałami WebTV
+channellist.new_zap_mode Szybki zapis listy
+channellist.new_zap_mode_active aktywny
+channellist.new_zap_mode_allow możliwy
+channellist.new_zap_mode_off wyłączony
channellist.nonefound Brak listy kanałów! Uruchom\nwyszukiwanie kanałów (Menu główne -> Usługi)
+channellist.numeric_adjust Ustaw według numerów
channellist.provs Dostawcy
+channellist.recording_not_possible Nagrywanie niemożliwe!
+channellist.remember Ostatnio używany
+channellist.reset_all Usuń flagę 'nowy' dla wszystkich kanałów
+channellist.reset_flags Usuwanie oznaczenia dla nowych kanałów
channellist.sats Satelity
+channellist.show_channellogo Pokaż loga kanałów
+channellist.show_channelnumber Pokaż numery kanałów
+channellist.show_empty_favs Pokaż puste bukiety
channellist.since od
channellist.start początek
+ci.clock CI taktowanie (Mhz)
ci.empty Brak modułu w gnieździe
+ci.ignore_msg Ignorowanie komunikatów CA
ci.init_failed Błąd podczas inicjalizacji
ci.init_ok Pomyślna inicjalizacja modułu
ci.inserted Moduł w gnieździe
ci.removed Usunięto moduł
ci.reset Reset
-ci.reset_standby Reset po wyjścu ze stanu gotowości
+ci.reset_standby Reset po wyjściu ze stanu gotowości
ci.settings Dostęp warunkowy
ci.timeout Przekroczony czas oczekiwania
ci.waiting Oczekiwanie na inicjalizację
+clock_background Pokaż tło
+clock_seconds Pokaż sekundy
+clock_size_height Rozmiar wyświetlania zegara
+clock_switch_off Zegar wył.
+clock_switch_on Zegar wł.
+color.gradient Kolor gradient
colorchooser.alpha Alfa
colorchooser.blue Niebieski
colorchooser.green Zielony
colorchooser.red Czerwony
colormenu.background Kolor tła
+colormenu.clock_textcolor Kolor zegara
+colormenu.contrast_fonts Kontrast fontów
colormenu.fade Zanikanie menu
colormenu.font Font OSD
colormenu.font_ttx Font teletekstu
-colormenu.hd_preset HD (LCD/PDP)
+colormenu.hd_preset LCD
colormenu.menucolors Kolory menu
colormenu.osd_preset Rodzaj TV
colormenu.sd_preset SD (CRT)
@@ -248,6 +305,10 @@ colorthememenu.question Zapisać aktualny motyw?
colorthememenu.save Zapis aktualnego motywu
colorthememenu.select1 Motywy użytkownika
colorthememenu.select2 Motywy standardowe
+cpu.freq Taktowanie procesora
+cpu.freq_default Domyślne taktowanie procesora
+cpu.freq_normal Normalne taktowanie procesora
+cpu.freq_standby Taktowanie procesora w stanie czuwania
date.Apr Kwi
date.Aug Sie
date.Dec Gru
@@ -267,62 +328,91 @@ date.Sun Ni
date.Thu Cz
date.Tue Wt
date.Wed Śr
+debug Wyjście debug
+debug.level Poziom
+debug.level_1 normalny
+debug.level_2 informacyjny
+debug.level_3 rozszerzony
+epg.saving Zapisywanie EPG
epgextended.actors Aktorzy
epgextended.director Reżyser
epgextended.guests Goście
epgextended.original_title Oryginalny tytuł
epgextended.presenter Prezenter
-epgextended.year_of_production Rok produkcji
+epgextended.year_of_production Rok produkcji
epglist.noevents Informacje EPG są niedostępne
epgviewer.More_Screenings Kolejne emisje na tym kanale
+epgviewer.More_Screenings_short Pokaż więcej
+epgviewer.age_rating Klasyfikacja wiekowa
+epgviewer.audio Audio
+epgviewer.genre Kategoria
+epgviewer.length Czas trwania (min.)
epgviewer.nodetailed Brak szczegółowych informacji
epgviewer.notfound Nie znaleziono informacji programowych (EPG)
eventfinder.head Szukaj w EPG
+eventfinder.history Szukaj w historii
eventfinder.keyword Szukana fraza
+eventfinder.max_history Maksymalna ilość wyników
eventfinder.search Szukaj
+eventfinder.search_all_epg Wszystko
eventfinder.search_within_epg Uwzględnij
eventfinder.search_within_list Przeszukaj
-eventfinder.searching Szukaj przy uzyciu klawiatury w epg...
-eventfinder.start_search Rozpocznij wyszukiwanie
+eventfinder.searching Szukaj przy użyciu klawiatury w epg...
+eventfinder.start_search Rozpocznij wyszukiwanie
+eventlist.additional Dodatkowe informacje
+eventlist.name Lista zdarzeń
eventlistbar.channelswitch Przełącz
eventlistbar.eventsort Sortuj
-eventlistbar.recordevent Nagraj
+eventlistbar.recordevent Nagraj
extra.add_to_bouquet Dodaj do bukietu
-extra.audio_run_player Przycisk audio rozpoczyna odtwarzanie
+extra.audio_run_player Przycisk audio rozpoczyna odtwarzanie
extra.auto_delete Kasowanie plików tymczasowych
extra.auto_timeshift Timeshift po (s, 0-wył)
-extra.bigwindows Duże okna
extra.cache_txt Buforowanie teletekstu
extra.chadded Obecny kanał został dodany do wybranego bukietu....\n
-extra.chalreadyinbq The current channel is already in selected bouquet....\n
+extra.chalreadyinbq Ten kanał jest już dodany do tego bukietu....\n
extra.dboxinfo Informacje o systemie
-extra.east wschód
+extra.dboxinfo_available Wolny
+extra.dboxinfo_boottime Boot
+extra.dboxinfo_filesystem Filesystem
+extra.dboxinfo_frontend Frontends
+extra.dboxinfo_load Obciążenie
+extra.dboxinfo_memory Pamięć
+extra.dboxinfo_ram RAM
+extra.dboxinfo_size Całkowita
+extra.dboxinfo_swap Swap
+extra.dboxinfo_time Czas
+extra.dboxinfo_timeformat %F, %H:%M:%S
+extra.dboxinfo_uptime Uptime
+extra.dboxinfo_use Urzycie
+extra.dboxinfo_used Wykorzystane
+extra.east Wschód
extra.fec_1_2 1/2
extra.fec_2_3 2/3
+extra.fec_2_5 2/5
extra.fec_3_4 3/4
+extra.fec_3_5 3/5
+extra.fec_4_5 4/5
extra.fec_5_6 5/6
extra.fec_7_8 7/8
-extra.fec_s2_8psk_1_2 1/2 S2 8PSK
-extra.fec_s2_8psk_2_3 2/3 S2 8PSK
-extra.fec_s2_8psk_3_4 3/4 S2 8PSK
-extra.fec_s2_8psk_3_5 3/5 S2 8PSK
-extra.fec_s2_8psk_4_5 4/5 S2 8PSK
-extra.fec_s2_8psk_5_6 5/6 S2 8PSK
-extra.fec_s2_8psk_7_8 7/8 S2 8PSK
-extra.fec_s2_8psk_8_9 8/9 S2 8PSK
-extra.fec_s2_8psk_9_10 9/10 S2 8PSK
-extra.fec_s2_qpsk_1_2 1/2 S2 QPSK
-extra.fec_s2_qpsk_2_3 2/3 S2 QPSK
-extra.fec_s2_qpsk_3_4 3/4 S2 QPSK
-extra.fec_s2_qpsk_3_5 3/5 S2 QPSK
-extra.fec_s2_qpsk_4_5 4/5 S2 QPSK
-extra.fec_s2_qpsk_5_6 5/6 S2 QPSK
-extra.fec_s2_qpsk_7_8 7/8 S2 QPSK
-extra.fec_s2_qpsk_8_9 8/9 S2 QPSK
-extra.fec_s2_qpsk_9_10 9/10 S2 QPSK
+extra.fec_8_9 8/9
+extra.fec_9_10 9/10
+extra.fec_auto Auto
+extra.key_current_transponder Aktualny transponder
+extra.key_format_mode Format wideo
+extra.key_help Pomoc
extra.key_list_end koniec
extra.key_list_start rozpocznij
+extra.key_next43mode Następne proporcje obrazu
+extra.key_pic_mode Format ekranu
+extra.key_pic_size Tryb 4:3
+extra.key_pip_close Stop/Start PiP
+extra.key_pip_setup Konfiguracja PiP
+extra.key_pip_swap Swap PiP/live
extra.key_plugin Przycisk wywołujący plugin
+extra.key_record Nagrywanie
+extra.key_screenshot Zrzut ekranu
+extra.key_switchformat Następna rozdzielczość
extra.key_timeshift Timeshift
extra.key_unlock Odblokuj
extra.ladirection Kierunek szerokości geogr.
@@ -330,50 +420,110 @@ extra.latitude Szerokość geograficzna
extra.loadconfig Wczytaj...
extra.loadkeys Wczytaj ustawienia pilota
extra.lodirection Kierunek długości geogr.
-extra.logo Logo startowe
extra.longitude Długość geograficzna
extra.menu_left_exit "Lewy" - powrót do poprzedniego menu
-extra.north północ
-extra.record_time Bufor opcji timeshift (godz.)
+extra.north Północ
+extra.record_time Maksymalny czas trwania nagrywania
+extra.record_time_ts Maksymalny czas trwania Timeshift
extra.rotor_swap Zamiana kierunków obrotnicy
extra.rounded_corners Kształt narożników menu
extra.rounded_corners_off proste
-extra.rounded_corners_on zaokrąglone
+extra.rounded_corners_on zaokrąglone
extra.saveconfig Zapisz jako...
extra.savekeys Zapisz ustawienia pilota
-extra.scan_fast szybkie
-extra.scan_full pełne
extra.scrambled_message Informacja o braku uprawnień
-extra.sms_channel Tryb sms dla kanału
-extra.south południe
+extra.show_mute_icon Pokaż ikonę wyciszenia przy głośności "0"
+extra.sms_channel Tryb sms dla kanału
+extra.south Południe
extra.start_tostandby Tryb gotowości po uruchomieniu
extra.temp_timeshift Osobny katalog dla timeshift/pauzy
extra.timeshift_pause Pauza
-extra.tp.pol_v V
+extra.tp_bandwidth Pasmo
+extra.tp_bandwidth_10mhz 10Mhz
+extra.tp_bandwidth_1_712mhz 1.712Mhz
+extra.tp_bandwidth_5mhz 5Mhz
+extra.tp_bandwidth_6mhz 6Mhz
+extra.tp_bandwidth_7mhz 7Mhz
+extra.tp_bandwidth_8mhz 8Mhz
+extra.tp_bandwidth_auto Auto
+extra.tp_coderate_hp Coderate (HP)
+extra.tp_coderate_lp Coderate (LP)
+extra.tp_constellation Konstelacja
+extra.tp_delsys System odbierania
+extra.tp_delsys_dss DSS
+extra.tp_delsys_dtmb DTMB
+extra.tp_delsys_dvbc DVB-C
+extra.tp_delsys_dvbc2 DVB-C2
+extra.tp_delsys_dvbs DVB-S
+extra.tp_delsys_dvbs2 DVB-S2
+extra.tp_delsys_dvbt DVB-T
+extra.tp_delsys_dvbt2 DVB-T2
+extra.tp_delsys_isdbc ISDB-C
+extra.tp_delsys_isdbs ISDB-S
+extra.tp_delsys_isdbt ISDB-T
+extra.tp_delsys_turbo Turbo
extra.tp_fec FEC
extra.tp_freq Częstotliwość
+extra.tp_gi Przedział
+extra.tp_gi_19_128 19/128
+extra.tp_gi_19_256 19/256
+extra.tp_gi_1_128 1/128
+extra.tp_gi_1_16 1/16
+extra.tp_gi_1_32 1/32
+extra.tp_gi_1_4 1/4
+extra.tp_gi_1_8 1/8
+extra.tp_gi_auto Auto
+extra.tp_gi_pn420 PN420
+extra.tp_gi_pn595 PN595
+extra.tp_gi_pn945 PN945
+extra.tp_hierarchy Hierarchia informacji
+extra.tp_hierarchy_1 1
+extra.tp_hierarchy_2 2
+extra.tp_hierarchy_4 4
+extra.tp_hierarchy_auto Auto
+extra.tp_hierarchy_none None
extra.tp_mod Modulacja
extra.tp_mod_128 QAM/128
extra.tp_mod_16 QAM/16
extra.tp_mod_256 QAM/256
extra.tp_mod_32 QAM/32
+extra.tp_mod_4 QPSK
+extra.tp_mod_4_nr QAM/4-NR
extra.tp_mod_64 QAM/64
+extra.tp_mod_8 8PSK
+extra.tp_mod_auto QAM/AUTO
+extra.tp_pilot Pilot
+extra.tp_pilot_auto Auto (HW)
+extra.tp_pilot_auto_sw Auto (SW)
extra.tp_pol Polaryzacja
extra.tp_pol_h H
+extra.tp_pol_l L
+extra.tp_pol_r R
+extra.tp_pol_v V
extra.tp_rate SR
+extra.tp_transmit_mode Tryb przesyłania
+extra.tp_transmit_mode_16k 16K
+extra.tp_transmit_mode_1k 1K
+extra.tp_transmit_mode_2k 2K
+extra.tp_transmit_mode_32k 32K
+extra.tp_transmit_mode_4k 4K
+extra.tp_transmit_mode_8k 8K
+extra.tp_transmit_mode_auto Auto
+extra.tp_transmit_mode_c1 C1
+extra.tp_transmit_mode_c3780 C3780
extra.update_dir Katalog aktualizacji
extra.use_gotoxx Użyj "gotoXX"
-extra.volume_pos Poz. wskaźnika głośności
-extra.west zachód
+extra.volume_digits Cyfrowy wskaźnik głośności
+extra.volume_pos Pozycja wskaźnika głośności
+extra.volume_size Rozmiar wskaźnika głośności
+extra.west Zachód
extra.zap_cycle Wyłącz historię programów
extra.zapit_fe_timeout Przekroczony czas
extra.zapit_hvoltage Podwyższone napięcie (13.5/18.5)
-extra.zapit_make_bouquet Wykonaj pozostałe listy kanałów
-extra.zapit_menu Opcje przełączania
+extra.zapit_make_bouquet Wykonaj pozostałe listy kanałów
extra.zapit_motor_speed Prędkość obrotnicy (10=1°/sec)
extra.zapit_scanpids PID
extra.zapit_sdt_changed Zmieniono kanały, przeładuj ustawienia.
-extra.zapit_write_names Wprowadź nazwę kanału
fan_speed Prędkość wentylatora
favorites.addchannel Bieżący kanał zostanie dodany do bukietu \n"Ulubione". \nProszę czekać...
favorites.bouquetname Ulubione
@@ -384,15 +534,17 @@ favorites.copy Kopiuj bukiet do ulubionych
favorites.finalhint \nUżyj edytora bukietów, aby dokonać\nzmian w ulubionych.\n
favorites.menueadd Dodaj kanał do ulubionych
favorites.nobouquets Funkcja jest dostępna wyłącznie przy włączonych bukietach.
-filebrowser.delete Usuń
+filebrowser.add Dodaj
+filebrowser.delete Usuń
filebrowser.denydirectoryleave Katalog startowy jako główny
filebrowser.dodelete1 Usuń
-filebrowser.dodelete2 Usuń
+filebrowser.dodelete2 Usuń
filebrowser.filter.active Włącz filtr
filebrowser.filter.inactive Wyłącz filtr
filebrowser.head Przeglądarka plików
filebrowser.mark Zaznacz
-filebrowser.nextpage Nast. strona
+filebrowser.nextpage Nast. strona
+filebrowser.pm Menadżer Playlisty
filebrowser.prevpage Poprz. strona
filebrowser.scan Trwa wyszukiwanie...
filebrowser.select Wybierz
@@ -406,9 +558,23 @@ filesystem.is.utf8 Zestaw znaków
filesystem.is.utf8.option.iso8859.1 ISO-8859-1
filesystem.is.utf8.option.utf8 UTF-8
flashupdate.actionreadflash Odczyt partycji
+flashupdate.apply_settings Zaimportować bieżące ustawienia do nowego image?
+flashupdate.autocheck Automatyczne sprawdzanie aktualizacji podczas startu
flashupdate.cantopenfile Nie można otworzyć pliku.
-flashupdate.cantopenmtd Nie można otworzyć urządzenia MTD.
-flashupdate.checkupdate Pokaż dostępne aktualizacje
+flashupdate.cantopenmtd Nie można otworzyć urządzenia MTD
+flashupdate.checkupdate_internet Aktualizacja przez internet
+flashupdate.checkupdate_local Aktualizacja lokalna
+flashupdate.copy_image Kopiowanie obrazu
+flashupdate.createimage Zapisz image
+flashupdate.createimage_add_env Dodaj 'env' do image
+flashupdate.createimage_add_kernel Dodaj 'kernel' do image
+flashupdate.createimage_add_spare Dodaj 'spare' do image
+flashupdate.createimage_add_u_boot Dodaj 'u-boot' do image
+flashupdate.createimage_add_uldr Dodaj 'uldr' do image
+flashupdate.createimage_menu Zapis aktualnego oprogramowania
+flashupdate.createimage_options Opcje
+flashupdate.createimage_other Tworzenie image dla %s STB
+flashupdate.createimage_warning Image dla %s STB zostało utworzone.\nTo image będzie działać tylko dla %s STB!\n \nKontynuować?
flashupdate.currentversion_sep Zainstalowane oprogramowanie
flashupdate.currentversiondate Data
flashupdate.currentversiontime Godzina
@@ -427,11 +593,24 @@ flashupdate.globalprogress Postęp całkowity
flashupdate.head Aktualizacja
flashupdate.md5check Sprawdzanie sumy kontrolnej
flashupdate.md5sumerror Nieprawidłowa suma kontrolna
+flashupdate.menu_apply_kernel Zapis kernela
+flashupdate.menu_apply_settings Zastosuj ustawienia
+flashupdate.mkfs_create_image Tworzenie image
+flashupdate.mkfs_preparing_files Przygotowanie plików i katalogów
+flashupdate.mkfs_using_sumtool Używaj narzędzia do sumy
flashupdate.msgbox Dane wybranej aktualizacji:\nData: %s, %s\nWymagana wersja oprogramowania: %s\nTyp: %s\n\nPobrać i zainstalować wybraną aktualizację?
flashupdate.msgbox_manual Dane wybranej aktualizacji:\nData: %s, %s\nWymagana wersja oprogramowania: %s\nTyp: %s\n\nZainstalować wybraną aktualizację?
flashupdate.mtdselector Wybór partycji
+flashupdate.namemode1 Nazwa pliku z ustawieniami
+flashupdate.namemode1_default +settings.img
+flashupdate.namemode1_hostname_time ++settings.img
+flashupdate.namemode1_orgname_time ++settings.img
+flashupdate.namemode2 Nazwa pliku z kopią firmware
+flashupdate.namemode2_default +.img
+flashupdate.namemode2_hostname_time ++.img
flashupdate.new_found Dostępna nowa wersja firmware.
flashupdate.new_notfound Brak nowych wersji firmware.
+flashupdate.noversion Kontrola wersji jest obsługiwana tylko przy aktualizacji przez internet.\nCzy na pewno chcesz zainstalować ten obraz?
flashupdate.programmingflash Programowanie pamięci flash
flashupdate.proxypassword Hasło
flashupdate.proxypassword_hint1 Wpisz hasło serwera proxy.
@@ -443,15 +622,24 @@ flashupdate.proxyserver_sep Serwer proxy
flashupdate.proxyusername Nazwa użytkownika
flashupdate.proxyusername_hint1 Wpisz nazwę użytkownika serwera proxy.
flashupdate.proxyusername_hint2 Pusty wpis oznacza brak autoryzacji.
+flashupdate.read_directory_not_exist Katalog kopii zapasowej %s \nnie istnieje!
+flashupdate.read_no_available_space Maksymalna dostępna przestrzeń w %s \nto %s KB, a tutaj jest wymagane %s KB.\n \nOperacja zostanie anulowana, wybierz inny nośnik!!
+flashupdate.read_volume_error Rozmiaru partycji %s \nnie można okreslić!
flashupdate.readflash Odczyt całej pamięci flash
flashupdate.readflashmtd Odczyt pojedynczej partycji
flashupdate.ready Gotowe
flashupdate.reallyflashmtd Czy na pewno chcesz wykonać programowanie?\n\nW przypadku wystąpienia błędu lub nieprawidłowego obrazu\nodbiornik nie uruchomi się.\n\nNazwa obrazu: %s\nCel: %s
flashupdate.savesuccess Obraz został zapisany pomyślnie\npod nazwą %s.
flashupdate.selectimage Dostępne aktualizacje i dodatki
-flashupdate.squashfs.noversion Kontrola zgodności przeprowadzana jest tylko\npodczas aktualizacji poprzez Internet.\nKontynouwać instalację?
+flashupdate.settings Aktualizacja ustawień
flashupdate.titlereadflash Odczyt pamięci flash
flashupdate.titlewriteflash Zapis pamięci flash
+flashupdate.update_with_settings_del_skipped Folder [%s] nie może być usunięty. Wpis zostanie pominięty.
+flashupdate.update_with_settings_error Błąd zapisu!\n \nNowe image ma %ld KB (out of %ld KB). Nie\nma wystarczająco dużo miejsca, aby zakończyć tę operację.\n \nOperacja anulowana!
+flashupdate.update_with_settings_processed Trwa przetwarzanie image...
+flashupdate.update_with_settings_skipped Folder [%s] nie może być zapisany. Wpis zostanie pominięty.
+flashupdate.update_with_settings_successfully Ustawienia zakończone powodzeniem.\nMożliwy zapis image.
+flashupdate.update_with_settings_warning Ostrzeżenie przed zapisem!\n \nNowe image ma %ld KB (out of %ld KB). Prawdopodobnie nie\nma wystarczająco dużo miejsca, aby zakończyć tę operację...\n \nCzy na pewno chcesz kontynuować?
flashupdate.updatemode Rodzaj aktualizacji
flashupdate.updatemode_internet automatyczna (Internet)
flashupdate.updatemode_manual ręczna (ftp)
@@ -459,76 +647,91 @@ flashupdate.url_file Adresy serwerów
flashupdate.versioncheck Sprawdź wersję
flashupdate.writeflash Zapis całej pamięci flash
flashupdate.writeflashmtd Zapis pojedynczej partycji
-flashupdate.wrongbase Niepoprawna wersja oprogramowania bazowego.\nKontynouwać?
+flashupdate.wrongbase Niepoprawna wersja oprogramowania bazowego.\nKontynouwać?
fontmenu.channellist Lista kanałów
fontmenu.epg EPG
fontmenu.eventlist Lista programów
-fontmenu.gamelist Lista gier
fontmenu.head Ustawienia fontów
fontmenu.infobar Belka informacyjna
+fontmenu.menu Menu
+fontmenu.other Inne
fontmenu.scaling Powiększ rozmiar czcionki o:
-fontmenu.scaling_x W poziomie (in %)
-fontmenu.scaling_y W pionie (in %)
-fontmenu.sizes Rozmiary fontu
+fontmenu.scaling_x W poziomie (w %)
+fontmenu.scaling_x_hint2 Poziomo (w %) min 50 / max 200
+fontmenu.scaling_y W pionie (w %)
+fontmenu.scaling_y_hint2 Pionowo (w %) min 50 / max 200
+fontmenu.sizes Rozmiary fontów
fontsize.channel_num_zap Bez funkcji
fontsize.channellist Lista kanałów
fontsize.channellist_descr Opis
+fontsize.channellist_event Lista Zdarzeń
fontsize.channellist_number Numer
fontsize.epg_date Dane EPG
fontsize.epg_info1 Informacja EPG 1
fontsize.epg_info2 Informacja EPG 2
fontsize.epg_title Tytuł EPG
fontsize.eventlist_datetime Data / godzina listy programów
+fontsize.eventlist_event Informacja o zdarzeniu
fontsize.eventlist_itemlarge Duża lista programów
fontsize.eventlist_itemsmall Mała lista programów
fontsize.eventlist_title Tytuł listy programów
fontsize.filebrowser_item Przeglądarka plików
-fontsize.gamelist_itemlarge duża
-fontsize.gamelist_itemsmall mała
fontsize.hint Trwa inicjalizowanie fontu, proszę czekać...
fontsize.infobar_channame Nazwa kanału
fontsize.infobar_info Informacja na pasku
fontsize.infobar_number Kanał na pasku informacyjnym
fontsize.infobar_small Mała belka informacyjna
fontsize.menu Tekst menu
+fontsize.menu_hint Szczegóły Menu
fontsize.menu_info Menu informacyjne
-fontsize.menu_title Tytuł menu
-gtxalpha.alpha1 1
-gtxalpha.alpha2 2
-hdd_10min po 10 min
-hdd_1min po 1 min
-hdd_20min po 20 min
-hdd_30min po 30 min
-hdd_5min po 5 min
-hdd_60min po 60 min
+fontsize.menu_title Tytuł Menu
+fontsize.subtitles Napisy
+hdd_10min po 10 min.
+hdd_1min po 1 min.
+hdd_20min po 20 min.
+hdd_30min po 30 min.
+hdd_5min po 5 min.
+hdd_60min po 60 min.
hdd_activate Aktywacja ustawień
hdd_check Test systemu plików
hdd_check_failed Błąd, sprawdzanie dysku nie powiodło się!
-hdd_ext3 ext3
+hdd_check_format_bad Sprawdzanie dysków w formacie %s nie jest obsługiwane.
hdd_extended_settings Ustawienia dysku
hdd_fast minimalne
hdd_format Tworzenie systemu plików (ext3)
hdd_format_failed Błąd podczas tworzenia systemu plików!
hdd_format_warn Na pewno utworzyć nowy system plików?\nWszystkie dane zostaną utracone!
hdd_fs System plików
+hdd_fs_unknown nieznany
hdd_manage Zarządzanie
hdd_middle średnie
+hdd_mount Zamontuj
+hdd_mount_failed Błąd montowania
+hdd_mount_ok Urządzenie gotowe do użycia
+hdd_mount_umount Zamontuj/odmontuj dyski
hdd_noise Wyciszenie
hdd_not_found Brak dysku twardego
-hdd_reiser ReiserFS
hdd_removable_device Przenośna pamięć flash
+hdd_set_recdir Użyć tego urządzenia do nagrań?
hdd_settings Dysk twardy
hdd_sleep Stan gotowości
hdd_slow maksymalne
+hdd_statfs Poziom zapytania
+hdd_statfs_always zawsze
+hdd_statfs_recording tylko podczas nagrywania
+hdd_umount Odmontuj
hdd_umount_warn Błąd, nie udało się odmontować dysku!
-imageinfo.creator Twórca:
+hdd_umounted Urządzenie odmontowane
+imageinfo.creator Autor:
imageinfo.date Data:
imageinfo.dokumentation Dokumentacja:
imageinfo.forum Forum:
imageinfo.head Informacje o oprogramowaniu:
imageinfo.homepage Str. domowa:
imageinfo.image Nazwa:
+imageinfo.kernel Kernel:
imageinfo.license Licencja:
+imageinfo.vcs Git:
imageinfo.version Wersja:
inetradio.name Radio internetowe
infoviewer.epgnotload Informacje nie zostały jeszcze odczytane...
@@ -544,6 +747,7 @@ infoviewer.now Obecnie
infoviewer.selecttime Czasy rozpoczęcia
infoviewer.streaminfo Funkcje
infoviewer.subchan_disp_pos Wyświetlanie podkanałów
+infoviewer.subchan_infobar Pełny pasek informacyjny
infoviewer.subservice Podkanały
infoviewer.waittime Trwa odczytywanie godziny...
ipsetup.hint_1 Wpisz 0-9 lub naciśnij przycisk góra/dół
@@ -561,20 +765,42 @@ keybindingmenu.cancel Zamknij listę kanałów
keybindingmenu.channeldown Następny kanał
keybindingmenu.channellist Lista kanałów
keybindingmenu.channelup Poprzedni kanał
+keybindingmenu.edit Edycja
keybindingmenu.head Konfiguracja przycisków
keybindingmenu.lastchannel Szybkie przełączanie
+keybindingmenu.longkeypress_duration Długie naciśnięcie przycisku
+keybindingmenu.misc Różne
+keybindingmenu.mode_left_right_key_tv Zachowanie przycisku Lewy/Prawy w trybie TV
+keybindingmenu.mode_left_right_key_tv_infobar Pokaż Pasek informacyjny
+keybindingmenu.mode_left_right_key_tv_volume Regulacja głośności
+keybindingmenu.mode_left_right_key_tv_vzap Wirtualne przełączanie
+keybindingmenu.mode_left_right_key_tv_zap Przełącz
keybindingmenu.modechange Zmiana trybu
+keybindingmenu.navigation Nawigacja
keybindingmenu.pagedown Następna strona
keybindingmenu.pageup Poprzednia strona
keybindingmenu.poweroff Wyłącznik
keybindingmenu.quickzap Zmiana kanałów
+keybindingmenu.remotecontrol_hardware Sprzęt
+keybindingmenu.remotecontrol_hardware_coolstream CST
+keybindingmenu.remotecontrol_hardware_dbox d-box Nokia (stary)
+keybindingmenu.remotecontrol_hardware_msg_part1 Pilot został zmieniony z '
+keybindingmenu.remotecontrol_hardware_msg_part2 ' na '
+keybindingmenu.remotecontrol_hardware_msg_part3 ' \nCzy wybór jest prawidłowy?\nProszę potwierdzić w ciągu 15 sekund przy użyciu nowego pilota.\nW przeciwnym razie wybór będzie anulowany.
+keybindingmenu.remotecontrol_hardware_philips Philips
+keybindingmenu.remotecontrol_hardware_tripledragon Triple Dragon
keybindingmenu.repeatblock Opóźnienie początkowe
keybindingmenu.repeatblockgeneric Opóźnienie powtarzania
keybindingmenu.sort Zmień kolejność sortowania
+keybindingmenu.special_active Klawisze specjalne
keybindingmenu.subchanneldown Poprzedni podkanał
keybindingmenu.subchannelup Następny podkanał
keybindingmenu.tvradiomode TV/Radio
-keybindingmenu.zaphistory Historia przełączania
+keybindingmenu.video Wideo
+keybindingmenu.volume Głośność
+keybindingmenu.volumedown Ciszej
+keybindingmenu.volumeup Głośniej
+keybindingmenu.zaphistory Historia przełączania
keychooser.head Ustaw nowy przycisk
keychooser.text1 Naciśnij wybrany przycisk
keychooser.text2 Exit, aby anulować...
@@ -584,18 +810,24 @@ keychoosermenu.setnone nie ustawiaj
languagesetup.head Ustawienia językowe
languagesetup.osd Język menu
languagesetup.select Język
-lcdcontroler.brightness Jasność
+lcd_info_line Pokaż w infolinii
+lcd_info_line_channel Nazwa kanału
+lcd_info_line_clock Zegar
+lcdcontroler.brightness Jasność
lcdcontroler.brightnessdeepstandby Jasność w głębokim czuwaniu
lcdcontroler.brightnessstandby Jasność w trybie got.
-lcdcontroler.contrast Kontrast
-lcdmenu.dim_brightness Jasność po wygaszeniu
+lcdmenu.dim_brightness Jasność po wygaszeniu
lcdmenu.dim_time Czas do wygaszenia
-lcdmenu.head Ustawienia wyświtlacza
+lcdmenu.head Ustawienia wyświetlacza
lcdmenu.lcdcontroler Jasność
+lcdmenu.scroll Włącz przewijanie tekstu
lcdmenu.statusline Pasek stanu
+lcdmenu.statusline.both głośność / czas odtwarzania
lcdmenu.statusline.playtime czas
lcdmenu.statusline.volume głośność
-ledcontroler.blink Świeć gdy ustawiony timer ?
+ledcontroler.backlight Podświetlenie przycisków
+ledcontroler.backlight.tv Tryb TV
+ledcontroler.blink Świeć w głębokim czuwaniu, gdy ustawiony timer?
ledcontroler.menu Przycisk zasilania
ledcontroler.mode.deepstandby Głebokie czuwanie
ledcontroler.mode.record Świecenie podczas nagrywania
@@ -605,11 +837,19 @@ ledcontroler.off Led1 & Led2 wył.
ledcontroler.on.all Led1 & Led2 wł.
ledcontroler.on.led1 Led1 wł.
ledcontroler.on.led2 Led2 wł.
-logo_hdd_dir Katalog dla logo kanałow.
+lua.boolparam_deprecated1 Ostrożnie!
+lua.boolparam_deprecated2 Użyj liczby lub ciąg znaków
+lua.boolparam_deprecated3 dla Boolean parameter jest nieaktualny.\n Please use native bool values eg.
+lua.function_deprecated1 Uwaga!
+lua.function_deprecated2 Funckcje
+lua.function_deprecated3 jest przestarzały,\n użyj
mainmenu.audioplayer Odtwarzacz audio
+mainmenu.channels Kanały
mainmenu.clearsectionsd Czyść bufor EPG
mainmenu.games Gry
mainmenu.head Menu główne
+mainmenu.lua Pluginy
+mainmenu.media Media
mainmenu.movieplayer Odtwarzacz wideo
mainmenu.pausesectionsd Czytaj informacje EPG
mainmenu.pictureviewer Przeglądarka obrazów
@@ -621,16 +861,21 @@ mainmenu.recording_stop STOP
mainmenu.scripts Skrypty
mainmenu.service Usługi
mainmenu.settings Ustawienia
-mainmenu.shutdown Wyłącz
+mainmenu.shutdown Wyłącz (głębokie czuwanie)
+mainmenu.shutdown_menu Menu wyłączania
mainmenu.sleeptimer Wyłącznik czasowy
+mainmenu.standby Czuwanie
+mainmenu.tools Narzedzia
mainmenu.tvmode Telewizja
+mainmenu.tvradio_switch Przełączanie TV-Radio
mainsettings.audio Dźwięk
mainsettings.head Ustawienia
mainsettings.keybinding Pilot
-mainsettings.language Język
+mainsettings.language Język / Strefa czasowa
mainsettings.lcd Wyświetlacz VFD
mainsettings.manage Zarządzaj ustawieniami
mainsettings.misc Pozostałe
+mainsettings.multimedia Multimedia
mainsettings.network Sieć
mainsettings.osd Grafika ekranowa
mainsettings.recording Nagrywanie
@@ -638,17 +883,509 @@ mainsettings.savesettingsnow Zapisz
mainsettings.savesettingsnow_hint Trwa zapisywanie ustawień, proszę czekać...
mainsettings.timezone Strefa czasowa
mainsettings.video Obraz
-menu.back wstecz
-menu.next dalej (Menu aby wyjść)
+menu.back Wstecz
+menu.cancel Anuluj
+menu.hint_a_pic Konfiguracja odtwarzacza audio i przeglądarki zdjęć
+menu.hint_aplay Odtwarzacz audio
+menu.hint_aplay_setup Zmień ustawienia odtwarzacza audio, takich jak wyświetlanie tytułu, katalog startowy, wygaszacz ekranu i inne.
+menu.hint_audio Wyjście audio, DD\nopcje głośności
+menu.hint_audio_adjust_vol_ac3 Regulacja głośności dla ścieżek dźwiękowych AC3
+menu.hint_audio_adjust_vol_clear Usunąć wszystkie zapisane wartości dla ścieżek AC3 i PCM
+menu.hint_audio_adjust_vol_pcm Regulacja głośności dla ścieżek dxwiekowych PCM
+menu.hint_audio_analog_mode Wybór kanałów audio\nstereo, mono-lewy, mono-prawy
+menu.hint_audio_avsync synchronizacja A/V
+menu.hint_audio_dd Automatyczne przełączanie do DolbyDigital,\njeśli dostępny
+menu.hint_audio_hdmi_dd DolbyDigital przez HDMI: wyłączone\nauto jeśli dostępne w odbiorniku, włączone
+menu.hint_audio_spdif_dd DolbyDigital przez wyjście optyczne
+menu.hint_audio_srs SRS TruVolume control volume jumps\nat content changes
+menu.hint_audio_srs_algo Amount of control, light or normal
+menu.hint_audio_srs_nmgr Noise manager
+menu.hint_audio_srs_volume Reference level to maintain
+menu.hint_audio_volstart Always set selected volume value on boot
+menu.hint_audio_volstep Volume +/- keys increase/decrease step
+menu.hint_audioplayer_defdir Default audioplayer directory
+menu.hint_audioplayer_follow Move playlist selected pointer\nto current playing song
+menu.hint_audioplayer_highprio Increase playback priority
+menu.hint_audioplayer_order Change playlist sort order
+menu.hint_audioplayer_playlist Show playlist items
+menu.hint_audioplayer_repeat Enable playlist repeat when end of list reached
+menu.hint_audioplayer_sc_metadata Enable streaming audio metadata parsing
+menu.hint_audioplayer_title Enable SMS-style title search in playlist
+menu.hint_auto_lang Auto-switch audio to preferred language
+menu.hint_auto_subs Auto-start subtitles for preferred language
+menu.hint_back Return to previous menu\nPress menu key to close all menus
+menu.hint_back_brief Return to previous menu
+menu.hint_backlight Configure buttons backlight
+menu.hint_backup Backup configs and channels to selected dir
+menu.hint_bedit Edit favorites and bouquets
+menu.hint_buildinfo Information about compilers, compiler flags, kernel
+menu.hint_cache_txt Start teletext caching after channel switch
+menu.hint_cec_mode CEC mode
+menu.hint_cec_standby CEC standby
+menu.hint_cec_view_on CEC view ON
+menu.hint_channellist_additional Show additional informations\nin main box
+menu.hint_channellist_colored Use different color for current or next event
+menu.hint_channellist_epg_align EPG event align
+menu.hint_channellist_extended Show current event progress bar
+menu.hint_channellist_fonts Change channel list font sizes
+menu.hint_channellist_foot Show additional information\nin bottom box
+menu.hint_channellist_mode Use the selected channel list mode on startup if last mode is TV
+menu.hint_channellist_mode_radio Use the selected channel list mode on startup if last mode is Radio
+menu.hint_channellist_setup Configure channel list GUI options
+menu.hint_channellist_show_channellogo Show channel logos in channel list
+menu.hint_channellist_show_channelnumber Show channel number in channel list
+menu.hint_channellist_show_empty_favs Show / hide empty bouquets in favorites
+menu.hint_channels Open channel list
+menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card
+menu.hint_clock_background Show clock with theme's background color
+menu.hint_clock_mode Switch clock on or off
+menu.hint_clock_seconds Show time format with seconds
+menu.hint_clock_size Set the size of the info clock
+menu.hint_clock_textcolor Configure digit colors
+menu.hint_color_gradient Switches color gradients for various menu items on/off
+menu.hint_colors Configure GUI colors
+menu.hint_content_back Change GUI window background color
+menu.hint_content_textcolor Change GUI window text color
+menu.hint_contrast_fonts Make fonts contrast (do not blend with background)
+menu.hint_dboxinfo Information about box cpu and storage
+menu.hint_delete_channels Remove all channels
+menu.hint_delete_removed Delete the channels in the 'Removed channels' boquet
+menu.hint_epg_cache Maximum days to cache for future events
+menu.hint_epg_dir Select directory on harddisk or usb flash\nto save EPG.
+menu.hint_epg_extendedcache Maximum hours to cache extended\nevents descriptions
+menu.hint_epg_fonts Change EPG details window font sizes
+menu.hint_epg_max_events Maximum events to cache. After reaching limit\nEPG cache will remove future events
+menu.hint_epg_old_events Hours after event end time to consider\nevent old and remove it from cache
+menu.hint_epg_read Read saved EPG data after boot from an external device
+menu.hint_epg_save Save cached EPG data to an external device
+menu.hint_epg_save_frequently Save cached EPG data in frequently intervals to an external device
+menu.hint_epg_save_mode Cache EPG only for channels present in favorite bouquets
+menu.hint_epg_save_standby Save EPG on soft standby mode
+menu.hint_epg_scan Select bouquets to scan epg, current on zap,\nall or selected favorites
+menu.hint_epg_scan_mode Enable background epg scan using free tuner
+menu.hint_event_textcolor Change event color for colored-event options\nin channel list and infobar
+menu.hint_eventlist_additional Show additional informations\nin main box
+menu.hint_eventlist_fonts Change event list font sizes
+menu.hint_eventlist_setup Configure event list GUI options
+menu.hint_extended Power saving, EPG save/load options\nHDMI-CEC, Start channel, zap options
+menu.hint_factory Reset box to factory state\nBox will reboot after reset
+menu.hint_fade Fade GUI windows
+menu.hint_fan_speed Control fan speed
+menu.hint_filebrowser_denydirectoryleave Deny filebrowser to leave initial directory
+menu.hint_filebrowser_showrights Show file permissions in file browser
+menu.hint_fileplay Play various video files
+menu.hint_filesystem_is_utf8 Filebrowser filesystem encoding
+menu.hint_font_gui Select font file to use for GUI
+menu.hint_font_scaling Set global vertical and horizontal\nGUI font scaling
+menu.hint_font_ttx Select font file to use for teletext
+menu.hint_fonts Konfiguracja wyglądu i rozmiaru czcionki
+menu.hint_games Widok listy zainstalowanych gier
+menu.hint_hdd Formatowanie/sprawdzanie twardego dysku
+menu.hint_hdd_apply Ustaw parametry usypiania/wyciszania
+menu.hint_hdd_check Sprawdź system plików (fsck)
+menu.hint_hdd_fmt Wybierz format dysku
+menu.hint_hdd_format Utwórz i sformatuj partycję HDD
+menu.hint_hdd_noise Ustaw automatyczne zarządzanie akustyczne\nnie wszystkie napędy to wspierają
+menu.hint_hdd_sleep Określ czas braku aktywności HDD,\npo którym zostanie on zatrzymany
+menu.hint_hdd_statfs Specify when the recording directory fill level in infoviewer and, if available, on VFD, may be updated
+menu.hint_hdd_tools Zinicjuj HDD, sprawdź system plików
+menu.hint_head_back Change GUI title background color
+menu.hint_head_textcolor Change GUI window title text color
+menu.hint_imageinfo Information about installed software
+menu.hint_inact_timer Shutdown box after inactivity
+menu.hint_inactive_back Change inactive item background color
+menu.hint_inactive_textcolor Change inactive item text color
+menu.hint_inet_radio Internet radio
+menu.hint_info Information about image, box cpu and storage,\nstream information
+menu.hint_infobar_back Change infobar background color
+menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-sys
+menu.hint_infobar_colored_event Use different color for current or next event
+menu.hint_infobar_dd Show DD icon
+menu.hint_infobar_filesys Show flash and HDD used space levels
+menu.hint_infobar_fonts Change infobar font sizes
+menu.hint_infobar_logo Logo / signal options
+menu.hint_infobar_logo_dir Select directory to search for channels logo
+menu.hint_infobar_on_epg Show infobar on current EPG event change
+menu.hint_infobar_radiotext Show radiotext window
+menu.hint_infobar_res Show channel resolution icons
+menu.hint_infobar_sat Show current satellite or cable provider
+menu.hint_infobar_setup Configure infobar options
+menu.hint_infobar_textcolor Change infobar text color
+menu.hint_infobar_tuner Show active tuner number icon
+menu.hint_infoclock_setup Configure info clock GUI options
+menu.hint_keep_numbers Keep channel numbers over next scans\nand bouquets editing
+menu.hint_key_addrecord Assign button to add record timer\nfrom event list
+menu.hint_key_addremind Assign button to add zap timer\nfrom event list
+menu.hint_key_audio On: 'audio' button start show audio-play menu\nOff: 'audio' button show Audio selection
+menu.hint_key_binding Re-define keys used for common operations
+menu.hint_key_bouquetdown Assign button to switch channel list\nto previous bouquet
+menu.hint_key_bouquetup Assign button to switch channel list\nto next bouquet
+menu.hint_key_cancel Assign button to close GUI window
+menu.hint_key_channel_sms If enabled, numeric buttons in channel list\nused to search channel in SMS style
+menu.hint_key_channeldown Assign button for fast switch to previous\nchannel in channel list
+menu.hint_key_channellist Configure keybingdings for channel list
+menu.hint_key_channelup Assign button for fast switch to next\nchannel in channel list
+menu.hint_key_format_mode_active Disable/enable key for the video format conversion
+menu.hint_key_hardware Change remote control type
+menu.hint_key_history Assign button to show channel\nchannel switch history
+menu.hint_key_lastchannel Assign button for fast zap to\nprevious channel in history
+menu.hint_key_left_exit Allow return to previous menu with 'left' key
+menu.hint_key_list_end Assign button to go do list end
+menu.hint_key_list_start Assign button to go to list start
+menu.hint_key_load Load keybindings from file
+menu.hint_key_modechange Change TV/Radio mode and standby keys
+menu.hint_key_movieplayer Configure keybingdings for movie player
+menu.hint_key_mpaudio Assign button to show audio selection\nin record/file playback mode
+menu.hint_key_mpbookmark Assign button to create bookmark\nwhile playing record
+menu.hint_key_mpforward Assign button to fast forward record playback
+menu.hint_key_mppause Assign button to pause record/file playback
+menu.hint_key_mpplay Assign button to resume record/file playback
+menu.hint_key_mpplugin Assign button to start selected plugin\nwhile playing record/file
+menu.hint_key_mprewind Assign button to rewind record playback
+menu.hint_key_mpstop Assign button to stop record/file playback
+menu.hint_key_mpsubtitle Assign button to show subtitle selection
+menu.hint_key_mptime Assign button to show play time\nleft time
+menu.hint_key_mptimeshift Assign button to start timeshift
+menu.hint_key_pagedown Assign button to show next items page
+menu.hint_key_pageup Assign button to show previous items page
+menu.hint_key_pic_mode_active Disable/enable key for the screen format
+menu.hint_key_pic_size_active Disable/enable key for the 4:3 display behavior
+menu.hint_key_pip_close Assign button to stop PiP\nor start it for current channel
+menu.hint_key_pip_setup Assign button to configure PiP
+menu.hint_key_pip_swap Assign button to swap PiP and live channel
+menu.hint_key_plugin Assign button to execute the one touch plugin
+menu.hint_key_poweroff Assign button to switch power state\n (standby/deepstandby <-> running)
+menu.hint_key_quickzap Configure keybingdings for quick\nchannel switch
+menu.hint_key_record Assign button to start a recording
+menu.hint_key_repeatblock Delay after button press and before\nfirst key repeat
+menu.hint_key_repeatblockgeneric Delay between key repeats\nwhile button pressed
+menu.hint_key_right Select 'right' function in live TV/Radio mode
+menu.hint_key_save Save keybindings to file
+menu.hint_key_screenshot Assign button to save GUI and/or TV screenshot
+menu.hint_key_sort Assign button to change channel list sort order
+menu.hint_key_special_active Disable or enable some special keys
+menu.hint_key_subchanneldown Assign button for fast switch\n to previous subchannel
+menu.hint_key_subchannelup Assign button for fast switch\n to next subchannel
+menu.hint_key_transponder Assign button to show channel list\nfor current transponder
+menu.hint_key_tvradiomode Assign button to switch TV <> Radio mode
+menu.hint_key_unlock Assign button to unlock box if locked\nTo unlock press 'red', then in next 5 seconds this key
+menu.hint_key_volumedown Assign button to decrease volume
+menu.hint_key_volumeup Assign button to increase volume
+menu.hint_keys Remote control repeat rate\nEdit key bindings
+menu.hint_lang_pref Configure preferred audio, EPG\nand subtitle languages
+menu.hint_language OSD language, timezone\nPreffered audio and subtitles languages
+menu.hint_last_radio Start box on selected channel\nif last mode is Radio
+menu.hint_last_tv Start box on selected channel\nif last mode is TV
+menu.hint_last_use Start box on last used channel
+menu.hint_leds_blink Blink LEDS in deep-standby
+menu.hint_leds_deepstandby LEDs state in deeps-standby mode
+menu.hint_leds_record LEDs state when box recording
+menu.hint_leds_standby LEDs state in soft-standby mode
+menu.hint_leds_tv Working LEDs state
+menu.hint_load Load Neutrino-HD GUI settings from file
+menu.hint_longkeypress_duration A key press will be considered as "long key press" if it's pressed longer than the specified time.
+menu.hint_lua Pluginy Lua
+menu.hint_make_hdlist Auto-create HD channel list based on\nchannel type and name
+menu.hint_make_newlist Create list of recently added channels
+menu.hint_make_removedlist Create list of recently removed channels
+menu.hint_make_webtvlist Auto-create WebTV channel list based on\nchannel type and name
+menu.hint_manage_settings Backup, restore, revert to defaults\nFactory box reset
+menu.hint_mb Your recordings
+menu.hint_media Play movies, audio files\nWatch pictures
+menu.hint_menu_fonts Change menu font sizes
+menu.hint_menu_hints Show this hints. Also you can switch\nit any time using 'help' button
+menu.hint_menu_pos Select menu position
+menu.hint_menus Configure menu options
+menu.hint_misc_cec HDMI-CEC Options
+menu.hint_misc_channellist HD/New/Removed channel lists\nZap cycle
+menu.hint_misc_energy Enable soft-standby, delayed shutdown\ninactivity timers
+menu.hint_misc_epg Save/load EPG options, EPG cache options\nEPG save directory
+menu.hint_misc_filebrowser Filesystem encoding, file rights\ndeny directory leave
+menu.hint_misc_general Start to standby, cache teletext, swp rotor\nplugin hdd dir
+menu.hint_misc_zapit Initial TV/Radio channels
+menu.hint_movie Play movies
+menu.hint_moviebrowser_setup Set selection and display options.
+menu.hint_movieplayer_plugin Choose a plugin that's executed with the one touch key in movieplayer mode
+menu.hint_net_broadcast Enter broadcast address\nif unsure, use IP address with last .255
+menu.hint_net_dhcp Use DHCP server to auto-configure
+menu.hint_net_djmount Mount UPnP devices as filesystem\nunder /media/00upnp
+menu.hint_net_dropbear Enable ssh access to the box
+menu.hint_net_ftpd Enable file transfer using FTP
+menu.hint_net_gateway Enter gateway/router IP address
+menu.hint_net_hostname Change your box hostname
+menu.hint_net_if Select interface to config
+menu.hint_net_ipaddress Enter your box IP address
+menu.hint_net_mount Configure, mount and un-mount network shares\nNFS and CIFS supported
+menu.hint_net_nameserver Enter name server (DNS) IP address
+menu.hint_net_netmask Enter network mask\nif unsure, use 255.255.255.0
+menu.hint_net_nfs_mount Configure and mount network shares
+menu.hint_net_nfs_umount Un-mount mounted shares
+menu.hint_net_ntp Configure time sync
+menu.hint_net_ntpenable Enable time sync using NTP protocol\nIf NTP sync not successfull, DVB will be used
+menu.hint_net_ntprefresh Time sync interval
+menu.hint_net_ntpserver Enter NTP server name
+menu.hint_net_pass Enter passkey (WPA-PSK)
+menu.hint_net_proxy If you use proxy to access internet\nconfigure it here for online software update
+menu.hint_net_proxypass Proxy user password\nif authorization required
+menu.hint_net_proxyserver Proxy server name
+menu.hint_net_proxyuser Proxy user name\nif authorization required
+menu.hint_net_services Configure network services:\nTelnet, ftp, uPnp
+menu.hint_net_setupnow Apply current settings
+menu.hint_net_setuponstartup Start network at boot time
+menu.hint_net_show Show current network settings
+menu.hint_net_ssid Enter SSID of wireless network\nyou want to connect to
+menu.hint_net_ssid_scan Scan for available WLAN networks
+menu.hint_net_telnet Enable telnet login to your box
+menu.hint_net_test Test network connection: ping gateway,\n name server and external IP
+menu.hint_net_ushare Share connected HDD over uPnp
+menu.hint_net_xupnpd Share live channels over UPNP
+menu.hint_network IP address, gateway, DNS, Time sync\nNetwork shares and services
+menu.hint_new_zap_mode Allow channel switch while browsing\n(toggle mode with 'mute' in channel list)
+menu.hint_numeric_adjust Adjust channel list mode on numeric zap
+menu.hint_opkg Install or update software packages
+menu.hint_opkg_upgrade Updates all installed packages to the most recent version available
+menu.hint_osd Colors, fonts, screen size\nGUI look and feel options
+menu.hint_osd_language Select OSD language
+menu.hint_osd_preset Pre-configured screen margins for CRT and LCD TV
+menu.hint_osd_timing After this time the OSD will be faded out
+menu.hint_other_fonts Change other font sizes
+menu.hint_parentallock_changepin Change PIN code
+menu.hint_parentallock_lockage Select age allowed to watch
+menu.hint_parentallock_menu Lock menus with pin code
+menu.hint_parentallock_prompt Configure when Neutrino-HD will ask you\nfor PIN code
+menu.hint_personalize Enable, disable or Protect menu items\nConfigure color-buttons user menus
+menu.hint_pictureviewer_defdir Default picture viewer directory
+menu.hint_pictureviewer_scaling Picture scaling algorithm
+menu.hint_pictureviewer_setup Configure pictureviewer behavior
+menu.hint_pictureviewer_slide_time Slideshow interval, in seconds
+menu.hint_picview Przeglądarka obrazów jpeg,png i gif
+menu.hint_plugin_type_games Show games in usermenu at selection 'Plugin types'
+menu.hint_plugin_type_lua Show plugins in usermenu at selection 'Plugin types'
+menu.hint_plugin_type_scripts Show scripts in usermenu at selection 'Plugin types'
+menu.hint_plugin_type_tools Show tools in usermenu at selection 'Plugin types'
+menu.hint_plugins_hdd_dir Select directory to load\nplugins from
+menu.hint_power_leds Configure power-button LEDs behavior
+menu.hint_pref_lang Select preferred audio and EPG language\nselect 'none' to disable
+menu.hint_pref_subs Select preferred subtitle language\nselect 'none' to disable
+menu.hint_progressbar Select the options for the progressbar
+menu.hint_progressbar_color Change appearance of progress bars
+menu.hint_progressbar_gradient Add a vertical brightness gradient to progress bars
+menu.hint_progressbar_infobar_position Selects the options of progressbar in the infobar
+menu.hint_progressbar_preview Use OK to change the current progressbar state
+menu.hint_progressbar_timescale_green Choose the green portion of colored progressbars
+menu.hint_progressbar_timescale_invert Select your preferred color gradient
+menu.hint_progressbar_timescale_red Choose the red portion of colored progressbars
+menu.hint_progressbar_timescale_yellow Choose the yellow portion of colored progressbars
+menu.hint_protection Protect content by PIN code\nDefault PIN 0000
+menu.hint_radiomode Switch box to radio mode
+menu.hint_reboot Reboot box\nNo confirmation
+menu.hint_record_apid_ac3 Record AC3 audio pids
+menu.hint_record_apid_alt Record alternative non-AC3 audio pids
+menu.hint_record_apid_std Record first audio pid
+menu.hint_record_apids Configure audio pids to record
+menu.hint_record_apply Apply record options
+menu.hint_record_auto_cover Auto-create movie thumbnail for movie browser on record playback
+menu.hint_record_chandir Create directory with name of channel\nto store recording
+menu.hint_record_data Record (VideoText, subtitles) data streams
+menu.hint_record_data_dvbsub subtitle stream
+menu.hint_record_data_vtxt VideoText stream
+menu.hint_record_dir Select directory to store recordings
+menu.hint_record_end Stop direct record after maximal time or after current event end time
+menu.hint_record_filename_template edit filename template
+menu.hint_record_slow_warn Show warning, when record buffer is close to overflow
+menu.hint_record_startstop_msg Turns the message when recording start/end on or off.
+menu.hint_record_tdir Select directory to save timeshift recordings\nin temporary timeshift mode
+menu.hint_record_time Record duration before stop when\nusing direct record with record button
+menu.hint_record_time_ts Timeshift duration before stop when\ntemporary timeshift enabled
+menu.hint_record_timeafter Stop record after event end\nin minutes
+menu.hint_record_timebefore Start record before event start\nin minutes
+menu.hint_record_timer Configure record by timer options
+menu.hint_record_timeshift Configure timeshift options
+menu.hint_record_timeshift_auto Auto start timeshift after channel switch, in seconds
+menu.hint_record_timeshift_delete Delete timeshift files after timeshift stop
+menu.hint_record_timeshift_pause Start timeshift playback in paused mode
+menu.hint_record_timeshift_temp If off, timeshift started as\nany direct record
+menu.hint_record_zap Switch to channel to be recorded\nat record announce
+menu.hint_record_zap_pre_time For ZapTo timers, switch channel\nbefore event start, in minutes
+menu.hint_recording Recording and timeshift options\nTimers safety, audio pids options
+menu.hint_reload_channels Reload channels from flash
+menu.hint_reload_plugins Reload plugins from flash
+menu.hint_reset Reset Neutrino-HD GUI settings to defaults\nTuner config and channels not affected
+menu.hint_restore Restore files from selected backup
+menu.hint_rotor_swap Swap rotor east/west directions\nin motor control
+menu.hint_rounded_corners Draw round or rectangular windows corners
+menu.hint_save_settings Save all settings to flash
+menu.hint_saveas Save Neutrino-HD GUI settings to file
+menu.hint_scan_auto Auto-scan selected provider
+menu.hint_scan_autoall Scan several selected providers at once
+menu.hint_scan_autoall_select Add selected satellites to scan
+menu.hint_scan_bouquet Update: add to current bouquets, erase:\nremove old bouquets, leave: dont add or change
+menu.hint_scan_bouquet_writenames Write services names to bouquets \n never > fovourites only > providers only > both
+menu.hint_scan_bw Select the channel bandwidth
+menu.hint_scan_cable Select cable network to scan
+menu.hint_scan_cable_simple Cable scan with optional\nprovider channel numbering
+menu.hint_scan_commited Select commited input for\nthis satellite
+menu.hint_scan_delsys Select delivery system for this channel/TP.
+menu.hint_scan_diseqc Select diseqc switch input for\nthis satellite
+menu.hint_scan_diseqcorder Diseqc command order for cascaded switches
+menu.hint_scan_diseqcrepeat Diseqc repeat for cascaded switches
+menu.hint_scan_diseqctype Select your diseqc switch protocol\nwith 'advanced' you can use uncommited switches
+menu.hint_scan_fast CanalDigitaal/TéléSAT/TV Vlaanderen provider scan\nWARNING: diseqc config will be overwritten
+menu.hint_scan_fastdiseqc Start diseqc auto-configuration
+menu.hint_scan_fastprov Select provider to scan
+menu.hint_scan_fasttype Select fast scan type
+menu.hint_scan_fastupdate Enable/disable fast scan auto-update
+menu.hint_scan_fec Select transponder FEC
+menu.hint_scan_felink Select tuner to link tuner to
+menu.hint_scan_femode Select tuner connection type
+menu.hint_scan_fesetup Configure tuner(s)
+menu.hint_scan_fetimeout Time to wait for signal, in 1/10 of second
+menu.hint_scan_freq Enter transponder frequency
+menu.hint_scan_fta Add only free-to-air (not-scrambled) channels
+menu.hint_scan_gi Select the guard interval for this terrestrial channel
+menu.hint_scan_hierarchy Select the hierarchy for this terrestrial channel
+menu.hint_scan_ladirection Select latitude direction
+menu.hint_scan_latitude Enter your latitude
+menu.hint_scan_lnbconfig Configure LNB parameters for this satellite
+menu.hint_scan_lodirection Select longtitude direction
+menu.hint_scan_lofh High banb LNB frequency
+menu.hint_scan_lofl Low band LNB frequency
+menu.hint_scan_lofs Band switch LNB frequency
+menu.hint_scan_logical Use provider's channel numbering
+menu.hint_scan_logical_hd If both SD and HD channel versions present\nput HD to the top of list
+menu.hint_scan_longitude Enter your longtitude
+menu.hint_scan_manual Manual transponder scan using\nselected parameters
+menu.hint_scan_mod Select transponder modulation
+menu.hint_scan_motor Rotor options, satellite finder
+menu.hint_scan_motor_18v Use 18V when moving rotor
+menu.hint_scan_motor_speed Rotor moving speed in 1/10 degree\nper second
+menu.hint_scan_motorpos Select stored position number for this satellite,\nignored, if USALS enabled
+menu.hint_scan_nid Enter decimal network ID
+menu.hint_scan_nit Add transpoders from network information
+menu.hint_scan_pids Scan and save audio/video/PMT PIDs
+menu.hint_scan_pilot Select pilot parameter
+menu.hint_scan_pol Select transponder polarization
+menu.hint_scan_rate Enter transponder symbol rate
+menu.hint_scan_reset_numbers Reset exising channel numbers\nand re-number channels after scan
+menu.hint_scan_satadd Add satellites for this frontend
+menu.hint_scan_satellite Select satellite to scan
+menu.hint_scan_satenable Enable satellite for this frontend
+menu.hint_scan_satfind Satellite finder: manually drive your rotor\nto setup stored positions
+menu.hint_scan_satfind_start Start Satellite finder
+menu.hint_scan_satscan Scan selected satellite
+menu.hint_scan_satselect Select satellite
+menu.hint_scan_satsetup Configure satellites options
+menu.hint_scan_savesettings Save tuner config and scan settings\nAlso saved, if you start service scan
+menu.hint_scan_scantype Select, which channel types to scan
+menu.hint_scan_setup_fe Configure selected frontend options
+menu.hint_scan_start Start scan. You can use 'exit' button to stop
+menu.hint_scan_test Test signal for this transponder
+menu.hint_scan_tpselect Select transponder to scan
+menu.hint_scan_transmit_mode Select the transmission mode for this terrestrial channel
+menu.hint_scan_uncommited Select uncommited input for\nthis satellite
+menu.hint_scan_usals USALS options
+menu.hint_scan_usals_repeat Repeat usals move rotor commands\nif you expirience unstable rotor move
+menu.hint_scan_usalsall Use USALS for all satellites on this frontend
+menu.hint_scan_useusals Use USALS for this satellite,\nif ON, rotor position ignored
+menu.hint_scrambled_message Show scrambled message, when channel cannot be decoded
+menu.hint_screen_setup Configure screen margins
+menu.hint_screensaver_delay Set the time (in minutes) after which the screensaver has to start or turn it off
+menu.hint_screensaver_dir Select directory in which the screensaver has to start
+menu.hint_screensaver_timeout Select the timeout to change pictures in screensavers
+menu.hint_screensaver_setup Configure screensaver options for audioplayer and radio mode
+menu.hint_screenshot_count When no GUI on screen, you can save 1-5\nscreenshot serie
+menu.hint_screenshot_cover ON: When playing record, overwrite single\nscreenshot to show inside MovieBrowser
+menu.hint_screenshot_dir Select directory to save screenshots
+menu.hint_screenshot_format File format to save screenshot
+menu.hint_screenshot_res Screenshot size: current channel's video size\nor OSD size (1280x720)
+menu.hint_screenshot_scale For video+OSD screenshots, scale to video size
+menu.hint_screenshot_setup Configure screenshots options
+menu.hint_screenshot_video Include live video in screenshot
+menu.hint_scripts Run scripts
+menu.hint_selected_back Change selected item background color
+menu.hint_selected_text Change selected item text color
+menu.hint_service Tuner setup, service scan,\nbouquet editor, software upgrade
+menu.hint_service_scan Auto / manual service scan
+menu.hint_settings Configure Neutrino-HD\nNetwork, audio, video, OSD and more
+menu.hint_show_mute_icon Show mute icon, when volume set to 0
+menu.hint_shutdown Put your box in deep standby mode\nNo confirmation
+menu.hint_shutdown_count Time to put box in deep-standby\nfrom soft-standby mode
+menu.hint_shutdown_menu Put you receiver in sleep or deep standby mode, set sleep timer
+menu.hint_shutdown_rcdelay Enable deep-standby, if power button\npressed more than 1 second
+menu.hint_shutdown_real Enable soft-standby mode\nIf disabled, power button put box to deep-standby
+menu.hint_sleeptimer Set timer to put your box\nin sleep mode
+menu.hint_sleeptimer_min Default setting for sleeptimer
+menu.hint_soft_restart Restart Neutrino-HD without reboot
+menu.hint_softupdate_check Check online update, download and flash firmware
+menu.hint_softupdate_check_local Select and flash firmware from local file
+menu.hint_softupdate_createimage_menu Backup of current software, including all settings
+menu.hint_softupdate_expert Separate partitions from the flash read / write to the flash
+menu.hint_softupdate_expert_read Separate partitions (U-Boot, Splash, Kernel, SystemFS) from the flash read
+menu.hint_softupdate_expert_write Separate partitions (Splash, Kernel, SystemFS) write to the flash
+menu.hint_softupdate_settings The local update directory and the configuration file to set
+menu.hint_standby Put receiver to sleep mode
+menu.hint_start_tostandby Enter standby mode after boot
+menu.hint_streaminfo Current channel info: pids, signal and noise ratio\nBitrate graphs
+menu.hint_subchannel_pos Select subchannels menu position
+menu.hint_sw_update Update software
+menu.hint_theme Select pre-defined color theme\nSave or load theme from files
+menu.hint_timeouts Configure time to hide GUI windows\nin seconds
+menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc.
+menu.hint_timezone Select your timezone
+menu.hint_tools Run tools
+menu.hint_tvmode Switch box to TV mode
+menu.hint_tvradio_switch Switches between TV and Radio mode
+menu.hint_upnp Universal Plug and Play Browser
+menu.hint_vfd Frontpanel LEDs, VFD options
+menu.hint_vfd_brightness Working brightness
+menu.hint_vfd_brightness_setup Configure frontpanel display brightness\nfor different modes
+menu.hint_vfd_brightnessdeepstandby Brightness in deep-standby mode
+menu.hint_vfd_brightnessdim Auto-dim brightness
+menu.hint_vfd_brightnessstandby Brightness in soft-standby mode
+menu.hint_vfd_defaults Restore default brightness values
+menu.hint_vfd_dimtime Auto-dim time, in seconds
+menu.hint_vfd_infoline Choose what to display in main VFD line
+menu.hint_vfd_scroll Enable or disable text scrolling on VFD
+menu.hint_vfd_statusline Choose what to display in short\nVFD status line
+menu.hint_video Video output, resolution, format\nAspect ratio, fast mode switch options
+menu.hint_video_43mode Display mode for 4:3 content\non 16:9 TV
+menu.hint_video_analog_mode Select analog output mode\nfor SCART and CINCH connectors
+menu.hint_video_brightness Change picture brightness
+menu.hint_video_cinch_mode Select analog output mode for\ncomposite video out
+menu.hint_video_contrast Change picture contrast
+menu.hint_video_dbdr MPEG2 enhancement filters
+menu.hint_video_format TV aspect ratio
+menu.hint_video_mode HDMI output video mode
+menu.hint_video_modes VF key will cycle between enabled modes
+menu.hint_video_modes_auto Enable modes to auto-select based on content
+menu.hint_video_pip Picture in picture size and position
+menu.hint_video_saturation Change picture saturation
+menu.hint_video_scart_mode Select analog output mode for SCART connectors
+menu.hint_video_sdosd Enable/disable OSD display on SD output (scart, cinch)
+menu.hint_volume Configure Volume GUI options
+menu.hint_volume_digits Numeric display of the volumebar on/off
+menu.hint_volume_pos Select volume indicator position
+menu.hint_volume_size Select volume indicator height
+menu.hint_webtv_setup WebTV channels configured here will be available in the standard channel lists.
+menu.hint_window_size Channellist, EPG-infos and some other windows are scaled by this factor
+menu.hint_ytplay Play selected youtube feeds
+menu.hint_ytplay_setup Configure YouTube-specific options, e.g. an upper limit for search results
+menu.hint_zap_cycle Przy przełączaniu kanałów, pozostań w aktualnym bukiecie
+menu.next Dalej (Menu aby wyjść)
messagebox.back Wróć
messagebox.cancel Anuluj
messagebox.discard Czy chcesz odrzucić zmiany?
messagebox.error Błąd!
messagebox.info Informacja
messagebox.no NIE
+messagebox.ok Ok
messagebox.yes TAK
miscsettings.channellist Lista kanałów
+miscsettings.channellist_colored_events Podświetlony program
miscsettings.channellist_epgtext_align Wyrównywanie informacji EPG
+miscsettings.colored_events_0 żaden
+miscsettings.colored_events_1 aktualny
+miscsettings.colored_events_2 następny
miscsettings.energy Zarządzanie energią
miscsettings.epg_cache Bufor EPG (dni)
miscsettings.epg_cache_hint1 Wpisz na ile dni do przodu
@@ -660,39 +1397,85 @@ miscsettings.epg_extendedcache_hint2 podręcznej. Cokolwiek to znaczy. ;)
miscsettings.epg_head EPG
miscsettings.epg_max_events Maksymalna ilość wpisów
miscsettings.epg_max_events_hint1 Podaj ilość buforowanych wpisów.
-miscsettings.epg_max_events_hint2 Domyślnie 6000, 0 aby wyłącza limit.
+miscsettings.epg_max_events_hint2 Domyślnie 6000, 0 wyłącza limit.
miscsettings.epg_old_events Bufor starych wpisów (godz.)
miscsettings.epg_old_events_hint1 Wpisz do ilu godzin wstecz
miscsettings.epg_old_events_hint2 pokazywać stare wpisy.
-miscsettings.epg_save Zapis i przywracanie EPG
+miscsettings.epg_read Przywróć EPG przy starcie
+miscsettings.epg_save Zapis EPG
+miscsettings.epg_save_frequently Częstość zapisu EPG
+miscsettings.epg_save_mode Tylko Ulubione
+miscsettings.epg_save_standby Zapis EPG w standby
+miscsettings.epg_scan Skanowanie EPG
+miscsettings.epg_scan_always Zawsze
+miscsettings.epg_scan_bouquets EPG scan bouquets
+miscsettings.epg_scan_bq Bukiet
+miscsettings.epg_scan_fav Ulubione
+miscsettings.epg_scan_live Na bieżąco
+miscsettings.epg_scan_sel Wybrane
+miscsettings.epg_scan_standby W stanie czuwania
miscsettings.general Ogólne
miscsettings.head Ustawienia różne
miscsettings.infobar Belka informacyjna
miscsettings.infobar_casystem_display Ikony systemów kodowania
miscsettings.infobar_casystem_mini mini
miscsettings.infobar_casystem_mode dyskretne
-miscsettings.infobar_disp_0 brak
-miscsettings.infobar_disp_1 pozycja pierwsza
-miscsettings.infobar_disp_2 pozycja druga
-miscsettings.infobar_disp_3 pozycja trzecia
+miscsettings.infobar_colored_events Podświetlony program
+miscsettings.infobar_disp_0 Bez Logo
+miscsettings.infobar_disp_1 Logo w polu numer
+miscsettings.infobar_disp_2 Logo+numer kanału
+miscsettings.infobar_disp_3 Logo+nazwa kanału+sygnał
+miscsettings.infobar_disp_4 Logo+nazwa kanału/numer kanału
+miscsettings.infobar_disp_5 Logo+sygnał
+miscsettings.infobar_disp_6 Logo+numer kanału+sygnał
miscsettings.infobar_disp_log Logo kanału
+miscsettings.infobar_logo_hdd_dir Lokalizacja logo
miscsettings.infobar_sat_display Wyświetlanie nazwy satelity
miscsettings.infobar_show Pokaż pasek po zmianie epg
+miscsettings.infobar_show_dd_available Pokaż dostępność Dolby Digital
miscsettings.infobar_show_res Pokaż rozdzielczość
miscsettings.infobar_show_res_simple prosta
-miscsettings.infobar_show_var_hdd Paski zapełnienia pamięci flash i dysku
+miscsettings.infobar_show_sysfs_hdd Pokaż wykorzystanie pamięci i HDD
+miscsettings.infobar_show_tuner Pokaż aktywny tuner
+miscsettings.infoclock Zegar
+miscsettings.progressbar Pasek postępu
+miscsettings.progressbar_color Kolor
+miscsettings.progressbar_design Wygląd
+miscsettings.progressbar_design_0 punkty
+miscsettings.progressbar_design_1 paski pionowe
+miscsettings.progressbar_design_2 paski poziome
+miscsettings.progressbar_design_3 kolorowy
+miscsettings.progressbar_design_4 monochrome
+miscsettings.progressbar_design_long Design
+miscsettings.progressbar_gradient 3D effect
+miscsettings.progressbar_infobar_position Położenie
+miscsettings.progressbar_infobar_position_0 standardowe
+miscsettings.progressbar_infobar_position_1 poniżej nazwy kanału
+miscsettings.progressbar_infobar_position_2 mały i poniżej nazwy kanału
+miscsettings.progressbar_infobar_position_3 wąski i między EPG-Events
+miscsettings.progressbar_preview Podgląd
+miscsettings.progressbar_timescale Time scale
+miscsettings.progressbar_timescale_green zielony
+miscsettings.progressbar_timescale_green_red z zielonego na czerwony
+miscsettings.progressbar_timescale_invert Kolor gradient
+miscsettings.progressbar_timescale_red czerwony
+miscsettings.progressbar_timescale_red_green z czerwonego na zielony
+miscsettings.progressbar_timescale_yellow żółty
+miscsettings.radiotext Radiotext
miscsettings.shutdown_count Całkowite wyłączenie po (min, 0-wył)
-miscsettings.shutdown_count_hint1 Czas w minutach, po którym odbiornik w trybie
+miscsettings.shutdown_count_hint1 Czas w minutach, po którym odbiornik w trybie
miscsettings.shutdown_count_hint2 gotowości wyłączy się całkowicie (0-wył).
miscsettings.shutdown_real Tryb gotowości
miscsettings.shutdown_real_rcdelay Wyłączenie po przytrzymaniu
-miscsettings.sleeptimer Deaktywuj wył. timera po:
-miscsettings.virtual_zap_mode Wirtualne przełączanie
+miscsettings.sleeptimer Aktywacja wyłącznika czasowego (min.):
+miscsettings.sleeptimer_min Domyślny wyłącznik czasowy
+miscsettings.volume Głośność
+miscsettings.zapto_pre_time Korekcja czasu po starcie
motorcontrol.calc_positions Wyliczenie pozycji
-motorcontrol.disable_limit Wyłączenie limitów
-motorcontrol.drive_mode tryb rychu
-motorcontrol.drive_mode_auto Zatrzymanie ręczne/automatyczne
-motorcontrol.east_limit Ustawienie limitu kierunku wschodniego
+motorcontrol.disable_limit Wyłączenie limitów
+motorcontrol.drive_mode tryb ruchu
+motorcontrol.drive_mode_auto Zatrzymanie ręczne/automatyczne
+motorcontrol.east_limit Ustawienie limitu kierunku wschodniego
motorcontrol.enable_limit Włączenie limitów
motorcontrol.goto Przejście do pozycji obrotnicy (a)
motorcontrol.halt Zatrzymanie obrotnicy
@@ -701,11 +1484,13 @@ motorcontrol.install_menu Menu instalacji
motorcontrol.motor_pos (a) Pozycja obrotnicy:
motorcontrol.movement (b) Przesuwanie:
motorcontrol.msec ms
+motorcontrol.network Informacje o sieci
motorcontrol.no_mode brak trybu pracy
motorcontrol.notdef Nie używany
+motorcontrol.override Zastąp
motorcontrol.pos_decrease Zmiana (-) pozycji obrotnicy (a)
motorcontrol.pos_increase Zmiana (+) pozycji obrotnicy (a)
-motorcontrol.ref_position Przejście do pozycji
+motorcontrol.ref_position Przejście do pozycji
motorcontrol.sat_pos Pozycja satelity (Tryb krok po kroku):
motorcontrol.settings Ustawienia kontroli obrotnicy
motorcontrol.status Status
@@ -719,77 +1504,95 @@ motorcontrol.step_west Ruch obrotnicy na zachód (b,c)
motorcontrol.stop_moving zatrzymaj na dobrym sygnale (przesuwam)
motorcontrol.stop_stopped zatrzymaj na dobrym sygnale (zatrzymano)
motorcontrol.store Zapis pozycji obrotnicy (a)
-motorcontrol.timed_mode Czas dla trybu krokowego
+motorcontrol.timed_mode Czas dla trybu krokowego
motorcontrol.user_menu Menu użytkownika
-motorcontrol.west_limit Ustawienie limitu kierunku zachodniego
+motorcontrol.west_limit Ustawienie limitu kierunku zachodniego
+moviebrowser.ask_rec_to_delete Usunięcie filmu zatrzymuje bieżące nagrywanie!\n[%s]\nKontynuować mimo to??
+moviebrowser.book_add Dodaj zakładkę
moviebrowser.book_clear_all Wyczyść wszystko
moviebrowser.book_head Zakładki
-moviebrowser.book_lastmoviestop od ostatniego miejsca
-moviebrowser.book_movieend koniec filmu:
+moviebrowser.book_lastmoviestop Ostatnio odtwarzany
+moviebrowser.book_movieend Koniec filmu:
moviebrowser.book_moviestart Start filmu:
moviebrowser.book_name Nazwa:
moviebrowser.book_new Nowa zakładka
+moviebrowser.book_no_end Nie zdefiniowano zakładki
moviebrowser.book_position Pozycja:
moviebrowser.book_type Skocz (<0 w tył , >0 do przodu):
moviebrowser.book_type_backward Powtórz
-moviebrowser.book_type_forward skocz poza
+moviebrowser.book_type_forward Skocz poza
moviebrowser.browser_frame_high Wysokość przeglądarki [%]
moviebrowser.browser_row_head Ustawienia wierszy
moviebrowser.browser_row_item Ustęp wiersza
moviebrowser.browser_row_nr Ilość wierszy
moviebrowser.browser_row_width Szerokośc wiersza [%]
+moviebrowser.cache_dir Cache directory
+moviebrowser.copies Copy jumps from movie to new files?
+moviebrowser.copy Copy jumps from movie to new file?
+moviebrowser.copy_failed Copy failed, are there jump bookmarks and enough free space?
+moviebrowser.copying Kopiowanie, proszę czekać ...
+moviebrowser.cut Cut jumps from movie?
+moviebrowser.cut_failed Cut failed, are there jump bookmarks and enough free space?
+moviebrowser.cutting Cutting movie, proszę czekać ...
+moviebrowser.delete_info Usuwanie plików, proszę czekać...
+moviebrowser.delete_screenshot Usunąć screenshot?
moviebrowser.dir Ścieżka
moviebrowser.dir_head Dodatkowe ściezki
moviebrowser.edit_book Zmień zakładkę
-moviebrowser.edit_book_name_info1 Wprowadź nową nazwę zakładki
+moviebrowser.edit_book_name_info1 Wprowadź nową nazwę zakładki
moviebrowser.edit_book_name_info2 nazwa zakładki
-moviebrowser.edit_book_pos_info1 Wprowadź nową pozycję
-moviebrowser.edit_book_pos_info2
+moviebrowser.edit_book_pos_info1 Wprowadź nową pozycję
+moviebrowser.edit_book_pos_info2
moviebrowser.edit_book_type_info1 Wprowadź nową długość skoku
moviebrowser.edit_book_type_info2 <0 w tył , >0 w przód, 0: brak
-moviebrowser.edit_serie Wprowadź nazwę serii
+moviebrowser.edit_serie Wprowadź nazwę serii
moviebrowser.error_no_movies Nie znaleziono filmów
moviebrowser.foot_filter Filtruj:
+moviebrowser.foot_focus Okno przełączania
+moviebrowser.foot_options Opcje
moviebrowser.foot_play Start filmu
+moviebrowser.foot_refresh Odśwież listę
moviebrowser.foot_sort Sortuj:
moviebrowser.head Biblioteka nagrań
moviebrowser.head_filter Filtruj filmy wg. kategorii:
moviebrowser.head_playlist Ostatnio odtwarzane:
moviebrowser.head_recordlist Ostatnio nagrane:
moviebrowser.hide_series Ukryj serie
-moviebrowser.hint_jumpbackward Skocz w tył o 5s\n '0' aby anulować
+moviebrowser.hint_jumpbackward Skocz w tył o 5s\n '0' aby anulować
moviebrowser.hint_jumpforward Skocz do przodu o 5s\n '0' aby anulować
moviebrowser.hint_movieend Zakończ odtwarzanie w 5 s\n '0' aby anulować
moviebrowser.hint_newbook_backward Nowy skok w tył \n 'niebieski' końcowa pozycja
-moviebrowser.hint_newbook_forward Nowy skok w przód\n 'niebieski' końcowa pozycja
+moviebrowser.hint_newbook_forward Nowy skok w przód\n 'niebieski' końcowa pozycja
moviebrowser.info_audio Audio
moviebrowser.info_channel Kanał
+moviebrowser.info_file Plik
moviebrowser.info_filename Nazwa
moviebrowser.info_genre_major Genre
-moviebrowser.info_genre_minor Genre
+moviebrowser.info_genre_minor Genre (minor)
moviebrowser.info_head Informacja o filmie
-moviebrowser.info_head_update Zapisz zmiany we wszystkich plikach
+moviebrowser.info_head_update Zapisz zmiany we wszystkich plikach
moviebrowser.info_info1 Info 1
-moviebrowser.info_length Długość (min)
+moviebrowser.info_info2 Info 2
+moviebrowser.info_length Czas trwania (min)
moviebrowser.info_parental_lockage Blokada rodzicielska
moviebrowser.info_parental_lockage_0year zawsze
moviebrowser.info_parental_lockage_12year 12 lat
moviebrowser.info_parental_lockage_16year 16 lat
moviebrowser.info_parental_lockage_18year 18 lat
moviebrowser.info_parental_lockage_6year 6 lat
-moviebrowser.info_parental_lockage_always nigdy
+moviebrowser.info_parental_lockage_always nigdy
moviebrowser.info_path Katalog
moviebrowser.info_prevplaydate Data ostatniego odtwarzania
moviebrowser.info_prodcountry Kraj
moviebrowser.info_prodyear Rok
moviebrowser.info_quality Jakość
-moviebrowser.info_recorddate Data nagranie
+moviebrowser.info_recorddate Data nagrania
moviebrowser.info_serie Seria
moviebrowser.info_size Rozmiar (MB)
moviebrowser.info_title Tytuł
moviebrowser.info_videoformat Obraz
-moviebrowser.last_play_max_items Liczba linii ostatniego odtwarzania
-moviebrowser.last_record_max_items Liczba linii ostatniego nagrania
+moviebrowser.last_play_max_items Liczba linii ostatniego odtwarzania
+moviebrowser.last_record_max_items Liczba linii ostatniego nagrania
moviebrowser.load_default Ładuj ustawienia domyślne
moviebrowser.menu_directories_head Katalogi
moviebrowser.menu_help_head Pomoc
@@ -797,18 +1600,18 @@ moviebrowser.menu_main_bookmarks Zakładki
moviebrowser.menu_main_head Ustawienia
moviebrowser.menu_nfs_head Ustawienia NFS
moviebrowser.menu_parental_lock_activated aktywne
-moviebrowser.menu_parental_lock_activated_no nue
+moviebrowser.menu_parental_lock_activated_no nie
moviebrowser.menu_parental_lock_activated_no_temp nie (tymczasowo)
moviebrowser.menu_parental_lock_activated_yes tak
moviebrowser.menu_parental_lock_head Blokada
-moviebrowser.menu_parental_lock_rate_head Zablokuj film z
+moviebrowser.menu_parental_lock_rate_head Zablokuj film z
moviebrowser.menu_save Zapisz zmiany
-moviebrowser.menu_save_all Rozpocznij aktualizację informacji o pliku
+moviebrowser.menu_save_all Rozpocznij aktualizację informacji o pliku
moviebrowser.option_browser Opcje przeglądania
moviebrowser.reload_at_start Przeładuj informacje o filmie na starcie
moviebrowser.remount_at_start Montuj na starcie
moviebrowser.scan_for_movies Szukaj filmu ...
-moviebrowser.serie_auto_create Autmatycznie twórz serie
+moviebrowser.serie_auto_create Automatycznie twórz serie
moviebrowser.serie_head Seria
moviebrowser.serie_name Zmień nazwę
moviebrowser.short_audio Audio
@@ -821,7 +1624,7 @@ moviebrowser.short_genre_major Wiek
moviebrowser.short_genre_minor Wiek
moviebrowser.short_info1 Info 1
moviebrowser.short_info2 Info 2
-moviebrowser.short_length min
+moviebrowser.short_length Min
moviebrowser.short_parental_lockage Wiek
moviebrowser.short_path Katalog
moviebrowser.short_prevplaydate Ostatni
@@ -833,46 +1636,88 @@ moviebrowser.short_size Rozmiar MB
moviebrowser.short_title Tytuł
moviebrowser.start_head Odtwarzanie...
moviebrowser.start_record_start od początku nagrania
+moviebrowser.truncate Obciąć film?
+moviebrowser.truncate_failed Błąd.
+moviebrowser.truncate_failed_playing Impossible to truncate playing movie.
+moviebrowser.truncating Skracanie filmu, proszę czekać ...
+moviebrowser.ts_only Pokaż tylko nagrania
moviebrowser.update_if_dest_empty_only Kopiuj jeśli miejsce docelowe jest puste
moviebrowser.use_dir Użyj katalogu
moviebrowser.use_movie_dir Użyj katalogu z filmami
moviebrowser.use_rec_dir Użyj katalogu do nagrywania
+moviebrowser.yt_cache Pobrane
+moviebrowser.yt_cache_add Pobieranie \n%s\njest zaplanowane.
+moviebrowser.yt_cancel Anuluj wszystko
+moviebrowser.yt_cancel_transfer anuluj pobieranie?
+moviebrowser.yt_clear Czyść
+moviebrowser.yt_completed Pobieranie zakończone
+moviebrowser.yt_concurrent_connections Jednoczesne połączenia
+moviebrowser.yt_error Nie udało się załadować kanału youtube
+moviebrowser.yt_failed Błąb pobierania
+moviebrowser.yt_history Historia wyszukiwania
+moviebrowser.yt_max_history Maksymalny rozmiar historii wyszukiwania
+moviebrowser.yt_max_results Maksymalna ilość wyników do pobrania
+moviebrowser.yt_most_popular Najbardziej popularne dziś
+moviebrowser.yt_most_popular_all_time Najbardziej popularne
+moviebrowser.yt_next_results Następne wyniki
+moviebrowser.yt_orderby Sortuj
+moviebrowser.yt_orderby.published data publikacji
+moviebrowser.yt_orderby.rating ocena
+moviebrowser.yt_orderby.relevance dostosowanie
+moviebrowser.yt_orderby.viewcount ilość oglądań
+moviebrowser.yt_pending Oczekiwanie na pobranie
+moviebrowser.yt_pref_quality Preferowana jakość
+moviebrowser.yt_prev_results Poprzednie wyniki
+moviebrowser.yt_recently_featured Ostatnio wyróżnione
+moviebrowser.yt_region Region
+moviebrowser.yt_related Podobne filmy
+moviebrowser.yt_search Szukaj wg słowa kluczowego
movieplayer.bookmark Zakładki
movieplayer.bookmarkname Nazwa zakładki
movieplayer.bookmarkname_hint1 Podaj nazwę nowej zakładki
movieplayer.bookmarkname_hint2 Podaj nazwę nowej zakładki
+movieplayer.chapters Rozdziały
+movieplayer.defplugin Plugin startowy
movieplayer.fileplayback Odtwórz plik...
movieplayer.head Odtwarzacz filmów
+movieplayer.starting Rozpoczęcie odtwarzania...
+movieplayer.titles Tytuły
movieplayer.toomanybookmarks Za dużo zakładek. Aby dodać\nkolejną musisz jedną usunąć.
-movieplayer.tshelp1 Stop
+movieplayer.tshelp1 Stop
movieplayer.tshelp10 przesuń 10 min do tyłu
-movieplayer.tshelp11 przesuń 10 min do przodu
-movieplayer.tshelp12 Pomoc: http://www.giggo.de/dbox2/movieplayer.html\n
-movieplayer.tshelp2 Wybierz utwór
+movieplayer.tshelp11 przesuń 10 min do przodu
+movieplayer.tshelp12 Pomoc: http://www.giggo.de/dbox2/movieplayer.html\n
+movieplayer.tshelp2 Wybierz utwór
movieplayer.tshelp3 Pauza/Odtwarzaj
-movieplayer.tshelp4 Utwórz zakładkę
-movieplayer.tshelp5 Pokaż postęp
+movieplayer.tshelp4 Utwórz zakładkę
+movieplayer.tshelp5 Pokaż postęp
movieplayer.tshelp6 przesuń 1 min do tyłu
movieplayer.tshelp7 przesuń 1 min do przodu
movieplayer.tshelp8 przesuń 5 min do tyłu
-movieplayer.tshelp9 przesuń 5 min do przodu
+movieplayer.tshelp9 przesuń 5 min do przodu
movieplayer.tsplayback Odtwarzaj TS
+movieplayer.ytplayback Odtwarzaj Youtube
mpkey.audio Utwór audio
mpkey.bookmark zapisz zakładkę
mpkey.forward Do przodu
+mpkey.goto Czas utworu
+mpkey.next_repeat_mode Następny Ponowne-Odtwarzanie
mpkey.pause Pauza
mpkey.play Play
mpkey.plugin Uruchom plugin
mpkey.rewind Wstecz
mpkey.stop Stop
+mpkey.subtitle Napisy
mpkey.time Pokaż czas
networkmenu.apply_settings Wprowadzanie zmian, proszę czekać...
networkmenu.apply_settings_now Zastosować wprowadzone zmiany?
-networkmenu.broadcast Adres rozgłoszenia
+networkmenu.broadcast Adres rozgłaszenia
networkmenu.dhcp DHCP
networkmenu.error_no_address %s nie został(a) wprowadzony!
networkmenu.gateway Adres bramy
networkmenu.hostname Nazwa hosta
+networkmenu.hostname_hint1 Wpisz nazwę hosta
+networkmenu.hostname_hint2 Wymagane ponowne uruchomienie po zmianie
networkmenu.inactive_network Sieć nieaktywna!
networkmenu.ipaddress Adres IP
networkmenu.mount Zasoby sieciowe
@@ -884,15 +1729,19 @@ networkmenu.ntprefresh_hint1 Podaj liczbę minut co jaką nastąpi
networkmenu.ntprefresh_hint2 synchronizacja czasu z serwerem NTP
networkmenu.ntpserver Adres serwera NTP
networkmenu.ntpserver_hint1 Podaj adres serwera NTP
-networkmenu.ntpserver_hint2
+networkmenu.ntpserver_hint2 Konieczny Reboot albo EPG-Reset
networkmenu.ntptitle Aktualizacja czasu
networkmenu.password Hasło/Klucz
networkmenu.reset_settings_now Przywrócić poprzednie ustawienia?
networkmenu.select_if Interfejs sieciowy
+networkmenu.services Usługi sieciowe
networkmenu.setupnow Zastosuj
networkmenu.setuponstartup Aktywne po uruchomieniu
networkmenu.show Bieżące ustawienia
-networkmenu.ssid SSID
+networkmenu.ssid Nazwa sieci (SSID)
+networkmenu.ssid_scan Skanowanie sieci WLAN
+networkmenu.ssid_scan_error Nie znaleziono sieci WLAN.
+networkmenu.ssid_scan_wait Skanowanie sieci WLAN w toku ...
networkmenu.test Test ustawień
neutrino_starting Uruchamianie Neutrino...
nfs.alreadymounted Zasób jest już podłączony.
@@ -908,7 +1757,8 @@ nfs.mountnow Podłącz teraz
nfs.mountok Montowanie zakończone pomyślnie
nfs.mounttimeout Błąd podłączenia: upłynął limit czasu.
nfs.password Hasło (CIFS)
-nfs.remount Odśwież
+nfs.refresh_mac Sprawdź Mac
+nfs.remount Odśwież
nfs.type Protokół
nfs.type_cifs CIFS
nfs.type_lufs FTPFS
@@ -922,16 +1772,35 @@ nvod.starting (rozpoczęcie za %d min)
nvodselector.directormode Widok
nvodselector.head Wybierz czas rozpoczęcia
nvodselector.subservice Perspektywy
+opkg.button.expert_off Tryb standardowy
+opkg.button.expert_on Tryb eksperta
+opkg.button.info Informacje o pakiecie
+opkg.button.install Instalacja pakietu
+opkg.button.uninstall Odinstalowanie pakietu
+opkg.failure.install Bład instalacji (%d)
+opkg.failure.update Błąd aktualizacji (%d)
+opkg.failure.upgrade Błąd aktualizacji (%d)
+opkg.messagebox.reinstall Przeinstalowanie %s?
+opkg.messagebox.remove Usunąć %s?
+opkg.success.install Instalacja zakończona, wymagany restart Neutrino.
+opkg.title Package Management
+opkg.upgrade Aktualizacja pakietów
options.default Przywróć wartości domyślne
options.fb ekran
-options.null brak
-options.off NIE
-options.on TAK
+options.hint_default Resetowanie do wartości domyślnych
+options.ntp_off DVB
+options.ntp_on NTP
+options.null brak
+options.off NIE
+options.on TAK
options.on.without_messages Bez wiadomości
options.serial serial
+parentallock.bouquetmode Domyślne bukiety
parentallock.changepin Zmiana kodu PIN
parentallock.changepin_hint1 Wpisz nowy kod PIN.
parentallock.changetolocked zablokowane bukiety
+parentallock.defaultlocked zablokowany
+parentallock.defaultunlocked odblokowany
parentallock.head Blokada rodzicielska
parentallock.lockage Blokowane programy
parentallock.lockage12 od dwunastu lat
@@ -939,37 +1808,76 @@ parentallock.lockage16 od szesnastu lat
parentallock.lockage18 od osiemnastu lat
parentallock.lockedchannel Kanał zablokowany...
parentallock.lockedprogram Program zablokowany (od lat %d)
+parentallock.menu Ustawienia blokady rodzicielskiej
parentallock.never nigdy
parentallock.onsignal sygnał nadawcy
parentallock.parentallock Blokada rodzicielska
parentallock.prompt Żądanie kodu PIN
+parentallock.zaptime Ustaw czas dla blokowanych (min)
+personalize.access Opcje dostępu
+personalize.apply_settings Zastosować zmiany?
+personalize.button_auto auto
+personalize.button_blue niebieski
+personalize.button_green zielony
+personalize.button_red czerwony
+personalize.button_yellow żółty
+personalize.disabled Wyłączony
+personalize.enabled Włączony
+personalize.head Ustawienia własne
+personalize.help Pomoc
+personalize.help_line1 Personalizacja umożliwia najlepsze
+personalize.help_line2 dostosowanie. Menu może być ustawione jako
+personalize.help_line3 widoczne, niewidoczne, aktywne, nieaktywne
+personalize.help_line4 lub zabezpieczone kodem PIN.
+personalize.help_line5 Dostęp do personalizacji można zabezpieczyć za pomocą
+personalize.help_line6 kodu PIN. PIN jest identyczny dla wszystkich chronionych
+personalize.help_line7 menu z wyjątkiem blokady rodzicielskiej.
+personalize.help_line8 Domyślny kod PIN to: 0000
+personalize.menuconfiguration Menu konfiguracji
+personalize.menudisabledhint Potrzebne menu jest obecnie wyłączone!\nW celu aktywacji należy otworzyć menu 'Ustawienia własne'\naby znaleźć się w menu 'Ustawienia'!
+personalize.notprotected Nie
+personalize.notvisible nie widać
+personalize.pin PIN
+personalize.pin_in_use Kod dostępu do ustawień własnych
+personalize.pincode Kod dostępu
+personalize.pinhint Wpisz kod dostępu
+personalize.pinprotect Tak
+personalize.pinstatus Wymagany PIN
+personalize.plugins Pluginy
+personalize.usermenu_plugin_types Wybór typów pluginów
+personalize.usermenu_preferred_buttons Przyporządkowanie preferowanych przycisków
+personalize.usermenu_show_cancel Pokaż klawisz "Cancel"
+personalize.visible widać
pictureviewer.defdir Katalog startowy
pictureviewer.head Przeglądarka obrazów
pictureviewer.help1 Funkcje przycisków w menu
-pictureviewer.help10 Funkcje przycisków podczas wyświetlania obrazu
-pictureviewer.help11 Ponowne odczytanie obrazu
-pictureviewer.help12 Poprzedni obraz
-pictureviewer.help13 Następny obraz
-pictureviewer.help14 Powiększenie
-pictureviewer.help15 Pomniejszenie
-pictureviewer.help16 Przesunięcie w górę
-pictureviewer.help17 Przesunięcie w lewo
-pictureviewer.help18 Przesunięcie w prawo
-pictureviewer.help19 Przesunięcie w dół
+pictureviewer.help10 Ponowne odczytanie obrazu
+pictureviewer.help11 Poprzedni obraz
+pictureviewer.help12 Następny obraz
+pictureviewer.help13 Powiększenie
+pictureviewer.help14 Pomniejszenie
+pictureviewer.help15 Przesunięcie w górę
+pictureviewer.help16 Przesunięcie w lewo
+pictureviewer.help17 Przesunięcie w prawo
+pictureviewer.help18 Przesunięcie w dół
+pictureviewer.help19 Ponowne odczytanie obrazu (bez skalowania)
pictureviewer.help2 Wyświetlenie obrazu
-pictureviewer.help20 Zmiana rodzaju sortowania
-pictureviewer.help21 Ponowne odczytanie obrazu (bez skalowania)
-pictureviewer.help22 Powrót do menu
pictureviewer.help3 Zmiana rodzaju sortowania
-pictureviewer.help4 Wyłączenie skalowania
+pictureviewer.help30 Tryb audioplayer
+pictureviewer.help31 Start
+pictureviewer.help32 Pauza
+pictureviewer.help33 Stop
+pictureviewer.help34 Nastepny tytuł
+pictureviewer.help35 Poprzedni tytuł
+pictureviewer.help4 Wyłączenie skalowania
pictureviewer.help5 Funkcje przycisków w menu
pictureviewer.help6 Poprzedni obraz
pictureviewer.help7 Nastepny obraz
-pictureviewer.help8 Zmiana rodzaju sortowania
-pictureviewer.help9 Wyjście
+pictureviewer.help8 Wyjście
+pictureviewer.help9 Zmiana rodzaju sortowania
pictureviewer.resize.color_average zaawansowane
pictureviewer.resize.none brak
-pictureviewer.resize.simple proste
+pictureviewer.resize.simple proste
pictureviewer.scaling Rodzaj skalowania
pictureviewer.show Wyświetl
pictureviewer.slide_time Czas wyświetlania slajdu
@@ -982,36 +1890,68 @@ ping.socket jest niedostępny (błąd gniazda)
ping.unreachable jest niedostępny
pinprotection.head Wpisz kod PIN
pinprotection.wrongcode Wpisz ponownie kod PIN!
-plugins.hdd_dir Katalog na hdd dla pluginów.
+plugins.hdd_dir Katalog na hdd dla pluginów
plugins.result Wynik działania skryptu
-progressbar.color Kolorowe paski postępu
-rclock.lockmsg Sterowanie odbiornikiem zostanie zablokowane, aby je\nprzywrócić naciśnij [Czerwony], a następnie [Menu].
+plugintype.disabled Zamknięte
+plugintype.game Gry
+plugintype.lua Plugin Lua
+plugintype.script Skrypt
+plugintype.tool Narzędzia
+rclock.lockmsg Sterowanie odbiornikiem zostanie zablokowane, aby je\nprzywrócić naciśnij [Czerwony], a następnie [Menu].
rclock.menueadd Blokada pilota
-rclock.title Blokada pilota
-rclock.unlockmsg Sterowanie pilotem zostało odblokowane.
+rclock.title Blokada pilota
+rclock.unlockmsg Sterowanie pilotem zostało odblokowane.
+recording.is_running Ten kanał jest już nagrywany. Zacząć nowe nagranie?
+recording.start Start nagrywania, proszę czekać...!
+recording.startstop_msg Komunikat gdy nagrywanie jest wł/wył
+recording.stop Zatrzymywanie nagrywania, proszę czekać...!
+recording.time_hour godz.
+recording.time_hours godz.
+recording.time_min min.
recordingmenu.apids Ścieżki audio
recordingmenu.apids_ac3 Nagrywanie ścieżki Dolby Digital
-recordingmenu.apids_alt Nagrywanie pozostałych ścieżek
+recordingmenu.apids_alt Nagrywanie pozostałych ścieżek
recordingmenu.apids_std Nagrywanie standardowej ścieżki
+recordingmenu.auto_cover Auto-thumbnail
+recordingmenu.data_pids Dane strumienia
recordingmenu.defdir Katalog nagrań
+recordingmenu.dvbsub_pids Zapis strumienia dvbsub
+recordingmenu.end_of_recording_epg EPG aktywnego wydarzenia
+recordingmenu.end_of_recording_max max. Czas nagrywania
+recordingmenu.end_of_recording_name Czas zakończenia nagrywania
recordingmenu.file dysk
+recordingmenu.filename_template Szablon nazwy pliku
+recordingmenu.filename_template_hint wildcards zostaną zastąpione
+recordingmenu.filename_template_hint2 %C = kanał, %T = tytuł, %I = info, %d = data, %t = czas
recordingmenu.help Urządzenia nagrywające:\n--------------------------------------\nserwer:\nwykorzystuje serwer strumieniowania\n\nmagnetowid:\nwykorzystuje gniazdo magnetowidu (drugi scart)\n\ndysk:\nwykorzystuje zasób sieciowy (NFS)\nlub wewnętrzny dysk twardy\nTS: używaj trybu SPTS(Dbox2)\nPES: nie używaj trybu SPTS(Dbox2)\n\n\nMaksymalny rozmiar pliku:\n---------------------\nNFS V2: 2 GB (2048 MB)\nNFS V3: bez ograniczeń (0 MB)\nFAT: 2 GB (2048 MB)\nFAT32: 4 GB (4096 MB)\n\nDla NFS (UDP) zaleca się zapis synchroniczny
+recordingmenu.multimenu.ask_stop_all Napewno zatrzymać wszystkie %d nagrania?
+recordingmenu.multimenu.info_stop_all %d z %d nagrań będą zatrzymane.
+recordingmenu.multimenu.rec_akt nagrywanie aktualnego kanału
+recordingmenu.multimenu.stop_all zatrzymanie wszystkich nagrań
+recordingmenu.multimenu.timeshift Timeshift
recordingmenu.off wyłączone
-recordingmenu.save_in_channeldir Zapisz w katalogu
+recordingmenu.record_is_not_running Nagrywanie nie rozpoczęło się!
+recordingmenu.record_is_running Nagrywanie rozpoczęte!
+recordingmenu.save_in_channeldir Zapisz w katalogu
+recordingmenu.server Serwer
recordingmenu.server_mac Adres MAC serwera (dla opcji WoL)
recordingmenu.setupnow Zastosuj
+recordingmenu.slow_warn Włącz ostrzeżenie o zwolnieniu nagrywania
+recordingmenu.timeshift Timeshift
recordingmenu.tsdir Katalog opcji timeshift
-recordingmenu.vcr magnetowid
+recordingmenu.vcr Magnetowid
+recordingmenu.vtxt_pid Nagrywaj teletext
recordingmenu.zap_on_announce Powiadamianie o nagrywaniu
recordtimer.announce Za kilka minut rozpocznie się nagrywanie.
-repeatblocker.hint_1 Opóźnienie między kolejnymi naciśnięciami przycisku
-repeatblocker.hint_2 0 - wyłączenie blokady (przycisk czerwony)
reset_all Ustawienia fabryczne
reset_channels Usuwanie listy kanałów
reset_confirm Jesteś pewny?
+reset_removed Skasuj usuniete kanały
reset_settings Przywróć domyślne
-satsetup.auto_scan Auto. przeszukiwanie jednego satelity
-satsetup.auto_scan_all Auto. przeszukiwanie wybranych satelitów
+satsetup.auto_scan Automatyczne przeszukiwanie jednego satelity
+satsetup.auto_scan_all Automatyczne przeszukiwanie wybranych satelitów
+satsetup.cable Skanowanie telewizji kablowej
+satsetup.cable_nid Network ID
satsetup.comm_input Wejście podłączone
satsetup.diseqc DiSEqC
satsetup.diseqc10 DiSEqC 1.0
@@ -1020,31 +1960,61 @@ satsetup.diseqc12 DiSEqC 1.2
satsetup.diseqc_advanced zaawansowane
satsetup.diseqc_com_uncom Podłączone/Niepodłączone
satsetup.diseqc_input Wejście przełącznika DiSEqC
+satsetup.diseqc_order DiSEqC
satsetup.diseqc_uncom_com Niepodłączone/Podłączone
satsetup.diseqcrepeat Liczba powtórzeń DiSEqC
satsetup.extended Konfiguracja DiSEqC
satsetup.extended_motor Konfiguracja siłownika
satsetup.fastscan_all kanały SD i HD
+satsetup.fastscan_auto_diseqc Rozpocznij konfigurację DiSEqC
+satsetup.fastscan_auto_diseqc_wait Trwa konfiguracja DiSEqC
satsetup.fastscan_hd tylko kanały HD
satsetup.fastscan_head Szybki skan (Astra 1, 19.2E, 12.515Mhz)
satsetup.fastscan_prov Dostawca
-satsetup.fastscan_prov_cd CanalDigitaal
-satsetup.fastscan_prov_telesat TéléSAT
-satsetup.fastscan_prov_tvv TV Vlaanderen
+satsetup.fastscan_prov_cd_hd CanalDigitaal (HD)
+satsetup.fastscan_prov_cd_sd CanalDigitaal (SD)
+satsetup.fastscan_prov_hda HD Austria
+satsetup.fastscan_prov_hello Hello
+satsetup.fastscan_prov_skylink_c Skylink Czech
+satsetup.fastscan_prov_skylink_s Skylink Slovak
+satsetup.fastscan_prov_telesat_b TéléSAT Belgium
+satsetup.fastscan_prov_telesat_l TéléSAT Luxemburg
+satsetup.fastscan_prov_tvv_hd TV Vlaanderen (HD)
+satsetup.fastscan_prov_tvv_sd TV Vlaanderen (SD)
satsetup.fastscan_sd tylko kanały SD
satsetup.fastscan_type Wyszukaj
+satsetup.fastscan_update Auto update
+satsetup.fe_delsys_mode Tryb
+satsetup.fe_delsys_mode_auto Automatycznie
+satsetup.fe_delsys_mode_cable Kablówka
+satsetup.fe_delsys_mode_sat Satelita
+satsetup.fe_delsys_mode_terrestrial Naziemna
+satsetup.fe_mode Ustawienia tunera
+satsetup.fe_mode_independent Niezależny
+satsetup.fe_mode_link_loop W pętli
+satsetup.fe_mode_link_twin Bliźniaczy
+satsetup.fe_mode_master Główny
+satsetup.fe_mode_unused Nieużywany
+satsetup.fe_setup Ustawienia tunera
satsetup.lofh Wysoki offset LNB
satsetup.lofl Niski offset LNB
satsetup.lofs Offset przełączania
+satsetup.logical_hd Preferuj kanały HD
+satsetup.logical_numbers Użyj numerowania
satsetup.manual_scan Wyszukiwanie ręczne
satsetup.minidiseqc mini-DiSEqC
satsetup.motor_pos Pozycja obrotnicy
satsetup.nodiseqc brak
+satsetup.reset_numbers Resetuj numery kanałów
satsetup.sat_setup Ustawienia wejść LNB dla satelity
satsetup.satellite Satelita
+satsetup.select_sat Wybór satelit
satsetup.smatvremote SMATV
-satsetup.uncomm_input Wejście niepodłączone
+satsetup.uncomm_input Wejście niepodłączone
+satsetup.uni_settings Ustawienia Unicable
+satsetup.unicable Unicable
satsetup.usals_repeat Powtarzanie USALS
+satsetup.use_bat Użyj BAT
satsetup.use_fta_flag Tylko kanały FTA
satsetup.use_nit NIT
satsetup.use_usals Użyj USALS
@@ -1059,13 +2029,20 @@ sc.waiting Oczekuję na odpowiedź z karty
scants.abort_body Czy napewno przerwać wyszukiwanie?
scants.abort_header Przerwij skanowanie
scants.actcable Kabel:
+scants.acthybrid Hybrid:
scants.actsatellite Satelita:
+scants.actterrestrial Naziemna:
scants.bouquet Bukiety
scants.bouquet_create utwórz nowe
scants.bouquet_erase usuń
scants.bouquet_leave bez zmian
scants.bouquet_satellite bukiet pozycji sat.
scants.bouquet_update aktualizuj
+scants.bouquet_writenames Write service names to bouquets
+scants.bouquet_writenames_bouquets providers
+scants.bouquet_writenames_ever both
+scants.bouquet_writenames_never never
+scants.bouquet_writenames_ubouquets favourites
scants.channel Kanał:
scants.failed Wyszukiwanie kanałów nie powiodło się!
scants.finished Wyszukiwanie kanałów powiodło się.
@@ -1075,16 +2052,34 @@ scants.numberofdataservices Dane
scants.numberofradioservices Radio
scants.numberoftotalservices Ogółem
scants.numberoftvservices TV
+scants.preverences_receiving_system Preferencje
+scants.preverences_scan Typ skanowania
scants.provider Dostawca:
-scants.select_tp Transponder
+scants.select_tp Wybierz transponder
scants.startnow Wyszukiwanie
scants.test Sygnał
-scants.transponders Transponder:
+scants.transponders Transpondery:
scrambled_channel Kanał kodowany, brak uprawnień do odbioru.
+screensaver.delay Opóźnienie
+screensaver.dir Katalog
+screensaver.menu Wygaszacz
+screensaver.off Wygaszacz wyłączony
+screensaver.timeout Zmień obraz
screensetup.lowerright zielony - prawy, dolny róg
screensetup.upperleft czerwony - lewy, górny róg
+screenshot.count Oblicz
+screenshot.cover Utwórz schowek dla przeglądarki filmów
+screenshot.defdir Katalog docelowy
+screenshot.format Formatuj
+screenshot.info Brak użycia klawisza zrzutu ekranu
+screenshot.menu Zrzut ekranu
+screenshot.osd Rozdzielczość OSD
+screenshot.res Rozdzielczość
+screenshot.scale Skala
+screenshot.tv Rozdzielczość TV
+screenshot.video Wideo w tle
servicemenu.getplugins Przeładowanie listy wtyczek
-servicemenu.getplugins_hint Przeładowuję pluginy,\nproszę czekać.
+servicemenu.getplugins_hint Przeładowuję pluginy,\nproszę czekać...
servicemenu.head Usługi
servicemenu.imageinfo Informacje o oprogramowaniu
servicemenu.reload Przeładowanie listy kanałów
@@ -1095,28 +2090,36 @@ servicemenu.restart_refused_recording Nie można wykonać restartu, trwa nagrywa
servicemenu.scants Wyszukiwanie kanałów
servicemenu.update Aktualizacja oprogramowania
settings.backup Zapisz wszystkie ustawienia
-settings.backup_failed Błąd podczas zapisu ustawień !
+settings.backup_failed Błąd podczas zapisu ustawień!
settings.help Pomoc
+settings.menu_hints Pokaż poradnik
settings.menu_pos Pozycja menu
+settings.menus Menu
settings.missingoptionsconffile Ustawienia Neutrino zostały rozszerzone.\nDla nowych opcji zostaną użyte wartości domyślne.
settings.noconffile Nie można odnaleźć ustawień Neutrino.\nZostaną użyte wartości domyślne.
+settings.pos_bottom_center dół, środek
settings.pos_bottom_left lewy, dolny róg
settings.pos_bottom_right prawy, dolny róg
settings.pos_default_center środek, dół ekranu
settings.pos_higher_center środek, góra ekranu
+settings.pos_top_center góra, środek
settings.pos_top_left lewy, górny róg
settings.pos_top_right prawy, górny róg
settings.restore Przywróć wszystkie ustawienia
-settings.restore_warn Czy chcesz zamienić obecne ustawienia ?
-shutdown.recoding_query Czy naprawdę chcesz przerwać nagranie ?
+settings.restore_warn Czy chcesz zamienić obecne ustawienia?
+shutdown.recording_query Czy naprawdę chcesz przerwać nagranie ?
shutdowntimer.announce Odbiornik zostanie wyłączony za minutę.\nCzy chcesz anulować proces?
sleeptimerbox.announce Odbiornik zostanie wyłączony za minutę.
sleeptimerbox.hint1 Czas do wyłączenia w minutach (000-wył)
sleeptimerbox.hint2 Po upływie tego czasu, odbiornik zostanie wyłączony.
+sleeptimerbox.hint3 Tuner zostanie wyłączony jeśli pilot nie będzie używany.
sleeptimerbox.title Wyłącznik czasowy
-streaminfo.aratio Proporcje
+sleeptimerbox.title2 Wyłącznik czasowy
+streaminfo.aratio Proporcje obrazu
streaminfo.aratio_unknown Proporcje: nieznane
streaminfo.audiotype Format dźwięku
+streaminfo.audiotype_unknown nieznany
+streaminfo.average_bitrate Średni
streaminfo.bitrate Szybkość transmisji
streaminfo.framerate Klatek/s
streaminfo.framerate_unknown Klatek/s: brak danych
@@ -1126,20 +2129,29 @@ streaminfo.resolution Rozdzielczość
streaminfo.signal Parametry sygnału
streaming.busy Proces nagrywania wciąż trwa. Jeśli ten komunikat się powtarza,\na nie jesteś w trakcie nagrywania, zrestartuj Neutrino.
streaming.dir_not_writable Brak możliwości zapisu do katalogu nagrań.\nNagrywanie nie będzie działać.
+streaming.overflow Przepełnienie bufora zapisu.Rozważ zatrzymanie niektórych nagrań.
+streaming.slow System/hdd za bardzo zwolnił.Rozważ zatrzymanie niektórych nagrań.
streaming.write_error Nagrywanie zostało przerwane z powodu błędu w trakcie zapisu.
+stringinput.backspace Powrót
stringinput.caps wielkie/małe litery
-stringinput.clear usuń wszystko
+stringinput.clear Usuń wszystko
+stringinput.insert Wstaw
+stringinput.save Zapisz
+subtitles.charset Kodowanie znaków
subtitles.head Napisy
-subtitles.stop Wyłącz
-timer.eventrecord.msg Program zostanie nagrany.
+subtitles.stop Wyłącz napisy
+terrestrialsetup.area Obszar
+terrestrialsetup.provider Dostawca programu telewizji naziemnej
+timer.eventrecord.msg Program zostanie nagrany
timer.eventrecord.title Nagrywanie
-timer.eventtimed.msg Program został zapamiętany.
+timer.eventtimed.msg Program został zapamiętany
timer.eventtimed.title Przełączanie
timerbar.channelswitch Przełącz
timerbar.recordevent Nagraj
timerlist.alarmtime Czas rozpoczęcia
timerlist.apids PID-y audio
-timerlist.apids_dflt nagrywaj domyslne ścieżki audio
+timerlist.apids_dflt nagrywaj domyślne ścieżki audio
+timerlist.ask_to_delete Usunięcie zatrzymuje aktualne nagrywania!\n%sKontynuować?
timerlist.bouquetselect Wybierz bukiet
timerlist.channel Kanał
timerlist.channelselect Wybierz kanał
@@ -1153,14 +2165,14 @@ timerlist.modetv Kanały telewizyjne
timerlist.modify Edytuj
timerlist.name Planowanie nagrywania
timerlist.new Dodaj
-timerlist.overlapping_timer Konflikt timer'a. Utworzyć mimo wszystko?
+timerlist.overlapping_timer Konflikt zaplanowanych zadań. Utworzyć mimo wszystko?
timerlist.plugin Plugin
timerlist.program.unknown Nieznany program
timerlist.recording_dir Katalog nagrań
timerlist.reload Odśwież
timerlist.repeat Powtarzane
timerlist.repeat.biweekly dwa razy w tygodniu
-timerlist.repeat.byeventdescription patrz zegar
+timerlist.repeat.byeventdescription pokaż zaplanowane zadania
timerlist.repeat.daily codziennie
timerlist.repeat.fourweekly cztery razy w tygodniu
timerlist.repeat.friday Pt
@@ -1209,8 +2221,20 @@ timing.filebrowser Przeglądarka plików
timing.hint_1 Czas wyświetlania OSD
timing.hint_2 na ekranie TV (s)
timing.infobar Belka informacyjna
+timing.infobar_movieplayer Belka informacyjna (wideo)
+timing.infobar_radio Belka informacyjna (radio)
timing.menu Menu
-timing.numericzap Przełączanie numerami
+timing.numericzap Przełączanie po numerach
+timing.volumebar Volume bar
+unicable.lnb Unicable Input
+unicable.qrg Unicable Frequency
+unicable.scr Unicable SCR
+unit.decimal .
+unit.long.years years
+unit.short.hour h
+unit.short.millisecond ms
+unit.short.minute min
+unit.short.second s
upnpbrowser.head Przeglądarka UPnP
upnpbrowser.noservers Brak serwerów UPnP w sieci.
upnpbrowser.rescan Ponowne skanowanie
@@ -1222,61 +2246,97 @@ usermenu.button_yellow Przycisk żółty
usermenu.head Menu użytkownika
usermenu.item_bar ---- Separator ----
usermenu.item_epg_misc Opcje EPG
-usermenu.item_none wolne
+usermenu.item_none (puste)
+usermenu.item_plugin_types Typy pluginów
usermenu.item_vtxt Teletekst
+usermenu.items Pozycje menu
+usermenu.key Klawisz
+usermenu.key_select Przypisz klawisz
+usermenu.msg_info_is_empty Brak zdefiniowanej nazwy dla tego menu!\nUżyj nazwy domyślnej:\n
+usermenu.msg_warning_name To menu ma więcej składników,\nale nie ma dla niego zdefiniowanej nazwy.\nZaleca się podanie nowej nazwy!
+usermenu.msg_warning_no_items Brak zdefiniowanych składników!\nKasowanie nazwy menu!
usermenu.name Nazwa
video_mode_ok Czy ten tryb wideo działa poprawnie?
videomenu.43mode Tryb 4:3
+videomenu.analog_auto AUTO
+videomenu.analog_cvbs CVBS
+videomenu.analog_hd_rgb RGB (HD)
videomenu.analog_hd_rgb_cinch RGB cinch (HD)
videomenu.analog_hd_rgb_scart RGB scart (HD)
+videomenu.analog_hd_yprpb YPbPr(HD)
videomenu.analog_hd_yprpb_cinch YPbPr cinch (HD)
videomenu.analog_hd_yprpb_scart YPbPr scart (HD)
videomenu.analog_mode Sygnał analogowy
+videomenu.analog_sd_rgb RGB (SD)
videomenu.analog_sd_rgb_cinch RGB cinch (SD)
videomenu.analog_sd_rgb_scart RGB scart (SD)
+videomenu.analog_sd_yprpb YPbPr (SD)
videomenu.analog_sd_yprpb_cinch YPbPr cinch (SD)
videomenu.analog_sd_yprpb_scart YPbPr scart (SD)
-videomenu.auto automatycznie
+videomenu.auto Automatycznie
videomenu.brightness Jasność
videomenu.cinch Cinch
videomenu.contrast Kontrast
-videomenu.csync Korekcja synchronizacji
videomenu.dbdr Przetwarzanie MPEG2
videomenu.dbdr_both deblock + dering
videomenu.dbdr_deblock deblock
videomenu.dbdr_none brak
-videomenu.enabled_modes Tryby wideo dla przycisku V.F
-videomenu.fullscreen pełny ekran
+videomenu.enabled_modes Tryby wideo
+videomenu.enabled_modes_auto Automatyczny tryb wideo
+videomenu.fullscreen Pełny ekran
videomenu.hdmi_cec HDMI-CEC
-videomenu.hdmi_cec_mode HDMI-CEC
+videomenu.hdmi_cec_mode Receiver to use
videomenu.hdmi_cec_mode_off wyłączone
videomenu.hdmi_cec_mode_recorder nagrywarka
videomenu.hdmi_cec_mode_tuner odbiornik
videomenu.hdmi_cec_standby Stan gotowości po wył. TV
videomenu.hdmi_cec_view_on Włączanie TV
videomenu.hue Odcień
-videomenu.letterbox letterbox
+videomenu.letterbox Letterbox
videomenu.panscan Pan&Scan
-videomenu.panscan2 Pan&Scan 14:9
+videomenu.panscan2 14:9 Pan&Scan
+videomenu.pip Ustawienia PiP
+videomenu.pip_error Błąd PiP
videomenu.saturation Nasycenie
videomenu.scart Scart
videomenu.screensetup Widoczna część obrazu
+videomenu.sdosd SD OSD
videomenu.sharpness Ostrość
videomenu.tv-scart Opcje wyświetlania obrazu
+videomenu.vcrsignal VCR Output Signal Type
+videomenu.vcrsignal_composite CVBS
+videomenu.vcrsignal_svideo S-Video
videomenu.videoformat Proporcje obrazu
videomenu.videoformat_149 14:9
videomenu.videoformat_169 16:9
videomenu.videoformat_43 4:3
videomenu.videomode Sygnał cyfrowy
-word.from Od
+webtv.head WebTV
+webtv.xml WebTV XML files
+webtv.xml.add Add XML file
+webtv.xml.del Remove XML file
+window_size Wielkość okna w %
+wizard.initial_settings Znaleziono ustawienia początkowe
+wizard.install_settings Czy zainstalować kanały z Astry 19,2°E?
+wizard.setup Pierwsza instalacja
+wizard.setup_advanced Zaawansowany
+wizard.setup_easy Łatwy
+wizard.setup_type Typ instalacji
+wizard.setup_type_hint Łatwy dla konfiguracji dostawców CanalDigitaal/TéléSAT/TV Vlaanderen lub prostego skanowania telewizji kablowej
+wizard.welcome_head Witamy w Kreatorze instalacji
+wizard.welcome_text Kolejne kroki poprowadzą Cię przez początkową instalację.\nWażne: Twoim tunerem można wygodnie sterować\n przez interfejs WWW lub oglądać telewizję na żywo w przeglądarce internetowej.\nNie udostępniaj go w niezaufanych sieciach!\nCzy chcesz kontynuować?
+word.from z
+word.in w
zapit.scantype Wyszukaj kanały
zapit.scantype.all wszystkie
zapit.scantype.radio tylko radiowe
zapit.scantype.tv tylko telewizyjne
zapit.scantype.tvradio telewizyjne i radiowe
+zapitsetup.channelmode Startowa lista kanałów telewizyjnych
+zapitsetup.channelmode_radio Startowa lista kanałów radiowych
zapitsetup.head Ustawienia kanału startowego
zapitsetup.info Kanał startowy
zapitsetup.last_radio Kanał radiowy
zapitsetup.last_tv Kanał TV
zapitsetup.last_use Ostatnio oglądany
-zaptotimer.announce Za minutę zostanie zmieniony kanał.
+zaptotimer.announce Za minutę zostanie zmieniony kanał
diff --git a/data/satellites.xml b/data/satellites.xml
index 7540a326d..f8c198fd2 100644
--- a/data/satellites.xml
+++ b/data/satellites.xml
@@ -2198,50 +2198,44 @@
-
+
-
-
+
+
-
+
-
+
-
-
+
-
-
+
-
-
-
+
-
+
-
-
@@ -2257,12 +2251,11 @@
-
-
+
+
-
@@ -2270,13 +2263,12 @@
-
-
+
+
-
-
+
@@ -2284,16 +2276,16 @@
-
+
+
-
-
+
@@ -2301,141 +2293,162 @@
-
+
+
-
-
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
+
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
+
-
+
+
-
-
-
-
+
+
-
-
-
-
+
+
+
-
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
@@ -2486,103 +2499,110 @@
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
@@ -2666,155 +2686,122 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
diff --git a/data/themes/Classic.theme b/data/themes/Classic.theme
index 2d2562217..ddcaf5048 100644
--- a/data/themes/Classic.theme
+++ b/data/themes/Classic.theme
@@ -38,3 +38,7 @@ menu_Content_inactive_Text_alpha=0
menu_Content_inactive_Text_red=80
menu_Content_inactive_Text_green=80
menu_Content_inactive_Text_blue=80
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/Crema.theme b/data/themes/Crema.theme
index 0abd780bb..f1f01a7a1 100644
--- a/data/themes/Crema.theme
+++ b/data/themes/Crema.theme
@@ -38,3 +38,7 @@ menu_Head_alpha=0
menu_Head_blue=28
menu_Head_green=0
menu_Head_red=0
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/DVB2000.theme b/data/themes/DVB2000.theme
index 5a9ad7ae7..e75b1cb77 100644
--- a/data/themes/DVB2000.theme
+++ b/data/themes/DVB2000.theme
@@ -38,3 +38,7 @@ menu_Content_inactive_Text_alpha=0
menu_Content_inactive_Text_red=100
menu_Content_inactive_Text_green=100
menu_Content_inactive_Text_blue=0
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/DarkBlue.theme b/data/themes/DarkBlue.theme
index 9bc2849d1..59619ceb6 100644
--- a/data/themes/DarkBlue.theme
+++ b/data/themes/DarkBlue.theme
@@ -38,3 +38,7 @@ menu_Content_inactive_Text_alpha=0
menu_Content_inactive_Text_red=55
menu_Content_inactive_Text_green=70
menu_Content_inactive_Text_blue=85
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/DarkBrown.theme b/data/themes/DarkBrown.theme
index 903181d21..e088eae9e 100644
--- a/data/themes/DarkBrown.theme
+++ b/data/themes/DarkBrown.theme
@@ -38,3 +38,7 @@ menu_Content_inactive_Text_alpha=0
menu_Content_inactive_Text_red=60
menu_Content_inactive_Text_green=60
menu_Content_inactive_Text_blue=60
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/Gray.theme b/data/themes/Gray.theme
index 6356e7d1b..4abf37e83 100644
--- a/data/themes/Gray.theme
+++ b/data/themes/Gray.theme
@@ -49,3 +49,7 @@ menu_Head_alpha=0
menu_Head_blue=30
menu_Head_green=20
menu_Head_red=15
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/Grey-Blue.theme b/data/themes/Grey-Blue.theme
new file mode 100644
index 000000000..402295daa
--- /dev/null
+++ b/data/themes/Grey-Blue.theme
@@ -0,0 +1,52 @@
+clock_Digit_alpha=0
+clock_Digit_blue=100
+clock_Digit_green=100
+clock_Digit_red=100
+colored_events_alpha=0
+colored_events_blue=98
+colored_events_green=46
+colored_events_red=0
+infobar_Text_alpha=0
+infobar_Text_blue=100
+infobar_Text_green=100
+infobar_Text_red=100
+infobar_alpha=6
+infobar_blue=15
+infobar_green=14
+infobar_red=14
+menu_Content_Selected_Text_alpha=0
+menu_Content_Selected_Text_blue=0
+menu_Content_Selected_Text_green=0
+menu_Content_Selected_Text_red=0
+menu_Content_Selected_alpha=20
+menu_Content_Selected_blue=100
+menu_Content_Selected_green=55
+menu_Content_Selected_red=25
+menu_Content_Text_alpha=0
+menu_Content_Text_blue=100
+menu_Content_Text_green=100
+menu_Content_Text_red=100
+menu_Content_alpha=12
+menu_Content_blue=15
+menu_Content_green=15
+menu_Content_inactive_Text_alpha=0
+menu_Content_inactive_Text_blue=85
+menu_Content_inactive_Text_green=70
+menu_Content_inactive_Text_red=55
+menu_Content_inactive_alpha=20
+menu_Content_inactive_blue=7
+menu_Content_inactive_green=7
+menu_Content_inactive_red=8
+menu_Content_red=16
+menu_Head_Text_alpha=0
+menu_Head_Text_blue=100
+menu_Head_Text_green=44
+menu_Head_Text_red=0
+menu_Head_alpha=4
+menu_Head_blue=0
+menu_Head_green=0
+menu_Head_red=0
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
index 4a7de1fa6..3e35742c0 100644
--- a/data/themes/Makefile.am
+++ b/data/themes/Makefile.am
@@ -1,4 +1,4 @@
-installdir = $(DATADIR)/neutrino/themes
+installdir = $(THEMESDIR)
install_DATA = \
Classic.theme \
@@ -7,6 +7,7 @@ install_DATA = \
DarkBlue.theme \
DarkBrown.theme \
Gray.theme \
+ Grey-Blue.theme \
MonoChrom.theme \
Olive.theme \
Red.theme \
diff --git a/data/themes/MonoChrom.theme b/data/themes/MonoChrom.theme
index 4ed999dc0..e7f78701b 100644
--- a/data/themes/MonoChrom.theme
+++ b/data/themes/MonoChrom.theme
@@ -38,3 +38,7 @@ menu_Head_alpha=0
menu_Head_blue=0
menu_Head_green=0
menu_Head_red=0
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/Olive.theme b/data/themes/Olive.theme
index c30b4eba1..9d7f7f3e0 100644
--- a/data/themes/Olive.theme
+++ b/data/themes/Olive.theme
@@ -38,3 +38,7 @@ menu_Head_alpha=0
menu_Head_blue=80
menu_Head_green=80
menu_Head_red=80
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/Red.theme b/data/themes/Red.theme
index 714fea08c..cb798ea35 100644
--- a/data/themes/Red.theme
+++ b/data/themes/Red.theme
@@ -49,3 +49,7 @@ menu_Head_alpha=0
menu_Head_blue=0
menu_Head_green=10
menu_Head_red=40
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/data/themes/VirginMedia.theme b/data/themes/VirginMedia.theme
index 23a3b8f21..3cf0f24cf 100644
--- a/data/themes/VirginMedia.theme
+++ b/data/themes/VirginMedia.theme
@@ -38,3 +38,7 @@ menu_Content_inactive_Text_alpha=0
menu_Content_inactive_Text_red=60
menu_Content_inactive_Text_green=60
menu_Content_inactive_Text_blue=60
+menu_Hint_gradient=0
+menu_Head_gradient=0
+infobar_gradient_top=0
+infobar_gradient_bottom=0
diff --git a/lib/Makefile.am b/lib/Makefile.am
index caee19792..037c33c38 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS = \
libmd5sum \
libnet \
xmltree \
+ jsoncpp \
libtuxtxt \
libiw \
libdvbsub \
diff --git a/lib/jsoncpp/Makefile.am b/lib/jsoncpp/Makefile.am
new file mode 100644
index 000000000..513c34e30
--- /dev/null
+++ b/lib/jsoncpp/Makefile.am
@@ -0,0 +1,10 @@
+AM_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(srcdir)/include
+
+AM_CXXFLAGS = -fno-rtti
+
+noinst_LIBRARIES = libjsoncpp.a
+
+libjsoncpp_a_SOURCES = jsoncpp.cpp
diff --git a/lib/jsoncpp/include/json/json-forwards.h b/lib/jsoncpp/include/json/json-forwards.h
new file mode 100644
index 000000000..ccbdb2b13
--- /dev/null
+++ b/lib/jsoncpp/include/json/json-forwards.h
@@ -0,0 +1,255 @@
+/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).
+/// It is intended to be used with #include "json/json-forwards.h"
+/// This header provides forward declaration for all JsonCpp types.
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+/*
+The JsonCpp library's source code, including accompanying documentation,
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all
+jurisdictions which recognize such a disclaimer. In such jurisdictions,
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this
+software may choose to accept it either as 1) Public Domain, 2) under the
+conditions of the MIT License (see below), or 3) under the terms of dual
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+ http://en.wikipedia.org/wiki/MIT_License
+
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+
+*/
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
+# define JSON_FORWARD_AMALGATED_H_INCLUDED
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+#define JSON_IS_AMALGAMATION
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_CONFIG_H_INCLUDED
+#define JSON_CONFIG_H_INCLUDED
+
+/// If defined, indicates that json library is embedded in CppTL library.
+//# define JSON_IN_CPPTL 1
+
+/// If defined, indicates that json may leverage CppTL library
+//# define JSON_USE_CPPTL 1
+/// If defined, indicates that cpptl vector based map should be used instead of
+/// std::map
+/// as Value container.
+//# define JSON_USE_CPPTL_SMALLMAP 1
+
+// If non-zero, the library uses exceptions to report bad input instead of C
+// assertion macros. The default is to use exceptions.
+#ifndef JSON_USE_EXCEPTION
+#define JSON_USE_EXCEPTION 1
+#endif
+
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+/// Remarks: it is automatically defined in the generated amalgated header.
+// #define JSON_IS_AMALGAMATION
+
+#ifdef JSON_IN_CPPTL
+#include
+#ifndef JSON_USE_CPPTL
+#define JSON_USE_CPPTL 1
+#endif
+#endif
+
+#ifdef JSON_IN_CPPTL
+#define JSON_API CPPTL_API
+#elif defined(JSON_DLL_BUILD)
+#if defined(_MSC_VER)
+#define JSON_API __declspec(dllexport)
+#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+#endif // if defined(_MSC_VER)
+#elif defined(JSON_DLL)
+#if defined(_MSC_VER)
+#define JSON_API __declspec(dllimport)
+#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+#endif // if defined(_MSC_VER)
+#endif // ifdef JSON_IN_CPPTL
+#if !defined(JSON_API)
+#define JSON_API
+#endif
+
+// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
+// integer
+// Storages, and 64 bits integer support is disabled.
+// #define JSON_NO_INT64 1
+
+#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
+// Microsoft Visual Studio 6 only support conversion from __int64 to double
+// (no conversion from unsigned __int64).
+#define JSON_USE_INT64_DOUBLE_CONVERSION 1
+// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
+// characters in the debug information)
+// All projects I've ever seen with VS6 were using this globally (not bothering
+// with pragma push/pop).
+#pragma warning(disable : 4786)
+#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
+
+#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
+/// Indicates that the following function is deprecated.
+#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
+#elif defined(__clang__) && defined(__has_feature)
+#if __has_feature(attribute_deprecated_with_message)
+#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
+#endif
+#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
+#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
+#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
+#endif
+
+#if !defined(JSONCPP_DEPRECATED)
+#define JSONCPP_DEPRECATED(message)
+#endif // if !defined(JSONCPP_DEPRECATED)
+
+namespace Json {
+typedef int Int;
+typedef unsigned int UInt;
+#if defined(JSON_NO_INT64)
+typedef int LargestInt;
+typedef unsigned int LargestUInt;
+#undef JSON_HAS_INT64
+#else // if defined(JSON_NO_INT64)
+// For Microsoft Visual use specific types as long long is not supported
+#if defined(_MSC_VER) // Microsoft Visual Studio
+typedef __int64 Int64;
+typedef unsigned __int64 UInt64;
+#else // if defined(_MSC_VER) // Other platforms, use long long
+typedef long long int Int64;
+typedef unsigned long long int UInt64;
+#endif // if defined(_MSC_VER)
+typedef Int64 LargestInt;
+typedef UInt64 LargestUInt;
+#define JSON_HAS_INT64
+#endif // if defined(JSON_NO_INT64)
+} // end namespace Json
+
+#endif // JSON_CONFIG_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_FORWARDS_H_INCLUDED
+#define JSON_FORWARDS_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "config.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+// writer.h
+class FastWriter;
+class StyledWriter;
+
+// reader.h
+class Reader;
+
+// features.h
+class Features;
+
+// value.h
+typedef unsigned int ArrayIndex;
+class StaticString;
+class Path;
+class PathArgument;
+class Value;
+class ValueIteratorBase;
+class ValueIterator;
+class ValueConstIterator;
+
+} // namespace Json
+
+#endif // JSON_FORWARDS_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
diff --git a/lib/jsoncpp/include/json/json.h b/lib/jsoncpp/include/json/json.h
new file mode 100644
index 000000000..f27ecfc81
--- /dev/null
+++ b/lib/jsoncpp/include/json/json.h
@@ -0,0 +1,1944 @@
+/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).
+/// It is intended to be used with #include "json/json.h"
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+/*
+The JsonCpp library's source code, including accompanying documentation,
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all
+jurisdictions which recognize such a disclaimer. In such jurisdictions,
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this
+software may choose to accept it either as 1) Public Domain, 2) under the
+conditions of the MIT License (see below), or 3) under the terms of dual
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+ http://en.wikipedia.org/wiki/MIT_License
+
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+
+*/
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#ifndef JSON_AMALGATED_H_INCLUDED
+# define JSON_AMALGATED_H_INCLUDED
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+#define JSON_IS_AMALGAMATION
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/version.h
+// //////////////////////////////////////////////////////////////////////
+
+// DO NOT EDIT. This file is generated by CMake from "version"
+// and "version.h.in" files.
+// Run CMake configure step to update it.
+#ifndef JSON_VERSION_H_INCLUDED
+# define JSON_VERSION_H_INCLUDED
+
+# define JSONCPP_VERSION_STRING "0.10.2"
+# define JSONCPP_VERSION_MAJOR 0
+# define JSONCPP_VERSION_MINOR 10
+# define JSONCPP_VERSION_PATCH 2
+# define JSONCPP_VERSION_QUALIFIER
+# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8))
+
+#endif // JSON_VERSION_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/version.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_CONFIG_H_INCLUDED
+#define JSON_CONFIG_H_INCLUDED
+
+/// If defined, indicates that json library is embedded in CppTL library.
+//# define JSON_IN_CPPTL 1
+
+/// If defined, indicates that json may leverage CppTL library
+//# define JSON_USE_CPPTL 1
+/// If defined, indicates that cpptl vector based map should be used instead of
+/// std::map
+/// as Value container.
+//# define JSON_USE_CPPTL_SMALLMAP 1
+
+// If non-zero, the library uses exceptions to report bad input instead of C
+// assertion macros. The default is to use exceptions.
+#ifndef JSON_USE_EXCEPTION
+#define JSON_USE_EXCEPTION 1
+#endif
+
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+/// Remarks: it is automatically defined in the generated amalgated header.
+// #define JSON_IS_AMALGAMATION
+
+#ifdef JSON_IN_CPPTL
+#include
+#ifndef JSON_USE_CPPTL
+#define JSON_USE_CPPTL 1
+#endif
+#endif
+
+#ifdef JSON_IN_CPPTL
+#define JSON_API CPPTL_API
+#elif defined(JSON_DLL_BUILD)
+#if defined(_MSC_VER)
+#define JSON_API __declspec(dllexport)
+#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+#endif // if defined(_MSC_VER)
+#elif defined(JSON_DLL)
+#if defined(_MSC_VER)
+#define JSON_API __declspec(dllimport)
+#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+#endif // if defined(_MSC_VER)
+#endif // ifdef JSON_IN_CPPTL
+#if !defined(JSON_API)
+#define JSON_API
+#endif
+
+// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
+// integer
+// Storages, and 64 bits integer support is disabled.
+// #define JSON_NO_INT64 1
+
+#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
+// Microsoft Visual Studio 6 only support conversion from __int64 to double
+// (no conversion from unsigned __int64).
+#define JSON_USE_INT64_DOUBLE_CONVERSION 1
+// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
+// characters in the debug information)
+// All projects I've ever seen with VS6 were using this globally (not bothering
+// with pragma push/pop).
+#pragma warning(disable : 4786)
+#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
+
+#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
+/// Indicates that the following function is deprecated.
+#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
+#elif defined(__clang__) && defined(__has_feature)
+#if __has_feature(attribute_deprecated_with_message)
+#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
+#endif
+#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
+#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
+#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
+#endif
+
+#if !defined(JSONCPP_DEPRECATED)
+#define JSONCPP_DEPRECATED(message)
+#endif // if !defined(JSONCPP_DEPRECATED)
+
+namespace Json {
+typedef int Int;
+typedef unsigned int UInt;
+#if defined(JSON_NO_INT64)
+typedef int LargestInt;
+typedef unsigned int LargestUInt;
+#undef JSON_HAS_INT64
+#else // if defined(JSON_NO_INT64)
+// For Microsoft Visual use specific types as long long is not supported
+#if defined(_MSC_VER) // Microsoft Visual Studio
+typedef __int64 Int64;
+typedef unsigned __int64 UInt64;
+#else // if defined(_MSC_VER) // Other platforms, use long long
+typedef long long int Int64;
+typedef unsigned long long int UInt64;
+#endif // if defined(_MSC_VER)
+typedef Int64 LargestInt;
+typedef UInt64 LargestUInt;
+#define JSON_HAS_INT64
+#endif // if defined(JSON_NO_INT64)
+} // end namespace Json
+
+#endif // JSON_CONFIG_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_FORWARDS_H_INCLUDED
+#define JSON_FORWARDS_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "config.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+// writer.h
+class FastWriter;
+class StyledWriter;
+
+// reader.h
+class Reader;
+
+// features.h
+class Features;
+
+// value.h
+typedef unsigned int ArrayIndex;
+class StaticString;
+class Path;
+class PathArgument;
+class Value;
+class ValueIteratorBase;
+class ValueIterator;
+class ValueConstIterator;
+
+} // namespace Json
+
+#endif // JSON_FORWARDS_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/features.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
+#define CPPTL_JSON_FEATURES_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "forwards.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+/** \brief Configuration passed to reader and writer.
+ * This configuration object can be used to force the Reader or Writer
+ * to behave in a standard conforming way.
+ */
+class JSON_API Features {
+public:
+ /** \brief A configuration that allows all features and assumes all strings
+ * are UTF-8.
+ * - C & C++ comments are allowed
+ * - Root object can be any JSON value
+ * - Assumes Value strings are encoded in UTF-8
+ */
+ static Features all();
+
+ /** \brief A configuration that is strictly compatible with the JSON
+ * specification.
+ * - Comments are forbidden.
+ * - Root object must be either an array or an object value.
+ * - Assumes Value strings are encoded in UTF-8
+ */
+ static Features strictMode();
+
+ /** \brief Initialize the configuration like JsonConfig::allFeatures;
+ */
+ Features();
+
+ /// \c true if comments are allowed. Default: \c true.
+ bool allowComments_;
+
+ /// \c true if root must be either an array or an object value. Default: \c
+ /// false.
+ bool strictRoot_;
+};
+
+} // namespace Json
+
+#endif // CPPTL_JSON_FEATURES_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/features.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/value.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef CPPTL_JSON_H_INCLUDED
+#define CPPTL_JSON_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "forwards.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+
+#ifndef JSON_USE_CPPTL_SMALLMAP
+#include
+#else
+#include
+#endif
+#ifdef JSON_USE_CPPTL
+#include
+#endif
+
+// Disable warning C4251: : needs to have dll-interface to
+// be used by...
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+/** \brief JSON (JavaScript Object Notation).
+ */
+namespace Json {
+
+/** Base class for all exceptions we throw.
+ *
+ * We use nothing but these internally. Of course, STL can throw others.
+ */
+class JSON_API Exception;
+/** Exceptions which the user cannot easily avoid.
+ *
+ * E.g. out-of-memory (when we use malloc), stack-overflow, malicious input
+ *
+ * \remark derived from Json::Exception
+ */
+class JSON_API RuntimeError;
+/** Exceptions thrown by JSON_ASSERT/JSON_FAIL macros.
+ *
+ * These are precondition-violations (user bugs) and internal errors (our bugs).
+ *
+ * \remark derived from Json::Exception
+ */
+class JSON_API LogicError;
+
+/// used internally
+void throwRuntimeError(std::string const& msg);
+/// used internally
+void throwLogicError(std::string const& msg);
+
+/** \brief Type of the value held by a Value object.
+ */
+enum ValueType {
+ nullValue = 0, ///< 'null' value
+ intValue, ///< signed integer value
+ uintValue, ///< unsigned integer value
+ realValue, ///< double value
+ stringValue, ///< UTF-8 string value
+ booleanValue, ///< bool value
+ arrayValue, ///< array value (ordered list)
+ objectValue ///< object value (collection of name/value pairs).
+};
+
+enum CommentPlacement {
+ commentBefore = 0, ///< a comment placed on the line before a value
+ commentAfterOnSameLine, ///< a comment just after a value on the same line
+ commentAfter, ///< a comment on the line after a value (only make sense for
+ /// root value)
+ numberOfCommentPlacement
+};
+
+//# ifdef JSON_USE_CPPTL
+// typedef CppTL::AnyEnumerator EnumMemberNames;
+// typedef CppTL::AnyEnumerator EnumValues;
+//# endif
+
+/** \brief Lightweight wrapper to tag static string.
+ *
+ * Value constructor and objectValue member assignement takes advantage of the
+ * StaticString and avoid the cost of string duplication when storing the
+ * string or the member name.
+ *
+ * Example of usage:
+ * \code
+ * Json::Value aValue( StaticString("some text") );
+ * Json::Value object;
+ * static const StaticString code("code");
+ * object[code] = 1234;
+ * \endcode
+ */
+class JSON_API StaticString {
+public:
+ explicit StaticString(const char* czstring) : c_str_(czstring) {}
+
+ operator const char*() const { return c_str_; }
+
+ const char* c_str() const { return c_str_; }
+
+private:
+ const char* c_str_;
+};
+
+/** \brief Represents a JSON value.
+ *
+ * This class is a discriminated union wrapper that can represents a:
+ * - signed integer [range: Value::minInt - Value::maxInt]
+ * - unsigned integer (range: 0 - Value::maxUInt)
+ * - double
+ * - UTF-8 string
+ * - boolean
+ * - 'null'
+ * - an ordered list of Value
+ * - collection of name/value pairs (javascript object)
+ *
+ * The type of the held value is represented by a #ValueType and
+ * can be obtained using type().
+ *
+ * Values of an #objectValue or #arrayValue can be accessed using operator[]()
+ * methods.
+ * Non-const methods will automatically create the a #nullValue element
+ * if it does not exist.
+ * The sequence of an #arrayValue will be automatically resized and initialized
+ * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
+ *
+ * The get() methods can be used to obtain default value in the case the
+ * required element does not exist.
+ *
+ * It is possible to iterate over the list of a #objectValue values using
+ * the getMemberNames() method.
+ *
+ * \note #Value string-length fit in size_t, but keys must be < 2^30.
+ * (The reason is an implementation detail.) A #CharReader will raise an
+ * exception if a bound is exceeded to avoid security holes in your app,
+ * but the Value API does *not* check bounds. That is the responsibility
+ * of the caller.
+ */
+class JSON_API Value {
+ friend class ValueIteratorBase;
+public:
+ typedef std::vector Members;
+ typedef ValueIterator iterator;
+ typedef ValueConstIterator const_iterator;
+ typedef Json::UInt UInt;
+ typedef Json::Int Int;
+#if defined(JSON_HAS_INT64)
+ typedef Json::UInt64 UInt64;
+ typedef Json::Int64 Int64;
+#endif // defined(JSON_HAS_INT64)
+ typedef Json::LargestInt LargestInt;
+ typedef Json::LargestUInt LargestUInt;
+ typedef Json::ArrayIndex ArrayIndex;
+
+ static const Value& nullRef;
+#if !defined(__ARMEL__)
+ /// \deprecated This exists for binary compatibility only. Use nullRef.
+ static const Value null;
+#endif
+ /// Minimum signed integer value that can be stored in a Json::Value.
+ static const LargestInt minLargestInt;
+ /// Maximum signed integer value that can be stored in a Json::Value.
+ static const LargestInt maxLargestInt;
+ /// Maximum unsigned integer value that can be stored in a Json::Value.
+ static const LargestUInt maxLargestUInt;
+
+ /// Minimum signed int value that can be stored in a Json::Value.
+ static const Int minInt;
+ /// Maximum signed int value that can be stored in a Json::Value.
+ static const Int maxInt;
+ /// Maximum unsigned int value that can be stored in a Json::Value.
+ static const UInt maxUInt;
+
+#if defined(JSON_HAS_INT64)
+ /// Minimum signed 64 bits int value that can be stored in a Json::Value.
+ static const Int64 minInt64;
+ /// Maximum signed 64 bits int value that can be stored in a Json::Value.
+ static const Int64 maxInt64;
+ /// Maximum unsigned 64 bits int value that can be stored in a Json::Value.
+ static const UInt64 maxUInt64;
+#endif // defined(JSON_HAS_INT64)
+
+private:
+#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+ class CZString {
+ public:
+ enum DuplicationPolicy {
+ noDuplication = 0,
+ duplicate,
+ duplicateOnCopy
+ };
+ CZString(ArrayIndex index);
+ CZString(char const* str, unsigned length, DuplicationPolicy allocate);
+ CZString(CZString const& other);
+ ~CZString();
+ CZString& operator=(CZString other);
+ bool operator<(CZString const& other) const;
+ bool operator==(CZString const& other) const;
+ ArrayIndex index() const;
+ //const char* c_str() const; ///< \deprecated
+ char const* data() const;
+ unsigned length() const;
+ bool isStaticString() const;
+
+ private:
+ void swap(CZString& other);
+
+ struct StringStorage {
+ DuplicationPolicy policy_: 2;
+ unsigned length_: 30; // 1GB max
+ };
+
+ char const* cstr_; // actually, a prefixed string, unless policy is noDup
+ union {
+ ArrayIndex index_;
+ StringStorage storage_;
+ };
+ };
+
+public:
+#ifndef JSON_USE_CPPTL_SMALLMAP
+ typedef std::map ObjectValues;
+#else
+ typedef CppTL::SmallMap ObjectValues;
+#endif // ifndef JSON_USE_CPPTL_SMALLMAP
+#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+public:
+ /** \brief Create a default Value of the given type.
+
+ This is a very useful constructor.
+ To create an empty array, pass arrayValue.
+ To create an empty object, pass objectValue.
+ Another Value can then be set to this one by assignment.
+This is useful since clear() and resize() will not alter types.
+
+ Examples:
+\code
+Json::Value null_value; // null
+Json::Value arr_value(Json::arrayValue); // []
+Json::Value obj_value(Json::objectValue); // {}
+\endcode
+ */
+ Value(ValueType type = nullValue);
+ Value(Int value);
+ Value(UInt value);
+#if defined(JSON_HAS_INT64)
+ Value(Int64 value);
+ Value(UInt64 value);
+#endif // if defined(JSON_HAS_INT64)
+ Value(double value);
+ Value(const char* value); ///< Copy til first 0. (NULL causes to seg-fault.)
+ Value(const char* beginValue, const char* endValue); ///< Copy all, incl zeroes.
+ /** \brief Constructs a value from a static string.
+
+ * Like other value string constructor but do not duplicate the string for
+ * internal storage. The given string must remain alive after the call to this
+ * constructor.
+ * \note This works only for null-terminated strings. (We cannot change the
+ * size of this class, so we have nowhere to store the length,
+ * which might be computed later for various operations.)
+ *
+ * Example of usage:
+ * \code
+ * static StaticString foo("some text");
+ * Json::Value aValue(foo);
+ * \endcode
+ */
+ Value(const StaticString& value);
+ Value(const std::string& value); ///< Copy data() til size(). Embedded zeroes too.
+#ifdef JSON_USE_CPPTL
+ Value(const CppTL::ConstString& value);
+#endif
+ Value(bool value);
+ /// Deep copy.
+ Value(const Value& other);
+ ~Value();
+
+ /// Deep copy, then swap(other).
+ /// \note Over-write existing comments. To preserve comments, use #swapPayload().
+ Value &operator=(const Value &other);
+ /// Swap everything.
+ void swap(Value& other);
+ /// Swap values but leave comments and source offsets in place.
+ void swapPayload(Value& other);
+
+ ValueType type() const;
+
+ /// Compare payload only, not comments etc.
+ bool operator<(const Value& other) const;
+ bool operator<=(const Value& other) const;
+ bool operator>=(const Value& other) const;
+ bool operator>(const Value& other) const;
+ bool operator==(const Value& other) const;
+ bool operator!=(const Value& other) const;
+ int compare(const Value& other) const;
+
+ const char* asCString() const; ///< Embedded zeroes could cause you trouble!
+ std::string asString() const; ///< Embedded zeroes are possible.
+ /** Get raw char* of string-value.
+ * \return false if !string. (Seg-fault if str or end are NULL.)
+ */
+ bool getString(
+ char const** str, char const** end) const;
+#ifdef JSON_USE_CPPTL
+ CppTL::ConstString asConstString() const;
+#endif
+ Int asInt() const;
+ UInt asUInt() const;
+#if defined(JSON_HAS_INT64)
+ Int64 asInt64() const;
+ UInt64 asUInt64() const;
+#endif // if defined(JSON_HAS_INT64)
+ LargestInt asLargestInt() const;
+ LargestUInt asLargestUInt() const;
+ float asFloat() const;
+ double asDouble() const;
+ bool asBool() const;
+
+ bool isNull() const;
+ bool isBool() const;
+ bool isInt() const;
+ bool isInt64() const;
+ bool isUInt() const;
+ bool isUInt64() const;
+ bool isIntegral() const;
+ bool isDouble() const;
+ bool isNumeric() const;
+ bool isString() const;
+ bool isArray() const;
+ bool isObject() const;
+
+ bool isConvertibleTo(ValueType other) const;
+
+ /// Number of values in array or object
+ ArrayIndex size() const;
+
+ /// \brief Return true if empty array, empty object, or null;
+ /// otherwise, false.
+ bool empty() const;
+
+ /// Return isNull()
+ bool operator!() const;
+
+ /// Remove all object members and array elements.
+ /// \pre type() is arrayValue, objectValue, or nullValue
+ /// \post type() is unchanged
+ void clear();
+
+ /// Resize the array to size elements.
+ /// New elements are initialized to null.
+ /// May only be called on nullValue or arrayValue.
+ /// \pre type() is arrayValue or nullValue
+ /// \post type() is arrayValue
+ void resize(ArrayIndex size);
+
+ /// Access an array element (zero based index ).
+ /// If the array contains less than index element, then null value are
+ /// inserted
+ /// in the array so that its size is index+1.
+ /// (You may need to say 'value[0u]' to get your compiler to distinguish
+ /// this from the operator[] which takes a string.)
+ Value& operator[](ArrayIndex index);
+
+ /// Access an array element (zero based index ).
+ /// If the array contains less than index element, then null value are
+ /// inserted
+ /// in the array so that its size is index+1.
+ /// (You may need to say 'value[0u]' to get your compiler to distinguish
+ /// this from the operator[] which takes a string.)
+ Value& operator[](int index);
+
+ /// Access an array element (zero based index )
+ /// (You may need to say 'value[0u]' to get your compiler to distinguish
+ /// this from the operator[] which takes a string.)
+ const Value& operator[](ArrayIndex index) const;
+
+ /// Access an array element (zero based index )
+ /// (You may need to say 'value[0u]' to get your compiler to distinguish
+ /// this from the operator[] which takes a string.)
+ const Value& operator[](int index) const;
+
+ /// If the array contains at least index+1 elements, returns the element
+ /// value,
+ /// otherwise returns defaultValue.
+ Value get(ArrayIndex index, const Value& defaultValue) const;
+ /// Return true if index < size().
+ bool isValidIndex(ArrayIndex index) const;
+ /// \brief Append value to array at the end.
+ ///
+ /// Equivalent to jsonvalue[jsonvalue.size()] = value;
+ Value& append(const Value& value);
+
+ /// Access an object value by name, create a null member if it does not exist.
+ /// \note Because of our implementation, keys are limited to 2^30 -1 chars.
+ /// Exceeding that will cause an exception.
+ Value& operator[](const char* key);
+ /// Access an object value by name, returns null if there is no member with
+ /// that name.
+ const Value& operator[](const char* key) const;
+ /// Access an object value by name, create a null member if it does not exist.
+ /// \param key may contain embedded nulls.
+ Value& operator[](const std::string& key);
+ /// Access an object value by name, returns null if there is no member with
+ /// that name.
+ /// \param key may contain embedded nulls.
+ const Value& operator[](const std::string& key) const;
+ /** \brief Access an object value by name, create a null member if it does not
+ exist.
+
+ * If the object has no entry for that name, then the member name used to store
+ * the new entry is not duplicated.
+ * Example of use:
+ * \code
+ * Json::Value object;
+ * static const StaticString code("code");
+ * object[code] = 1234;
+ * \endcode
+ */
+ Value& operator[](const StaticString& key);
+#ifdef JSON_USE_CPPTL
+ /// Access an object value by name, create a null member if it does not exist.
+ Value& operator[](const CppTL::ConstString& key);
+ /// Access an object value by name, returns null if there is no member with
+ /// that name.
+ const Value& operator[](const CppTL::ConstString& key) const;
+#endif
+ /// Return the member named key if it exist, defaultValue otherwise.
+ /// \note deep copy
+ Value get(const char* key, const Value& defaultValue) const;
+ /// Return the member named key if it exist, defaultValue otherwise.
+ /// \note deep copy
+ /// \param key may contain embedded nulls.
+ Value get(const char* key, const char* end, const Value& defaultValue) const;
+ /// Return the member named key if it exist, defaultValue otherwise.
+ /// \note deep copy
+ /// \param key may contain embedded nulls.
+ Value get(const std::string& key, const Value& defaultValue) const;
+#ifdef JSON_USE_CPPTL
+ /// Return the member named key if it exist, defaultValue otherwise.
+ /// \note deep copy
+ Value get(const CppTL::ConstString& key, const Value& defaultValue) const;
+#endif
+ /// Most general and efficient version of isMember()const, get()const,
+ /// and operator[]const
+ /// \note As stated elsewhere, behavior is undefined if (end-key) >= 2^30
+ Value const* find(char const* key, char const* end) const;
+ /// Most general and efficient version of object-mutators.
+ /// \note As stated elsewhere, behavior is undefined if (end-key) >= 2^30
+ /// \return non-zero, but JSON_ASSERT if this is neither object nor nullValue.
+ Value const* demand(char const* key, char const* end);
+ /// \brief Remove and return the named member.
+ ///
+ /// Do nothing if it did not exist.
+ /// \return the removed Value, or null.
+ /// \pre type() is objectValue or nullValue
+ /// \post type() is unchanged
+ /// \deprecated
+ Value removeMember(const char* key);
+ /// Same as removeMember(const char*)
+ /// \param key may contain embedded nulls.
+ /// \deprecated
+ Value removeMember(const std::string& key);
+ /// Same as removeMember(const char* key, const char* end, Value* removed),
+ /// but 'key' is null-terminated.
+ bool removeMember(const char* key, Value* removed);
+ /** \brief Remove the named map member.
+
+ Update 'removed' iff removed.
+ \param key may contain embedded nulls.
+ \return true iff removed (no exceptions)
+ */
+ bool removeMember(std::string const& key, Value* removed);
+ /// Same as removeMember(std::string const& key, Value* removed)
+ bool removeMember(const char* key, const char* end, Value* removed);
+ /** \brief Remove the indexed array element.
+
+ O(n) expensive operations.
+ Update 'removed' iff removed.
+ \return true iff removed (no exceptions)
+ */
+ bool removeIndex(ArrayIndex i, Value* removed);
+
+ /// Return true if the object has a member named key.
+ /// \note 'key' must be null-terminated.
+ bool isMember(const char* key) const;
+ /// Return true if the object has a member named key.
+ /// \param key may contain embedded nulls.
+ bool isMember(const std::string& key) const;
+ /// Same as isMember(std::string const& key)const
+ bool isMember(const char* key, const char* end) const;
+#ifdef JSON_USE_CPPTL
+ /// Return true if the object has a member named key.
+ bool isMember(const CppTL::ConstString& key) const;
+#endif
+
+ /// \brief Return a list of the member names.
+ ///
+ /// If null, return an empty list.
+ /// \pre type() is objectValue or nullValue
+ /// \post if type() was nullValue, it remains nullValue
+ Members getMemberNames() const;
+
+ //# ifdef JSON_USE_CPPTL
+ // EnumMemberNames enumMemberNames() const;
+ // EnumValues enumValues() const;
+ //# endif
+
+ /// \deprecated Always pass len.
+ JSONCPP_DEPRECATED("Use setComment(std::string const&) instead.")
+ void setComment(const char* comment, CommentPlacement placement);
+ /// Comments must be //... or /* ... */
+ void setComment(const char* comment, size_t len, CommentPlacement placement);
+ /// Comments must be //... or /* ... */
+ void setComment(const std::string& comment, CommentPlacement placement);
+ bool hasComment(CommentPlacement placement) const;
+ /// Include delimiters and embedded newlines.
+ std::string getComment(CommentPlacement placement) const;
+
+ std::string toStyledString() const;
+
+ const_iterator begin() const;
+ const_iterator end() const;
+
+ iterator begin();
+ iterator end();
+
+private:
+ void initBasic(ValueType type, bool allocated = false);
+
+ Value& resolveReference(const char* key);
+ Value& resolveReference(const char* key, const char* end);
+
+ struct CommentInfo {
+ CommentInfo();
+ ~CommentInfo();
+
+ void setComment(const char* text, size_t len);
+
+ char* comment_;
+ };
+
+ // struct MemberNamesTransform
+ //{
+ // typedef const char *result_type;
+ // const char *operator()( const CZString &name ) const
+ // {
+ // return name.c_str();
+ // }
+ //};
+
+ union ValueHolder {
+ LargestInt int_;
+ LargestUInt uint_;
+ double real_;
+ bool bool_;
+ char* string_; // actually ptr to unsigned, followed by str, unless !allocated_
+ ObjectValues* map_;
+ } value_;
+ ValueType type_ : 8;
+ unsigned int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
+ // If not allocated_, string_ must be null-terminated.
+ CommentInfo* comments_;
+};
+
+/** \brief Experimental and untested: represents an element of the "path" to
+ * access a node.
+ */
+class JSON_API PathArgument {
+public:
+ friend class Path;
+
+ PathArgument();
+ PathArgument(ArrayIndex index);
+ PathArgument(const char* key);
+ PathArgument(const std::string& key);
+
+private:
+ enum Kind {
+ kindNone = 0,
+ kindIndex,
+ kindKey
+ };
+ std::string key_;
+ ArrayIndex index_;
+ Kind kind_;
+};
+
+/** \brief Experimental and untested: represents a "path" to access a node.
+ *
+ * Syntax:
+ * - "." => root node
+ * - ".[n]" => elements at index 'n' of root node (an array value)
+ * - ".name" => member named 'name' of root node (an object value)
+ * - ".name1.name2.name3"
+ * - ".[0][1][2].name1[3]"
+ * - ".%" => member name is provided as parameter
+ * - ".[%]" => index is provied as parameter
+ */
+class JSON_API Path {
+public:
+ Path(const std::string& path,
+ const PathArgument& a1 = PathArgument(),
+ const PathArgument& a2 = PathArgument(),
+ const PathArgument& a3 = PathArgument(),
+ const PathArgument& a4 = PathArgument(),
+ const PathArgument& a5 = PathArgument());
+
+ const Value& resolve(const Value& root) const;
+ Value resolve(const Value& root, const Value& defaultValue) const;
+ /// Creates the "path" to access the specified node and returns a reference on
+ /// the node.
+ Value& make(Value& root) const;
+
+private:
+ typedef std::vector InArgs;
+ typedef std::vector Args;
+
+ void makePath(const std::string& path, const InArgs& in);
+ void addPathInArg(const std::string& path,
+ const InArgs& in,
+ InArgs::const_iterator& itInArg,
+ PathArgument::Kind kind);
+ void invalidPath(const std::string& path, int location);
+
+ Args args_;
+};
+
+/** \brief base class for Value iterators.
+ *
+ */
+class JSON_API ValueIteratorBase {
+public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef unsigned int size_t;
+ typedef int difference_type;
+ typedef ValueIteratorBase SelfType;
+
+ ValueIteratorBase();
+ explicit ValueIteratorBase(const Value::ObjectValues::iterator& current);
+
+ bool operator==(const SelfType& other) const { return isEqual(other); }
+
+ bool operator!=(const SelfType& other) const { return !isEqual(other); }
+
+ difference_type operator-(const SelfType& other) const {
+ return other.computeDistance(*this);
+ }
+
+ /// Return either the index or the member name of the referenced value as a
+ /// Value.
+ Value key() const;
+
+ /// Return the index of the referenced Value, or -1 if it is not an arrayValue.
+ UInt index() const;
+
+ /// Return the member name of the referenced Value, or "" if it is not an
+ /// objectValue.
+ /// \note Avoid `c_str()` on result, as embedded zeroes are possible.
+ std::string name() const;
+
+ /// Return the member name of the referenced Value. "" if it is not an
+ /// objectValue.
+ /// \deprecated This cannot be used for UTF-8 strings, since there can be embedded nulls.
+ JSONCPP_DEPRECATED("Use `key = name();` instead.")
+ char const* memberName() const;
+ /// Return the member name of the referenced Value, or NULL if it is not an
+ /// objectValue.
+ /// \note Better version than memberName(). Allows embedded nulls.
+ char const* memberName(char const** end) const;
+
+protected:
+ Value& deref() const;
+
+ void increment();
+
+ void decrement();
+
+ difference_type computeDistance(const SelfType& other) const;
+
+ bool isEqual(const SelfType& other) const;
+
+ void copy(const SelfType& other);
+
+private:
+ Value::ObjectValues::iterator current_;
+ // Indicates that iterator is for a null value.
+ bool isNull_;
+};
+
+/** \brief const iterator for object and array value.
+ *
+ */
+class JSON_API ValueConstIterator : public ValueIteratorBase {
+ friend class Value;
+
+public:
+ typedef const Value value_type;
+ //typedef unsigned int size_t;
+ //typedef int difference_type;
+ typedef const Value& reference;
+ typedef const Value* pointer;
+ typedef ValueConstIterator SelfType;
+
+ ValueConstIterator();
+
+private:
+/*! \internal Use by Value to create an iterator.
+ */
+ explicit ValueConstIterator(const Value::ObjectValues::iterator& current);
+public:
+ SelfType& operator=(const ValueIteratorBase& other);
+
+ SelfType operator++(int) {
+ SelfType temp(*this);
+ ++*this;
+ return temp;
+ }
+
+ SelfType operator--(int) {
+ SelfType temp(*this);
+ --*this;
+ return temp;
+ }
+
+ SelfType& operator--() {
+ decrement();
+ return *this;
+ }
+
+ SelfType& operator++() {
+ increment();
+ return *this;
+ }
+
+ reference operator*() const { return deref(); }
+
+ pointer operator->() const { return &deref(); }
+};
+
+/** \brief Iterator for object and array value.
+ */
+class JSON_API ValueIterator : public ValueIteratorBase {
+ friend class Value;
+
+public:
+ typedef Value value_type;
+ typedef unsigned int size_t;
+ typedef int difference_type;
+ typedef Value& reference;
+ typedef Value* pointer;
+ typedef ValueIterator SelfType;
+
+ ValueIterator();
+ ValueIterator(const ValueConstIterator& other);
+ ValueIterator(const ValueIterator& other);
+
+private:
+/*! \internal Use by Value to create an iterator.
+ */
+ explicit ValueIterator(const Value::ObjectValues::iterator& current);
+public:
+ SelfType& operator=(const SelfType& other);
+
+ SelfType operator++(int) {
+ SelfType temp(*this);
+ ++*this;
+ return temp;
+ }
+
+ SelfType operator--(int) {
+ SelfType temp(*this);
+ --*this;
+ return temp;
+ }
+
+ SelfType& operator--() {
+ decrement();
+ return *this;
+ }
+
+ SelfType& operator++() {
+ increment();
+ return *this;
+ }
+
+ reference operator*() const { return deref(); }
+
+ pointer operator->() const { return &deref(); }
+};
+
+} // namespace Json
+
+
+namespace std {
+/// Specialize std::swap() for Json::Value.
+template<>
+inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
+}
+
+
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(pop)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+#endif // CPPTL_JSON_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/value.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/reader.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef CPPTL_JSON_READER_H_INCLUDED
+#define CPPTL_JSON_READER_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "features.h"
+#include "value.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+#include
+#include
+
+// Disable warning C4251: : needs to have dll-interface to
+// be used by...
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+namespace Json {
+
+/** \brief Unserialize a JSON document into a
+ *Value.
+ *
+ * \deprecated Use CharReader and CharReaderBuilder.
+ */
+class JSON_API Reader {
+public:
+ typedef char Char;
+ typedef const Char* Location;
+
+ /** \brief Constructs a Reader allowing all features
+ * for parsing.
+ */
+ Reader();
+
+ /** \brief Constructs a Reader allowing the specified feature set
+ * for parsing.
+ */
+ Reader(const Features& features);
+
+ /** \brief Read a Value from a JSON
+ * document.
+ * \param document UTF-8 encoded string containing the document to read.
+ * \param root [out] Contains the root value of the document if it was
+ * successfully parsed.
+ * \param collectComments \c true to collect comment and allow writing them
+ * back during
+ * serialization, \c false to discard comments.
+ * This parameter is ignored if
+ * Features::allowComments_
+ * is \c false.
+ * \return \c true if the document was successfully parsed, \c false if an
+ * error occurred.
+ */
+ bool
+ parse(const std::string& document, Value& root, bool collectComments = true);
+
+ /** \brief Read a Value from a JSON
+ document.
+ * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the
+ document to read.
+ * \param endDoc Pointer on the end of the UTF-8 encoded string of the
+ document to read.
+ * Must be >= beginDoc.
+ * \param root [out] Contains the root value of the document if it was
+ * successfully parsed.
+ * \param collectComments \c true to collect comment and allow writing them
+ back during
+ * serialization, \c false to discard comments.
+ * This parameter is ignored if
+ Features::allowComments_
+ * is \c false.
+ * \return \c true if the document was successfully parsed, \c false if an
+ error occurred.
+ */
+ bool parse(const char* beginDoc,
+ const char* endDoc,
+ Value& root,
+ bool collectComments = true);
+
+ /// \brief Parse from input stream.
+ /// \see Json::operator>>(std::istream&, Json::Value&).
+ bool parse(std::istream& is, Value& root, bool collectComments = true);
+
+ /** \brief Returns a user friendly string that list errors in the parsed
+ * document.
+ * \return Formatted error message with the list of errors with their location
+ * in
+ * the parsed document. An empty string is returned if no error
+ * occurred
+ * during parsing.
+ * \deprecated Use getFormattedErrorMessages() instead (typo fix).
+ */
+ JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.")
+ std::string getFormatedErrorMessages() const;
+
+ /** \brief Returns a user friendly string that list errors in the parsed
+ * document.
+ * \return Formatted error message with the list of errors with their location
+ * in
+ * the parsed document. An empty string is returned if no error
+ * occurred
+ * during parsing.
+ */
+ std::string getFormattedErrorMessages() const;
+
+private:
+ enum TokenType {
+ tokenEndOfStream = 0,
+ tokenObjectBegin,
+ tokenObjectEnd,
+ tokenArrayBegin,
+ tokenArrayEnd,
+ tokenString,
+ tokenNumber,
+ tokenTrue,
+ tokenFalse,
+ tokenNull,
+ tokenArraySeparator,
+ tokenMemberSeparator,
+ tokenComment,
+ tokenError
+ };
+
+ class Token {
+ public:
+ TokenType type_;
+ Location start_;
+ Location end_;
+ };
+
+ class ErrorInfo {
+ public:
+ Token token_;
+ std::string message_;
+ Location extra_;
+ };
+
+ typedef std::deque Errors;
+
+ bool readToken(Token& token);
+ void skipSpaces();
+ bool match(Location pattern, int patternLength);
+ bool readComment();
+ bool readCStyleComment();
+ bool readCppStyleComment();
+ bool readString();
+ void readNumber();
+ bool readValue();
+ bool readObject(Token& token);
+ bool readArray(Token& token);
+ bool decodeNumber(Token& token);
+ bool decodeNumber(Token& token, Value& decoded);
+ bool decodeString(Token& token);
+ bool decodeString(Token& token, std::string& decoded);
+ bool decodeDouble(Token& token);
+ bool decodeDouble(Token& token, Value& decoded);
+ bool decodeUnicodeCodePoint(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode);
+ bool decodeUnicodeEscapeSequence(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode);
+ bool addError(const std::string& message, Token& token, Location extra = 0);
+ bool recoverFromError(TokenType skipUntilToken);
+ bool addErrorAndRecover(const std::string& message,
+ Token& token,
+ TokenType skipUntilToken);
+ void skipUntilSpace();
+ Value& currentValue();
+ Char getNextChar();
+ void
+ getLocationLineAndColumn(Location location, int& line, int& column) const;
+ std::string getLocationLineAndColumn(Location location) const;
+ void addComment(Location begin, Location end, CommentPlacement placement);
+ void skipCommentTokens(Token& token);
+
+ typedef std::stack Nodes;
+ Nodes nodes_;
+ Errors errors_;
+ std::string document_;
+ Location begin_;
+ Location end_;
+ Location current_;
+ Location lastValueEnd_;
+ Value* lastValue_;
+ std::string commentsBefore_;
+ Features features_;
+ bool collectComments_;
+}; // Reader
+
+/** Interface for reading JSON from a char array.
+ */
+class JSON_API CharReader {
+public:
+ virtual ~CharReader() {}
+ /** \brief Read a Value from a JSON
+ document.
+ * The document must be a UTF-8 encoded string containing the document to read.
+ *
+ * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the
+ document to read.
+ * \param endDoc Pointer on the end of the UTF-8 encoded string of the
+ document to read.
+ * Must be >= beginDoc.
+ * \param root [out] Contains the root value of the document if it was
+ * successfully parsed.
+ * \param errs [out] Formatted error messages (if not NULL)
+ * a user friendly string that lists errors in the parsed
+ * document.
+ * \return \c true if the document was successfully parsed, \c false if an
+ error occurred.
+ */
+ virtual bool parse(
+ char const* beginDoc, char const* endDoc,
+ Value* root, std::string* errs) = 0;
+
+ class Factory {
+ public:
+ virtual ~Factory() {}
+ /** \brief Allocate a CharReader via operator new().
+ * \throw std::exception if something goes wrong (e.g. invalid settings)
+ */
+ virtual CharReader* newCharReader() const = 0;
+ }; // Factory
+}; // CharReader
+
+/** \brief Build a CharReader implementation.
+
+Usage:
+\code
+ using namespace Json;
+ CharReaderBuilder builder;
+ builder["collectComments"] = false;
+ Value value;
+ std::string errs;
+ bool ok = parseFromStream(builder, std::cin, &value, &errs);
+\endcode
+*/
+class JSON_API CharReaderBuilder : public CharReader::Factory {
+public:
+ // Note: We use a Json::Value so that we can add data-members to this class
+ // without a major version bump.
+ /** Configuration of this builder.
+ These are case-sensitive.
+ Available settings (case-sensitive):
+ - `"collectComments": false or true`
+ - true to collect comment and allow writing them
+ back during serialization, false to discard comments.
+ This parameter is ignored if allowComments is false.
+ - `"allowComments": false or true`
+ - true if comments are allowed.
+ - `"strictRoot": false or true`
+ - true if root must be either an array or an object value
+ - `"allowDroppedNullPlaceholders": false or true`
+ - true if dropped null placeholders are allowed. (See StreamWriterBuilder.)
+ - `"allowNumericKeys": false or true`
+ - true if numeric object keys are allowed.
+ - `"allowSingleQuotes": false or true`
+ - true if '' are allowed for strings (both keys and values)
+ - `"stackLimit": integer`
+ - Exceeding stackLimit (recursive depth of `readValue()`) will
+ cause an exception.
+ - This is a security issue (seg-faults caused by deeply nested JSON),
+ so the default is low.
+ - `"failIfExtra": false or true`
+ - If true, `parse()` returns false when extra non-whitespace trails
+ the JSON value in the input string.
+ - `"rejectDupKeys": false or true`
+ - If true, `parse()` returns false when a key is duplicated within an object.
+
+ You can examine 'settings_` yourself
+ to see the defaults. You can also write and read them just like any
+ JSON Value.
+ \sa setDefaults()
+ */
+ Json::Value settings_;
+
+ CharReaderBuilder();
+ virtual ~CharReaderBuilder();
+
+ virtual CharReader* newCharReader() const;
+
+ /** \return true if 'settings' are legal and consistent;
+ * otherwise, indicate bad settings via 'invalid'.
+ */
+ bool validate(Json::Value* invalid) const;
+
+ /** A simple way to update a specific setting.
+ */
+ Value& operator[](std::string key);
+
+ /** Called by ctor, but you can use this to reset settings_.
+ * \pre 'settings' != NULL (but Json::null is fine)
+ * \remark Defaults:
+ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
+ */
+ static void setDefaults(Json::Value* settings);
+ /** Same as old Features::strictMode().
+ * \pre 'settings' != NULL (but Json::null is fine)
+ * \remark Defaults:
+ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
+ */
+ static void strictMode(Json::Value* settings);
+};
+
+/** Consume entire stream and use its begin/end.
+ * Someday we might have a real StreamReader, but for now this
+ * is convenient.
+ */
+bool JSON_API parseFromStream(
+ CharReader::Factory const&,
+ std::istream&,
+ Value* root, std::string* errs);
+
+/** \brief Read from 'sin' into 'root'.
+
+ Always keep comments from the input JSON.
+
+ This can be used to read a file into a particular sub-object.
+ For example:
+ \code
+ Json::Value root;
+ cin >> root["dir"]["file"];
+ cout << root;
+ \endcode
+ Result:
+ \verbatim
+ {
+ "dir": {
+ "file": {
+ // The input stream JSON would be nested here.
+ }
+ }
+ }
+ \endverbatim
+ \throw std::exception on parse error.
+ \see Json::operator<<()
+*/
+JSON_API std::istream& operator>>(std::istream&, Value&);
+
+} // namespace Json
+
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(pop)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+#endif // CPPTL_JSON_READER_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/reader.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/writer.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_WRITER_H_INCLUDED
+#define JSON_WRITER_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "value.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+
+// Disable warning C4251: : needs to have dll-interface to
+// be used by...
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+namespace Json {
+
+class Value;
+
+/**
+
+Usage:
+\code
+ using namespace Json;
+ void writeToStdout(StreamWriter::Factory const& factory, Value const& value) {
+ std::unique_ptr const writer(
+ factory.newStreamWriter());
+ writer->write(value, &std::cout);
+ std::cout << std::endl; // add lf and flush
+ }
+\endcode
+*/
+class JSON_API StreamWriter {
+protected:
+ std::ostream* sout_; // not owned; will not delete
+public:
+ StreamWriter();
+ virtual ~StreamWriter();
+ /** Write Value into document as configured in sub-class.
+ Do not take ownership of sout, but maintain a reference during function.
+ \pre sout != NULL
+ \return zero on success (For now, we always return zero, so check the stream instead.)
+ \throw std::exception possibly, depending on configuration
+ */
+ virtual int write(Value const& root, std::ostream* sout) = 0;
+
+ /** \brief A simple abstract factory.
+ */
+ class JSON_API Factory {
+ public:
+ virtual ~Factory();
+ /** \brief Allocate a CharReader via operator new().
+ * \throw std::exception if something goes wrong (e.g. invalid settings)
+ */
+ virtual StreamWriter* newStreamWriter() const = 0;
+ }; // Factory
+}; // StreamWriter
+
+/** \brief Write into stringstream, then return string, for convenience.
+ * A StreamWriter will be created from the factory, used, and then deleted.
+ */
+std::string JSON_API writeString(StreamWriter::Factory const& factory, Value const& root);
+
+
+/** \brief Build a StreamWriter implementation.
+
+Usage:
+\code
+ using namespace Json;
+ Value value = ...;
+ StreamWriterBuilder builder;
+ builder["commentStyle"] = "None";
+ builder["indentation"] = " "; // or whatever you like
+ std::unique_ptr writer(
+ builder.newStreamWriter());
+ writer->write(value, &std::cout);
+ std::cout << std::endl; // add lf and flush
+\endcode
+*/
+class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
+public:
+ // Note: We use a Json::Value so that we can add data-members to this class
+ // without a major version bump.
+ /** Configuration of this builder.
+ Available settings (case-sensitive):
+ - "commentStyle": "None" or "All"
+ - "indentation": ""
+ - "enableYAMLCompatibility": false or true
+ - slightly change the whitespace around colons
+ - "dropNullPlaceholders": false or true
+ - Drop the "null" string from the writer's output for nullValues.
+ Strictly speaking, this is not valid JSON. But when the output is being
+ fed to a browser's Javascript, it makes for smaller output and the
+ browser can handle the output just fine.
+
+ You can examine 'settings_` yourself
+ to see the defaults. You can also write and read them just like any
+ JSON Value.
+ \sa setDefaults()
+ */
+ Json::Value settings_;
+
+ StreamWriterBuilder();
+ virtual ~StreamWriterBuilder();
+
+ /**
+ * \throw std::exception if something goes wrong (e.g. invalid settings)
+ */
+ virtual StreamWriter* newStreamWriter() const;
+
+ /** \return true if 'settings' are legal and consistent;
+ * otherwise, indicate bad settings via 'invalid'.
+ */
+ bool validate(Json::Value* invalid) const;
+ /** A simple way to update a specific setting.
+ */
+ Value& operator[](std::string key);
+
+ /** Called by ctor, but you can use this to reset settings_.
+ * \pre 'settings' != NULL (but Json::null is fine)
+ * \remark Defaults:
+ * \snippet src/lib_json/json_writer.cpp StreamWriterBuilderDefaults
+ */
+ static void setDefaults(Json::Value* settings);
+};
+
+/** \brief Abstract class for writers.
+ * \deprecated Use StreamWriter. (And really, this is an implementation detail.)
+ */
+class JSON_API Writer {
+public:
+ virtual ~Writer();
+
+ virtual std::string write(const Value& root) = 0;
+};
+
+/** \brief Outputs a Value in JSON format
+ *without formatting (not human friendly).
+ *
+ * The JSON document is written in a single line. It is not intended for 'human'
+ *consumption,
+ * but may be usefull to support feature such as RPC where bandwith is limited.
+ * \sa Reader, Value
+ * \deprecated Use StreamWriterBuilder.
+ */
+class JSON_API FastWriter : public Writer {
+
+public:
+ FastWriter();
+ virtual ~FastWriter() {}
+
+ void enableYAMLCompatibility();
+
+public: // overridden from Writer
+ virtual std::string write(const Value& root);
+
+private:
+ void writeValue(const Value& value);
+
+ std::string document_;
+ bool yamlCompatiblityEnabled_;
+};
+
+/** \brief Writes a Value in JSON format in a
+ *human friendly way.
+ *
+ * The rules for line break and indent are as follow:
+ * - Object value:
+ * - if empty then print {} without indent and line break
+ * - if not empty the print '{', line break & indent, print one value per
+ *line
+ * and then unindent and line break and print '}'.
+ * - Array value:
+ * - if empty then print [] without indent and line break
+ * - if the array contains no object value, empty array or some other value
+ *types,
+ * and all the values fit on one lines, then print the array on a single
+ *line.
+ * - otherwise, it the values do not fit on one line, or the array contains
+ * object or non empty array, then print one value per line.
+ *
+ * If the Value have comments then they are outputed according to their
+ *#CommentPlacement.
+ *
+ * \sa Reader, Value, Value::setComment()
+ * \deprecated Use StreamWriterBuilder.
+ */
+class JSON_API StyledWriter : public Writer {
+public:
+ StyledWriter();
+ virtual ~StyledWriter() {}
+
+public: // overridden from Writer
+ /** \brief Serialize a Value in JSON format.
+ * \param root Value to serialize.
+ * \return String containing the JSON document that represents the root value.
+ */
+ virtual std::string write(const Value& root);
+
+private:
+ void writeValue(const Value& value);
+ void writeArrayValue(const Value& value);
+ bool isMultineArray(const Value& value);
+ void pushValue(const std::string& value);
+ void writeIndent();
+ void writeWithIndent(const std::string& value);
+ void indent();
+ void unindent();
+ void writeCommentBeforeValue(const Value& root);
+ void writeCommentAfterValueOnSameLine(const Value& root);
+ bool hasCommentForValue(const Value& value);
+ static std::string normalizeEOL(const std::string& text);
+
+ typedef std::vector ChildValues;
+
+ ChildValues childValues_;
+ std::string document_;
+ std::string indentString_;
+ int rightMargin_;
+ int indentSize_;
+ bool addChildValues_;
+};
+
+/** \brief Writes a Value in JSON format in a
+ human friendly way,
+ to a stream rather than to a string.
+ *
+ * The rules for line break and indent are as follow:
+ * - Object value:
+ * - if empty then print {} without indent and line break
+ * - if not empty the print '{', line break & indent, print one value per
+ line
+ * and then unindent and line break and print '}'.
+ * - Array value:
+ * - if empty then print [] without indent and line break
+ * - if the array contains no object value, empty array or some other value
+ types,
+ * and all the values fit on one lines, then print the array on a single
+ line.
+ * - otherwise, it the values do not fit on one line, or the array contains
+ * object or non empty array, then print one value per line.
+ *
+ * If the Value have comments then they are outputed according to their
+ #CommentPlacement.
+ *
+ * \param indentation Each level will be indented by this amount extra.
+ * \sa Reader, Value, Value::setComment()
+ * \deprecated Use StreamWriterBuilder.
+ */
+class JSON_API StyledStreamWriter {
+public:
+ StyledStreamWriter(std::string indentation = "\t");
+ ~StyledStreamWriter() {}
+
+public:
+ /** \brief Serialize a Value in JSON format.
+ * \param out Stream to write to. (Can be ostringstream, e.g.)
+ * \param root Value to serialize.
+ * \note There is no point in deriving from Writer, since write() should not
+ * return a value.
+ */
+ void write(std::ostream& out, const Value& root);
+
+private:
+ void writeValue(const Value& value);
+ void writeArrayValue(const Value& value);
+ bool isMultineArray(const Value& value);
+ void pushValue(const std::string& value);
+ void writeIndent();
+ void writeWithIndent(const std::string& value);
+ void indent();
+ void unindent();
+ void writeCommentBeforeValue(const Value& root);
+ void writeCommentAfterValueOnSameLine(const Value& root);
+ bool hasCommentForValue(const Value& value);
+ static std::string normalizeEOL(const std::string& text);
+
+ typedef std::vector ChildValues;
+
+ ChildValues childValues_;
+ std::ostream* document_;
+ std::string indentString_;
+ int rightMargin_;
+ std::string indentation_;
+ bool addChildValues_ : 1;
+ bool indented_ : 1;
+};
+
+#if defined(JSON_HAS_INT64)
+std::string JSON_API valueToString(Int value);
+std::string JSON_API valueToString(UInt value);
+#endif // if defined(JSON_HAS_INT64)
+std::string JSON_API valueToString(LargestInt value);
+std::string JSON_API valueToString(LargestUInt value);
+std::string JSON_API valueToString(double value);
+std::string JSON_API valueToString(bool value);
+std::string JSON_API valueToQuotedString(const char* value);
+
+/// \brief Output using the StyledStreamWriter.
+/// \see Json::operator>>()
+JSON_API std::ostream& operator<<(std::ostream&, const Value& root);
+
+} // namespace Json
+
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(pop)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+#endif // JSON_WRITER_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/writer.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/assertions.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
+#define CPPTL_JSON_ASSERTIONS_H_INCLUDED
+
+#include
+#include
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "config.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+/** It should not be possible for a maliciously designed file to
+ * cause an abort() or seg-fault, so these macros are used only
+ * for pre-condition violations and internal logic errors.
+ */
+#if JSON_USE_EXCEPTION
+
+// @todo <= add detail about condition in exception
+# define JSON_ASSERT(condition) \
+ {if (!(condition)) {Json::throwLogicError( "assert json failed" );}}
+
+# define JSON_FAIL_MESSAGE(message) \
+ { \
+ std::ostringstream oss; oss << message; \
+ Json::throwLogicError(oss.str()); \
+ abort(); \
+ }
+
+#else // JSON_USE_EXCEPTION
+
+# define JSON_ASSERT(condition) assert(condition)
+
+// The call to assert() will show the failure message in debug builds. In
+// release builds we abort, for a core-dump or debugger.
+# define JSON_FAIL_MESSAGE(message) \
+ { \
+ std::ostringstream oss; oss << message; \
+ assert(false && oss.str().c_str()); \
+ abort(); \
+ }
+
+
+#endif
+
+#define JSON_ASSERT_MESSAGE(condition, message) \
+ if (!(condition)) { \
+ JSON_FAIL_MESSAGE(message); \
+ }
+
+#endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/assertions.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#endif //ifndef JSON_AMALGATED_H_INCLUDED
diff --git a/lib/jsoncpp/jsoncpp.cpp b/lib/jsoncpp/jsoncpp.cpp
new file mode 100644
index 000000000..7a2c7f0c7
--- /dev/null
+++ b/lib/jsoncpp/jsoncpp.cpp
@@ -0,0 +1,4930 @@
+/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/).
+/// It is intended to be used with #include "json/json.h"
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+/*
+The JsonCpp library's source code, including accompanying documentation,
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all
+jurisdictions which recognize such a disclaimer. In such jurisdictions,
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this
+software may choose to accept it either as 1) Public Domain, 2) under the
+conditions of the MIT License (see below), or 3) under the terms of dual
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+ http://en.wikipedia.org/wiki/MIT_License
+
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+
+*/
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+#include "json/json.h"
+
+#ifndef JSON_IS_AMALGAMATION
+#error "Compile with -I PATH_TO_JSON_DIRECTORY"
+#endif
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_tool.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED
+#define LIB_JSONCPP_JSON_TOOL_H_INCLUDED
+
+/* This header provides common string manipulation support, such as UTF-8,
+ * portable conversion from/to string...
+ *
+ * It is an internal header that must not be exposed.
+ */
+
+namespace Json {
+
+/// Converts a unicode code-point to UTF-8.
+static inline std::string codePointToUTF8(unsigned int cp) {
+ std::string result;
+
+ // based on description from http://en.wikipedia.org/wiki/UTF-8
+
+ if (cp <= 0x7f) {
+ result.resize(1);
+ result[0] = static_cast(cp);
+ } else if (cp <= 0x7FF) {
+ result.resize(2);
+ result[1] = static_cast(0x80 | (0x3f & cp));
+ result[0] = static_cast(0xC0 | (0x1f & (cp >> 6)));
+ } else if (cp <= 0xFFFF) {
+ result.resize(3);
+ result[2] = static_cast(0x80 | (0x3f & cp));
+ result[1] = 0x80 | static_cast((0x3f & (cp >> 6)));
+ result[0] = 0xE0 | static_cast((0xf & (cp >> 12)));
+ } else if (cp <= 0x10FFFF) {
+ result.resize(4);
+ result[3] = static_cast(0x80 | (0x3f & cp));
+ result[2] = static_cast(0x80 | (0x3f & (cp >> 6)));
+ result[1] = static_cast(0x80 | (0x3f & (cp >> 12)));
+ result[0] = static_cast(0xF0 | (0x7 & (cp >> 18)));
+ }
+
+ return result;
+}
+
+/// Returns true if ch is a control character (in range [0,32[).
+static inline bool isControlCharacter(char ch) { return ch > 0 && ch <= 0x1F; }
+
+enum {
+ /// Constant that specify the size of the buffer that must be passed to
+ /// uintToString.
+ uintToStringBufferSize = 3 * sizeof(LargestUInt) + 1
+};
+
+// Defines a char buffer for use with uintToString().
+typedef char UIntToStringBuffer[uintToStringBufferSize];
+
+/** Converts an unsigned integer to string.
+ * @param value Unsigned interger to convert to string
+ * @param current Input/Output string buffer.
+ * Must have at least uintToStringBufferSize chars free.
+ */
+static inline void uintToString(LargestUInt value, char*& current) {
+ *--current = 0;
+ do {
+ *--current = char(value % 10) + '0';
+ value /= 10;
+ } while (value != 0);
+}
+
+/** Change ',' to '.' everywhere in buffer.
+ *
+ * We had a sophisticated way, but it did not work in WinCE.
+ * @see https://github.com/open-source-parsers/jsoncpp/pull/9
+ */
+static inline void fixNumericLocale(char* begin, char* end) {
+ while (begin < end) {
+ if (*begin == ',') {
+ *begin = '.';
+ }
+ ++begin;
+ }
+}
+
+} // namespace Json {
+
+#endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_tool.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_reader.cpp
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2011 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+#include "json_tool.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
+#define snprintf _snprintf
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
+// Disable warning about strdup being deprecated.
+#pragma warning(disable : 4996)
+#endif
+
+static int const stackLimit_g = 1000;
+static int stackDepth_g = 0; // see readValue()
+
+namespace Json {
+
+#if __cplusplus >= 201103L
+typedef std::unique_ptr CharReaderPtr;
+#else
+typedef std::auto_ptr CharReaderPtr;
+#endif
+
+// Implementation of class Features
+// ////////////////////////////////
+
+Features::Features()
+ : allowComments_(true), strictRoot_(false)
+{}
+Features Features::all() { return Features(); }
+
+Features Features::strictMode() {
+ Features features;
+ features.allowComments_ = false;
+ features.strictRoot_ = true;
+ return features;
+}
+
+// Implementation of class Reader
+// ////////////////////////////////
+
+static bool containsNewLine(Reader::Location begin, Reader::Location end) {
+ for (; begin < end; ++begin)
+ if (*begin == '\n' || *begin == '\r')
+ return true;
+ return false;
+}
+
+// Class Reader
+// //////////////////////////////////////////////////////////////////
+
+Reader::Reader()
+ : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(),
+ lastValue_(), commentsBefore_(), features_(Features::all()),
+ collectComments_() {}
+
+Reader::Reader(const Features& features)
+ : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(),
+ lastValue_(), commentsBefore_(), features_(features), collectComments_() {
+}
+
+bool
+Reader::parse(const std::string& document, Value& root, bool collectComments) {
+ document_ = document;
+ const char* begin = document_.c_str();
+ const char* end = begin + document_.length();
+ return parse(begin, end, root, collectComments);
+}
+
+bool Reader::parse(std::istream& sin, Value& root, bool collectComments) {
+ // std::istream_iterator begin(sin);
+ // std::istream_iterator end;
+ // Those would allow streamed input from a file, if parse() were a
+ // template function.
+
+ // Since std::string is reference-counted, this at least does not
+ // create an extra copy.
+ std::string doc;
+ std::getline(sin, doc, (char)EOF);
+ return parse(doc, root, collectComments);
+}
+
+bool Reader::parse(const char* beginDoc,
+ const char* endDoc,
+ Value& root,
+ bool collectComments) {
+ if (!features_.allowComments_) {
+ collectComments = false;
+ }
+
+ begin_ = beginDoc;
+ end_ = endDoc;
+ collectComments_ = collectComments;
+ current_ = begin_;
+ lastValueEnd_ = 0;
+ lastValue_ = 0;
+ commentsBefore_ = "";
+ errors_.clear();
+ while (!nodes_.empty())
+ nodes_.pop();
+ nodes_.push(&root);
+
+ stackDepth_g = 0; // Yes, this is bad coding, but options are limited.
+ bool successful = readValue();
+ Token token;
+ skipCommentTokens(token);
+ if (collectComments_ && !commentsBefore_.empty())
+ root.setComment(commentsBefore_, commentAfter);
+ if (features_.strictRoot_) {
+ if (!root.isArray() && !root.isObject()) {
+ // Set error location to start of doc, ideally should be first token found
+ // in doc
+ token.type_ = tokenError;
+ token.start_ = beginDoc;
+ token.end_ = endDoc;
+ addError(
+ "A valid JSON document must be either an array or an object value.",
+ token);
+ return false;
+ }
+ }
+ return successful;
+}
+
+bool Reader::readValue() {
+ // This is a non-reentrant way to support a stackLimit. Terrible!
+ // But this deprecated class has a security problem: Bad input can
+ // cause a seg-fault. This seems like a fair, binary-compatible way
+ // to prevent the problem.
+ if (stackDepth_g >= stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue().");
+ ++stackDepth_g;
+
+ Token token;
+ skipCommentTokens(token);
+ bool successful = true;
+
+ if (collectComments_ && !commentsBefore_.empty()) {
+ currentValue().setComment(commentsBefore_, commentBefore);
+ commentsBefore_ = "";
+ }
+
+ switch (token.type_) {
+ case tokenObjectBegin:
+ successful = readObject(token);
+ break;
+ case tokenArrayBegin:
+ successful = readArray(token);
+ break;
+ case tokenNumber:
+ successful = decodeNumber(token);
+ break;
+ case tokenString:
+ successful = decodeString(token);
+ break;
+ case tokenTrue:
+ {
+ Value v(true);
+ currentValue().swapPayload(v);
+ }
+ break;
+ case tokenFalse:
+ {
+ Value v(false);
+ currentValue().swapPayload(v);
+ }
+ break;
+ case tokenNull:
+ {
+ Value v;
+ currentValue().swapPayload(v);
+ }
+ break;
+ // Else, fall through...
+ default:
+ return addError("Syntax error: value, object or array expected.", token);
+ }
+
+ if (collectComments_) {
+ lastValueEnd_ = current_;
+ lastValue_ = ¤tValue();
+ }
+
+ --stackDepth_g;
+ return successful;
+}
+
+void Reader::skipCommentTokens(Token& token) {
+ if (features_.allowComments_) {
+ do {
+ readToken(token);
+ } while (token.type_ == tokenComment);
+ } else {
+ readToken(token);
+ }
+}
+
+bool Reader::readToken(Token& token) {
+ skipSpaces();
+ token.start_ = current_;
+ Char c = getNextChar();
+ bool ok = true;
+ switch (c) {
+ case '{':
+ token.type_ = tokenObjectBegin;
+ break;
+ case '}':
+ token.type_ = tokenObjectEnd;
+ break;
+ case '[':
+ token.type_ = tokenArrayBegin;
+ break;
+ case ']':
+ token.type_ = tokenArrayEnd;
+ break;
+ case '"':
+ token.type_ = tokenString;
+ ok = readString();
+ break;
+ case '/':
+ token.type_ = tokenComment;
+ ok = readComment();
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case '-':
+ token.type_ = tokenNumber;
+ readNumber();
+ break;
+ case 't':
+ token.type_ = tokenTrue;
+ ok = match("rue", 3);
+ break;
+ case 'f':
+ token.type_ = tokenFalse;
+ ok = match("alse", 4);
+ break;
+ case 'n':
+ token.type_ = tokenNull;
+ ok = match("ull", 3);
+ break;
+ case ',':
+ token.type_ = tokenArraySeparator;
+ break;
+ case ':':
+ token.type_ = tokenMemberSeparator;
+ break;
+ case 0:
+ token.type_ = tokenEndOfStream;
+ break;
+ default:
+ ok = false;
+ break;
+ }
+ if (!ok)
+ token.type_ = tokenError;
+ token.end_ = current_;
+ return true;
+}
+
+void Reader::skipSpaces() {
+ while (current_ != end_) {
+ Char c = *current_;
+ if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
+ ++current_;
+ else
+ break;
+ }
+}
+
+bool Reader::match(Location pattern, int patternLength) {
+ if (end_ - current_ < patternLength)
+ return false;
+ int index = patternLength;
+ while (index--)
+ if (current_[index] != pattern[index])
+ return false;
+ current_ += patternLength;
+ return true;
+}
+
+bool Reader::readComment() {
+ Location commentBegin = current_ - 1;
+ Char c = getNextChar();
+ bool successful = false;
+ if (c == '*')
+ successful = readCStyleComment();
+ else if (c == '/')
+ successful = readCppStyleComment();
+ if (!successful)
+ return false;
+
+ if (collectComments_) {
+ CommentPlacement placement = commentBefore;
+ if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) {
+ if (c != '*' || !containsNewLine(commentBegin, current_))
+ placement = commentAfterOnSameLine;
+ }
+
+ addComment(commentBegin, current_, placement);
+ }
+ return true;
+}
+
+static std::string normalizeEOL(Reader::Location begin, Reader::Location end) {
+ std::string normalized;
+ normalized.reserve(end - begin);
+ Reader::Location current = begin;
+ while (current != end) {
+ char c = *current++;
+ if (c == '\r') {
+ if (current != end && *current == '\n')
+ // convert dos EOL
+ ++current;
+ // convert Mac EOL
+ normalized += '\n';
+ } else {
+ normalized += c;
+ }
+ }
+ return normalized;
+}
+
+void
+Reader::addComment(Location begin, Location end, CommentPlacement placement) {
+ assert(collectComments_);
+ const std::string& normalized = normalizeEOL(begin, end);
+ if (placement == commentAfterOnSameLine) {
+ assert(lastValue_ != 0);
+ lastValue_->setComment(normalized, placement);
+ } else {
+ commentsBefore_ += normalized;
+ }
+}
+
+bool Reader::readCStyleComment() {
+ while (current_ != end_) {
+ Char c = getNextChar();
+ if (c == '*' && *current_ == '/')
+ break;
+ }
+ return getNextChar() == '/';
+}
+
+bool Reader::readCppStyleComment() {
+ while (current_ != end_) {
+ Char c = getNextChar();
+ if (c == '\n')
+ break;
+ if (c == '\r') {
+ // Consume DOS EOL. It will be normalized in addComment.
+ if (current_ != end_ && *current_ == '\n')
+ getNextChar();
+ // Break on Moc OS 9 EOL.
+ break;
+ }
+ }
+ return true;
+}
+
+void Reader::readNumber() {
+ const char *p = current_;
+ char c = '0'; // stopgap for already consumed character
+ // integral part
+ while (c >= '0' && c <= '9')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ // fractional part
+ if (c == '.') {
+ c = (current_ = p) < end_ ? *p++ : 0;
+ while (c >= '0' && c <= '9')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ }
+ // exponential part
+ if (c == 'e' || c == 'E') {
+ c = (current_ = p) < end_ ? *p++ : 0;
+ if (c == '+' || c == '-')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ while (c >= '0' && c <= '9')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ }
+}
+
+bool Reader::readString() {
+ Char c = 0;
+ while (current_ != end_) {
+ c = getNextChar();
+ if (c == '\\')
+ getNextChar();
+ else if (c == '"')
+ break;
+ }
+ return c == '"';
+}
+
+bool Reader::readObject(Token& /*tokenStart*/) {
+ Token tokenName;
+ std::string name;
+ Value init(objectValue);
+ currentValue().swapPayload(init);
+ while (readToken(tokenName)) {
+ bool initialTokenOk = true;
+ while (tokenName.type_ == tokenComment && initialTokenOk)
+ initialTokenOk = readToken(tokenName);
+ if (!initialTokenOk)
+ break;
+ if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object
+ return true;
+ name = "";
+ if (tokenName.type_ == tokenString) {
+ if (!decodeString(tokenName, name))
+ return recoverFromError(tokenObjectEnd);
+ } else {
+ break;
+ }
+
+ Token colon;
+ if (!readToken(colon) || colon.type_ != tokenMemberSeparator) {
+ return addErrorAndRecover(
+ "Missing ':' after object member name", colon, tokenObjectEnd);
+ }
+ Value& value = currentValue()[name];
+ nodes_.push(&value);
+ bool ok = readValue();
+ nodes_.pop();
+ if (!ok) // error already set
+ return recoverFromError(tokenObjectEnd);
+
+ Token comma;
+ if (!readToken(comma) ||
+ (comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator &&
+ comma.type_ != tokenComment)) {
+ return addErrorAndRecover(
+ "Missing ',' or '}' in object declaration", comma, tokenObjectEnd);
+ }
+ bool finalizeTokenOk = true;
+ while (comma.type_ == tokenComment && finalizeTokenOk)
+ finalizeTokenOk = readToken(comma);
+ if (comma.type_ == tokenObjectEnd)
+ return true;
+ }
+ return addErrorAndRecover(
+ "Missing '}' or object member name", tokenName, tokenObjectEnd);
+}
+
+bool Reader::readArray(Token& /*tokenStart*/) {
+ Value init(arrayValue);
+ currentValue().swapPayload(init);
+ skipSpaces();
+ if (*current_ == ']') // empty array
+ {
+ Token endArray;
+ readToken(endArray);
+ return true;
+ }
+ int index = 0;
+ for (;;) {
+ Value& value = currentValue()[index++];
+ nodes_.push(&value);
+ bool ok = readValue();
+ nodes_.pop();
+ if (!ok) // error already set
+ return recoverFromError(tokenArrayEnd);
+
+ Token token;
+ // Accept Comment after last item in the array.
+ ok = readToken(token);
+ while (token.type_ == tokenComment && ok) {
+ ok = readToken(token);
+ }
+ bool badTokenType =
+ (token.type_ != tokenArraySeparator && token.type_ != tokenArrayEnd);
+ if (!ok || badTokenType) {
+ return addErrorAndRecover(
+ "Missing ',' or ']' in array declaration", token, tokenArrayEnd);
+ }
+ if (token.type_ == tokenArrayEnd)
+ break;
+ }
+ return true;
+}
+
+bool Reader::decodeNumber(Token& token) {
+ Value decoded;
+ if (!decodeNumber(token, decoded))
+ return false;
+ currentValue().swapPayload(decoded);
+ return true;
+}
+
+bool Reader::decodeNumber(Token& token, Value& decoded) {
+ // Attempts to parse the number as an integer. If the number is
+ // larger than the maximum supported value of an integer then
+ // we decode the number as a double.
+ Location current = token.start_;
+ bool isNegative = *current == '-';
+ if (isNegative)
+ ++current;
+ // TODO: Help the compiler do the div and mod at compile time or get rid of them.
+ Value::LargestUInt maxIntegerValue =
+ isNegative ? Value::LargestUInt(-Value::minLargestInt)
+ : Value::maxLargestUInt;
+ Value::LargestUInt threshold = maxIntegerValue / 10;
+ Value::LargestUInt value = 0;
+ while (current < token.end_) {
+ Char c = *current++;
+ if (c < '0' || c > '9')
+ return decodeDouble(token, decoded);
+ Value::UInt digit(c - '0');
+ if (value >= threshold) {
+ // We've hit or exceeded the max value divided by 10 (rounded down). If
+ // a) we've only just touched the limit, b) this is the last digit, and
+ // c) it's small enough to fit in that rounding delta, we're okay.
+ // Otherwise treat this number as a double to avoid overflow.
+ if (value > threshold || current != token.end_ ||
+ digit > maxIntegerValue % 10) {
+ return decodeDouble(token, decoded);
+ }
+ }
+ value = value * 10 + digit;
+ }
+ if (isNegative)
+ decoded = -Value::LargestInt(value);
+ else if (value <= Value::LargestUInt(Value::maxInt))
+ decoded = Value::LargestInt(value);
+ else
+ decoded = value;
+ return true;
+}
+
+bool Reader::decodeDouble(Token& token) {
+ Value decoded;
+ if (!decodeDouble(token, decoded))
+ return false;
+ currentValue().swapPayload(decoded);
+ return true;
+}
+
+bool Reader::decodeDouble(Token& token, Value& decoded) {
+ double value = 0;
+ const int bufferSize = 32;
+ int count;
+ int length = int(token.end_ - token.start_);
+
+ // Sanity check to avoid buffer overflow exploits.
+ if (length < 0) {
+ return addError("Unable to parse token length", token);
+ }
+
+ // Avoid using a string constant for the format control string given to
+ // sscanf, as this can cause hard to debug crashes on OS X. See here for more
+ // info:
+ //
+ // http://developer.apple.com/library/mac/#DOCUMENTATION/DeveloperTools/gcc-4.0.1/gcc/Incompatibilities.html
+ char format[] = "%lf";
+
+ if (length <= bufferSize) {
+ Char buffer[bufferSize + 1];
+ memcpy(buffer, token.start_, length);
+ buffer[length] = 0;
+ count = sscanf(buffer, format, &value);
+ } else {
+ std::string buffer(token.start_, token.end_);
+ count = sscanf(buffer.c_str(), format, &value);
+ }
+
+ if (count != 1)
+ return addError("'" + std::string(token.start_, token.end_) +
+ "' is not a number.",
+ token);
+ decoded = value;
+ return true;
+}
+
+bool Reader::decodeString(Token& token) {
+ std::string decoded_string;
+ if (!decodeString(token, decoded_string))
+ return false;
+ Value decoded(decoded_string);
+ currentValue().swapPayload(decoded);
+ return true;
+}
+
+bool Reader::decodeString(Token& token, std::string& decoded) {
+ decoded.reserve(token.end_ - token.start_ - 2);
+ Location current = token.start_ + 1; // skip '"'
+ Location end = token.end_ - 1; // do not include '"'
+ while (current != end) {
+ Char c = *current++;
+ if (c == '"')
+ break;
+ else if (c == '\\') {
+ if (current == end)
+ return addError("Empty escape sequence in string", token, current);
+ Char escape = *current++;
+ switch (escape) {
+ case '"':
+ decoded += '"';
+ break;
+ case '/':
+ decoded += '/';
+ break;
+ case '\\':
+ decoded += '\\';
+ break;
+ case 'b':
+ decoded += '\b';
+ break;
+ case 'f':
+ decoded += '\f';
+ break;
+ case 'n':
+ decoded += '\n';
+ break;
+ case 'r':
+ decoded += '\r';
+ break;
+ case 't':
+ decoded += '\t';
+ break;
+ case 'u': {
+ unsigned int unicode;
+ if (!decodeUnicodeCodePoint(token, current, end, unicode))
+ return false;
+ decoded += codePointToUTF8(unicode);
+ } break;
+ default:
+ return addError("Bad escape sequence in string", token, current);
+ }
+ } else {
+ decoded += c;
+ }
+ }
+ return true;
+}
+
+bool Reader::decodeUnicodeCodePoint(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode) {
+
+ if (!decodeUnicodeEscapeSequence(token, current, end, unicode))
+ return false;
+ if (unicode >= 0xD800 && unicode <= 0xDBFF) {
+ // surrogate pairs
+ if (end - current < 6)
+ return addError(
+ "additional six characters expected to parse unicode surrogate pair.",
+ token,
+ current);
+ unsigned int surrogatePair;
+ if (*(current++) == '\\' && *(current++) == 'u') {
+ if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) {
+ unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
+ } else
+ return false;
+ } else
+ return addError("expecting another \\u token to begin the second half of "
+ "a unicode surrogate pair",
+ token,
+ current);
+ }
+ return true;
+}
+
+bool Reader::decodeUnicodeEscapeSequence(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode) {
+ if (end - current < 4)
+ return addError(
+ "Bad unicode escape sequence in string: four digits expected.",
+ token,
+ current);
+ unicode = 0;
+ for (int index = 0; index < 4; ++index) {
+ Char c = *current++;
+ unicode *= 16;
+ if (c >= '0' && c <= '9')
+ unicode += c - '0';
+ else if (c >= 'a' && c <= 'f')
+ unicode += c - 'a' + 10;
+ else if (c >= 'A' && c <= 'F')
+ unicode += c - 'A' + 10;
+ else
+ return addError(
+ "Bad unicode escape sequence in string: hexadecimal digit expected.",
+ token,
+ current);
+ }
+ return true;
+}
+
+bool
+Reader::addError(const std::string& message, Token& token, Location extra) {
+ ErrorInfo info;
+ info.token_ = token;
+ info.message_ = message;
+ info.extra_ = extra;
+ errors_.push_back(info);
+ return false;
+}
+
+bool Reader::recoverFromError(TokenType skipUntilToken) {
+ int errorCount = int(errors_.size());
+ Token skip;
+ for (;;) {
+ if (!readToken(skip))
+ errors_.resize(errorCount); // discard errors caused by recovery
+ if (skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream)
+ break;
+ }
+ errors_.resize(errorCount);
+ return false;
+}
+
+bool Reader::addErrorAndRecover(const std::string& message,
+ Token& token,
+ TokenType skipUntilToken) {
+ addError(message, token);
+ return recoverFromError(skipUntilToken);
+}
+
+Value& Reader::currentValue() { return *(nodes_.top()); }
+
+Reader::Char Reader::getNextChar() {
+ if (current_ == end_)
+ return 0;
+ return *current_++;
+}
+
+void Reader::getLocationLineAndColumn(Location location,
+ int& line,
+ int& column) const {
+ Location current = begin_;
+ Location lastLineStart = current;
+ line = 0;
+ while (current < location && current != end_) {
+ Char c = *current++;
+ if (c == '\r') {
+ if (*current == '\n')
+ ++current;
+ lastLineStart = current;
+ ++line;
+ } else if (c == '\n') {
+ lastLineStart = current;
+ ++line;
+ }
+ }
+ // column & line start at 1
+ column = int(location - lastLineStart) + 1;
+ ++line;
+}
+
+std::string Reader::getLocationLineAndColumn(Location location) const {
+ int line, column;
+ getLocationLineAndColumn(location, line, column);
+ char buffer[18 + 16 + 16 + 1];
+#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
+#if defined(WINCE)
+ _snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
+#else
+ sprintf_s(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
+#endif
+#else
+ snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
+#endif
+ return buffer;
+}
+
+// Deprecated. Preserved for backward compatibility
+std::string Reader::getFormatedErrorMessages() const {
+ return getFormattedErrorMessages();
+}
+
+std::string Reader::getFormattedErrorMessages() const {
+ std::string formattedMessage;
+ for (Errors::const_iterator itError = errors_.begin();
+ itError != errors_.end();
+ ++itError) {
+ const ErrorInfo& error = *itError;
+ formattedMessage +=
+ "* " + getLocationLineAndColumn(error.token_.start_) + "\n";
+ formattedMessage += " " + error.message_ + "\n";
+ if (error.extra_)
+ formattedMessage +=
+ "See " + getLocationLineAndColumn(error.extra_) + " for detail.\n";
+ }
+ return formattedMessage;
+}
+
+// Reader
+/////////////////////////
+
+// exact copy of Features
+class OurFeatures {
+public:
+ static OurFeatures all();
+ OurFeatures();
+ bool allowComments_;
+ bool strictRoot_;
+ bool allowDroppedNullPlaceholders_;
+ bool allowNumericKeys_;
+ bool allowSingleQuotes_;
+ bool failIfExtra_;
+ bool rejectDupKeys_;
+ int stackLimit_;
+}; // OurFeatures
+
+// exact copy of Implementation of class Features
+// ////////////////////////////////
+
+OurFeatures::OurFeatures()
+ : allowComments_(true), strictRoot_(false)
+ , allowDroppedNullPlaceholders_(false), allowNumericKeys_(false)
+ , allowSingleQuotes_(false)
+ , failIfExtra_(false)
+{
+}
+
+OurFeatures OurFeatures::all() { return OurFeatures(); }
+
+// Implementation of class Reader
+// ////////////////////////////////
+
+// exact copy of Reader, renamed to OurReader
+class OurReader {
+public:
+ typedef char Char;
+ typedef const Char* Location;
+ struct StructuredError {
+ size_t offset_start;
+ size_t offset_limit;
+ std::string message;
+ };
+
+ OurReader(OurFeatures const& features);
+ bool parse(const char* beginDoc,
+ const char* endDoc,
+ Value& root,
+ bool collectComments = true);
+ std::string getFormattedErrorMessages() const;
+
+private:
+ OurReader(OurReader const&); // no impl
+ void operator=(OurReader const&); // no impl
+
+ enum TokenType {
+ tokenEndOfStream = 0,
+ tokenObjectBegin,
+ tokenObjectEnd,
+ tokenArrayBegin,
+ tokenArrayEnd,
+ tokenString,
+ tokenNumber,
+ tokenTrue,
+ tokenFalse,
+ tokenNull,
+ tokenArraySeparator,
+ tokenMemberSeparator,
+ tokenComment,
+ tokenError
+ };
+
+ class Token {
+ public:
+ TokenType type_;
+ Location start_;
+ Location end_;
+ };
+
+ class ErrorInfo {
+ public:
+ Token token_;
+ std::string message_;
+ Location extra_;
+ };
+
+ typedef std::deque Errors;
+
+ bool readToken(Token& token);
+ void skipSpaces();
+ bool match(Location pattern, int patternLength);
+ bool readComment();
+ bool readCStyleComment();
+ bool readCppStyleComment();
+ bool readString();
+ bool readStringSingleQuote();
+ void readNumber();
+ bool readValue();
+ bool readObject(Token& token);
+ bool readArray(Token& token);
+ bool decodeNumber(Token& token);
+ bool decodeNumber(Token& token, Value& decoded);
+ bool decodeString(Token& token);
+ bool decodeString(Token& token, std::string& decoded);
+ bool decodeDouble(Token& token);
+ bool decodeDouble(Token& token, Value& decoded);
+ bool decodeUnicodeCodePoint(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode);
+ bool decodeUnicodeEscapeSequence(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode);
+ bool addError(const std::string& message, Token& token, Location extra = 0);
+ bool recoverFromError(TokenType skipUntilToken);
+ bool addErrorAndRecover(const std::string& message,
+ Token& token,
+ TokenType skipUntilToken);
+ void skipUntilSpace();
+ Value& currentValue();
+ Char getNextChar();
+ void
+ getLocationLineAndColumn(Location location, int& line, int& column) const;
+ std::string getLocationLineAndColumn(Location location) const;
+ void addComment(Location begin, Location end, CommentPlacement placement);
+ void skipCommentTokens(Token& token);
+
+ typedef std::stack Nodes;
+ Nodes nodes_;
+ Errors errors_;
+ std::string document_;
+ Location begin_;
+ Location end_;
+ Location current_;
+ Location lastValueEnd_;
+ Value* lastValue_;
+ std::string commentsBefore_;
+ int stackDepth_;
+
+ OurFeatures const features_;
+ bool collectComments_;
+}; // OurReader
+
+// complete copy of Read impl, for OurReader
+
+OurReader::OurReader(OurFeatures const& features)
+ : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(),
+ lastValue_(), commentsBefore_(), features_(features), collectComments_() {
+}
+
+bool OurReader::parse(const char* beginDoc,
+ const char* endDoc,
+ Value& root,
+ bool collectComments) {
+ if (!features_.allowComments_) {
+ collectComments = false;
+ }
+
+ begin_ = beginDoc;
+ end_ = endDoc;
+ collectComments_ = collectComments;
+ current_ = begin_;
+ lastValueEnd_ = 0;
+ lastValue_ = 0;
+ commentsBefore_ = "";
+ errors_.clear();
+ while (!nodes_.empty())
+ nodes_.pop();
+ nodes_.push(&root);
+
+ stackDepth_ = 0;
+ bool successful = readValue();
+ Token token;
+ skipCommentTokens(token);
+ if (features_.failIfExtra_) {
+ if (token.type_ != tokenError && token.type_ != tokenEndOfStream) {
+ addError("Extra non-whitespace after JSON value.", token);
+ return false;
+ }
+ }
+ if (collectComments_ && !commentsBefore_.empty())
+ root.setComment(commentsBefore_, commentAfter);
+ if (features_.strictRoot_) {
+ if (!root.isArray() && !root.isObject()) {
+ // Set error location to start of doc, ideally should be first token found
+ // in doc
+ token.type_ = tokenError;
+ token.start_ = beginDoc;
+ token.end_ = endDoc;
+ addError(
+ "A valid JSON document must be either an array or an object value.",
+ token);
+ return false;
+ }
+ }
+ return successful;
+}
+
+bool OurReader::readValue() {
+ if (stackDepth_ >= features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue().");
+ ++stackDepth_;
+ Token token;
+ skipCommentTokens(token);
+ bool successful = true;
+
+ if (collectComments_ && !commentsBefore_.empty()) {
+ currentValue().setComment(commentsBefore_, commentBefore);
+ commentsBefore_ = "";
+ }
+
+ switch (token.type_) {
+ case tokenObjectBegin:
+ successful = readObject(token);
+ break;
+ case tokenArrayBegin:
+ successful = readArray(token);
+ break;
+ case tokenNumber:
+ successful = decodeNumber(token);
+ break;
+ case tokenString:
+ successful = decodeString(token);
+ break;
+ case tokenTrue:
+ {
+ Value v(true);
+ currentValue().swapPayload(v);
+ }
+ break;
+ case tokenFalse:
+ {
+ Value v(false);
+ currentValue().swapPayload(v);
+ }
+ break;
+ case tokenNull:
+ {
+ Value v;
+ currentValue().swapPayload(v);
+ }
+ break;
+ case tokenArraySeparator:
+ case tokenObjectEnd:
+ case tokenArrayEnd:
+ if (features_.allowDroppedNullPlaceholders_) {
+ // "Un-read" the current token and mark the current value as a null
+ // token.
+ current_--;
+ Value v;
+ currentValue().swapPayload(v);
+ break;
+ } // else, fall through ...
+ default:
+ return addError("Syntax error: value, object or array expected.", token);
+ }
+
+ if (collectComments_) {
+ lastValueEnd_ = current_;
+ lastValue_ = ¤tValue();
+ }
+
+ --stackDepth_;
+ return successful;
+}
+
+void OurReader::skipCommentTokens(Token& token) {
+ if (features_.allowComments_) {
+ do {
+ readToken(token);
+ } while (token.type_ == tokenComment);
+ } else {
+ readToken(token);
+ }
+}
+
+bool OurReader::readToken(Token& token) {
+ skipSpaces();
+ token.start_ = current_;
+ Char c = getNextChar();
+ bool ok = true;
+ switch (c) {
+ case '{':
+ token.type_ = tokenObjectBegin;
+ break;
+ case '}':
+ token.type_ = tokenObjectEnd;
+ break;
+ case '[':
+ token.type_ = tokenArrayBegin;
+ break;
+ case ']':
+ token.type_ = tokenArrayEnd;
+ break;
+ case '"':
+ token.type_ = tokenString;
+ ok = readString();
+ break;
+ case '\'':
+ if (features_.allowSingleQuotes_) {
+ token.type_ = tokenString;
+ ok = readStringSingleQuote();
+ break;
+ } // else continue
+ case '/':
+ token.type_ = tokenComment;
+ ok = readComment();
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case '-':
+ token.type_ = tokenNumber;
+ readNumber();
+ break;
+ case 't':
+ token.type_ = tokenTrue;
+ ok = match("rue", 3);
+ break;
+ case 'f':
+ token.type_ = tokenFalse;
+ ok = match("alse", 4);
+ break;
+ case 'n':
+ token.type_ = tokenNull;
+ ok = match("ull", 3);
+ break;
+ case ',':
+ token.type_ = tokenArraySeparator;
+ break;
+ case ':':
+ token.type_ = tokenMemberSeparator;
+ break;
+ case 0:
+ token.type_ = tokenEndOfStream;
+ break;
+ default:
+ ok = false;
+ break;
+ }
+ if (!ok)
+ token.type_ = tokenError;
+ token.end_ = current_;
+ return true;
+}
+
+void OurReader::skipSpaces() {
+ while (current_ != end_) {
+ Char c = *current_;
+ if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
+ ++current_;
+ else
+ break;
+ }
+}
+
+bool OurReader::match(Location pattern, int patternLength) {
+ if (end_ - current_ < patternLength)
+ return false;
+ int index = patternLength;
+ while (index--)
+ if (current_[index] != pattern[index])
+ return false;
+ current_ += patternLength;
+ return true;
+}
+
+bool OurReader::readComment() {
+ Location commentBegin = current_ - 1;
+ Char c = getNextChar();
+ bool successful = false;
+ if (c == '*')
+ successful = readCStyleComment();
+ else if (c == '/')
+ successful = readCppStyleComment();
+ if (!successful)
+ return false;
+
+ if (collectComments_) {
+ CommentPlacement placement = commentBefore;
+ if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) {
+ if (c != '*' || !containsNewLine(commentBegin, current_))
+ placement = commentAfterOnSameLine;
+ }
+
+ addComment(commentBegin, current_, placement);
+ }
+ return true;
+}
+
+void
+OurReader::addComment(Location begin, Location end, CommentPlacement placement) {
+ assert(collectComments_);
+ const std::string& normalized = normalizeEOL(begin, end);
+ if (placement == commentAfterOnSameLine) {
+ assert(lastValue_ != 0);
+ lastValue_->setComment(normalized, placement);
+ } else {
+ commentsBefore_ += normalized;
+ }
+}
+
+bool OurReader::readCStyleComment() {
+ while (current_ != end_) {
+ Char c = getNextChar();
+ if (c == '*' && *current_ == '/')
+ break;
+ }
+ return getNextChar() == '/';
+}
+
+bool OurReader::readCppStyleComment() {
+ while (current_ != end_) {
+ Char c = getNextChar();
+ if (c == '\n')
+ break;
+ if (c == '\r') {
+ // Consume DOS EOL. It will be normalized in addComment.
+ if (current_ != end_ && *current_ == '\n')
+ getNextChar();
+ // Break on Moc OS 9 EOL.
+ break;
+ }
+ }
+ return true;
+}
+
+void OurReader::readNumber() {
+ const char *p = current_;
+ char c = '0'; // stopgap for already consumed character
+ // integral part
+ while (c >= '0' && c <= '9')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ // fractional part
+ if (c == '.') {
+ c = (current_ = p) < end_ ? *p++ : 0;
+ while (c >= '0' && c <= '9')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ }
+ // exponential part
+ if (c == 'e' || c == 'E') {
+ c = (current_ = p) < end_ ? *p++ : 0;
+ if (c == '+' || c == '-')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ while (c >= '0' && c <= '9')
+ c = (current_ = p) < end_ ? *p++ : 0;
+ }
+}
+bool OurReader::readString() {
+ Char c = 0;
+ while (current_ != end_) {
+ c = getNextChar();
+ if (c == '\\')
+ getNextChar();
+ else if (c == '"')
+ break;
+ }
+ return c == '"';
+}
+
+
+bool OurReader::readStringSingleQuote() {
+ Char c = 0;
+ while (current_ != end_) {
+ c = getNextChar();
+ if (c == '\\')
+ getNextChar();
+ else if (c == '\'')
+ break;
+ }
+ return c == '\'';
+}
+
+bool OurReader::readObject(Token& /*tokenStart*/) {
+ Token tokenName;
+ std::string name;
+ Value init(objectValue);
+ currentValue().swapPayload(init);
+ while (readToken(tokenName)) {
+ bool initialTokenOk = true;
+ while (tokenName.type_ == tokenComment && initialTokenOk)
+ initialTokenOk = readToken(tokenName);
+ if (!initialTokenOk)
+ break;
+ if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object
+ return true;
+ name = "";
+ if (tokenName.type_ == tokenString) {
+ if (!decodeString(tokenName, name))
+ return recoverFromError(tokenObjectEnd);
+ } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) {
+ Value numberName;
+ if (!decodeNumber(tokenName, numberName))
+ return recoverFromError(tokenObjectEnd);
+ name = numberName.asString();
+ } else {
+ break;
+ }
+
+ Token colon;
+ if (!readToken(colon) || colon.type_ != tokenMemberSeparator) {
+ return addErrorAndRecover(
+ "Missing ':' after object member name", colon, tokenObjectEnd);
+ }
+ if (name.length() >= (1U<<30)) throwRuntimeError("keylength >= 2^30");
+ if (features_.rejectDupKeys_ && currentValue().isMember(name)) {
+ std::string msg = "Duplicate key: '" + name + "'";
+ return addErrorAndRecover(
+ msg, tokenName, tokenObjectEnd);
+ }
+ Value& value = currentValue()[name];
+ nodes_.push(&value);
+ bool ok = readValue();
+ nodes_.pop();
+ if (!ok) // error already set
+ return recoverFromError(tokenObjectEnd);
+
+ Token comma;
+ if (!readToken(comma) ||
+ (comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator &&
+ comma.type_ != tokenComment)) {
+ return addErrorAndRecover(
+ "Missing ',' or '}' in object declaration", comma, tokenObjectEnd);
+ }
+ bool finalizeTokenOk = true;
+ while (comma.type_ == tokenComment && finalizeTokenOk)
+ finalizeTokenOk = readToken(comma);
+ if (comma.type_ == tokenObjectEnd)
+ return true;
+ }
+ return addErrorAndRecover(
+ "Missing '}' or object member name", tokenName, tokenObjectEnd);
+}
+
+bool OurReader::readArray(Token& /*tokenStart*/) {
+ Value init(arrayValue);
+ currentValue().swapPayload(init);
+ skipSpaces();
+ if (*current_ == ']') // empty array
+ {
+ Token endArray;
+ readToken(endArray);
+ return true;
+ }
+ int index = 0;
+ for (;;) {
+ Value& value = currentValue()[index++];
+ nodes_.push(&value);
+ bool ok = readValue();
+ nodes_.pop();
+ if (!ok) // error already set
+ return recoverFromError(tokenArrayEnd);
+
+ Token token;
+ // Accept Comment after last item in the array.
+ ok = readToken(token);
+ while (token.type_ == tokenComment && ok) {
+ ok = readToken(token);
+ }
+ bool badTokenType =
+ (token.type_ != tokenArraySeparator && token.type_ != tokenArrayEnd);
+ if (!ok || badTokenType) {
+ return addErrorAndRecover(
+ "Missing ',' or ']' in array declaration", token, tokenArrayEnd);
+ }
+ if (token.type_ == tokenArrayEnd)
+ break;
+ }
+ return true;
+}
+
+bool OurReader::decodeNumber(Token& token) {
+ Value decoded;
+ if (!decodeNumber(token, decoded))
+ return false;
+ currentValue().swapPayload(decoded);
+ return true;
+}
+
+bool OurReader::decodeNumber(Token& token, Value& decoded) {
+ // Attempts to parse the number as an integer. If the number is
+ // larger than the maximum supported value of an integer then
+ // we decode the number as a double.
+ Location current = token.start_;
+ bool isNegative = *current == '-';
+ if (isNegative)
+ ++current;
+ // TODO: Help the compiler do the div and mod at compile time or get rid of them.
+ Value::LargestUInt maxIntegerValue =
+ isNegative ? Value::LargestUInt(-Value::minLargestInt)
+ : Value::maxLargestUInt;
+ Value::LargestUInt threshold = maxIntegerValue / 10;
+ Value::LargestUInt value = 0;
+ while (current < token.end_) {
+ Char c = *current++;
+ if (c < '0' || c > '9')
+ return decodeDouble(token, decoded);
+ Value::UInt digit(c - '0');
+ if (value >= threshold) {
+ // We've hit or exceeded the max value divided by 10 (rounded down). If
+ // a) we've only just touched the limit, b) this is the last digit, and
+ // c) it's small enough to fit in that rounding delta, we're okay.
+ // Otherwise treat this number as a double to avoid overflow.
+ if (value > threshold || current != token.end_ ||
+ digit > maxIntegerValue % 10) {
+ return decodeDouble(token, decoded);
+ }
+ }
+ value = value * 10 + digit;
+ }
+ if (isNegative)
+ decoded = -Value::LargestInt(value);
+ else if (value <= Value::LargestUInt(Value::maxInt))
+ decoded = Value::LargestInt(value);
+ else
+ decoded = value;
+ return true;
+}
+
+bool OurReader::decodeDouble(Token& token) {
+ Value decoded;
+ if (!decodeDouble(token, decoded))
+ return false;
+ currentValue().swapPayload(decoded);
+ return true;
+}
+
+bool OurReader::decodeDouble(Token& token, Value& decoded) {
+ double value = 0;
+ const int bufferSize = 32;
+ int count;
+ int length = int(token.end_ - token.start_);
+
+ // Sanity check to avoid buffer overflow exploits.
+ if (length < 0) {
+ return addError("Unable to parse token length", token);
+ }
+
+ // Avoid using a string constant for the format control string given to
+ // sscanf, as this can cause hard to debug crashes on OS X. See here for more
+ // info:
+ //
+ // http://developer.apple.com/library/mac/#DOCUMENTATION/DeveloperTools/gcc-4.0.1/gcc/Incompatibilities.html
+ char format[] = "%lf";
+
+ if (length <= bufferSize) {
+ Char buffer[bufferSize + 1];
+ memcpy(buffer, token.start_, length);
+ buffer[length] = 0;
+ count = sscanf(buffer, format, &value);
+ } else {
+ std::string buffer(token.start_, token.end_);
+ count = sscanf(buffer.c_str(), format, &value);
+ }
+
+ if (count != 1)
+ return addError("'" + std::string(token.start_, token.end_) +
+ "' is not a number.",
+ token);
+ decoded = value;
+ return true;
+}
+
+bool OurReader::decodeString(Token& token) {
+ std::string decoded_string;
+ if (!decodeString(token, decoded_string))
+ return false;
+ Value decoded(decoded_string);
+ currentValue().swapPayload(decoded);
+ return true;
+}
+
+bool OurReader::decodeString(Token& token, std::string& decoded) {
+ decoded.reserve(token.end_ - token.start_ - 2);
+ Location current = token.start_ + 1; // skip '"'
+ Location end = token.end_ - 1; // do not include '"'
+ while (current != end) {
+ Char c = *current++;
+ if (c == '"')
+ break;
+ else if (c == '\\') {
+ if (current == end)
+ return addError("Empty escape sequence in string", token, current);
+ Char escape = *current++;
+ switch (escape) {
+ case '"':
+ decoded += '"';
+ break;
+ case '/':
+ decoded += '/';
+ break;
+ case '\\':
+ decoded += '\\';
+ break;
+ case 'b':
+ decoded += '\b';
+ break;
+ case 'f':
+ decoded += '\f';
+ break;
+ case 'n':
+ decoded += '\n';
+ break;
+ case 'r':
+ decoded += '\r';
+ break;
+ case 't':
+ decoded += '\t';
+ break;
+ case 'u': {
+ unsigned int unicode;
+ if (!decodeUnicodeCodePoint(token, current, end, unicode))
+ return false;
+ decoded += codePointToUTF8(unicode);
+ } break;
+ default:
+ return addError("Bad escape sequence in string", token, current);
+ }
+ } else {
+ decoded += c;
+ }
+ }
+ return true;
+}
+
+bool OurReader::decodeUnicodeCodePoint(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode) {
+
+ if (!decodeUnicodeEscapeSequence(token, current, end, unicode))
+ return false;
+ if (unicode >= 0xD800 && unicode <= 0xDBFF) {
+ // surrogate pairs
+ if (end - current < 6)
+ return addError(
+ "additional six characters expected to parse unicode surrogate pair.",
+ token,
+ current);
+ unsigned int surrogatePair;
+ if (*(current++) == '\\' && *(current++) == 'u') {
+ if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) {
+ unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
+ } else
+ return false;
+ } else
+ return addError("expecting another \\u token to begin the second half of "
+ "a unicode surrogate pair",
+ token,
+ current);
+ }
+ return true;
+}
+
+bool OurReader::decodeUnicodeEscapeSequence(Token& token,
+ Location& current,
+ Location end,
+ unsigned int& unicode) {
+ if (end - current < 4)
+ return addError(
+ "Bad unicode escape sequence in string: four digits expected.",
+ token,
+ current);
+ unicode = 0;
+ for (int index = 0; index < 4; ++index) {
+ Char c = *current++;
+ unicode *= 16;
+ if (c >= '0' && c <= '9')
+ unicode += c - '0';
+ else if (c >= 'a' && c <= 'f')
+ unicode += c - 'a' + 10;
+ else if (c >= 'A' && c <= 'F')
+ unicode += c - 'A' + 10;
+ else
+ return addError(
+ "Bad unicode escape sequence in string: hexadecimal digit expected.",
+ token,
+ current);
+ }
+ return true;
+}
+
+bool
+OurReader::addError(const std::string& message, Token& token, Location extra) {
+ ErrorInfo info;
+ info.token_ = token;
+ info.message_ = message;
+ info.extra_ = extra;
+ errors_.push_back(info);
+ return false;
+}
+
+bool OurReader::recoverFromError(TokenType skipUntilToken) {
+ int errorCount = int(errors_.size());
+ Token skip;
+ for (;;) {
+ if (!readToken(skip))
+ errors_.resize(errorCount); // discard errors caused by recovery
+ if (skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream)
+ break;
+ }
+ errors_.resize(errorCount);
+ return false;
+}
+
+bool OurReader::addErrorAndRecover(const std::string& message,
+ Token& token,
+ TokenType skipUntilToken) {
+ addError(message, token);
+ return recoverFromError(skipUntilToken);
+}
+
+Value& OurReader::currentValue() { return *(nodes_.top()); }
+
+OurReader::Char OurReader::getNextChar() {
+ if (current_ == end_)
+ return 0;
+ return *current_++;
+}
+
+void OurReader::getLocationLineAndColumn(Location location,
+ int& line,
+ int& column) const {
+ Location current = begin_;
+ Location lastLineStart = current;
+ line = 0;
+ while (current < location && current != end_) {
+ Char c = *current++;
+ if (c == '\r') {
+ if (*current == '\n')
+ ++current;
+ lastLineStart = current;
+ ++line;
+ } else if (c == '\n') {
+ lastLineStart = current;
+ ++line;
+ }
+ }
+ // column & line start at 1
+ column = int(location - lastLineStart) + 1;
+ ++line;
+}
+
+std::string OurReader::getLocationLineAndColumn(Location location) const {
+ int line, column;
+ getLocationLineAndColumn(location, line, column);
+ char buffer[18 + 16 + 16 + 1];
+#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
+#if defined(WINCE)
+ _snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
+#else
+ sprintf_s(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
+#endif
+#else
+ snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
+#endif
+ return buffer;
+}
+
+std::string OurReader::getFormattedErrorMessages() const {
+ std::string formattedMessage;
+ for (Errors::const_iterator itError = errors_.begin();
+ itError != errors_.end();
+ ++itError) {
+ const ErrorInfo& error = *itError;
+ formattedMessage +=
+ "* " + getLocationLineAndColumn(error.token_.start_) + "\n";
+ formattedMessage += " " + error.message_ + "\n";
+ if (error.extra_)
+ formattedMessage +=
+ "See " + getLocationLineAndColumn(error.extra_) + " for detail.\n";
+ }
+ return formattedMessage;
+}
+
+
+class OurCharReader : public CharReader {
+ bool const collectComments_;
+ OurReader reader_;
+public:
+ OurCharReader(
+ bool collectComments,
+ OurFeatures const& features)
+ : collectComments_(collectComments)
+ , reader_(features)
+ {}
+ virtual bool parse(
+ char const* beginDoc, char const* endDoc,
+ Value* root, std::string* errs) {
+ bool ok = reader_.parse(beginDoc, endDoc, *root, collectComments_);
+ if (errs) {
+ *errs = reader_.getFormattedErrorMessages();
+ }
+ return ok;
+ }
+};
+
+CharReaderBuilder::CharReaderBuilder()
+{
+ setDefaults(&settings_);
+}
+CharReaderBuilder::~CharReaderBuilder()
+{}
+CharReader* CharReaderBuilder::newCharReader() const
+{
+ bool collectComments = settings_["collectComments"].asBool();
+ OurFeatures features = OurFeatures::all();
+ features.allowComments_ = settings_["allowComments"].asBool();
+ features.strictRoot_ = settings_["strictRoot"].asBool();
+ features.allowDroppedNullPlaceholders_ = settings_["allowDroppedNullPlaceholders"].asBool();
+ features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool();
+ features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool();
+ features.stackLimit_ = settings_["stackLimit"].asInt();
+ features.failIfExtra_ = settings_["failIfExtra"].asBool();
+ features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool();
+ return new OurCharReader(collectComments, features);
+}
+static void getValidReaderKeys(std::set* valid_keys)
+{
+ valid_keys->clear();
+ valid_keys->insert("collectComments");
+ valid_keys->insert("allowComments");
+ valid_keys->insert("strictRoot");
+ valid_keys->insert("allowDroppedNullPlaceholders");
+ valid_keys->insert("allowNumericKeys");
+ valid_keys->insert("allowSingleQuotes");
+ valid_keys->insert("stackLimit");
+ valid_keys->insert("failIfExtra");
+ valid_keys->insert("rejectDupKeys");
+}
+bool CharReaderBuilder::validate(Json::Value* invalid) const
+{
+ Json::Value my_invalid;
+ if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL
+ Json::Value& inv = *invalid;
+ std::set valid_keys;
+ getValidReaderKeys(&valid_keys);
+ Value::Members keys = settings_.getMemberNames();
+ size_t n = keys.size();
+ for (size_t i = 0; i < n; ++i) {
+ std::string const& key = keys[i];
+ if (valid_keys.find(key) == valid_keys.end()) {
+ inv[key] = settings_[key];
+ }
+ }
+ return 0u == inv.size();
+}
+Value& CharReaderBuilder::operator[](std::string key)
+{
+ return settings_[key];
+}
+// static
+void CharReaderBuilder::strictMode(Json::Value* settings)
+{
+//! [CharReaderBuilderStrictMode]
+ (*settings)["allowComments"] = false;
+ (*settings)["strictRoot"] = true;
+ (*settings)["allowDroppedNullPlaceholders"] = false;
+ (*settings)["allowNumericKeys"] = false;
+ (*settings)["allowSingleQuotes"] = false;
+ (*settings)["failIfExtra"] = true;
+ (*settings)["rejectDupKeys"] = true;
+//! [CharReaderBuilderStrictMode]
+}
+// static
+void CharReaderBuilder::setDefaults(Json::Value* settings)
+{
+//! [CharReaderBuilderDefaults]
+ (*settings)["collectComments"] = true;
+ (*settings)["allowComments"] = true;
+ (*settings)["strictRoot"] = false;
+ (*settings)["allowDroppedNullPlaceholders"] = false;
+ (*settings)["allowNumericKeys"] = false;
+ (*settings)["allowSingleQuotes"] = false;
+ (*settings)["stackLimit"] = 1000;
+ (*settings)["failIfExtra"] = false;
+ (*settings)["rejectDupKeys"] = false;
+//! [CharReaderBuilderDefaults]
+}
+
+//////////////////////////////////
+// global functions
+
+bool parseFromStream(
+ CharReader::Factory const& fact, std::istream& sin,
+ Value* root, std::string* errs)
+{
+ std::ostringstream ssin;
+ ssin << sin.rdbuf();
+ std::string doc = ssin.str();
+ char const* begin = doc.data();
+ char const* end = begin + doc.size();
+ // Note that we do not actually need a null-terminator.
+ CharReaderPtr const reader(fact.newCharReader());
+ return reader->parse(begin, end, root, errs);
+}
+
+std::istream& operator>>(std::istream& sin, Value& root) {
+ CharReaderBuilder b;
+ std::string errs;
+ bool ok = parseFromStream(b, sin, &root, &errs);
+ if (!ok) {
+ fprintf(stderr,
+ "Error from reader: %s",
+ errs.c_str());
+
+ throwRuntimeError("reader error");
+ }
+ return sin;
+}
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_reader.cpp
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_valueiterator.inl
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+// included by json_value.cpp
+
+namespace Json {
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIteratorBase
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIteratorBase::ValueIteratorBase()
+ : current_(), isNull_(true) {
+}
+
+ValueIteratorBase::ValueIteratorBase(
+ const Value::ObjectValues::iterator& current)
+ : current_(current), isNull_(false) {}
+
+Value& ValueIteratorBase::deref() const {
+ return current_->second;
+}
+
+void ValueIteratorBase::increment() {
+ ++current_;
+}
+
+void ValueIteratorBase::decrement() {
+ --current_;
+}
+
+ValueIteratorBase::difference_type
+ValueIteratorBase::computeDistance(const SelfType& other) const {
+#ifdef JSON_USE_CPPTL_SMALLMAP
+ return other.current_ - current_;
+#else
+ // Iterator for null value are initialized using the default
+ // constructor, which initialize current_ to the default
+ // std::map::iterator. As begin() and end() are two instance
+ // of the default std::map::iterator, they can not be compared.
+ // To allow this, we handle this comparison specifically.
+ if (isNull_ && other.isNull_) {
+ return 0;
+ }
+
+ // Usage of std::distance is not portable (does not compile with Sun Studio 12
+ // RogueWave STL,
+ // which is the one used by default).
+ // Using a portable hand-made version for non random iterator instead:
+ // return difference_type( std::distance( current_, other.current_ ) );
+ difference_type myDistance = 0;
+ for (Value::ObjectValues::iterator it = current_; it != other.current_;
+ ++it) {
+ ++myDistance;
+ }
+ return myDistance;
+#endif
+}
+
+bool ValueIteratorBase::isEqual(const SelfType& other) const {
+ if (isNull_) {
+ return other.isNull_;
+ }
+ return current_ == other.current_;
+}
+
+void ValueIteratorBase::copy(const SelfType& other) {
+ current_ = other.current_;
+ isNull_ = other.isNull_;
+}
+
+Value ValueIteratorBase::key() const {
+ const Value::CZString czstring = (*current_).first;
+ if (czstring.data()) {
+ if (czstring.isStaticString())
+ return Value(StaticString(czstring.data()));
+ return Value(czstring.data(), czstring.data() + czstring.length());
+ }
+ return Value(czstring.index());
+}
+
+UInt ValueIteratorBase::index() const {
+ const Value::CZString czstring = (*current_).first;
+ if (!czstring.data())
+ return czstring.index();
+ return Value::UInt(-1);
+}
+
+std::string ValueIteratorBase::name() const {
+ char const* mykey;
+ char const* end;
+ mykey = memberName(&end);
+ if (!mykey) return std::string();
+ return std::string(mykey, end);
+}
+
+char const* ValueIteratorBase::memberName() const {
+ const char* myname = (*current_).first.data();
+ return myname ? myname : "";
+}
+
+char const* ValueIteratorBase::memberName(char const** end) const {
+ const char* myname = (*current_).first.data();
+ if (!myname) {
+ *end = NULL;
+ return NULL;
+ }
+ *end = myname + (*current_).first.length();
+ return myname;
+}
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueConstIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueConstIterator::ValueConstIterator() {}
+
+ValueConstIterator::ValueConstIterator(
+ const Value::ObjectValues::iterator& current)
+ : ValueIteratorBase(current) {}
+
+ValueConstIterator& ValueConstIterator::
+operator=(const ValueIteratorBase& other) {
+ copy(other);
+ return *this;
+}
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIterator::ValueIterator() {}
+
+ValueIterator::ValueIterator(const Value::ObjectValues::iterator& current)
+ : ValueIteratorBase(current) {}
+
+ValueIterator::ValueIterator(const ValueConstIterator& other)
+ : ValueIteratorBase(other) {}
+
+ValueIterator::ValueIterator(const ValueIterator& other)
+ : ValueIteratorBase(other) {}
+
+ValueIterator& ValueIterator::operator=(const SelfType& other) {
+ copy(other);
+ return *this;
+}
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_valueiterator.inl
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_value.cpp
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2011 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+#include
+#include
+#ifdef JSON_USE_CPPTL
+#include
+#endif
+#include // size_t
+#include // min()
+
+#define JSON_ASSERT_UNREACHABLE assert(false)
+
+namespace Json {
+
+// This is a walkaround to avoid the static initialization of Value::null.
+// kNull must be word-aligned to avoid crashing on ARM. We use an alignment of
+// 8 (instead of 4) as a bit of future-proofing.
+#if defined(__ARMEL__)
+#define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment)))
+#else
+// This exists for binary compatibility only. Use nullRef.
+const Value Value::null;
+#define ALIGNAS(byte_alignment)
+#endif
+static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = { 0 };
+const unsigned char& kNullRef = kNull[0];
+const Value& Value::nullRef = reinterpret_cast(kNullRef);
+
+const Int Value::minInt = Int(~(UInt(-1) / 2));
+const Int Value::maxInt = Int(UInt(-1) / 2);
+const UInt Value::maxUInt = UInt(-1);
+#if defined(JSON_HAS_INT64)
+const Int64 Value::minInt64 = Int64(~(UInt64(-1) / 2));
+const Int64 Value::maxInt64 = Int64(UInt64(-1) / 2);
+const UInt64 Value::maxUInt64 = UInt64(-1);
+// The constant is hard-coded because some compiler have trouble
+// converting Value::maxUInt64 to a double correctly (AIX/xlC).
+// Assumes that UInt64 is a 64 bits integer.
+static const double maxUInt64AsDouble = 18446744073709551615.0;
+#endif // defined(JSON_HAS_INT64)
+const LargestInt Value::minLargestInt = LargestInt(~(LargestUInt(-1) / 2));
+const LargestInt Value::maxLargestInt = LargestInt(LargestUInt(-1) / 2);
+const LargestUInt Value::maxLargestUInt = LargestUInt(-1);
+
+#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+template
+static inline bool InRange(double d, T min, U max) {
+ return d >= min && d <= max;
+}
+#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+static inline double integerToDouble(Json::UInt64 value) {
+ return static_cast(Int64(value / 2)) * 2.0 + Int64(value & 1);
+}
+
+template static inline double integerToDouble(T value) {
+ return static_cast(value);
+}
+
+template
+static inline bool InRange(double d, T min, U max) {
+ return d >= integerToDouble(min) && d <= integerToDouble(max);
+}
+#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+
+/** Duplicates the specified string value.
+ * @param value Pointer to the string to duplicate. Must be zero-terminated if
+ * length is "unknown".
+ * @param length Length of the value. if equals to unknown, then it will be
+ * computed using strlen(value).
+ * @return Pointer on the duplicate instance of string.
+ */
+static inline char* duplicateStringValue(const char* value,
+ size_t length) {
+ // Avoid an integer overflow in the call to malloc below by limiting length
+ // to a sane value.
+ if (length >= (size_t)Value::maxInt)
+ length = Value::maxInt - 1;
+
+ char* newString = static_cast(malloc(length + 1));
+ if (newString == NULL) {
+ throwRuntimeError(
+ "in Json::Value::duplicateStringValue(): "
+ "Failed to allocate string value buffer");
+ }
+ memcpy(newString, value, length);
+ newString[length] = 0;
+ return newString;
+}
+
+/* Record the length as a prefix.
+ */
+static inline char* duplicateAndPrefixStringValue(
+ const char* value,
+ unsigned int length)
+{
+ // Avoid an integer overflow in the call to malloc below by limiting length
+ // to a sane value.
+ JSON_ASSERT_MESSAGE(length <= (unsigned)Value::maxInt - sizeof(unsigned) - 1U,
+ "in Json::Value::duplicateAndPrefixStringValue(): "
+ "length too big for prefixing");
+ unsigned actualLength = length + sizeof(unsigned) + 1U;
+ char* newString = static_cast(malloc(actualLength));
+ if (newString == 0) {
+ throwRuntimeError(
+ "in Json::Value::duplicateAndPrefixStringValue(): "
+ "Failed to allocate string value buffer");
+ }
+ *reinterpret_cast(newString) = length;
+ memcpy(newString + sizeof(unsigned), value, length);
+ newString[actualLength - 1U] = 0; // to avoid buffer over-run accidents by users later
+ return newString;
+}
+inline static void decodePrefixedString(
+ bool isPrefixed, char const* prefixed,
+ unsigned* length, char const** value)
+{
+ if (!isPrefixed) {
+ *length = strlen(prefixed);
+ *value = prefixed;
+ } else {
+ *length = *reinterpret_cast(prefixed);
+ *value = prefixed + sizeof(unsigned);
+ }
+}
+/** Free the string duplicated by duplicateStringValue()/duplicateAndPrefixStringValue().
+ */
+static inline void releaseStringValue(char* value) { free(value); }
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// ValueInternals...
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+#if !defined(JSON_IS_AMALGAMATION)
+
+#include "json_valueiterator.inl"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+class JSON_API Exception : public std::exception {
+public:
+ Exception(std::string const& msg);
+ virtual ~Exception() throw();
+ virtual char const* what() const throw();
+protected:
+ std::string const msg_;
+};
+class JSON_API RuntimeError : public Exception {
+public:
+ RuntimeError(std::string const& msg);
+};
+class JSON_API LogicError : public Exception {
+public:
+ LogicError(std::string const& msg);
+};
+
+Exception::Exception(std::string const& msg)
+ : msg_(msg)
+{}
+Exception::~Exception() throw()
+{}
+char const* Exception::what() const throw()
+{
+ return msg_.c_str();
+}
+RuntimeError::RuntimeError(std::string const& msg)
+ : Exception(msg)
+{}
+LogicError::LogicError(std::string const& msg)
+ : Exception(msg)
+{}
+void throwRuntimeError(std::string const& msg)
+{
+ throw RuntimeError(msg);
+}
+void throwLogicError(std::string const& msg)
+{
+ throw LogicError(msg);
+}
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CommentInfo
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+Value::CommentInfo::CommentInfo() : comment_(0) {}
+
+Value::CommentInfo::~CommentInfo() {
+ if (comment_)
+ releaseStringValue(comment_);
+}
+
+void Value::CommentInfo::setComment(const char* text, size_t len) {
+ if (comment_) {
+ releaseStringValue(comment_);
+ comment_ = 0;
+ }
+ JSON_ASSERT(text != 0);
+ JSON_ASSERT_MESSAGE(
+ text[0] == '\0' || text[0] == '/',
+ "in Json::Value::setComment(): Comments must start with /");
+ // It seems that /**/ style comments are acceptable as well.
+ comment_ = duplicateStringValue(text, len);
+}
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CZString
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+// Notes: policy_ indicates if the string was allocated when
+// a string is stored.
+
+Value::CZString::CZString(ArrayIndex aindex) : cstr_(0), index_(aindex) {}
+
+Value::CZString::CZString(char const* str, unsigned ulength, DuplicationPolicy allocate)
+ : cstr_(str)
+{
+ // allocate != duplicate
+ storage_.policy_ = allocate;
+ storage_.length_ = ulength;
+}
+
+Value::CZString::CZString(const CZString& other)
+ : cstr_(other.storage_.policy_ != noDuplication && other.cstr_ != 0
+ ? duplicateStringValue(other.cstr_, other.storage_.length_)
+ : other.cstr_)
+{
+ storage_.policy_ = (other.cstr_
+ ? (other.storage_.policy_ == noDuplication
+ ? noDuplication : duplicate)
+ : other.storage_.policy_);
+ storage_.length_ = other.storage_.length_;
+}
+
+Value::CZString::~CZString() {
+ if (cstr_ && storage_.policy_ == duplicate)
+ releaseStringValue(const_cast(cstr_));
+}
+
+void Value::CZString::swap(CZString& other) {
+ std::swap(cstr_, other.cstr_);
+ std::swap(index_, other.index_);
+}
+
+Value::CZString& Value::CZString::operator=(CZString other) {
+ swap(other);
+ return *this;
+}
+
+bool Value::CZString::operator<(const CZString& other) const {
+ if (!cstr_) return index_ < other.index_;
+ //return strcmp(cstr_, other.cstr_) < 0;
+ // Assume both are strings.
+ unsigned this_len = this->storage_.length_;
+ unsigned other_len = other.storage_.length_;
+ unsigned min_len = std::min(this_len, other_len);
+ int comp = memcmp(this->cstr_, other.cstr_, min_len);
+ if (comp < 0) return true;
+ if (comp > 0) return false;
+ return (this_len < other_len);
+}
+
+bool Value::CZString::operator==(const CZString& other) const {
+ if (!cstr_) return index_ == other.index_;
+ //return strcmp(cstr_, other.cstr_) == 0;
+ // Assume both are strings.
+ unsigned this_len = this->storage_.length_;
+ unsigned other_len = other.storage_.length_;
+ if (this_len != other_len) return false;
+ int comp = memcmp(this->cstr_, other.cstr_, this_len);
+ return comp == 0;
+}
+
+ArrayIndex Value::CZString::index() const { return index_; }
+
+//const char* Value::CZString::c_str() const { return cstr_; }
+const char* Value::CZString::data() const { return cstr_; }
+unsigned Value::CZString::length() const { return storage_.length_; }
+bool Value::CZString::isStaticString() const { return storage_.policy_ == noDuplication; }
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::Value
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+/*! \internal Default constructor initialization must be equivalent to:
+ * memset( this, 0, sizeof(Value) )
+ * This optimization is used in ValueInternalMap fast allocator.
+ */
+Value::Value(ValueType vtype) {
+ initBasic(vtype);
+ switch (vtype) {
+ case nullValue:
+ break;
+ case intValue:
+ case uintValue:
+ value_.int_ = 0;
+ break;
+ case realValue:
+ value_.real_ = 0.0;
+ break;
+ case stringValue:
+ value_.string_ = 0;
+ break;
+ case arrayValue:
+ case objectValue:
+ value_.map_ = new ObjectValues();
+ break;
+ case booleanValue:
+ value_.bool_ = false;
+ break;
+ default:
+ JSON_ASSERT_UNREACHABLE;
+ }
+}
+
+Value::Value(Int value) {
+ initBasic(intValue);
+ value_.int_ = value;
+}
+
+Value::Value(UInt value) {
+ initBasic(uintValue);
+ value_.uint_ = value;
+}
+#if defined(JSON_HAS_INT64)
+Value::Value(Int64 value) {
+ initBasic(intValue);
+ value_.int_ = value;
+}
+Value::Value(UInt64 value) {
+ initBasic(uintValue);
+ value_.uint_ = value;
+}
+#endif // defined(JSON_HAS_INT64)
+
+Value::Value(double value) {
+ initBasic(realValue);
+ value_.real_ = value;
+}
+
+Value::Value(const char* value) {
+ initBasic(stringValue, true);
+ value_.string_ = duplicateAndPrefixStringValue(value, static_cast(strlen(value)));
+}
+
+Value::Value(const char* beginValue, const char* endValue) {
+ initBasic(stringValue, true);
+ value_.string_ =
+ duplicateAndPrefixStringValue(beginValue, static_cast(endValue - beginValue));
+}
+
+Value::Value(const std::string& value) {
+ initBasic(stringValue, true);
+ value_.string_ =
+ duplicateAndPrefixStringValue(value.data(), static_cast(value.length()));
+}
+
+Value::Value(const StaticString& value) {
+ initBasic(stringValue);
+ value_.string_ = const_cast(value.c_str());
+}
+
+#ifdef JSON_USE_CPPTL
+Value::Value(const CppTL::ConstString& value) {
+ initBasic(stringValue, true);
+ value_.string_ = duplicateAndPrefixStringValue(value, static_cast(value.length()));
+}
+#endif
+
+Value::Value(bool value) {
+ initBasic(booleanValue);
+ value_.bool_ = value;
+}
+
+Value::Value(Value const& other)
+ : type_(other.type_), allocated_(false)
+ ,
+ comments_(0)
+{
+ switch (type_) {
+ case nullValue:
+ case intValue:
+ case uintValue:
+ case realValue:
+ case booleanValue:
+ value_ = other.value_;
+ break;
+ case stringValue:
+ if (other.value_.string_ && other.allocated_) {
+ unsigned len;
+ char const* str;
+ decodePrefixedString(other.allocated_, other.value_.string_,
+ &len, &str);
+ value_.string_ = duplicateAndPrefixStringValue(str, len);
+ allocated_ = true;
+ } else {
+ value_.string_ = other.value_.string_;
+ allocated_ = false;
+ }
+ break;
+ case arrayValue:
+ case objectValue:
+ value_.map_ = new ObjectValues(*other.value_.map_);
+ break;
+ default:
+ JSON_ASSERT_UNREACHABLE;
+ }
+ if (other.comments_) {
+ comments_ = new CommentInfo[numberOfCommentPlacement];
+ for (int comment = 0; comment < numberOfCommentPlacement; ++comment) {
+ const CommentInfo& otherComment = other.comments_[comment];
+ if (otherComment.comment_)
+ comments_[comment].setComment(
+ otherComment.comment_, strlen(otherComment.comment_));
+ }
+ }
+}
+
+Value::~Value() {
+ switch (type_) {
+ case nullValue:
+ case intValue:
+ case uintValue:
+ case realValue:
+ case booleanValue:
+ break;
+ case stringValue:
+ if (allocated_)
+ releaseStringValue(value_.string_);
+ break;
+ case arrayValue:
+ case objectValue:
+ delete value_.map_;
+ break;
+ default:
+ JSON_ASSERT_UNREACHABLE;
+ }
+
+ if (comments_)
+ delete[] comments_;
+}
+
+Value &Value::operator=(const Value &other) {
+ Value temp(other);
+ swap(temp);
+ return *this;
+}
+
+void Value::swapPayload(Value& other) {
+ ValueType temp = type_;
+ type_ = other.type_;
+ other.type_ = temp;
+ std::swap(value_, other.value_);
+ int temp2 = allocated_;
+ allocated_ = other.allocated_;
+ other.allocated_ = temp2;
+}
+
+void Value::swap(Value& other) {
+ swapPayload(other);
+ std::swap(comments_, other.comments_);
+}
+
+ValueType Value::type() const { return type_; }
+
+int Value::compare(const Value& other) const {
+ if (*this < other)
+ return -1;
+ if (*this > other)
+ return 1;
+ return 0;
+}
+
+bool Value::operator<(const Value& other) const {
+ int typeDelta = type_ - other.type_;
+ if (typeDelta)
+ return typeDelta < 0 ? true : false;
+ switch (type_) {
+ case nullValue:
+ return false;
+ case intValue:
+ return value_.int_ < other.value_.int_;
+ case uintValue:
+ return value_.uint_ < other.value_.uint_;
+ case realValue:
+ return value_.real_ < other.value_.real_;
+ case booleanValue:
+ return value_.bool_ < other.value_.bool_;
+ case stringValue:
+ {
+ if ((value_.string_ == 0) || (other.value_.string_ == 0)) {
+ if (other.value_.string_) return true;
+ else return false;
+ }
+ unsigned this_len;
+ unsigned other_len;
+ char const* this_str;
+ char const* other_str;
+ decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
+ decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str);
+ unsigned min_len = std::min(this_len, other_len);
+ int comp = memcmp(this_str, other_str, min_len);
+ if (comp < 0) return true;
+ if (comp > 0) return false;
+ return (this_len < other_len);
+ }
+ case arrayValue:
+ case objectValue: {
+ int delta = int(value_.map_->size() - other.value_.map_->size());
+ if (delta)
+ return delta < 0;
+ return (*value_.map_) < (*other.value_.map_);
+ }
+ default:
+ JSON_ASSERT_UNREACHABLE;
+ }
+ return false; // unreachable
+}
+
+bool Value::operator<=(const Value& other) const { return !(other < *this); }
+
+bool Value::operator>=(const Value& other) const { return !(*this < other); }
+
+bool Value::operator>(const Value& other) const { return other < *this; }
+
+bool Value::operator==(const Value& other) const {
+ // if ( type_ != other.type_ )
+ // GCC 2.95.3 says:
+ // attempt to take address of bit-field structure member `Json::Value::type_'
+ // Beats me, but a temp solves the problem.
+ int temp = other.type_;
+ if (type_ != temp)
+ return false;
+ switch (type_) {
+ case nullValue:
+ return true;
+ case intValue:
+ return value_.int_ == other.value_.int_;
+ case uintValue:
+ return value_.uint_ == other.value_.uint_;
+ case realValue:
+ return value_.real_ == other.value_.real_;
+ case booleanValue:
+ return value_.bool_ == other.value_.bool_;
+ case stringValue:
+ {
+ if ((value_.string_ == 0) || (other.value_.string_ == 0)) {
+ return (value_.string_ == other.value_.string_);
+ }
+ unsigned this_len;
+ unsigned other_len;
+ char const* this_str;
+ char const* other_str;
+ decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
+ decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str);
+ if (this_len != other_len) return false;
+ int comp = memcmp(this_str, other_str, this_len);
+ return comp == 0;
+ }
+ case arrayValue:
+ case objectValue:
+ return value_.map_->size() == other.value_.map_->size() &&
+ (*value_.map_) == (*other.value_.map_);
+ default:
+ JSON_ASSERT_UNREACHABLE;
+ }
+ return false; // unreachable
+}
+
+bool Value::operator!=(const Value& other) const { return !(*this == other); }
+
+const char* Value::asCString() const {
+ JSON_ASSERT_MESSAGE(type_ == stringValue,
+ "in Json::Value::asCString(): requires stringValue");
+ if (value_.string_ == 0) return 0;
+ unsigned this_len;
+ char const* this_str;
+ decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
+ return this_str;
+}
+
+bool Value::getString(char const** str, char const** myend) const {
+ if (type_ != stringValue) return false;
+ if (value_.string_ == 0) return false;
+ unsigned length;
+ decodePrefixedString(this->allocated_, this->value_.string_, &length, str);
+ *myend = *str + length;
+ return true;
+}
+
+std::string Value::asString() const {
+ switch (type_) {
+ case nullValue:
+ return "";
+ case stringValue:
+ {
+ if (value_.string_ == 0) return "";
+ unsigned this_len;
+ char const* this_str;
+ decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
+ return std::string(this_str, this_len);
+ }
+ case booleanValue:
+ return value_.bool_ ? "true" : "false";
+ case intValue:
+ return valueToString(value_.int_);
+ case uintValue:
+ return valueToString(value_.uint_);
+ case realValue:
+ return valueToString(value_.real_);
+ default:
+ JSON_FAIL_MESSAGE("Type is not convertible to string");
+ }
+}
+
+#ifdef JSON_USE_CPPTL
+CppTL::ConstString Value::asConstString() const {
+ unsigned len;
+ char const* str;
+ decodePrefixedString(allocated_, value_.string_,
+ &len, &str);
+ return CppTL::ConstString(str, len);
+}
+#endif
+
+Value::Int Value::asInt() const {
+ switch (type_) {
+ case intValue:
+ JSON_ASSERT_MESSAGE(isInt(), "LargestInt out of Int range");
+ return Int(value_.int_);
+ case uintValue:
+ JSON_ASSERT_MESSAGE(isInt(), "LargestUInt out of Int range");
+ return Int(value_.uint_);
+ case realValue:
+ JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt, maxInt),
+ "double out of Int range");
+ return Int(value_.real_);
+ case nullValue:
+ return 0;
+ case booleanValue:
+ return value_.bool_ ? 1 : 0;
+ default:
+ break;
+ }
+ JSON_FAIL_MESSAGE("Value is not convertible to Int.");
+}
+
+Value::UInt Value::asUInt() const {
+ switch (type_) {
+ case intValue:
+ JSON_ASSERT_MESSAGE(isUInt(), "LargestInt out of UInt range");
+ return UInt(value_.int_);
+ case uintValue:
+ JSON_ASSERT_MESSAGE(isUInt(), "LargestUInt out of UInt range");
+ return UInt(value_.uint_);
+ case realValue:
+ JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt),
+ "double out of UInt range");
+ return UInt(value_.real_);
+ case nullValue:
+ return 0;
+ case booleanValue:
+ return value_.bool_ ? 1 : 0;
+ default:
+ break;
+ }
+ JSON_FAIL_MESSAGE("Value is not convertible to UInt.");
+}
+
+#if defined(JSON_HAS_INT64)
+
+Value::Int64 Value::asInt64() const {
+ switch (type_) {
+ case intValue:
+ return Int64(value_.int_);
+ case uintValue:
+ JSON_ASSERT_MESSAGE(isInt64(), "LargestUInt out of Int64 range");
+ return Int64(value_.uint_);
+ case realValue:
+ JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt64, maxInt64),
+ "double out of Int64 range");
+ return Int64(value_.real_);
+ case nullValue:
+ return 0;
+ case booleanValue:
+ return value_.bool_ ? 1 : 0;
+ default:
+ break;
+ }
+ JSON_FAIL_MESSAGE("Value is not convertible to Int64.");
+}
+
+Value::UInt64 Value::asUInt64() const {
+ switch (type_) {
+ case intValue:
+ JSON_ASSERT_MESSAGE(isUInt64(), "LargestInt out of UInt64 range");
+ return UInt64(value_.int_);
+ case uintValue:
+ return UInt64(value_.uint_);
+ case realValue:
+ JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64),
+ "double out of UInt64 range");
+ return UInt64(value_.real_);
+ case nullValue:
+ return 0;
+ case booleanValue:
+ return value_.bool_ ? 1 : 0;
+ default:
+ break;
+ }
+ JSON_FAIL_MESSAGE("Value is not convertible to UInt64.");
+}
+#endif // if defined(JSON_HAS_INT64)
+
+LargestInt Value::asLargestInt() const {
+#if defined(JSON_NO_INT64)
+ return asInt();
+#else
+ return asInt64();
+#endif
+}
+
+LargestUInt Value::asLargestUInt() const {
+#if defined(JSON_NO_INT64)
+ return asUInt();
+#else
+ return asUInt64();
+#endif
+}
+
+double Value::asDouble() const {
+ switch (type_) {
+ case intValue:
+ return static_cast(value_.int_);
+ case uintValue:
+#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+ return static_cast(value_.uint_);
+#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+ return integerToDouble(value_.uint_);
+#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+ case realValue:
+ return value_.real_;
+ case nullValue:
+ return 0.0;
+ case booleanValue:
+ return value_.bool_ ? 1.0 : 0.0;
+ default:
+ break;
+ }
+ JSON_FAIL_MESSAGE("Value is not convertible to double.");
+}
+
+float Value::asFloat() const {
+ switch (type_) {
+ case intValue:
+ return static_cast(value_.int_);
+ case uintValue:
+#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+ return static_cast(value_.uint_);
+#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+ return integerToDouble(value_.uint_);
+#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+ case realValue:
+ return static_cast(value_.real_);
+ case nullValue:
+ return 0.0;
+ case booleanValue:
+ return value_.bool_ ? 1.0f : 0.0f;
+ default:
+ break;
+ }
+ JSON_FAIL_MESSAGE("Value is not convertible to float.");
+}
+
+bool Value::asBool() const {
+ switch (type_) {
+ case booleanValue:
+ return value_.bool_;
+ case nullValue:
+ return false;
+ case intValue:
+ return value_.int_ ? true : false;
+ case uintValue:
+ return value_.uint_ ? true : false;
+ case realValue:
+ return value_.real_ ? true : false;
+ default:
+ break;
+ }
+ JSON_FAIL_MESSAGE("Value is not convertible to bool.");
+}
+
+bool Value::isConvertibleTo(ValueType other) const {
+ switch (other) {
+ case nullValue:
+ return (isNumeric() && asDouble() == 0.0) ||
+ (type_ == booleanValue && value_.bool_ == false) ||
+ (type_ == stringValue && asString() == "") ||
+ (type_ == arrayValue && value_.map_->size() == 0) ||
+ (type_ == objectValue && value_.map_->size() == 0) ||
+ type_ == nullValue;
+ case intValue:
+ return isInt() ||
+ (type_ == realValue && InRange(value_.real_, minInt, maxInt)) ||
+ type_ == booleanValue || type_ == nullValue;
+ case uintValue:
+ return isUInt() ||
+ (type_ == realValue && InRange(value_.real_, 0, maxUInt)) ||
+ type_ == booleanValue || type_ == nullValue;
+ case realValue:
+ return isNumeric() || type_ == booleanValue || type_ == nullValue;
+ case booleanValue:
+ return isNumeric() || type_ == booleanValue || type_ == nullValue;
+ case stringValue:
+ return isNumeric() || type_ == booleanValue || type_ == stringValue ||
+ type_ == nullValue;
+ case arrayValue:
+ return type_ == arrayValue || type_ == nullValue;
+ case objectValue:
+ return type_ == objectValue || type_ == nullValue;
+ }
+ JSON_ASSERT_UNREACHABLE;
+ return false;
+}
+
+/// Number of values in array or object
+ArrayIndex Value::size() const {
+ switch (type_) {
+ case nullValue:
+ case intValue:
+ case uintValue:
+ case realValue:
+ case booleanValue:
+ case stringValue:
+ return 0;
+ case arrayValue: // size of the array is highest index + 1
+ if (!value_.map_->empty()) {
+ ObjectValues::const_iterator itLast = value_.map_->end();
+ --itLast;
+ return (*itLast).first.index() + 1;
+ }
+ return 0;
+ case objectValue:
+ return ArrayIndex(value_.map_->size());
+ }
+ JSON_ASSERT_UNREACHABLE;
+ return 0; // unreachable;
+}
+
+bool Value::empty() const {
+ if (isNull() || isArray() || isObject())
+ return size() == 0u;
+ else
+ return false;
+}
+
+bool Value::operator!() const { return isNull(); }
+
+void Value::clear() {
+ JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue ||
+ type_ == objectValue,
+ "in Json::Value::clear(): requires complex value");
+ switch (type_) {
+ case arrayValue:
+ case objectValue:
+ value_.map_->clear();
+ break;
+ default:
+ break;
+ }
+}
+
+void Value::resize(ArrayIndex newSize) {
+ JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue,
+ "in Json::Value::resize(): requires arrayValue");
+ if (type_ == nullValue)
+ *this = Value(arrayValue);
+ ArrayIndex oldSize = size();
+ if (newSize == 0)
+ clear();
+ else if (newSize > oldSize)
+ (*this)[newSize - 1];
+ else {
+ for (ArrayIndex index = newSize; index < oldSize; ++index) {
+ value_.map_->erase(index);
+ }
+ assert(size() == newSize);
+ }
+}
+
+Value& Value::operator[](ArrayIndex index) {
+ JSON_ASSERT_MESSAGE(
+ type_ == nullValue || type_ == arrayValue,
+ "in Json::Value::operator[](ArrayIndex): requires arrayValue");
+ if (type_ == nullValue)
+ *this = Value(arrayValue);
+ CZString key(index);
+ ObjectValues::iterator it = value_.map_->lower_bound(key);
+ if (it != value_.map_->end() && (*it).first == key)
+ return (*it).second;
+
+ ObjectValues::value_type defaultValue(key, nullRef);
+ it = value_.map_->insert(it, defaultValue);
+ return (*it).second;
+}
+
+Value& Value::operator[](int index) {
+ JSON_ASSERT_MESSAGE(
+ index >= 0,
+ "in Json::Value::operator[](int index): index cannot be negative");
+ return (*this)[ArrayIndex(index)];
+}
+
+const Value& Value::operator[](ArrayIndex index) const {
+ JSON_ASSERT_MESSAGE(
+ type_ == nullValue || type_ == arrayValue,
+ "in Json::Value::operator[](ArrayIndex)const: requires arrayValue");
+ if (type_ == nullValue)
+ return nullRef;
+ CZString key(index);
+ ObjectValues::const_iterator it = value_.map_->find(key);
+ if (it == value_.map_->end())
+ return nullRef;
+ return (*it).second;
+}
+
+const Value& Value::operator[](int index) const {
+ JSON_ASSERT_MESSAGE(
+ index >= 0,
+ "in Json::Value::operator[](int index) const: index cannot be negative");
+ return (*this)[ArrayIndex(index)];
+}
+
+void Value::initBasic(ValueType vtype, bool allocated) {
+ type_ = vtype;
+ allocated_ = allocated;
+ comments_ = 0;
+}
+
+// Access an object value by name, create a null member if it does not exist.
+// @pre Type of '*this' is object or null.
+// @param key is null-terminated.
+Value& Value::resolveReference(const char* key) {
+ JSON_ASSERT_MESSAGE(
+ type_ == nullValue || type_ == objectValue,
+ "in Json::Value::resolveReference(): requires objectValue");
+ if (type_ == nullValue)
+ *this = Value(objectValue);
+ CZString actualKey(
+ key, static_cast(strlen(key)), CZString::noDuplication); // NOTE!
+ ObjectValues::iterator it = value_.map_->lower_bound(actualKey);
+ if (it != value_.map_->end() && (*it).first == actualKey)
+ return (*it).second;
+
+ ObjectValues::value_type defaultValue(actualKey, nullRef);
+ it = value_.map_->insert(it, defaultValue);
+ Value& value = (*it).second;
+ return value;
+}
+
+// @param key is not null-terminated.
+Value& Value::resolveReference(char const* key, char const* myend)
+{
+ JSON_ASSERT_MESSAGE(
+ type_ == nullValue || type_ == objectValue,
+ "in Json::Value::resolveReference(key, myend): requires objectValue");
+ if (type_ == nullValue)
+ *this = Value(objectValue);
+ CZString actualKey(
+ key, static_cast(myend-key), CZString::duplicateOnCopy);
+ ObjectValues::iterator it = value_.map_->lower_bound(actualKey);
+ if (it != value_.map_->end() && (*it).first == actualKey)
+ return (*it).second;
+
+ ObjectValues::value_type defaultValue(actualKey, nullRef);
+ it = value_.map_->insert(it, defaultValue);
+ Value& value = (*it).second;
+ return value;
+}
+
+Value Value::get(ArrayIndex index, const Value& defaultValue) const {
+ const Value* value = &((*this)[index]);
+ return value == &nullRef ? defaultValue : *value;
+}
+
+bool Value::isValidIndex(ArrayIndex index) const { return index < size(); }
+
+Value const* Value::find(char const* key, char const* myend) const
+{
+ JSON_ASSERT_MESSAGE(
+ type_ == nullValue || type_ == objectValue,
+ "in Json::Value::find(key, myend, found): requires objectValue or nullValue");
+ if (type_ == nullValue) return NULL;
+ CZString actualKey(key, static_cast(myend-key), CZString::noDuplication);
+ ObjectValues::const_iterator it = value_.map_->find(actualKey);
+ if (it == value_.map_->end()) return NULL;
+ return &(*it).second;
+}
+const Value& Value::operator[](const char* key) const
+{
+ Value const* found = find(key, key + strlen(key));
+ if (!found) return nullRef;
+ return *found;
+}
+Value const& Value::operator[](std::string const& key) const
+{
+ Value const* found = find(key.data(), key.data() + key.length());
+ if (!found) return nullRef;
+ return *found;
+}
+
+Value& Value::operator[](const char* key) {
+ return resolveReference(key, key + strlen(key));
+}
+
+Value& Value::operator[](const std::string& key) {
+ return resolveReference(key.data(), key.data() + key.length());
+}
+
+Value& Value::operator[](const StaticString& key) {
+ return resolveReference(key.c_str());
+}
+
+#ifdef JSON_USE_CPPTL
+Value& Value::operator[](const CppTL::ConstString& key) {
+ return resolveReference(key.c_str(), key.end_c_str());
+}
+Value const& Value::operator[](CppTL::ConstString const& key) const
+{
+ Value const* found = find(key.c_str(), key.end_c_str());
+ if (!found) return nullRef;
+ return *found;
+}
+#endif
+
+Value& Value::append(const Value& value) { return (*this)[size()] = value; }
+
+Value Value::get(char const* key, char const* myend, Value const& defaultValue) const
+{
+ Value const* found = find(key, myend);
+ return !found ? defaultValue : *found;
+}
+Value Value::get(char const* key, Value const& defaultValue) const
+{
+ return get(key, key + strlen(key), defaultValue);
+}
+Value Value::get(std::string const& key, Value const& defaultValue) const
+{
+ return get(key.data(), key.data() + key.length(), defaultValue);
+}
+
+
+bool Value::removeMember(const char* key, const char* myend, Value* removed)
+{
+ if (type_ != objectValue) {
+ return false;
+ }
+ CZString actualKey(key, static_cast(myend-key), CZString::noDuplication);
+ ObjectValues::iterator it = value_.map_->find(actualKey);
+ if (it == value_.map_->end())
+ return false;
+ *removed = it->second;
+ value_.map_->erase(it);
+ return true;
+}
+bool Value::removeMember(const char* key, Value* removed)
+{
+ return removeMember(key, key + strlen(key), removed);
+}
+bool Value::removeMember(std::string const& key, Value* removed)
+{
+ return removeMember(key.data(), key.data() + key.length(), removed);
+}
+Value Value::removeMember(const char* key)
+{
+ JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == objectValue,
+ "in Json::Value::removeMember(): requires objectValue");
+ if (type_ == nullValue)
+ return nullRef;
+
+ Value removed; // null
+ removeMember(key, key + strlen(key), &removed);
+ return removed; // still null if removeMember() did nothing
+}
+Value Value::removeMember(const std::string& key)
+{
+ return removeMember(key.c_str());
+}
+
+bool Value::removeIndex(ArrayIndex index, Value* removed) {
+ if (type_ != arrayValue) {
+ return false;
+ }
+ CZString key(index);
+ ObjectValues::iterator it = value_.map_->find(key);
+ if (it == value_.map_->end()) {
+ return false;
+ }
+ *removed = it->second;
+ ArrayIndex oldSize = size();
+ // shift left all items left, into the place of the "removed"
+ for (ArrayIndex i = index; i < (oldSize - 1); ++i){
+ CZString mykey(i);
+ (*value_.map_)[mykey] = (*this)[i + 1];
+ }
+ // erase the last one ("leftover")
+ CZString keyLast(oldSize - 1);
+ ObjectValues::iterator itLast = value_.map_->find(keyLast);
+ value_.map_->erase(itLast);
+ return true;
+}
+
+#ifdef JSON_USE_CPPTL
+Value Value::get(const CppTL::ConstString& key,
+ const Value& defaultValue) const {
+ return get(key.c_str(), key.end_c_str(), defaultValue);
+}
+#endif
+
+bool Value::isMember(char const* key, char const* myend) const
+{
+ Value const* value = find(key, myend);
+ return NULL != value;
+}
+bool Value::isMember(char const* key) const
+{
+ return isMember(key, key + strlen(key));
+}
+bool Value::isMember(std::string const& key) const
+{
+ return isMember(key.data(), key.data() + key.length());
+}
+
+#ifdef JSON_USE_CPPTL
+bool Value::isMember(const CppTL::ConstString& key) const {
+ return isMember(key.c_str(), key.end_c_str());
+}
+#endif
+
+Value::Members Value::getMemberNames() const {
+ JSON_ASSERT_MESSAGE(
+ type_ == nullValue || type_ == objectValue,
+ "in Json::Value::getMemberNames(), value must be objectValue");
+ if (type_ == nullValue)
+ return Value::Members();
+ Members members;
+ members.reserve(value_.map_->size());
+ ObjectValues::const_iterator it = value_.map_->begin();
+ ObjectValues::const_iterator itEnd = value_.map_->end();
+ for (; it != itEnd; ++it) {
+ members.push_back(std::string((*it).first.data(),
+ (*it).first.length()));
+ }
+ return members;
+}
+//
+//# ifdef JSON_USE_CPPTL
+// EnumMemberNames
+// Value::enumMemberNames() const
+//{
+// if ( type_ == objectValue )
+// {
+// return CppTL::Enum::any( CppTL::Enum::transform(
+// CppTL::Enum::keys( *(value_.map_), CppTL::Type() ),
+// MemberNamesTransform() ) );
+// }
+// return EnumMemberNames();
+//}
+//
+//
+// EnumValues
+// Value::enumValues() const
+//{
+// if ( type_ == objectValue || type_ == arrayValue )
+// return CppTL::Enum::anyValues( *(value_.map_),
+// CppTL::Type() );
+// return EnumValues();
+//}
+//
+//# endif
+
+static bool IsIntegral(double d) {
+ double integral_part;
+ return modf(d, &integral_part) == 0.0;
+}
+
+bool Value::isNull() const { return type_ == nullValue; }
+
+bool Value::isBool() const { return type_ == booleanValue; }
+
+bool Value::isInt() const {
+ switch (type_) {
+ case intValue:
+ return value_.int_ >= minInt && value_.int_ <= maxInt;
+ case uintValue:
+ return value_.uint_ <= UInt(maxInt);
+ case realValue:
+ return value_.real_ >= minInt && value_.real_ <= maxInt &&
+ IsIntegral(value_.real_);
+ default:
+ break;
+ }
+ return false;
+}
+
+bool Value::isUInt() const {
+ switch (type_) {
+ case intValue:
+ return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt);
+ case uintValue:
+ return value_.uint_ <= maxUInt;
+ case realValue:
+ return value_.real_ >= 0 && value_.real_ <= maxUInt &&
+ IsIntegral(value_.real_);
+ default:
+ break;
+ }
+ return false;
+}
+
+bool Value::isInt64() const {
+#if defined(JSON_HAS_INT64)
+ switch (type_) {
+ case intValue:
+ return true;
+ case uintValue:
+ return value_.uint_ <= UInt64(maxInt64);
+ case realValue:
+ // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a
+ // double, so double(maxInt64) will be rounded up to 2^63. Therefore we
+ // require the value to be strictly less than the limit.
+ return value_.real_ >= double(minInt64) &&
+ value_.real_ < double(maxInt64) && IsIntegral(value_.real_);
+ default:
+ break;
+ }
+#endif // JSON_HAS_INT64
+ return false;
+}
+
+bool Value::isUInt64() const {
+#if defined(JSON_HAS_INT64)
+ switch (type_) {
+ case intValue:
+ return value_.int_ >= 0;
+ case uintValue:
+ return true;
+ case realValue:
+ // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
+ // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
+ // require the value to be strictly less than the limit.
+ return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble &&
+ IsIntegral(value_.real_);
+ default:
+ break;
+ }
+#endif // JSON_HAS_INT64
+ return false;
+}
+
+bool Value::isIntegral() const {
+#if defined(JSON_HAS_INT64)
+ return isInt64() || isUInt64();
+#else
+ return isInt() || isUInt();
+#endif
+}
+
+bool Value::isDouble() const { return type_ == realValue || isIntegral(); }
+
+bool Value::isNumeric() const { return isIntegral() || isDouble(); }
+
+bool Value::isString() const { return type_ == stringValue; }
+
+bool Value::isArray() const { return type_ == arrayValue; }
+
+bool Value::isObject() const { return type_ == objectValue; }
+
+void Value::setComment(const char* comment, size_t len, CommentPlacement placement) {
+ if (!comments_)
+ comments_ = new CommentInfo[numberOfCommentPlacement];
+ if ((len > 0) && (comment[len-1] == '\n')) {
+ // Always discard trailing newline, to aid indentation.
+ len -= 1;
+ }
+ comments_[placement].setComment(comment, len);
+}
+
+void Value::setComment(const char* comment, CommentPlacement placement) {
+ setComment(comment, strlen(comment), placement);
+}
+
+void Value::setComment(const std::string& comment, CommentPlacement placement) {
+ setComment(comment.c_str(), comment.length(), placement);
+}
+
+bool Value::hasComment(CommentPlacement placement) const {
+ return comments_ != 0 && comments_[placement].comment_ != 0;
+}
+
+std::string Value::getComment(CommentPlacement placement) const {
+ if (hasComment(placement))
+ return comments_[placement].comment_;
+ return "";
+}
+
+std::string Value::toStyledString() const {
+ StyledWriter writer;
+ return writer.write(*this);
+}
+
+Value::const_iterator Value::begin() const {
+ switch (type_) {
+ case arrayValue:
+ case objectValue:
+ if (value_.map_)
+ return const_iterator(value_.map_->begin());
+ break;
+ default:
+ break;
+ }
+ return const_iterator();
+}
+
+Value::const_iterator Value::end() const {
+ switch (type_) {
+ case arrayValue:
+ case objectValue:
+ if (value_.map_)
+ return const_iterator(value_.map_->end());
+ break;
+ default:
+ break;
+ }
+ return const_iterator();
+}
+
+Value::iterator Value::begin() {
+ switch (type_) {
+ case arrayValue:
+ case objectValue:
+ if (value_.map_)
+ return iterator(value_.map_->begin());
+ break;
+ default:
+ break;
+ }
+ return iterator();
+}
+
+Value::iterator Value::end() {
+ switch (type_) {
+ case arrayValue:
+ case objectValue:
+ if (value_.map_)
+ return iterator(value_.map_->end());
+ break;
+ default:
+ break;
+ }
+ return iterator();
+}
+
+// class PathArgument
+// //////////////////////////////////////////////////////////////////
+
+PathArgument::PathArgument() : key_(), index_(), kind_(kindNone) {}
+
+PathArgument::PathArgument(ArrayIndex index)
+ : key_(), index_(index), kind_(kindIndex) {}
+
+PathArgument::PathArgument(const char* key)
+ : key_(key), index_(), kind_(kindKey) {}
+
+PathArgument::PathArgument(const std::string& key)
+ : key_(key.c_str()), index_(), kind_(kindKey) {}
+
+// class Path
+// //////////////////////////////////////////////////////////////////
+
+Path::Path(const std::string& path,
+ const PathArgument& a1,
+ const PathArgument& a2,
+ const PathArgument& a3,
+ const PathArgument& a4,
+ const PathArgument& a5) {
+ InArgs in;
+ in.push_back(&a1);
+ in.push_back(&a2);
+ in.push_back(&a3);
+ in.push_back(&a4);
+ in.push_back(&a5);
+ makePath(path, in);
+}
+
+void Path::makePath(const std::string& path, const InArgs& in) {
+ const char* current = path.c_str();
+ const char* end = current + path.length();
+ InArgs::const_iterator itInArg = in.begin();
+ while (current != end) {
+ if (*current == '[') {
+ ++current;
+ if (*current == '%')
+ addPathInArg(path, in, itInArg, PathArgument::kindIndex);
+ else {
+ ArrayIndex index = 0;
+ for (; current != end && *current >= '0' && *current <= '9'; ++current)
+ index = index * 10 + ArrayIndex(*current - '0');
+ args_.push_back(index);
+ }
+ if (current == end || *current++ != ']')
+ invalidPath(path, int(current - path.c_str()));
+ } else if (*current == '%') {
+ addPathInArg(path, in, itInArg, PathArgument::kindKey);
+ ++current;
+ } else if (*current == '.') {
+ ++current;
+ } else {
+ const char* beginName = current;
+ while (current != end && !strchr("[.", *current))
+ ++current;
+ args_.push_back(std::string(beginName, current));
+ }
+ }
+}
+
+void Path::addPathInArg(const std::string& /*path*/,
+ const InArgs& in,
+ InArgs::const_iterator& itInArg,
+ PathArgument::Kind kind) {
+ if (itInArg == in.end()) {
+ // Error: missing argument %d
+ } else if ((*itInArg)->kind_ != kind) {
+ // Error: bad argument type
+ } else {
+ args_.push_back(**itInArg);
+ }
+}
+
+void Path::invalidPath(const std::string& /*path*/, int /*location*/) {
+ // Error: invalid path.
+}
+
+const Value& Path::resolve(const Value& root) const {
+ const Value* node = &root;
+ for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) {
+ const PathArgument& arg = *it;
+ if (arg.kind_ == PathArgument::kindIndex) {
+ if (!node->isArray() || !node->isValidIndex(arg.index_)) {
+ // Error: unable to resolve path (array value expected at position...
+ }
+ node = &((*node)[arg.index_]);
+ } else if (arg.kind_ == PathArgument::kindKey) {
+ if (!node->isObject()) {
+ // Error: unable to resolve path (object value expected at position...)
+ }
+ node = &((*node)[arg.key_]);
+ if (node == &Value::nullRef) {
+ // Error: unable to resolve path (object has no member named '' at
+ // position...)
+ }
+ }
+ }
+ return *node;
+}
+
+Value Path::resolve(const Value& root, const Value& defaultValue) const {
+ const Value* node = &root;
+ for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) {
+ const PathArgument& arg = *it;
+ if (arg.kind_ == PathArgument::kindIndex) {
+ if (!node->isArray() || !node->isValidIndex(arg.index_))
+ return defaultValue;
+ node = &((*node)[arg.index_]);
+ } else if (arg.kind_ == PathArgument::kindKey) {
+ if (!node->isObject())
+ return defaultValue;
+ node = &((*node)[arg.key_]);
+ if (node == &Value::nullRef)
+ return defaultValue;
+ }
+ }
+ return *node;
+}
+
+Value& Path::make(Value& root) const {
+ Value* node = &root;
+ for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) {
+ const PathArgument& arg = *it;
+ if (arg.kind_ == PathArgument::kindIndex) {
+ if (!node->isArray()) {
+ // Error: node is not an array at position ...
+ }
+ node = &((*node)[arg.index_]);
+ } else if (arg.kind_ == PathArgument::kindKey) {
+ if (!node->isObject()) {
+ // Error: node is not an object at position...
+ }
+ node = &((*node)[arg.key_]);
+ }
+ }
+ return *node;
+}
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_value.cpp
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_writer.cpp
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2011 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include
+#include "json_tool.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#if defined(_MSC_VER) && _MSC_VER >= 1200 && _MSC_VER < 1800 // Between VC++ 6.0 and VC++ 11.0
+#include
+#define isfinite _finite
+#elif defined(__sun) && defined(__SVR4) //Solaris
+#include
+#define isfinite finite
+#else
+#include
+#define isfinite std::isfinite
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
+#define snprintf _snprintf
+#elif __cplusplus >= 201103L
+#define snprintf std::snprintf
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
+// Disable warning about strdup being deprecated.
+#pragma warning(disable : 4996)
+#endif
+
+namespace Json {
+
+#if __cplusplus >= 201103L
+typedef std::unique_ptr StreamWriterPtr;
+#else
+typedef std::auto_ptr StreamWriterPtr;
+#endif
+
+static bool containsControlCharacter(const char* str) {
+ while (*str) {
+ if (isControlCharacter(*(str++)))
+ return true;
+ }
+ return false;
+}
+
+static bool containsControlCharacter0(const char* str, unsigned len) {
+ char const* end = str + len;
+ while (end != str) {
+ if (isControlCharacter(*str) || 0==*str)
+ return true;
+ ++str;
+ }
+ return false;
+}
+
+std::string valueToString(LargestInt value) {
+ UIntToStringBuffer buffer;
+ char* current = buffer + sizeof(buffer);
+ bool isNegative = value < 0;
+ if (isNegative)
+ value = -value;
+ uintToString(LargestUInt(value), current);
+ if (isNegative)
+ *--current = '-';
+ assert(current >= buffer);
+ return current;
+}
+
+std::string valueToString(LargestUInt value) {
+ UIntToStringBuffer buffer;
+ char* current = buffer + sizeof(buffer);
+ uintToString(value, current);
+ assert(current >= buffer);
+ return current;
+}
+
+#if defined(JSON_HAS_INT64)
+
+std::string valueToString(Int value) {
+ return valueToString(LargestInt(value));
+}
+
+std::string valueToString(UInt value) {
+ return valueToString(LargestUInt(value));
+}
+
+#endif // # if defined(JSON_HAS_INT64)
+
+std::string valueToString(double value) {
+ // Allocate a buffer that is more than large enough to store the 16 digits of
+ // precision requested below.
+ char buffer[32];
+ int len = -1;
+
+// Print into the buffer. We need not request the alternative representation
+// that always has a decimal point because JSON doesn't distingish the
+// concepts of reals and integers.
+#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with
+ // visual studio 2005 to
+ // avoid warning.
+#if defined(WINCE)
+ len = _snprintf(buffer, sizeof(buffer), "%.17g", value);
+#else
+ len = sprintf_s(buffer, sizeof(buffer), "%.17g", value);
+#endif
+#else
+ if (isfinite(value)) {
+ len = snprintf(buffer, sizeof(buffer), "%.17g", value);
+ } else {
+ // IEEE standard states that NaN values will not compare to themselves
+ if (value != value) {
+ len = snprintf(buffer, sizeof(buffer), "null");
+ } else if (value < 0) {
+ len = snprintf(buffer, sizeof(buffer), "-1e+9999");
+ } else {
+ len = snprintf(buffer, sizeof(buffer), "1e+9999");
+ }
+ // For those, we do not need to call fixNumLoc, but it is fast.
+ }
+#endif
+ assert(len >= 0);
+ fixNumericLocale(buffer, buffer + len);
+ return buffer;
+}
+
+std::string valueToString(bool value) { return value ? "true" : "false"; }
+
+std::string valueToQuotedString(const char* value) {
+ if (value == NULL)
+ return "";
+ // Not sure how to handle unicode...
+ if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL &&
+ !containsControlCharacter(value))
+ return std::string("\"") + value + "\"";
+ // We have to walk value and escape any special characters.
+ // Appending to std::string is not efficient, but this should be rare.
+ // (Note: forward slashes are *not* rare, but I am not escaping them.)
+ std::string::size_type maxsize =
+ strlen(value) * 2 + 3; // allescaped+quotes+NULL
+ std::string result;
+ result.reserve(maxsize); // to avoid lots of mallocs
+ result += "\"";
+ for (const char* c = value; *c != 0; ++c) {
+ switch (*c) {
+ case '\"':
+ result += "\\\"";
+ break;
+ case '\\':
+ result += "\\\\";
+ break;
+ case '\b':
+ result += "\\b";
+ break;
+ case '\f':
+ result += "\\f";
+ break;
+ case '\n':
+ result += "\\n";
+ break;
+ case '\r':
+ result += "\\r";
+ break;
+ case '\t':
+ result += "\\t";
+ break;
+ // case '/':
+ // Even though \/ is considered a legal escape in JSON, a bare
+ // slash is also legal, so I see no reason to escape it.
+ // (I hope I am not misunderstanding something.
+ // blep notes: actually escaping \/ may be useful in javascript to avoid
+ // sequence.
+ // Should add a flag to allow this compatibility mode and prevent this
+ // sequence from occurring.
+ default:
+ if (isControlCharacter(*c)) {
+ std::ostringstream oss;
+ oss << "\\u" << std::hex << std::uppercase << std::setfill('0')
+ << std::setw(4) << static_cast(*c);
+ result += oss.str();
+ } else {
+ result += *c;
+ }
+ break;
+ }
+ }
+ result += "\"";
+ return result;
+}
+
+// https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp
+static char const* strnpbrk(char const* s, char const* accept, size_t n) {
+ assert((s || !n) && accept);
+
+ char const* const end = s + n;
+ for (char const* cur = s; cur < end; ++cur) {
+ int const c = *cur;
+ for (char const* a = accept; *a; ++a) {
+ if (*a == c) {
+ return cur;
+ }
+ }
+ }
+ return NULL;
+}
+static std::string valueToQuotedStringN(const char* value, unsigned length) {
+ if (value == NULL)
+ return "";
+ // Not sure how to handle unicode...
+ if (strnpbrk(value, "\"\\\b\f\n\r\t", length) == NULL &&
+ !containsControlCharacter0(value, length))
+ return std::string("\"") + value + "\"";
+ // We have to walk value and escape any special characters.
+ // Appending to std::string is not efficient, but this should be rare.
+ // (Note: forward slashes are *not* rare, but I am not escaping them.)
+ std::string::size_type maxsize =
+ length * 2 + 3; // allescaped+quotes+NULL
+ std::string result;
+ result.reserve(maxsize); // to avoid lots of mallocs
+ result += "\"";
+ char const* end = value + length;
+ for (const char* c = value; c != end; ++c) {
+ switch (*c) {
+ case '\"':
+ result += "\\\"";
+ break;
+ case '\\':
+ result += "\\\\";
+ break;
+ case '\b':
+ result += "\\b";
+ break;
+ case '\f':
+ result += "\\f";
+ break;
+ case '\n':
+ result += "\\n";
+ break;
+ case '\r':
+ result += "\\r";
+ break;
+ case '\t':
+ result += "\\t";
+ break;
+ // case '/':
+ // Even though \/ is considered a legal escape in JSON, a bare
+ // slash is also legal, so I see no reason to escape it.
+ // (I hope I am not misunderstanding something.)
+ // blep notes: actually escaping \/ may be useful in javascript to avoid
+ // sequence.
+ // Should add a flag to allow this compatibility mode and prevent this
+ // sequence from occurring.
+ default:
+ if ((isControlCharacter(*c)) || (*c == 0)) {
+ std::ostringstream oss;
+ oss << "\\u" << std::hex << std::uppercase << std::setfill('0')
+ << std::setw(4) << static_cast(*c);
+ result += oss.str();
+ } else {
+ result += *c;
+ }
+ break;
+ }
+ }
+ result += "\"";
+ return result;
+}
+
+// Class Writer
+// //////////////////////////////////////////////////////////////////
+Writer::~Writer() {}
+
+// Class FastWriter
+// //////////////////////////////////////////////////////////////////
+
+FastWriter::FastWriter()
+ : yamlCompatiblityEnabled_(false) {}
+
+void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; }
+
+std::string FastWriter::write(const Value& root) {
+ document_ = "";
+ writeValue(root);
+ document_ += "\n";
+ return document_;
+}
+
+void FastWriter::writeValue(const Value& value) {
+ switch (value.type()) {
+ case nullValue:
+ document_ += "null";
+ break;
+ case intValue:
+ document_ += valueToString(value.asLargestInt());
+ break;
+ case uintValue:
+ document_ += valueToString(value.asLargestUInt());
+ break;
+ case realValue:
+ document_ += valueToString(value.asDouble());
+ break;
+ case stringValue:
+ {
+ // Is NULL possible for value.string_?
+ char const* str;
+ char const* end;
+ bool ok = value.getString(&str, &end);
+ if (ok) document_ += valueToQuotedStringN(str, static_cast(end-str));
+ break;
+ }
+ case booleanValue:
+ document_ += valueToString(value.asBool());
+ break;
+ case arrayValue: {
+ document_ += '[';
+ int size = value.size();
+ for (int index = 0; index < size; ++index) {
+ if (index > 0)
+ document_ += ',';
+ writeValue(value[index]);
+ }
+ document_ += ']';
+ } break;
+ case objectValue: {
+ Value::Members members(value.getMemberNames());
+ document_ += '{';
+ for (Value::Members::iterator it = members.begin(); it != members.end();
+ ++it) {
+ const std::string& name = *it;
+ if (it != members.begin())
+ document_ += ',';
+ document_ += valueToQuotedStringN(name.data(), name.length());
+ document_ += yamlCompatiblityEnabled_ ? ": " : ":";
+ writeValue(value[name]);
+ }
+ document_ += '}';
+ } break;
+ }
+}
+
+// Class StyledWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledWriter::StyledWriter()
+ : rightMargin_(74), indentSize_(3), addChildValues_() {}
+
+std::string StyledWriter::write(const Value& root) {
+ document_ = "";
+ addChildValues_ = false;
+ indentString_ = "";
+ writeCommentBeforeValue(root);
+ writeValue(root);
+ writeCommentAfterValueOnSameLine(root);
+ document_ += "\n";
+ return document_;
+}
+
+void StyledWriter::writeValue(const Value& value) {
+ switch (value.type()) {
+ case nullValue:
+ pushValue("null");
+ break;
+ case intValue:
+ pushValue(valueToString(value.asLargestInt()));
+ break;
+ case uintValue:
+ pushValue(valueToString(value.asLargestUInt()));
+ break;
+ case realValue:
+ pushValue(valueToString(value.asDouble()));
+ break;
+ case stringValue:
+ {
+ // Is NULL possible for value.string_?
+ char const* str;
+ char const* end;
+ bool ok = value.getString(&str, &end);
+ if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str)));
+ else pushValue("");
+ break;
+ }
+ case booleanValue:
+ pushValue(valueToString(value.asBool()));
+ break;
+ case arrayValue:
+ writeArrayValue(value);
+ break;
+ case objectValue: {
+ Value::Members members(value.getMemberNames());
+ if (members.empty())
+ pushValue("{}");
+ else {
+ writeWithIndent("{");
+ indent();
+ Value::Members::iterator it = members.begin();
+ for (;;) {
+ const std::string& name = *it;
+ const Value& childValue = value[name];
+ writeCommentBeforeValue(childValue);
+ writeWithIndent(valueToQuotedString(name.c_str()));
+ document_ += " : ";
+ writeValue(childValue);
+ if (++it == members.end()) {
+ writeCommentAfterValueOnSameLine(childValue);
+ break;
+ }
+ document_ += ',';
+ writeCommentAfterValueOnSameLine(childValue);
+ }
+ unindent();
+ writeWithIndent("}");
+ }
+ } break;
+ }
+}
+
+void StyledWriter::writeArrayValue(const Value& value) {
+ unsigned size = value.size();
+ if (size == 0)
+ pushValue("[]");
+ else {
+ bool isArrayMultiLine = isMultineArray(value);
+ if (isArrayMultiLine) {
+ writeWithIndent("[");
+ indent();
+ bool hasChildValue = !childValues_.empty();
+ unsigned index = 0;
+ for (;;) {
+ const Value& childValue = value[index];
+ writeCommentBeforeValue(childValue);
+ if (hasChildValue)
+ writeWithIndent(childValues_[index]);
+ else {
+ writeIndent();
+ writeValue(childValue);
+ }
+ if (++index == size) {
+ writeCommentAfterValueOnSameLine(childValue);
+ break;
+ }
+ document_ += ',';
+ writeCommentAfterValueOnSameLine(childValue);
+ }
+ unindent();
+ writeWithIndent("]");
+ } else // output on a single line
+ {
+ assert(childValues_.size() == size);
+ document_ += "[ ";
+ for (unsigned index = 0; index < size; ++index) {
+ if (index > 0)
+ document_ += ", ";
+ document_ += childValues_[index];
+ }
+ document_ += " ]";
+ }
+ }
+}
+
+bool StyledWriter::isMultineArray(const Value& value) {
+ int size = value.size();
+ bool isMultiLine = size * 3 >= rightMargin_;
+ childValues_.clear();
+ for (int index = 0; index < size && !isMultiLine; ++index) {
+ const Value& childValue = value[index];
+ isMultiLine =
+ isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
+ childValue.size() > 0);
+ }
+ if (!isMultiLine) // check if line length > max line length
+ {
+ childValues_.reserve(size);
+ addChildValues_ = true;
+ int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]'
+ for (int index = 0; index < size; ++index) {
+ if (hasCommentForValue(value[index])) {
+ isMultiLine = true;
+ }
+ writeValue(value[index]);
+ lineLength += int(childValues_[index].length());
+ }
+ addChildValues_ = false;
+ isMultiLine = isMultiLine || lineLength >= rightMargin_;
+ }
+ return isMultiLine;
+}
+
+void StyledWriter::pushValue(const std::string& value) {
+ if (addChildValues_)
+ childValues_.push_back(value);
+ else
+ document_ += value;
+}
+
+void StyledWriter::writeIndent() {
+ if (!document_.empty()) {
+ char last = document_[document_.length() - 1];
+ if (last == ' ') // already indented
+ return;
+ if (last != '\n') // Comments may add new-line
+ document_ += '\n';
+ }
+ document_ += indentString_;
+}
+
+void StyledWriter::writeWithIndent(const std::string& value) {
+ writeIndent();
+ document_ += value;
+}
+
+void StyledWriter::indent() { indentString_ += std::string(indentSize_, ' '); }
+
+void StyledWriter::unindent() {
+ assert(int(indentString_.size()) >= indentSize_);
+ indentString_.resize(indentString_.size() - indentSize_);
+}
+
+void StyledWriter::writeCommentBeforeValue(const Value& root) {
+ if (!root.hasComment(commentBefore))
+ return;
+
+ document_ += "\n";
+ writeIndent();
+ const std::string& comment = root.getComment(commentBefore);
+ std::string::const_iterator iter = comment.begin();
+ while (iter != comment.end()) {
+ document_ += *iter;
+ if (*iter == '\n' &&
+ (iter != comment.end() && *(iter + 1) == '/'))
+ writeIndent();
+ ++iter;
+ }
+
+ // Comments are stripped of trailing newlines, so add one here
+ document_ += "\n";
+}
+
+void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) {
+ if (root.hasComment(commentAfterOnSameLine))
+ document_ += " " + root.getComment(commentAfterOnSameLine);
+
+ if (root.hasComment(commentAfter)) {
+ document_ += "\n";
+ document_ += root.getComment(commentAfter);
+ document_ += "\n";
+ }
+}
+
+bool StyledWriter::hasCommentForValue(const Value& value) {
+ return value.hasComment(commentBefore) ||
+ value.hasComment(commentAfterOnSameLine) ||
+ value.hasComment(commentAfter);
+}
+
+// Class StyledStreamWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledStreamWriter::StyledStreamWriter(std::string indentation)
+ : document_(NULL), rightMargin_(74), indentation_(indentation),
+ addChildValues_() {}
+
+void StyledStreamWriter::write(std::ostream& out, const Value& root) {
+ document_ = &out;
+ addChildValues_ = false;
+ indentString_ = "";
+ indented_ = true;
+ writeCommentBeforeValue(root);
+ if (!indented_) writeIndent();
+ indented_ = true;
+ writeValue(root);
+ writeCommentAfterValueOnSameLine(root);
+ *document_ << "\n";
+ document_ = NULL; // Forget the stream, for safety.
+}
+
+void StyledStreamWriter::writeValue(const Value& value) {
+ switch (value.type()) {
+ case nullValue:
+ pushValue("null");
+ break;
+ case intValue:
+ pushValue(valueToString(value.asLargestInt()));
+ break;
+ case uintValue:
+ pushValue(valueToString(value.asLargestUInt()));
+ break;
+ case realValue:
+ pushValue(valueToString(value.asDouble()));
+ break;
+ case stringValue:
+ {
+ // Is NULL possible for value.string_?
+ char const* str;
+ char const* end;
+ bool ok = value.getString(&str, &end);
+ if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str)));
+ else pushValue("");
+ break;
+ }
+ case booleanValue:
+ pushValue(valueToString(value.asBool()));
+ break;
+ case arrayValue:
+ writeArrayValue(value);
+ break;
+ case objectValue: {
+ Value::Members members(value.getMemberNames());
+ if (members.empty())
+ pushValue("{}");
+ else {
+ writeWithIndent("{");
+ indent();
+ Value::Members::iterator it = members.begin();
+ for (;;) {
+ const std::string& name = *it;
+ const Value& childValue = value[name];
+ writeCommentBeforeValue(childValue);
+ writeWithIndent(valueToQuotedString(name.c_str()));
+ *document_ << " : ";
+ writeValue(childValue);
+ if (++it == members.end()) {
+ writeCommentAfterValueOnSameLine(childValue);
+ break;
+ }
+ *document_ << ",";
+ writeCommentAfterValueOnSameLine(childValue);
+ }
+ unindent();
+ writeWithIndent("}");
+ }
+ } break;
+ }
+}
+
+void StyledStreamWriter::writeArrayValue(const Value& value) {
+ unsigned size = value.size();
+ if (size == 0)
+ pushValue("[]");
+ else {
+ bool isArrayMultiLine = isMultineArray(value);
+ if (isArrayMultiLine) {
+ writeWithIndent("[");
+ indent();
+ bool hasChildValue = !childValues_.empty();
+ unsigned index = 0;
+ for (;;) {
+ const Value& childValue = value[index];
+ writeCommentBeforeValue(childValue);
+ if (hasChildValue)
+ writeWithIndent(childValues_[index]);
+ else {
+ if (!indented_) writeIndent();
+ indented_ = true;
+ writeValue(childValue);
+ indented_ = false;
+ }
+ if (++index == size) {
+ writeCommentAfterValueOnSameLine(childValue);
+ break;
+ }
+ *document_ << ",";
+ writeCommentAfterValueOnSameLine(childValue);
+ }
+ unindent();
+ writeWithIndent("]");
+ } else // output on a single line
+ {
+ assert(childValues_.size() == size);
+ *document_ << "[ ";
+ for (unsigned index = 0; index < size; ++index) {
+ if (index > 0)
+ *document_ << ", ";
+ *document_ << childValues_[index];
+ }
+ *document_ << " ]";
+ }
+ }
+}
+
+bool StyledStreamWriter::isMultineArray(const Value& value) {
+ int size = value.size();
+ bool isMultiLine = size * 3 >= rightMargin_;
+ childValues_.clear();
+ for (int index = 0; index < size && !isMultiLine; ++index) {
+ const Value& childValue = value[index];
+ isMultiLine =
+ isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
+ childValue.size() > 0);
+ }
+ if (!isMultiLine) // check if line length > max line length
+ {
+ childValues_.reserve(size);
+ addChildValues_ = true;
+ int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]'
+ for (int index = 0; index < size; ++index) {
+ if (hasCommentForValue(value[index])) {
+ isMultiLine = true;
+ }
+ writeValue(value[index]);
+ lineLength += int(childValues_[index].length());
+ }
+ addChildValues_ = false;
+ isMultiLine = isMultiLine || lineLength >= rightMargin_;
+ }
+ return isMultiLine;
+}
+
+void StyledStreamWriter::pushValue(const std::string& value) {
+ if (addChildValues_)
+ childValues_.push_back(value);
+ else
+ *document_ << value;
+}
+
+void StyledStreamWriter::writeIndent() {
+ // blep intended this to look at the so-far-written string
+ // to determine whether we are already indented, but
+ // with a stream we cannot do that. So we rely on some saved state.
+ // The caller checks indented_.
+ *document_ << '\n' << indentString_;
+}
+
+void StyledStreamWriter::writeWithIndent(const std::string& value) {
+ if (!indented_) writeIndent();
+ *document_ << value;
+ indented_ = false;
+}
+
+void StyledStreamWriter::indent() { indentString_ += indentation_; }
+
+void StyledStreamWriter::unindent() {
+ assert(indentString_.size() >= indentation_.size());
+ indentString_.resize(indentString_.size() - indentation_.size());
+}
+
+void StyledStreamWriter::writeCommentBeforeValue(const Value& root) {
+ if (!root.hasComment(commentBefore))
+ return;
+
+ if (!indented_) writeIndent();
+ const std::string& comment = root.getComment(commentBefore);
+ std::string::const_iterator iter = comment.begin();
+ while (iter != comment.end()) {
+ *document_ << *iter;
+ if (*iter == '\n' &&
+ (iter != comment.end() && *(iter + 1) == '/'))
+ // writeIndent(); // would include newline
+ *document_ << indentString_;
+ ++iter;
+ }
+ indented_ = false;
+}
+
+void StyledStreamWriter::writeCommentAfterValueOnSameLine(const Value& root) {
+ if (root.hasComment(commentAfterOnSameLine))
+ *document_ << ' ' << root.getComment(commentAfterOnSameLine);
+
+ if (root.hasComment(commentAfter)) {
+ writeIndent();
+ *document_ << root.getComment(commentAfter);
+ }
+ indented_ = false;
+}
+
+bool StyledStreamWriter::hasCommentForValue(const Value& value) {
+ return value.hasComment(commentBefore) ||
+ value.hasComment(commentAfterOnSameLine) ||
+ value.hasComment(commentAfter);
+}
+
+//////////////////////////
+// BuiltStyledStreamWriter
+
+/// Scoped enums are not available until C++11.
+struct CommentStyle {
+ /// Decide whether to write comments.
+ enum Enum {
+ None, ///< Drop all comments.
+ Most, ///< Recover odd behavior of previous versions (not implemented yet).
+ All ///< Keep all comments.
+ };
+};
+
+struct BuiltStyledStreamWriter : public StreamWriter
+{
+ BuiltStyledStreamWriter(
+ std::string const& indentation,
+ CommentStyle::Enum cs,
+ std::string const& colonSymbol,
+ std::string const& nullSymbol,
+ std::string const& endingLineFeedSymbol);
+ virtual int write(Value const& root, std::ostream* sout);
+private:
+ void writeValue(Value const& value);
+ void writeArrayValue(Value const& value);
+ bool isMultineArray(Value const& value);
+ void pushValue(std::string const& value);
+ void writeIndent();
+ void writeWithIndent(std::string const& value);
+ void indent();
+ void unindent();
+ void writeCommentBeforeValue(Value const& root);
+ void writeCommentAfterValueOnSameLine(Value const& root);
+ static bool hasCommentForValue(const Value& value);
+
+ typedef std::vector ChildValues;
+
+ ChildValues childValues_;
+ std::string indentString_;
+ int rightMargin_;
+ std::string indentation_;
+ CommentStyle::Enum cs_;
+ std::string colonSymbol_;
+ std::string nullSymbol_;
+ std::string endingLineFeedSymbol_;
+ bool addChildValues_ : 1;
+ bool indented_ : 1;
+};
+BuiltStyledStreamWriter::BuiltStyledStreamWriter(
+ std::string const& indentation,
+ CommentStyle::Enum cs,
+ std::string const& colonSymbol,
+ std::string const& nullSymbol,
+ std::string const& endingLineFeedSymbol)
+ : rightMargin_(74)
+ , indentation_(indentation)
+ , cs_(cs)
+ , colonSymbol_(colonSymbol)
+ , nullSymbol_(nullSymbol)
+ , endingLineFeedSymbol_(endingLineFeedSymbol)
+ , addChildValues_(false)
+ , indented_(false)
+{
+}
+int BuiltStyledStreamWriter::write(Value const& root, std::ostream* sout)
+{
+ sout_ = sout;
+ addChildValues_ = false;
+ indented_ = true;
+ indentString_ = "";
+ writeCommentBeforeValue(root);
+ if (!indented_) writeIndent();
+ indented_ = true;
+ writeValue(root);
+ writeCommentAfterValueOnSameLine(root);
+ *sout_ << endingLineFeedSymbol_;
+ sout_ = NULL;
+ return 0;
+}
+void BuiltStyledStreamWriter::writeValue(Value const& value) {
+ switch (value.type()) {
+ case nullValue:
+ pushValue(nullSymbol_);
+ break;
+ case intValue:
+ pushValue(valueToString(value.asLargestInt()));
+ break;
+ case uintValue:
+ pushValue(valueToString(value.asLargestUInt()));
+ break;
+ case realValue:
+ pushValue(valueToString(value.asDouble()));
+ break;
+ case stringValue:
+ {
+ // Is NULL is possible for value.string_?
+ char const* str;
+ char const* end;
+ bool ok = value.getString(&str, &end);
+ if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str)));
+ else pushValue("");
+ break;
+ }
+ case booleanValue:
+ pushValue(valueToString(value.asBool()));
+ break;
+ case arrayValue:
+ writeArrayValue(value);
+ break;
+ case objectValue: {
+ Value::Members members(value.getMemberNames());
+ if (members.empty())
+ pushValue("{}");
+ else {
+ writeWithIndent("{");
+ indent();
+ Value::Members::iterator it = members.begin();
+ for (;;) {
+ std::string const& name = *it;
+ Value const& childValue = value[name];
+ writeCommentBeforeValue(childValue);
+ writeWithIndent(valueToQuotedStringN(name.data(), name.length()));
+ *sout_ << colonSymbol_;
+ writeValue(childValue);
+ if (++it == members.end()) {
+ writeCommentAfterValueOnSameLine(childValue);
+ break;
+ }
+ *sout_ << ",";
+ writeCommentAfterValueOnSameLine(childValue);
+ }
+ unindent();
+ writeWithIndent("}");
+ }
+ } break;
+ }
+}
+
+void BuiltStyledStreamWriter::writeArrayValue(Value const& value) {
+ unsigned size = value.size();
+ if (size == 0)
+ pushValue("[]");
+ else {
+ bool isMultiLine = (cs_ == CommentStyle::All) || isMultineArray(value);
+ if (isMultiLine) {
+ writeWithIndent("[");
+ indent();
+ bool hasChildValue = !childValues_.empty();
+ unsigned index = 0;
+ for (;;) {
+ Value const& childValue = value[index];
+ writeCommentBeforeValue(childValue);
+ if (hasChildValue)
+ writeWithIndent(childValues_[index]);
+ else {
+ if (!indented_) writeIndent();
+ indented_ = true;
+ writeValue(childValue);
+ indented_ = false;
+ }
+ if (++index == size) {
+ writeCommentAfterValueOnSameLine(childValue);
+ break;
+ }
+ *sout_ << ",";
+ writeCommentAfterValueOnSameLine(childValue);
+ }
+ unindent();
+ writeWithIndent("]");
+ } else // output on a single line
+ {
+ assert(childValues_.size() == size);
+ *sout_ << "[";
+ if (!indentation_.empty()) *sout_ << " ";
+ for (unsigned index = 0; index < size; ++index) {
+ if (index > 0)
+ *sout_ << ", ";
+ *sout_ << childValues_[index];
+ }
+ if (!indentation_.empty()) *sout_ << " ";
+ *sout_ << "]";
+ }
+ }
+}
+
+bool BuiltStyledStreamWriter::isMultineArray(Value const& value) {
+ int size = value.size();
+ bool isMultiLine = size * 3 >= rightMargin_;
+ childValues_.clear();
+ for (int index = 0; index < size && !isMultiLine; ++index) {
+ Value const& childValue = value[index];
+ isMultiLine =
+ isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
+ childValue.size() > 0);
+ }
+ if (!isMultiLine) // check if line length > max line length
+ {
+ childValues_.reserve(size);
+ addChildValues_ = true;
+ int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]'
+ for (int index = 0; index < size; ++index) {
+ if (hasCommentForValue(value[index])) {
+ isMultiLine = true;
+ }
+ writeValue(value[index]);
+ lineLength += int(childValues_[index].length());
+ }
+ addChildValues_ = false;
+ isMultiLine = isMultiLine || lineLength >= rightMargin_;
+ }
+ return isMultiLine;
+}
+
+void BuiltStyledStreamWriter::pushValue(std::string const& value) {
+ if (addChildValues_)
+ childValues_.push_back(value);
+ else
+ *sout_ << value;
+}
+
+void BuiltStyledStreamWriter::writeIndent() {
+ // blep intended this to look at the so-far-written string
+ // to determine whether we are already indented, but
+ // with a stream we cannot do that. So we rely on some saved state.
+ // The caller checks indented_.
+
+ if (!indentation_.empty()) {
+ // In this case, drop newlines too.
+ *sout_ << '\n' << indentString_;
+ }
+}
+
+void BuiltStyledStreamWriter::writeWithIndent(std::string const& value) {
+ if (!indented_) writeIndent();
+ *sout_ << value;
+ indented_ = false;
+}
+
+void BuiltStyledStreamWriter::indent() { indentString_ += indentation_; }
+
+void BuiltStyledStreamWriter::unindent() {
+ assert(indentString_.size() >= indentation_.size());
+ indentString_.resize(indentString_.size() - indentation_.size());
+}
+
+void BuiltStyledStreamWriter::writeCommentBeforeValue(Value const& root) {
+ if (cs_ == CommentStyle::None) return;
+ if (!root.hasComment(commentBefore))
+ return;
+
+ if (!indented_) writeIndent();
+ const std::string& comment = root.getComment(commentBefore);
+ std::string::const_iterator iter = comment.begin();
+ while (iter != comment.end()) {
+ *sout_ << *iter;
+ if (*iter == '\n' &&
+ (iter != comment.end() && *(iter + 1) == '/'))
+ // writeIndent(); // would write extra newline
+ *sout_ << indentString_;
+ ++iter;
+ }
+ indented_ = false;
+}
+
+void BuiltStyledStreamWriter::writeCommentAfterValueOnSameLine(Value const& root) {
+ if (cs_ == CommentStyle::None) return;
+ if (root.hasComment(commentAfterOnSameLine))
+ *sout_ << " " + root.getComment(commentAfterOnSameLine);
+
+ if (root.hasComment(commentAfter)) {
+ writeIndent();
+ *sout_ << root.getComment(commentAfter);
+ }
+}
+
+// static
+bool BuiltStyledStreamWriter::hasCommentForValue(const Value& value) {
+ return value.hasComment(commentBefore) ||
+ value.hasComment(commentAfterOnSameLine) ||
+ value.hasComment(commentAfter);
+}
+
+///////////////
+// StreamWriter
+
+StreamWriter::StreamWriter()
+ : sout_(NULL)
+{
+}
+StreamWriter::~StreamWriter()
+{
+}
+StreamWriter::Factory::~Factory()
+{}
+StreamWriterBuilder::StreamWriterBuilder()
+{
+ setDefaults(&settings_);
+}
+StreamWriterBuilder::~StreamWriterBuilder()
+{}
+StreamWriter* StreamWriterBuilder::newStreamWriter() const
+{
+ std::string indentation = settings_["indentation"].asString();
+ std::string cs_str = settings_["commentStyle"].asString();
+ bool eyc = settings_["enableYAMLCompatibility"].asBool();
+ bool dnp = settings_["dropNullPlaceholders"].asBool();
+ CommentStyle::Enum cs = CommentStyle::All;
+ if (cs_str == "All") {
+ cs = CommentStyle::All;
+ } else if (cs_str == "None") {
+ cs = CommentStyle::None;
+ } else {
+ throwRuntimeError("commentStyle must be 'All' or 'None'");
+ }
+ std::string colonSymbol = " : ";
+ if (eyc) {
+ colonSymbol = ": ";
+ } else if (indentation.empty()) {
+ colonSymbol = ":";
+ }
+ std::string nullSymbol = "null";
+ if (dnp) {
+ nullSymbol = "";
+ }
+ std::string endingLineFeedSymbol = "";
+ return new BuiltStyledStreamWriter(
+ indentation, cs,
+ colonSymbol, nullSymbol, endingLineFeedSymbol);
+}
+static void getValidWriterKeys(std::set* valid_keys)
+{
+ valid_keys->clear();
+ valid_keys->insert("indentation");
+ valid_keys->insert("commentStyle");
+ valid_keys->insert("enableYAMLCompatibility");
+ valid_keys->insert("dropNullPlaceholders");
+}
+bool StreamWriterBuilder::validate(Json::Value* invalid) const
+{
+ Json::Value my_invalid;
+ if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL
+ Json::Value& inv = *invalid;
+ std::set valid_keys;
+ getValidWriterKeys(&valid_keys);
+ Value::Members keys = settings_.getMemberNames();
+ size_t n = keys.size();
+ for (size_t i = 0; i < n; ++i) {
+ std::string const& key = keys[i];
+ if (valid_keys.find(key) == valid_keys.end()) {
+ inv[key] = settings_[key];
+ }
+ }
+ return 0u == inv.size();
+}
+Value& StreamWriterBuilder::operator[](std::string key)
+{
+ return settings_[key];
+}
+// static
+void StreamWriterBuilder::setDefaults(Json::Value* settings)
+{
+ //! [StreamWriterBuilderDefaults]
+ (*settings)["commentStyle"] = "All";
+ (*settings)["indentation"] = "\t";
+ (*settings)["enableYAMLCompatibility"] = false;
+ (*settings)["dropNullPlaceholders"] = false;
+ //! [StreamWriterBuilderDefaults]
+}
+
+std::string writeString(StreamWriter::Factory const& builder, Value const& root) {
+ std::ostringstream sout;
+ StreamWriterPtr const writer(builder.newStreamWriter());
+ writer->write(root, &sout);
+ return sout.str();
+}
+
+std::ostream& operator<<(std::ostream& sout, Value const& root) {
+ StreamWriterBuilder builder;
+ StreamWriterPtr const writer(builder.newStreamWriter());
+ writer->write(root, &sout);
+ return sout;
+}
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_writer.cpp
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
diff --git a/lib/libcoolstream/playback_cs.h b/lib/libcoolstream/playback_cs.h
index 21f440efd..399ef152a 100644
--- a/lib/libcoolstream/playback_cs.h
+++ b/lib/libcoolstream/playback_cs.h
@@ -71,6 +71,7 @@ public:
void RequestAbort();
void GetTitles(std::vector &playlists, std::vector &titles, int ¤t);
void SetTitle(int title);
+ uint64_t GetReadCount(void);
};
#endif // __PLAYBACK_CS_H_
diff --git a/lib/libcoolstream2/playback_cs.h b/lib/libcoolstream2/playback_cs.h
index df92cf58b..e89fc576c 100644
--- a/lib/libcoolstream2/playback_cs.h
+++ b/lib/libcoolstream2/playback_cs.h
@@ -72,6 +72,7 @@ public:
void RequestAbort();
void GetTitles(std::vector &playlists, std::vector &titles, int ¤t);
void SetTitle(int title);
+ uint64_t GetReadCount(void);
};
#endif // __PLAYBACK_CS_H_
diff --git a/lib/libdvbsub/dvbsub.cpp b/lib/libdvbsub/dvbsub.cpp
index dfcf285c8..79f0d5763 100644
--- a/lib/libdvbsub/dvbsub.cpp
+++ b/lib/libdvbsub/dvbsub.cpp
@@ -1,6 +1,3 @@
-// Workaround for C++
-#define __STDC_CONSTANT_MACROS
-
#include
#include
#include
diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp
index 279145eec..7cbfb0caa 100644
--- a/lib/libdvbsub/dvbsubtitle.cpp
+++ b/lib/libdvbsub/dvbsubtitle.cpp
@@ -25,6 +25,12 @@ extern "C" {
#include
#include "Debug.hpp"
+#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57, 1, 99)
+ #define CODEC_DVB_SUB CODEC_ID_DVB_SUBTITLE
+#else
+ #define CODEC_DVB_SUB AV_CODEC_ID_DVB_SUBTITLE
+#endif
+
// Set these to 'true' for debug output:
static bool DebugConverter = false;
@@ -204,7 +210,7 @@ cDvbSubtitleConverter::cDvbSubtitleConverter(void)
avcodec = NULL;
avcodec_register_all();
- avcodec = avcodec_find_decoder(CODEC_ID_DVB_SUBTITLE);
+ avcodec = avcodec_find_decoder(CODEC_DVB_SUB);//CODEC_ID_DVB_SUBTITLE or AV_CODEC_ID_DVB_SUBTITLE from 57.1.100
if (!avcodec) {
dbgconverter("cDvbSubtitleConverter: unable to get dvb subtitle codec!\n");
return;
diff --git a/lib/libdvbsub/dvbsubtitle.h b/lib/libdvbsub/dvbsubtitle.h
index d7d90e087..647852c5d 100644
--- a/lib/libdvbsub/dvbsubtitle.h
+++ b/lib/libdvbsub/dvbsubtitle.h
@@ -12,9 +12,6 @@
#ifndef __DVBSUBTITLE_H
#define __DVBSUBTITLE_H
-// Workaround for C++
-#define __STDC_CONSTANT_MACROS
-
extern "C" {
#include
#include
diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp
index dee4db6ab..459d386d0 100644
--- a/lib/libtuxtxt/tuxtxt.cpp
+++ b/lib/libtuxtxt/tuxtxt.cpp
@@ -3264,7 +3264,8 @@ void ConfigMenu(int Init)
for (i1=hotindex; i1 maxhotlist)
@@ -4826,7 +4827,8 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset)
for (Pitch = 0; Pitch < sbit->pitch; Pitch++)
{
if (sbit_diacrit->pitch > Pitch && sbit_diacrit->height > Row)
- sbitbuffer[Row*sbit->pitch+Pitch] |= sbit_diacrit->buffer[Row*sbit->pitch+Pitch];
+ if((sbit_diacrit->pitch*sbit_diacrit->height) > (Row*sbit->pitch+Pitch))
+ sbitbuffer[Row*sbit->pitch+Pitch] |= sbit_diacrit->buffer[Row*sbit->pitch+Pitch];
}
}
}
diff --git a/lib/libupnpclient/Makefile.am b/lib/libupnpclient/Makefile.am
index 737921751..45ca76f67 100644
--- a/lib/libupnpclient/Makefile.am
+++ b/lib/libupnpclient/Makefile.am
@@ -3,6 +3,8 @@ noinst_LIBRARIES = libtuxbox-upnpclient.a
AM_CPPFLAGS = -fno-rtti
AM_CPPFLAGS += \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
-I$(top_srcdir)/lib/xmltree
libtuxbox_upnpclient_a_SOURCES = UPNPSocket.cpp UPNPDevice.cpp UPNPService.cpp
diff --git a/lib/libupnpclient/UPNPDevice.cpp b/lib/libupnpclient/UPNPDevice.cpp
index f5b9e85f5..aa79534c2 100644
--- a/lib/libupnpclient/UPNPDevice.cpp
+++ b/lib/libupnpclient/UPNPDevice.cpp
@@ -18,12 +18,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
***********************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include
+#endif
#include
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -133,7 +136,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
std::string result, head, body, charset, urlbase;
std::string curl, eurl, name, mimetype, iurl, rcode;
std::string::size_type pos;
- XMLTreeNode *root, *device, *service, *node, *snode, *icon;
+ xmlNodePtr root, device, service, node, snode, icon;
int width = 0;
int height = 0;
int depth = 0;
@@ -165,76 +168,79 @@ CUPnPDevice::CUPnPDevice(std::string url)
if (rcode != "200")
throw std::runtime_error(std::string("description url returned ") + rcode);
- XMLTreeParser parser(charset.c_str());
- parser.Parse(body.c_str(), body.size(), 1);
- root = parser.RootNode();
+
+ xmlDocPtr parser = parseXml(body.c_str(),charset.c_str());
+ if(!parser)
+ throw std::runtime_error(std::string("XML: parser error"));
+
+ root = xmlDocGetRootElement(parser);
if (!root)
throw std::runtime_error(std::string("XML: no root node"));
- if (strcmp(root->GetType(),"root"))
+ if (strcmp(xmlGetName(root),"root"))
throw std::runtime_error(std::string("XML: no root"));
- for (node = root->GetChild(); node; node=node->GetNext())
+ for (node = xmlChildrenNode(root); node; node=xmlNextNode(node))
{
- if (!strcmp(node->GetType(),"URLBase"))
+ if (!strcmp(xmlGetName(node),"URLBase"))
{
- urlbase = std::string(node->GetData());
+ urlbase = std::string(xmlGetData(node));
if ((!urlbase.empty() ) && (urlbase[urlbase.length()-1] == '/'))
urlbase.erase(urlbase.length()-1);
}
}
- node = root->GetChild();
+ node = xmlChildrenNode(root);
if (!node)
throw std::runtime_error(std::string("XML: no root child"));
- while (strcmp(node->GetType(),"device"))
+ while (strcmp(xmlGetName(node),"device"))
{
- node = node->GetNext();
+ node = xmlNextNode(node);
if (!node)
throw std::runtime_error(std::string("XML: no device"));
}
device = node;
- for (node=device->GetChild(); node; node=node->GetNext())
+ for (node=xmlChildrenNode(device); node; node=xmlNextNode(node))
{
- if (!strcmp(node->GetType(),"deviceType"))
- devicetype = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"deviceType"))
+ devicetype = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"friendlyName"))
- friendlyname = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"friendlyName"))
+ friendlyname = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"manufacturer"))
- manufacturer = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"manufacturer"))
+ manufacturer = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"manufacturerURL"))
- manufacturerurl = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"manufacturerURL"))
+ manufacturerurl = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"modelDescription"))
- modeldescription = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"modelDescription"))
+ modeldescription = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"modelName"))
- modelname = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"modelName"))
+ modelname = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"modelNumber"))
- modelnumber = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"modelNumber"))
+ modelnumber = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"modelURL"))
- modelurl = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"modelURL"))
+ modelurl = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"serialNumber"))
- serialnumber = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"serialNumber"))
+ serialnumber = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"UDN"))
- udn = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"UDN"))
+ udn = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"UPC"))
- upc = std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"UPC"))
+ upc = std::string(xmlGetData(node)?xmlGetData(node):"");
- if (!strcmp(node->GetType(),"iconList"))
+ if (!strcmp(xmlGetName(node),"iconList"))
{
- for (icon=node->GetChild(); icon; icon=icon->GetNext())
+ for (icon=xmlChildrenNode(node); icon; icon=xmlNextNode(icon))
{
bool foundm = false;
bool foundw = false;
@@ -242,33 +248,33 @@ CUPnPDevice::CUPnPDevice(std::string url)
bool foundd = false;
bool foundu = false;
- if (strcmp(icon->GetType(),"icon"))
+ if (strcmp(xmlGetName(icon),"icon"))
throw std::runtime_error(std::string("XML: no icon"));
- for (snode=icon->GetChild(); snode; snode=snode->GetNext())
+ for (snode=xmlChildrenNode(icon); snode; snode=xmlNextNode(snode))
{
- if (!strcmp(snode->GetType(),"mimetype"))
+ if (!strcmp(xmlGetName(snode),"mimetype"))
{
- mimetype=std::string(snode->GetData()?snode->GetData():"");
+ mimetype=std::string(xmlGetData(snode)?xmlGetData(snode):"");
foundm = true;
}
- if (!strcmp(snode->GetType(),"width"))
+ if (!strcmp(xmlGetName(snode),"width"))
{
- width=snode->GetData()?atoi(snode->GetData()):0;
+ width=xmlGetData(snode)?atoi(xmlGetData(snode)):0;
foundw = true;
}
- if (!strcmp(snode->GetType(),"height"))
+ if (!strcmp(xmlGetName(snode),"height"))
{
- height=snode->GetData()?atoi(snode->GetData()):0;
+ height=xmlGetData(snode)?atoi(xmlGetData(snode)):0;
foundh = true;
}
- if (!strcmp(snode->GetType(),"depth"))
+ if (!strcmp(xmlGetName(snode),"depth"))
{
- depth=snode->GetData()?atoi(snode->GetData()):0;
+ depth=xmlGetData(snode)?atoi(xmlGetData(snode)):0;
foundd = true;
}
- if (!strcmp(snode->GetType(),"url"))
+ if (!strcmp(xmlGetName(snode),"url"))
{
- url=std::string(snode->GetData()?snode->GetData():"");
+ url=std::string(xmlGetData(snode)?xmlGetData(snode):"");
foundu = true;
}
}
@@ -286,28 +292,27 @@ CUPnPDevice::CUPnPDevice(std::string url)
icons.push_back(e);
}
}
- if (!strcmp(node->GetType(),"serviceList"))
+ if (!strcmp(xmlGetName(node),"serviceList"))
{
servicefound = true;
- for (service=node->GetChild(); service; service=service->GetNext())
+ for (service=xmlChildrenNode(node); service; service=xmlNextNode(service))
{
bool foundc = false;
bool founde = false;
bool foundn = false;
- if (strcmp(service->GetType(),"service"))
+ if (strcmp(xmlGetName(service),"service"))
throw std::runtime_error(std::string("XML: no service"));
- for (snode=service->GetChild(); snode; snode=snode->GetNext())
+ for (snode=xmlChildrenNode(service); snode; snode=xmlNextNode(snode))
{
- if (!strcmp(snode->GetType(),"serviceType"))
+ if (!strcmp(xmlGetName(snode),"serviceType"))
{
- name=std::string(snode->GetData()?snode->GetData():"");
+ name=std::string(xmlGetData(snode)?xmlGetData(snode):"");
foundn = true;
}
- if (!strcmp(snode->GetType(),"eventSubURL"))
+ if (!strcmp(xmlGetName(snode),"eventSubURL"))
{
- char *p;
- p = snode->GetData();
+ const char *p = xmlGetData(snode);
if (!p)
eurl=urlbase + "/";
else if (p[0]=='/')
@@ -316,10 +321,9 @@ CUPnPDevice::CUPnPDevice(std::string url)
eurl=urlbase + "/" + std::string(p);
founde = true;
}
- if (!strcmp(snode->GetType(),"controlURL"))
+ if (!strcmp(xmlGetName(snode),"controlURL"))
{
- char *p;
- p = snode->GetData();
+ const char *p = xmlGetData(snode);
if (!p)
curl=urlbase + "/";
else if (p[0]=='/')
@@ -348,6 +352,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
}
if (!servicefound)
throw std::runtime_error(std::string("XML: no service list"));
+ xmlFreeDoc(parser);
}
CUPnPDevice::~CUPnPDevice()
diff --git a/lib/libupnpclient/UPNPService.cpp b/lib/libupnpclient/UPNPService.cpp
index 32c15aaf3..349b19912 100644
--- a/lib/libupnpclient/UPNPService.cpp
+++ b/lib/libupnpclient/UPNPService.cpp
@@ -18,12 +18,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
***********************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include
+#endif
#include
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -52,7 +55,7 @@ std::list CUPnPService::SendSOAP(std::string action, std::list::iterator i;
std::list results;
- XMLTreeNode *root, *node, *snode;
+ xmlNodePtr root, node, snode;
std::string::size_type pos;
post << "\r\n"
@@ -95,13 +98,15 @@ std::list CUPnPService::SendSOAP(std::string action, std::listcheck_response(head, charset, rcode))
throw std::runtime_error(std::string("protocol error"));
- XMLTreeParser parser(charset.c_str());
- parser.Parse(body.c_str(), body.size(), 1);
- root = parser.RootNode();
+ xmlDocPtr parser = parseXml(body.c_str(),charset.c_str());
+ if(!parser)
+ throw std::runtime_error(std::string("XML: parser error"));
+
+ root = xmlDocGetRootElement(parser);
if (!root)
throw std::runtime_error(std::string("XML: no root node"));
- envelope=std::string(root->GetType());
+ envelope=std::string(xmlGetName(root));
pos = envelope.find(":");
if (pos !=std::string::npos)
envelope.erase(0,pos+1);
@@ -109,11 +114,11 @@ std::list CUPnPService::SendSOAP(std::string action, std::listGetChild();
+ node = xmlChildrenNode(root);
if (!node)
throw std::runtime_error(std::string("XML: no envelope child"));
- soapbody=std::string(node->GetType());
+ soapbody=std::string(xmlGetName(node));
pos = soapbody.find(":");
if (pos !=std::string::npos)
soapbody.erase(0,pos+1);
@@ -121,11 +126,11 @@ std::list CUPnPService::SendSOAP(std::string action, std::listGetChild();
+ node = xmlChildrenNode(node);
if (!node)
throw std::runtime_error(std::string("XML: no soap body child"));
- soapresponse=std::string(node->GetType());
+ soapresponse=std::string(xmlGetName(node));
pos = soapresponse.find(":");
if (pos !=std::string::npos)
soapresponse.erase(0,pos+1);
@@ -135,27 +140,27 @@ std::list CUPnPService::SendSOAP(std::string action, std::listGetChild(); node; node=node->GetNext())
+ for (node=xmlChildrenNode(node); node; node=xmlNextNode(node))
{
- if (!strcmp(node->GetType(),"detail"))
+ if (!strcmp(xmlGetName(node),"detail"))
{
- snode=node->GetChild();
+ snode=xmlChildrenNode(node);
if (snode)
- for (snode=snode->GetChild(); snode; snode=snode->GetNext())
+ for (snode=xmlChildrenNode(snode); snode; snode=xmlNextNode(snode))
{
- errstr=snode->GetType();
+ errstr=xmlGetName(snode);
pos = errstr.find(":");
if (pos !=std::string::npos)
errstr.erase(0,pos+1);
if (errstr=="errorCode")
- upnpcode=std::string(snode->GetData()?snode->GetData():"");
+ upnpcode=std::string(xmlGetData(snode)?xmlGetData(snode):"");
if (errstr=="errorDescription")
- upnpdesc=std::string(snode->GetData()?snode->GetData():"");
+ upnpdesc=std::string(xmlGetData(snode)?xmlGetData(snode):"");
}
}
- if (!strcmp(node->GetType(),"faultstring"))
- faultstring=std::string(node->GetData()?node->GetData():"");
+ if (!strcmp(xmlGetName(node),"faultstring"))
+ faultstring=std::string(xmlGetData(node)?xmlGetData(node):"");
}
if (!faultstring.empty())
throw std::runtime_error(faultstring + " " + upnpcode + " " + upnpdesc);
@@ -165,8 +170,9 @@ std::list CUPnPService::SendSOAP(std::string action, std::listGetChild(); node; node=node->GetNext())
- results.push_back(UPnPAttribute(node->GetType(), node->GetData()));
+ for (node=xmlChildrenNode(node); node; node=xmlNextNode(node))
+ results.push_back(UPnPAttribute(xmlGetName(node), xmlGetData(node)));
+ xmlFreeDoc(parser);
return results;
}
diff --git a/lib/libupnpclient/UPNPSocket.cpp b/lib/libupnpclient/UPNPSocket.cpp
index fcc55d43a..7f73010dc 100644
--- a/lib/libupnpclient/UPNPSocket.cpp
+++ b/lib/libupnpclient/UPNPSocket.cpp
@@ -23,7 +23,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/lib/xmltree/Makefile.am b/lib/xmltree/Makefile.am
index b02b21b15..0ec3e74e1 100644
--- a/lib/xmltree/Makefile.am
+++ b/lib/xmltree/Makefile.am
@@ -1,11 +1,18 @@
AM_CPPFLAGS = \
-I$(top_builddir) \
- -I$(top_srcdir) \
- -I$(srcdir)/xmltok
+ -I$(top_srcdir)
+
+if USE_PUGIXML
+else
+AM_CPPFLAGS += -I$(srcdir)/xmltok
+endif
AM_CXXFLAGS = -fno-rtti -fno-exceptions
noinst_LIBRARIES = libtuxbox-xmltree.a
-libtuxbox_xmltree_a_SOURCES = \
- hashtab.c xmlparse.cpp xmlrole.c xmltok.c xmltree.cpp xmlinterface.cpp
+libtuxbox_xmltree_a_SOURCES = xmlinterface.cpp
+if USE_PUGIXML
+else
+libtuxbox_xmltree_a_SOURCES += hashtab.c xmlparse.cpp xmlrole.c xmltok.c xmltree.cpp
+endif
diff --git a/lib/xmltree/xmlinterface.cpp b/lib/xmltree/xmlinterface.cpp
index e8d9792bc..692905c89 100644
--- a/lib/xmltree/xmlinterface.cpp
+++ b/lib/xmltree/xmlinterface.cpp
@@ -47,7 +47,7 @@
unsigned long xmlGetNumericAttribute(const xmlNodePtr node, const char *name, const int base)
{
- char *ptr = xmlGetAttribute(node, name);
+ const char *ptr = xmlGetAttribute(node, name);
if (!ptr)
return 0;
@@ -57,7 +57,7 @@ unsigned long xmlGetNumericAttribute(const xmlNodePtr node, const char *name, co
long xmlGetSignedNumericAttribute(const xmlNodePtr node, const char *name, const int base)
{
- char *ptr = xmlGetAttribute(node, name);
+ const char *ptr = xmlGetAttribute(node, name);
if (!ptr)
return 0;
@@ -68,17 +68,46 @@ long xmlGetSignedNumericAttribute(const xmlNodePtr node, const char *name, const
xmlNodePtr xmlGetNextOccurence(xmlNodePtr cur, const char * s)
{
while ((cur != NULL) && (strcmp(xmlGetName(cur), s) != 0))
- cur = cur->xmlNextNode;
+ cur = xmlNextNode(cur);
return cur;
}
+#if USE_PUGIXML
+std::string to_utf8(unsigned int cp)
+{
+ std::string result;
+ int count;
+ if (cp < 0x0080)
+ count = 1;
+ else if (cp < 0x0800)
+ count = 2;
+ else if (cp < 0x10000)
+ count = 3;
+ else if (cp <= 0x10FFFF)
+ count = 4;
+ else
+ return result;
+ result.resize(count);
+ for (int i = count-1; i > 0; --i)
+ {
+ result[i] = (char) (0x80 | (cp & 0x3F));
+ cp >>= 6;
+ }
+ for (int i = 0; i < count; ++i)
+ cp |= (1 << (7-i));
+ result[0] = (char) cp;
+ return result;
+}
+#endif
std::string Unicode_Character_to_UTF8(const int character)
{
#ifdef USE_LIBXML
xmlChar buf[5];
int length = xmlCopyChar(4, buf, character);
return std::string((char*)buf, length);
+#elif (defined( USE_PUGIXML ) )
+ return to_utf8(character);
#else /* USE_LIBXML */
char buf[XML_UTF8_ENCODE_MAX];
int length = XmlUtf8Encode(character, buf);
@@ -124,7 +153,7 @@ std::string convert_UTF8_To_UTF8_XML(const char* s)
}
#ifdef USE_LIBXML
-xmlDocPtr parseXml(const char * data)
+xmlDocPtr parseXml(const char * data,char *)
{
xmlDocPtr doc;
xmlNodePtr cur;
@@ -150,7 +179,7 @@ xmlDocPtr parseXml(const char * data)
}
}
-xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* = true */)
+xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* = true */,char *)
{
xmlDocPtr doc;
xmlNodePtr cur;
@@ -175,12 +204,70 @@ xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* =
return doc;
}
}
+
+#elif (defined( USE_PUGIXML ) )
+
+#include
+
+xmlDocPtr parseXml(const char * data,const char* /*encoding*/)
+{
+ pugi::xml_document* tree_parser = new pugi::xml_document();
+ if (!tree_parser->load_string(data))
+ {
+ delete tree_parser;
+ return NULL;
+ }
+
+ if (!tree_parser->root())
+ {
+ printf("Error: No Root Node\n");
+ delete tree_parser;
+ return NULL;
+ }
+ return tree_parser;
+}
+
+xmlDocPtr parseXmlFile(const char * filename, bool,const char* encoding)
+{
+ pugi::xml_encoding enc = pugi::encoding_auto;
+ if(encoding==NULL){
+ std::ifstream in;
+ in.open(filename);
+ if (in.is_open()) {
+ std::string line;
+ getline(in, line);
+ for (std::string::iterator it = line.begin(); it != line.end(); ++ it)
+ *it = toupper(*it);
+ if (line.find("ISO-8859-1",0)!= std::string::npos){
+ enc = pugi::encoding_latin1;
+ }
+ in.close();
+ }
+ }
+
+ pugi::xml_document* tree_parser = new pugi::xml_document();
+
+ if (!tree_parser->load_file(filename, pugi::parse_default, enc))
+ {
+ delete tree_parser;
+ return NULL;
+ }
+
+ if (!tree_parser->root())
+ {
+ printf("Error: No Root Node\n");
+ delete tree_parser;
+ return NULL;
+ }
+ return tree_parser;
+}
+
#else /* USE_LIBXML */
-xmlDocPtr parseXml(const char * data)
+xmlDocPtr parseXml(const char * data,const char *encoding)
{
XMLTreeParser* tree_parser;
- tree_parser = new XMLTreeParser(NULL);
+ tree_parser = new XMLTreeParser(encoding);
if (!tree_parser->Parse(data, strlen(data), true))
{
@@ -201,7 +288,7 @@ xmlDocPtr parseXml(const char * data)
return tree_parser;
}
-xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* = true */)
+xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* = true */,const char *encoding)
{
char buffer[2048];
XMLTreeParser* tree_parser;
@@ -218,7 +305,7 @@ xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* =
return NULL;
}
- tree_parser = new XMLTreeParser(NULL);
+ tree_parser = new XMLTreeParser(encoding);
do
{
diff --git a/lib/xmltree/xmlinterface.h b/lib/xmltree/xmlinterface.h
index 97d7b8325..b783c97ea 100644
--- a/lib/xmltree/xmlinterface.h
+++ b/lib/xmltree/xmlinterface.h
@@ -41,20 +41,44 @@
#ifdef USE_LIBXML
#include
#define xmlNextNode next
-inline char* xmlGetAttribute (xmlNodePtr cur, const char * s) { return (char *)xmlGetProp(cur, (const xmlChar *)s); };
-inline char* xmlGetName (xmlNodePtr cur) { return (char *)(cur->name); };
+inline const char* xmlGetAttribute (xmlNodePtr cur, const char * s) { return (const char *)xmlGetProp(cur, (const xmlChar *)s); };
+inline const char* xmlGetName (xmlNodePtr cur) { return (const char *)(cur->name); };
+/* ------------------------------------------------ USE_PUGIXML ------------------------------------------------*/
+#elif (defined( USE_PUGIXML ) )
+#include
+typedef pugi::xml_document *xmlDocPtr;
+typedef pugi::xml_node xmlNodePtr;
+inline void xmlFreeDoc (xmlDocPtr doc) { delete doc; }
+inline const char* xmlGetName (const xmlNodePtr cur) { return cur.name(); }
+inline xmlNodePtr xmlNextNode (xmlNodePtr cur) { return cur.next_sibling(); }
+inline xmlNodePtr xmlChildrenNode (xmlNodePtr cur) { return cur.first_child(); }
+inline const char* xmlGetData (xmlNodePtr cur) { return cur.child_value(); }
+inline const char* xmlGetAttribute (const xmlNodePtr cur, const char *s)
+{
+ if(cur.attribute(s))
+ return cur.attribute(s).value();
+ else
+ return NULL;
+}
+
+inline xmlNodePtr xmlDocGetRootElement(xmlDocPtr doc)
+{
+ xmlNodePtr firstNode = doc->root().first_child();
+ return firstNode;
+}
+/* ------------------------------------------------ END of USE_PUGIXML ------------------------------------------------*/
#else /* use libxmltree */
#include "xmltree.h"
typedef XMLTreeParser* xmlDocPtr;
typedef XMLTreeNode* xmlNodePtr;
-#define xmlChildrenNode GetChild()
-#define xmlNextNode GetNext()
-inline xmlNodePtr xmlDocGetRootElement(xmlDocPtr doc) { return doc->RootNode(); }
-inline void xmlFreeDoc (xmlDocPtr doc) { delete doc; }
-inline char* xmlGetAttribute (xmlNodePtr cur, const char *s) { return cur->GetAttributeValue(s); }
-inline char* xmlGetName (xmlNodePtr cur) { return cur->GetType(); }
-inline char* xmlGetData (xmlNodePtr cur) { return cur->GetData(); }
+inline xmlNodePtr xmlChildrenNode (xmlNodePtr cur) { return cur->GetChild(); }
+inline xmlNodePtr xmlNextNode (xmlNodePtr cur) { return cur->GetNext(); }
+inline xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc) { return doc->RootNode(); }
+inline void xmlFreeDoc (xmlDocPtr doc) { delete doc; }
+inline const char* xmlGetAttribute (xmlNodePtr cur, const char *s) { return cur->GetAttributeValue(s); }
+inline const char* xmlGetName (xmlNodePtr cur) { return cur->GetType(); }
+inline const char* xmlGetData (xmlNodePtr cur) { return cur->GetData(); }
#endif /* USE_LIBXML */
@@ -66,7 +90,7 @@ std::string Unicode_Character_to_UTF8(const int character);
std::string convert_UTF8_To_UTF8_XML(const char *s);
-xmlDocPtr parseXml(const char *data);
-xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence = true);
+xmlDocPtr parseXml(const char *data,const char *encoding = NULL);
+xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence = true,const char *encoding = NULL);
#endif /* __xmlinterface_h__ */
diff --git a/src/Makefile.am b/src/Makefile.am
index 551494d78..0dcf32edf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,6 +28,10 @@ if BOXTYPE_TRIPLE
SUBDIRS += lcddisplay
endif
+if USE_PUGIXML
+PUGIXML_LIBS = -lpugixml
+endif
+
if USE_TREMOR
VORBISLIBS = @VORBISIDEC_LIBS@
else
@@ -49,6 +53,7 @@ ADEC_LIBS = @SWRESAMPLE_LIBS@
else
ADEC_LIBS = @MAD_LIBS@ \
@ID3TAG_LIBS@ \
+ @SWRESAMPLE_LIBS@ \
$(FLACLIBS) \
$(VORBISLIBS)
endif
@@ -61,6 +66,11 @@ MTDUTILSLIBS = \
system/mtdutils/lib/libneutrino_system_mtdutils_lib.a
endif
+#if ENABLE_LUA
+LUALIBS = \
+ gui/lua/libneutrino_gui_lua.a
+#endif
+
neutrino_LDADD = \
daemonc/libneutrino_daemonc.a \
gui/bedit/libneutrino_gui_bedit.a \
@@ -73,6 +83,7 @@ neutrino_LDADD = \
gui/movieinfo.o \
gui/libneutrino_gui2.a \
gui/components/libneutrino_gui_components.a \
+ $(LUALIBS) \
eitd/libsectionsd.a \
gui/volumebar.o \
driver/libneutrino_driver.a \
@@ -81,7 +92,7 @@ neutrino_LDADD = \
timerd/libtimerd.a \
zapit/src/libzapit.a \
nhttpd/libnhttpd.a \
- nhttpd/tuxboxapi/coolstream/libnhttpd_tuxboxapi.a \
+ nhttpd/tuxboxapi/libnhttpd_tuxboxapi.a \
nhttpd/yhttpd_mods/libyhttpdmods.a \
nhttpd/yhttpd_core/libyhttpd.a \
system/libneutrino_system.a \
@@ -92,6 +103,7 @@ neutrino_LDADD = \
$(top_builddir)/lib/connection/libtuxbox-connection.a \
$(top_builddir)/lib/libeventserver/libtuxbox-eventserver.a \
$(top_builddir)/lib/xmltree/libtuxbox-xmltree.a \
+ $(top_builddir)/lib/jsoncpp/libjsoncpp.a \
$(top_builddir)/lib/libnet/libtuxbox-net.a \
$(top_builddir)/lib/libmd5sum/libtuxbox-md5sum.a \
$(top_builddir)/lib/libtuxtxt/libtuxtxt.a \
@@ -107,6 +119,7 @@ neutrino_LDADD = \
@AVCODEC_LIBS@ \
$(ADEC_LIBS) \
@SIGC_LIBS@ \
+ $(PUGIXML_LIBS) \
-ldvbsi++ \
-ljpeg \
-lOpenThreads \
diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp
index 057a87fb9..9847f008a 100644
--- a/src/daemonc/remotecontrol.cpp
+++ b/src/daemonc/remotecontrol.cpp
@@ -129,7 +129,6 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
g_Sectionsd->setServiceStopped();
CMoviePlayerGui::getInstance().stopPlayBack();
g_Zapit->zapTo_serviceID_NOWAIT(current_channel_id );
- //g_Sectionsd->setServiceChanged(current_channel_id, false);
zap_completion_timeout = time_monotonic_ms() + ZAP_GUARD_TIME;
@@ -177,7 +176,6 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
director_mode = 0;
needs_nvods = (msg == NeutrinoMessages:: EVT_ZAP_ISNVOD);
- //g_Sectionsd->setServiceChanged( current_channel_id, true );
CNeutrinoApp::getInstance()->adjustToChannelID(current_channel_id);
if ( g_InfoViewer->is_visible )
g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR , 0 );
@@ -316,11 +314,11 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
{
getNVODs();
if (subChannels.empty())
- g_Sectionsd->setServiceChanged( current_channel_id, true );
+ g_Sectionsd->setServiceChanged( current_channel_id, false);
}
else
// EVENT anfordern!
- g_Sectionsd->setServiceChanged( current_channel_id, true );
+ g_Sectionsd->setServiceChanged( current_channel_id, false);
}
return messages_return::handled;
@@ -339,13 +337,9 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
#endif
else if (msg == NeutrinoMessages::EVT_TUNE_COMPLETE) {
t_channel_id chid = *(t_channel_id *)data;
-printf("CRemoteControl::handleMsg: EVT_TUNE_COMPLETE (%016" PRIx64 ")\n", chid);
+ printf("CRemoteControl::handleMsg: EVT_TUNE_COMPLETE (%016" PRIx64 ")\n", chid);
if(chid && !IS_WEBTV(chid))
- g_Sectionsd->setServiceChanged( chid, true );
-#if 0
- else
- g_Sectionsd->setServiceChanged( current_channel_id, true );
-#endif
+ g_Sectionsd->setServiceChanged(chid, false);
return messages_return::handled;
}
//else if (msg == NeutrinoMessages::EVT_ZAP_FAILED || msg == NeutrinoMessages::EVT_ZAP_SUB_FAILED)
@@ -635,8 +629,6 @@ const std::string & CRemoteControl::setSubChannel(const int numSub, const bool f
CMoviePlayerGui::getInstance().stopPlayBack();
g_Zapit->zapTo_subServiceID_NOWAIT( current_sub_channel_id );
- // Houdini: to restart reading the private EPG when switching to a new option
- //g_Sectionsd->setServiceChanged( current_sub_channel_id , true );
return subChannels[numSub].subservice_name;
}
@@ -720,7 +712,6 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s
g_Zapit->zapTo_serviceID_NOWAIT(channel_id);
zap_completion_timeout = now + ZAP_GUARD_TIME;
- //g_Sectionsd->setServiceChanged( channel_id, false );
// g_RCInput->killTimer( current_programm_timer );
}
current_channel_id = channel_id;
diff --git a/src/driver/audiodec/Makefile.am b/src/driver/audiodec/Makefile.am
index bf001bbc4..356a113ba 100644
--- a/src/driver/audiodec/Makefile.am
+++ b/src/driver/audiodec/Makefile.am
@@ -18,6 +18,7 @@ if ENABLE_FFMPEGDEC
ASOURCES = ffmpegdec.cpp
else
ASOURCES = cdrdec.cpp \
+ ffmpegdec.cpp \
crc.c \
flacdec.cpp \
mp3dec.cpp \
diff --git a/src/driver/audiodec/basedec.cpp b/src/driver/audiodec/basedec.cpp
index 0c4c1bd52..34d8cbeb9 100644
--- a/src/driver/audiodec/basedec.cpp
+++ b/src/driver/audiodec/basedec.cpp
@@ -43,6 +43,7 @@
#ifdef ENABLE_FFMPEGDEC
#include "ffmpegdec.h"
#else
+#include "ffmpegdec.h"
#include "cdrdec.h"
#include "mp3dec.h"
#include "oggdec.h"
@@ -69,8 +70,15 @@ CBaseDec::RetCode CBaseDec::DecoderBase(CAudiofile* const in,
unsigned int* const secondsToSkip)
{
RetCode Status = OK;
+ FILE* fp;
+
+ if(( in->FileType == CFile::STREAM_AUDIO ) && (in->Filename.find(".flv") != string::npos))
+ {
+ fp = fopen( in->Filename.c_str(), "rc" );
+ }
+ else
+ fp = fopen( in->Filename.c_str(), "r" );
- FILE* fp = fopen( in->Filename.c_str(), "r" );
if ( fp == NULL )
{
fprintf( stderr, "Error opening file %s for decoding.\n",
@@ -98,6 +106,12 @@ CBaseDec::RetCode CBaseDec::DecoderBase(CAudiofile* const in,
Status = COggDec::getInstance()->Decoder( fp, OutputFd, state,
&in->MetaData, t,
secondsToSkip );
+ else if (ftype(fp, "flv")) {
+ Status = CFfmpegDec::getInstance()->Decoder(fp, OutputFd, state,
+ &in->MetaData, t,
+ secondsToSkip );
+ in->MetaData.type = CFile::FILE_UNKNOWN;
+ }
else
Status = CMP3Dec::getInstance()->Decoder( fp, OutputFd, state,
&in->MetaData, t,
@@ -125,6 +139,12 @@ CBaseDec::RetCode CBaseDec::DecoderBase(CAudiofile* const in,
&in->MetaData, t,
secondsToSkip );
#endif
+ else if (in->FileType == CFile::FILE_FLV) {
+ Status = CFfmpegDec::getInstance()->Decoder(fp, OutputFd, state,
+ &in->MetaData, t,
+ secondsToSkip );
+ in->MetaData.type = CFile::FILE_UNKNOWN;
+ }
else
{
fprintf( stderr, "DecoderBase: Supplied filetype is not " );
@@ -209,6 +229,7 @@ bool CBaseDec::GetMetaDataBase(CAudiofile* const in, const bool nice)
#ifndef ENABLE_FFMPEGDEC
if (in->FileType == CFile::FILE_MP3 || in->FileType == CFile::FILE_OGG
|| in->FileType == CFile::FILE_WAV || in->FileType == CFile::FILE_CDR
+ || in->FileType == CFile::FILE_FLV
#ifdef ENABLE_FLAC
|| in->FileType == CFile::FILE_FLAC
#endif
@@ -252,6 +273,16 @@ bool CBaseDec::GetMetaDataBase(CAudiofile* const in, const bool nice)
Status = FlacDec.GetMetaData(fp, nice, &in->MetaData);
}
#endif
+ else if (in->FileType == CFile::FILE_FLV)
+ {
+ struct stat st;
+ if (!fstat(fileno(fp), &st))
+ in->MetaData.filesize = st.st_size;
+ in->MetaData.type = in->FileType;
+
+ CFfmpegDec d;
+ Status = d.GetMetaData(fp, nice, &in->MetaData);
+ }
#else
struct stat st;
if (!fstat(fileno(fp), &st))
diff --git a/src/driver/audiodec/mp3dec.cpp b/src/driver/audiodec/mp3dec.cpp
index 1084e94b6..dc921f788 100644
--- a/src/driver/audiodec/mp3dec.cpp
+++ b/src/driver/audiodec/mp3dec.cpp
@@ -56,7 +56,7 @@
#include
#include "mp3dec.h"
#include
-
+#include
extern cAudio * audioDecoder;
//#define SPECTRUM
diff --git a/src/driver/colorgradient.cpp b/src/driver/colorgradient.cpp
index 57e9d71d5..50dacddd2 100644
--- a/src/driver/colorgradient.cpp
+++ b/src/driver/colorgradient.cpp
@@ -171,4 +171,56 @@ fb_pixel_t* CColorGradient::gradientOneColor(fb_pixel_t col, fb_pixel_t *gradien
return gradientBuf;
}
+fb_pixel_t* CColorGradient::gradientColorToColor(fb_pixel_t start_col,fb_pixel_t end_col, fb_pixel_t *gradientBuf, int bSize, int mode, int /*intensity*/)
+{
+ if (gradientBuf == NULL) {
+ gradientBuf = (fb_pixel_t*) malloc(bSize * sizeof(fb_pixel_t));
+ if (gradientBuf == NULL) {
+ dprintf(DEBUG_NORMAL, "[%s:%d] malloc error\n", __func__, __LINE__);
+ return NULL;
+ }
+ }
+ memset((void*)gradientBuf, '\0', bSize * sizeof(fb_pixel_t));
+
+ int start_box = 0;
+ int end_box = bSize;
+
+ if (mode == gradientDark2Light) {
+ fb_pixel_t temp_col = start_col;
+ start_col = end_col;
+ end_col = temp_col;
+ }
+
+ uint8_t start_tr = (uint8_t)((start_col & 0xFF000000) >> 24);
+ uint8_t start_r = (uint8_t)((start_col & 0x00FF0000) >> 16);
+ uint8_t start_g = (uint8_t)((start_col & 0x0000FF00) >> 8);
+ uint8_t start_b = (uint8_t) (start_col & 0x000000FF);
+
+ uint8_t end_tr = (uint8_t)((end_col & 0xFF000000) >> 24);
+ uint8_t end_r = (uint8_t)((end_col & 0x00FF0000) >> 16);
+ uint8_t end_g = (uint8_t)((end_col & 0x0000FF00) >> 8);
+ uint8_t end_b = (uint8_t) (end_col & 0x000000FF);
+
+ float steps = (float) bSize;
+
+ float trStep = (float)(end_tr - start_tr) / steps;
+ float rStep = (float)(end_r - start_r) / steps;
+ float gStep = (float)(end_g - start_g) / steps;
+ float bStep = (float)(end_b - start_b) / steps;
+
+ for (int i = start_box; i < end_box; i++) {
+
+ uint8_t tr = limitChar((int)((float)start_tr + trStep*(float)i));
+ uint8_t r = limitChar((int)((float)start_r + rStep*(float)i));
+ uint8_t g = limitChar((int)((float)start_g + gStep*(float)i));
+ uint8_t b = limitChar((int)((float)start_b + bStep*(float)i));
+
+ gradientBuf[i] = ((tr << 24) & 0xFF000000) |
+ ((r << 16) & 0x00FF0000) |
+ ((g << 8) & 0x0000FF00) |
+ ( b & 0x000000FF);
+ }
+ return gradientBuf;
+}
+
//printf("[%s #%d] factor_v: %f, factor_s: %f, v: 0x%02X, s: 0x%02X\n", __func__, __LINE__, factor_v, factor_s, v, s);
diff --git a/src/driver/colorgradient.h b/src/driver/colorgradient.h
index 41e26f518..6569f64b4 100644
--- a/src/driver/colorgradient.h
+++ b/src/driver/colorgradient.h
@@ -54,6 +54,7 @@ class CColorGradient
fb_pixel_t* gradientOneColor(fb_pixel_t col, fb_pixel_t *gradientBuf, int bSize, int mode, int intensity=normal, uint8_t v_min=0x40, uint8_t v_max=0xE0, uint8_t s=0xC0);
fb_pixel_t* gradientColorToTransparent(fb_pixel_t col, fb_pixel_t *gradientBuf, int bSize, int mode, int intensity=normal);
+ fb_pixel_t* gradientColorToColor(fb_pixel_t start_col, fb_pixel_t end_col, fb_pixel_t *gradientBuf, int bSize, int mode, int intensity=normal);
};
diff --git a/src/driver/fb_window.cpp b/src/driver/fb_window.cpp
index ed346e338..94cf1f344 100644
--- a/src/driver/fb_window.cpp
+++ b/src/driver/fb_window.cpp
@@ -39,17 +39,29 @@ CFBWindow::CFBWindow(const int _x, const int _y, const int _dx, const int _dy)
dy = _dy;
frameBuffer = CFrameBuffer::getInstance();
- Background = new fb_pixel_t [_dx * _dy];
- if (Background != NULL)
- frameBuffer->SaveScreen(_x, _y, _dx, _dy, Background);
-
+ Background = saveScreen(_x, _y, _dx, _dy);
}
CFBWindow::~CFBWindow(void)
{
if (Background != NULL)
- frameBuffer->RestoreScreen(x, y, dx, dy, Background);
- delete[] Background;
+ restoreScreen(x, y, dx, dy, Background, true);
+}
+
+fb_pixel_t* CFBWindow::saveScreen(const int _x, const int _y, const int _dx, const int _dy)
+{
+ fb_pixel_t* buf = new fb_pixel_t [_dx * _dy];
+ if (buf != NULL)
+ frameBuffer->SaveScreen(_x, _y, _dx, _dy, buf);
+ return buf;
+}
+
+void CFBWindow::restoreScreen(const int _x, const int _y, const int _dx, const int _dy, fb_pixel_t* buf, bool delBuf)
+{
+ if (buf != NULL)
+ frameBuffer->RestoreScreen(_x, _y, _dx, _dy, buf);
+ if (delBuf)
+ delete[] buf;
}
void CFBWindow::paintBoxRel(const int _x, const int _y, const int _dx, const int _dy, const color_t _col, int radius, int type)
@@ -57,6 +69,16 @@ void CFBWindow::paintBoxRel(const int _x, const int _y, const int _dx, const int
frameBuffer->paintBoxRel(x + _x, y + _y, _dx, _dy, _col, radius, type);
}
+void CFBWindow::paintVLineRel(int _x, int _y, int _dy, const color_t _col)
+{
+ frameBuffer->paintVLineRel(x + _x, y + _y, _dy, _col);
+}
+
+void CFBWindow::paintHLineRel(int _x, int _dx, int _y, const color_t _col)
+{
+ frameBuffer->paintHLineRel(x + _x, _dx, y + _y, _col);
+}
+
bool CFBWindow::paintIcon(const char * const _filename, const int _x, const int _y, const int _h, const color_t _offset)
{
frameBuffer->paintIcon(_filename, x + _x, y + _y, _h, _offset);
diff --git a/src/driver/fb_window.h b/src/driver/fb_window.h
index 0f9cf8a49..3cad57c77 100644
--- a/src/driver/fb_window.h
+++ b/src/driver/fb_window.h
@@ -43,8 +43,13 @@ class CFBWindow
~CFBWindow();
void paintBoxRel(const int _x, const int _y, const int _dx, const int _dy, const color_t _col, int radius = 0, int type = 0xF);
+ void paintVLineRel(int _x, int _y, int _dy, const color_t _col);
+ void paintHLineRel(int _x, int _dx, int _y, const color_t _col);
bool paintIcon(const char * const _filename, const int _x, const int _y, const int _h = 0, const color_t _offset = 1);
void RenderString(const font_t _font, const int _x, const int _y, const int _width, const char * const _text, const color_t _color, const int _boxheight = 0, const unsigned int _flags = Font::IS_UTF8);
+
+ fb_pixel_t* saveScreen(const int _x, const int _y, const int _dx, const int _dy);
+ void restoreScreen(const int _x, const int _y, const int _dx, const int _dy, fb_pixel_t* buf, bool delBuf);
};
#endif /* __fb_window_h__ */
diff --git a/src/driver/file.cpp b/src/driver/file.cpp
index 21e94f8ee..0d16b37bb 100644
--- a/src/driver/file.cpp
+++ b/src/driver/file.cpp
@@ -43,8 +43,8 @@
const char * const file_extension_list[] =
{
"aac", "asf", "avi", "bmp", "cdr", "crw",
- "dts", "flac", "gif", "imu", "iso", "jpeg", "jpg",
- "m2a", "m3u", "m4a", "mkv", "mp2", "mp3",
+ "dts", "flac", "flv", "gif", "imu", "iso", "jpeg", "jpg",
+ "m2a", "m3u", "m3u8", "m4a", "mkv", "mp2", "mp3",
"mpa", "ogg", "pls", "png", "sh",
"txt", "url", "wav", "xml"
};
@@ -53,9 +53,9 @@ const char * const file_extension_list[] =
const CFile::FileType file_type_list[] =
{
CFile::FILE_AAC , CFile::FILE_ASF , CFile::FILE_AVI , CFile::FILE_PICTURE , CFile::FILE_CDR , CFile::FILE_PICTURE ,
- CFile::FILE_WAV , CFile::FILE_FLAC , CFile::FILE_PICTURE , CFile::STREAM_PICTURE, CFile::FILE_ISO , CFile::FILE_PICTURE , CFile::FILE_PICTURE ,
- CFile::FILE_MP3 , CFile::FILE_PLAYLIST , CFile::FILE_AAC , CFile::FILE_MKV , CFile::FILE_MP3 , CFile::FILE_MP3 ,
- CFile::FILE_MP3 , CFile::FILE_OGG , CFile::FILE_PLAYLIST, CFile::FILE_PICTURE , CFile::FILE_TEXT ,
+ CFile::FILE_WAV , CFile::FILE_FLAC , CFile::FILE_FLV , CFile::FILE_PICTURE , CFile::STREAM_PICTURE, CFile::FILE_ISO , CFile::FILE_PICTURE , CFile::FILE_PICTURE ,
+ CFile::FILE_MP3 , CFile::FILE_PLAYLIST , CFile::FILE_PLAYLIST , CFile::FILE_AAC , CFile::FILE_MKV , CFile::FILE_MP3 , CFile::FILE_MP3 ,
+ CFile::FILE_MP3 , CFile::FILE_OGG , CFile::FILE_PLAYLIST , CFile::FILE_PICTURE , CFile::FILE_TEXT ,
CFile::FILE_TEXT , CFile::STREAM_AUDIO , CFile::FILE_WAV , CFile::FILE_XML
};
diff --git a/src/driver/file.h b/src/driver/file.h
index d1c935aa2..a72ff5e4f 100644
--- a/src/driver/file.h
+++ b/src/driver/file.h
@@ -70,6 +70,7 @@ class CFile
FILE_OGG,
FILE_WAV,
FILE_FLAC,
+ FILE_FLV,
FILE_XML,
FILE_PLAYLIST,
STREAM_AUDIO,
diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp
index 6060ddb39..dc58fccc9 100644
--- a/src/driver/framebuffer.cpp
+++ b/src/driver/framebuffer.cpp
@@ -59,7 +59,6 @@ extern cVideo * videoDecoder;
extern CPictureViewer * g_PicViewer;
#define ICON_CACHE_SIZE 1024*1024*2 // 2mb
-#define ICONDIR_VAR "/var/tuxbox/icons/"
#define BACKGROUNDIMAGEWIDTH 720
@@ -1010,10 +1009,10 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i
uint16_t width, height;
int lfd;
- lfd = open((iconBasePath + filename).c_str(), O_RDONLY);
+ lfd = open((iconBasePath + "/" + filename).c_str(), O_RDONLY);
if (lfd == -1) {
- printf("paintIcon8: error while loading icon: %s%s\n", iconBasePath.c_str(), filename.c_str());
+ printf("paintIcon8: error while loading icon: %s/%s\n", iconBasePath.c_str(), filename.c_str());
return false;
}
@@ -1066,16 +1065,16 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
/* we cache and check original name */
it = icon_cache.find(filename);
if(it == icon_cache.end()) {
- std::string newname = std::string(ICONDIR_VAR) + filename + ".png";
+ std::string newname = std::string(ICONSDIR_VAR) + "/" + filename + ".png";
if (access(newname.c_str(), F_OK))
- newname = iconBasePath + filename + ".png";
+ newname = iconBasePath + "/" + filename + ".png";
if (filename.find("/", 0) != std::string::npos)
newname = filename;
//printf("CFrameBuffer::paintIcon: check for %s\n", newname.c_str());fflush(stdout);
data = g_PicViewer->getIcon(newname, &width, &height);
- if(data) {
+ if(data) { //TODO: intercepting of possible full icon cache, that could cause strange behavior while painting of uncached icons
int dsize = width*height*sizeof(fb_pixel_t);
//printf("CFrameBuffer::paintIcon: %s found, data %x size %d x %d\n", newname.c_str(), data, width, height);fflush(stdout);
if(cache_size+dsize < ICON_CACHE_SIZE) {
@@ -1089,9 +1088,9 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
goto _display;
}
- newname = std::string(ICONDIR_VAR) + filename + ".raw";
+ newname = std::string(ICONSDIR_VAR) + "/" + filename + ".raw";
if (access(newname.c_str(), F_OK))
- newname = iconBasePath + filename + ".raw";
+ newname = iconBasePath + "/" + filename + ".raw";
int lfd = open(newname.c_str(), O_RDONLY);
@@ -1183,10 +1182,10 @@ void CFrameBuffer::loadPal(const std::string & filename, const unsigned char off
struct rgbData rgbdata;
int lfd;
- lfd = open((iconBasePath + filename).c_str(), O_RDONLY);
+ lfd = open((iconBasePath + "/" + filename).c_str(), O_RDONLY);
if (lfd == -1) {
- printf("error while loading palette: %s%s\n", iconBasePath.c_str(), filename.c_str());
+ printf("error while loading palette: %s/%s\n", iconBasePath.c_str(), filename.c_str());
return;
}
@@ -1489,11 +1488,11 @@ bool CFrameBuffer::loadPictureToMem(const std::string & filename, const uint16_t
//printf("%s(%d, %d, memp)\n", __FUNCTION__, width, height);
- lfd = open((iconBasePath + filename).c_str(), O_RDONLY );
+ lfd = open((iconBasePath + "/" + filename).c_str(), O_RDONLY );
if (lfd == -1)
{
- printf("error while loading icon: %s%s\n", iconBasePath.c_str(), filename.c_str());
+ printf("error while loading icon: %s/%s\n", iconBasePath.c_str(), filename.c_str());
return false;
}
@@ -1545,11 +1544,11 @@ bool CFrameBuffer::savePictureFromMem(const std::string & filename, const fb_pix
header.height_hi = height >> 8;
header.transp = 0;
- lfd = open((iconBasePath + filename).c_str(), O_WRONLY | O_CREAT, 0644);
+ lfd = open((iconBasePath + "/" + filename).c_str(), O_WRONLY | O_CREAT, 0644);
if (lfd==-1)
{
- printf("error while saving icon: %s%s", iconBasePath.c_str(), filename.c_str() );
+ printf("error while saving icon: %s/%s", iconBasePath.c_str(), filename.c_str() );
return false;
}
@@ -1614,7 +1613,7 @@ bool CFrameBuffer::loadBackgroundPic(const std::string & filename, bool show)
delete[] background;
background = NULL;
}
- background = g_PicViewer->getImage(iconBasePath + filename, BACKGROUNDIMAGEWIDTH, 576);
+ background = g_PicViewer->getImage(iconBasePath + "/" + filename, BACKGROUNDIMAGEWIDTH, 576);
if (background == NULL) {
background=0;
@@ -1797,17 +1796,23 @@ void CFrameBuffer::Clear()
paintBackground();
//memset(getFrameBufferPointer(), 0, stride * yRes);
}
-#if 0
-//never used
+
void CFrameBuffer::showFrame(const std::string & filename)
{
- std::string varpath = CONFIGDIR "/neutrino/icons/";
- if(!access((varpath + filename).c_str(), F_OK))
- videoDecoder->ShowPicture((varpath + filename).c_str());
- else
- videoDecoder->ShowPicture((iconBasePath + filename).c_str());
+ std::string picture = std::string(ICONSDIR_VAR) + "/" + filename;
+ if (access(picture.c_str(), F_OK))
+ picture = iconBasePath + "/" + filename;
+ if (filename.find("/", 0) != std::string::npos)
+ picture = filename;
+
+ videoDecoder->ShowPicture(picture.c_str());
}
-#endif
+
+void CFrameBuffer::stopFrame()
+{
+ videoDecoder->StopPicture();
+}
+
bool CFrameBuffer::Lock()
{
if(locked)
diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h
index fd80a8df6..2f9dacea6 100644
--- a/src/driver/framebuffer.h
+++ b/src/driver/framebuffer.h
@@ -258,6 +258,7 @@ class CFrameBuffer
void Clear();
void showFrame(const std::string & filename);
+ void stopFrame();
bool loadBackgroundPic(const std::string & filename, bool show = true);
bool Lock(void);
void Unlock(void);
diff --git a/src/driver/moviecut.cpp b/src/driver/moviecut.cpp
index 8ede3408b..269e4e381 100644
--- a/src/driver/moviecut.cpp
+++ b/src/driver/moviecut.cpp
@@ -291,7 +291,7 @@ int CMovieCut::getInput()
int retval = 0;
g_RCInput->getMsg(&msg, &data, 1, false);
if (msg == CRCInput::RC_home) {
- if (ShowMsg(LOCALE_MESSAGEBOX_INFO, "Cancel movie cut/split ?", CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes)
+ if (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIECUT_CANCEL, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes)
retval |= 4;
}
if (msg != CRCInput::RC_timeout)
@@ -317,14 +317,6 @@ bool CMovieCut::cutMovie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie)
time_t tt = time(0);
time_t tt1;
- unsigned char * buf = new unsigned char[BUF_SIZE];
- if (buf == 0) {
- perror("new");
- return false;
- }
-
- paintProgress(true);
-
off64_t size = minfo->file.Size;
off64_t secsize = getSecondSize(minfo);
off64_t newsize = size;
@@ -356,11 +348,18 @@ bool CMovieCut::cutMovie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie)
printf("CMovieCut::%s: end bookmark %d at %" PRId64 "\n", __func__, bcount, books[bcount].pos);
bcount++;
}
- printf("\n");
- if (!bcount) {
- delete [] buf;
+
+ if (!bcount)
+ return false;
+
+ unsigned char * buf = new unsigned char[BUF_SIZE];
+ if (buf == 0) {
+ perror("new");
return false;
}
+
+ paintProgress(true);
+
qsort(books, bcount, sizeof(struct mybook), compare_book);
for (int i = 0; i < bcount; i++) {
if (books[i].ok) {
@@ -528,6 +527,7 @@ bool CMovieCut::copyMovie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie, bool onefi
bcount++;
}
}
+
if (!bcount)
return false;
diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp
index 96517812e..d27da95a6 100644
--- a/src/driver/netfile.cpp
+++ b/src/driver/netfile.cpp
@@ -153,7 +153,8 @@ magic_t known_magic[] =
{
{{0xFF, 0xFF, 0xFF, 0x00}, {'I' , 'D' , '3' , 0x00}, "audio/mpeg"},
{{0xFF, 0xFF, 0xFF, 0x00}, {'O' , 'g' , 'g' , 0x00}, "audio/ogg" },
- {{0xFF, 0xFE, 0x00, 0x00}, {0xFF, 0xFA, 0x00, 0x00}, "audio/mpeg"}
+ {{0xFF, 0xFE, 0x00, 0x00}, {0xFF, 0xFA, 0x00, 0x00}, "audio/mpeg"},
+ {{0xFF, 0xFF, 0xFF, 0x00}, {'F' , 'L' , 'V' , 0x00}, "audio/flv"}
};
#if 0
diff --git a/src/driver/neutrinofonts.cpp b/src/driver/neutrinofonts.cpp
index 3cf0ddb03..4dc538f65 100644
--- a/src/driver/neutrinofonts.cpp
+++ b/src/driver/neutrinofonts.cpp
@@ -69,17 +69,22 @@ CNeutrinoFonts::CNeutrinoFonts()
InitDynFonts();
}
+void CNeutrinoFonts::clearDynFontStruct(dyn_font_t* f)
+{
+ f->dx = 0;
+ f->dy = 0;
+ f->size = 0;
+ f->style = 0;
+ f->text = "";
+ f->font = NULL;
+ f->useDigitOffset = false;
+}
+
void CNeutrinoFonts::InitDynFonts()
{
for (int i = 0; i < FONT_ID_MAX; i++) {
dyn_font_t dyn_font;
- dyn_font.dx = 0;
- dyn_font.dy = 0;
- dyn_font.size = 0;
- dyn_font.style = 0;
- dyn_font.text = "";
- dyn_font.font = NULL;
- dyn_font.useDigitOffset = false;
+ clearDynFontStruct(&dyn_font);
v_dyn_fonts.push_back(dyn_font);
}
}
@@ -97,6 +102,8 @@ CNeutrinoFonts::~CNeutrinoFonts()
delete v_dyn_fonts[i].font;
v_dyn_fonts.clear();
}
+
+ deleteDynFontExtAll();
}
CNeutrinoFonts* CNeutrinoFonts::getInstance()
@@ -117,7 +124,7 @@ void CNeutrinoFonts::SetupDynamicFonts(bool initRenderClass/*=true*/)
dynFontStyle[0] = g_dynFontRenderer->AddFont(fontDescr.filename.c_str());
fontDescr.name = g_dynFontRenderer->getFamily(fontDescr.filename.c_str());
- dprintf(DEBUG_NORMAL, " dynamic font family: %s\n", fontDescr.name.c_str());
+ dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] dynamic font family: %s\n", __func__, __LINE__, fontDescr.name.c_str());
dynFontStyle[1] = "Bold Regular";
g_dynFontRenderer->AddFont(fontDescr.filename.c_str(), true); // make italics
@@ -135,14 +142,14 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
old_fontDescr.size_offset = fontDescr.size_offset;
old_fontDescr.filename = fontDescr.filename;
fontDescr.filename = "";
- dprintf(DEBUG_NORMAL, "font file: %s\n", g_settings.font_file.c_str());
+ dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] font file: %s\n", __func__, __LINE__, g_settings.font_file.c_str());
if (access(g_settings.font_file.c_str(), F_OK)) {
if (!access(FONTDIR"/neutrino.ttf", F_OK)) {
fontDescr.filename = FONTDIR"/neutrino.ttf";
g_settings.font_file = fontDescr.filename;
}
else {
- fprintf( stderr,"[neutrino] font file [%s] not found\n neutrino exit\n",FONTDIR"/neutrino.ttf");
+ fprintf( stderr,"[CNeutrinoFonts] [%s - %d] font file [%s] not found\n neutrino exit\n", __func__, __LINE__, FONTDIR"/neutrino.ttf");
_exit(0);
}
}
@@ -154,7 +161,7 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
old_fontDescr.name = fontDescr.name;
fontDescr.name = "";
fontDescr.name = g_fontRenderer->getFamily(fontDescr.filename.c_str());
- dprintf(DEBUG_NORMAL, "standard font family: %s\n", fontDescr.name.c_str());
+ dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] standard font family: %s\n", __func__, __LINE__, fontDescr.name.c_str());
fontStyle[1] = "Bold Regular";
g_fontRenderer->AddFont(fontDescr.filename.c_str(), true); // make italics
@@ -209,10 +216,11 @@ void CNeutrinoFonts::refreshDynFont(int dx, int dy, std::string text, int style,
Font *dynFont = g_dynFontRenderer->getFont(fontDescr.name.c_str(), dynFontStyle[style].c_str(), dynSize);
dyn_font->font = dynFont;
dyn_font->size = dynSize;
- if (dyn_font->size != dynSize)
- printf("##### [%s] change %s_font size old %d to new %d, index: %u\n", __FUNCTION__, (isShare)?"share":"dyn", oldSize, dyn_font->size, index);
- else
- printf("##### [%s] refresh %s_font size %d, index: %u\n", __FUNCTION__, (isShare)?"share":"dyn", dyn_font->size, index);
+ if (dyn_font->size != dynSize){
+ dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] change %s_font size old %d to new %d, index: %u\n", __func__, __LINE__, (isShare)?"share":"dyn", oldSize, dyn_font->size, index);
+ }else{
+ dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] refresh %s_font size %d, index: %u\n",__func__, __LINE__, (isShare)?"share":"dyn", dyn_font->size, index);
+ }
}
int CNeutrinoFonts::getFontHeight(Font* fnt)
@@ -343,6 +351,66 @@ Font **CNeutrinoFonts::getDynFontWithID(int &dx, int &dy, std::string text, int
return ret;
}
+void CNeutrinoFonts::initDynFontExt()
+{
+ for (int i = 0; i < DYNFONTEXT_MAX; i++) {
+ dyn_font_t dyn_font;
+ clearDynFontStruct(&dyn_font);
+ v_dyn_fonts_ext.push_back(dyn_font);
+ }
+}
+
+void CNeutrinoFonts::deleteDynFontExtAll()
+{
+ if (!v_dyn_fonts_ext.empty()) {
+ for (size_t i = 0; i < v_dyn_fonts_ext.size(); ++i) {
+ if (v_dyn_fonts_ext[i].font != NULL)
+ delete v_dyn_fonts_ext[i].font;
+ }
+ v_dyn_fonts_ext.clear();
+ }
+}
+
+Font *CNeutrinoFonts::getDynFontExt(int &dx, int &dy, unsigned int f_id, std::string text/*=""*/, int style/*=FONT_STYLE_REGULAR*/)
+{
+ if ((dx <= 0) && (dy <= 0))
+ return NULL;
+ if ((fontDescr.name.empty()) || (fontDescr.filename.empty()))
+ SetupNeutrinoFonts();
+ if (g_dynFontRenderer == NULL)
+ SetupDynamicFonts();
+ if (v_dyn_fonts_ext.empty())
+ initDynFontExt();
+
+ int dynSize = getDynFontSize(dx, dy, text, style);
+ Font *dynFont = NULL;
+ Font *ret = NULL;
+
+ if (f_id < v_dyn_fonts_ext.size()) {
+ dynFont = g_dynFontRenderer->getFont(fontDescr.name.c_str(), dynFontStyle[style].c_str(), dynSize);
+ if (v_dyn_fonts_ext[f_id].font != NULL)
+ delete v_dyn_fonts_ext[f_id].font;
+ v_dyn_fonts_ext[f_id].dx = dx;
+ v_dyn_fonts_ext[f_id].dy = dy;
+ v_dyn_fonts_ext[f_id].size = dynSize;
+ v_dyn_fonts_ext[f_id].style = style;
+ v_dyn_fonts_ext[f_id].text = text;
+ v_dyn_fonts_ext[f_id].font = dynFont;
+ v_dyn_fonts_ext[f_id].useDigitOffset = useDigitOffset;
+ ret = v_dyn_fonts_ext[f_id].font;
+ }
+ else
+ return NULL;
+
+ dy = ret->getHeight();
+ if (!text.empty())
+ dx = ret->getRenderWidth(text);
+#ifdef DEBUG_NFONTS
+ printf("##### [%s] dx: %d, dy: %d, dynSize: %d, dynFont: %p, ret: %p, FontID: %d\n", __FUNCTION__, dx, dy, dynSize, *ret, ret, f_id);
+#endif
+ return ret;
+}
+
Font **CNeutrinoFonts::getDynFontShare(int &dx, int &dy, std::string text, int style)
{
if ((dx <= 0) && (dy <= 0))
diff --git a/src/driver/neutrinofonts.h b/src/driver/neutrinofonts.h
index ce6e623c2..6073f0dba 100644
--- a/src/driver/neutrinofonts.h
+++ b/src/driver/neutrinofonts.h
@@ -70,6 +70,7 @@ class CNeutrinoFonts
typedef std::vector v_dyn_fonts_t;
v_dyn_fonts_t v_share_fonts;
v_dyn_fonts_t v_dyn_fonts;
+ v_dyn_fonts_t v_dyn_fonts_ext;
bool useDigitOffset;
void InitDynFonts();
@@ -78,6 +79,8 @@ class CNeutrinoFonts
int getDynFontSize(int dx, int dy, std::string text, int style);
Font **getDynFontShare(int &dx, int &dy, std::string text, int style);
Font **getDynFontWithID(int &dx, int &dy, std::string text, int style, unsigned int f_id);
+ void clearDynFontStruct(dyn_font_t* f);
+ void initDynFontExt();
public:
enum {
@@ -104,6 +107,10 @@ class CNeutrinoFonts
FONTSETUP_ALL = FONTSETUP_NEUTRINO_FONT | FONTSETUP_NEUTRINO_FONT_INST | FONTSETUP_DYN_FONT | FONTSETUP_DYN_FONT_INST
};
+ enum {
+ DYNFONTEXT_MAX = 16
+ };
+
CNeutrinoFonts();
~CNeutrinoFonts();
static CNeutrinoFonts* getInstance();
@@ -116,6 +123,9 @@ class CNeutrinoFonts
void refreshDynFonts();
Font **getDynFont(int &dx, int &dy, std::string text="", int style=FONT_STYLE_REGULAR, int share=FONT_ID_SHARE);
void setFontUseDigitHeight(bool set=true) {useDigitOffset = set;}
+
+ Font *getDynFontExt(int &dx, int &dy, unsigned int f_id, std::string text="", int style=FONT_STYLE_REGULAR);
+ void deleteDynFontExtAll();
};
diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp
index 3f73ae03e..17d07c89b 100644
--- a/src/driver/pictureviewer/pictureviewer.cpp
+++ b/src/driver/pictureviewer/pictureviewer.cpp
@@ -3,14 +3,14 @@
#include
#include "pictureviewer.h"
#include "pv_config.h"
-
+#include
#include
#include
#include
#include
#include
#include
-
+#include
#include
#ifdef FBV_SUPPORT_GIF
@@ -166,10 +166,11 @@ bool CPictureViewer::DecodeImage (const std::string & _name, bool showBusySign,
if (fh) {
if (m_NextPic_Buffer != NULL) {
free (m_NextPic_Buffer);
+ m_NextPic_Buffer = NULL;
}
m_NextPic_Buffer = (unsigned char *) malloc (x * y * 3);
if (m_NextPic_Buffer == NULL) {
- printf ("DecodeImage: Error: malloc\n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: malloc, %s\n", __func__, __LINE__, strerror(errno));
return false;
}
// dbout("---Decoding Start(%d/%d)\n",x,y);
@@ -206,11 +207,11 @@ bool CPictureViewer::DecodeImage (const std::string & _name, bool showBusySign,
else
m_NextPic_YPan = 0;
} else {
- printf ("Unable to read file !\n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: Unable to read file !, %s\n", __func__, __LINE__, strerror(errno));
free (m_NextPic_Buffer);
m_NextPic_Buffer = (unsigned char *) malloc (3);
if (m_NextPic_Buffer == NULL) {
- printf ("DecodeImage: Error: malloc\n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: malloc, %s\n", __func__, __LINE__, strerror(errno));
return false;
}
memset (m_NextPic_Buffer, 0, 3);
@@ -222,13 +223,14 @@ bool CPictureViewer::DecodeImage (const std::string & _name, bool showBusySign,
m_NextPic_YPan = 0;
}
} else {
- printf ("Unable to read file or format not recognized!\n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Unable to read file or format not recognized!\n", __func__, __LINE__);
if (m_NextPic_Buffer != NULL) {
free (m_NextPic_Buffer);
+ m_NextPic_Buffer = NULL;
}
m_NextPic_Buffer = (unsigned char *) malloc (3);
if (m_NextPic_Buffer == NULL) {
- printf ("DecodeImage: Error: malloc\n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: malloc, %s\n", __func__, __LINE__, strerror(errno));
return false;
}
memset (m_NextPic_Buffer, 0, 3);
@@ -264,8 +266,8 @@ bool CPictureViewer::ShowImage (const std::string & filename, bool unscaled)
free (m_CurrentPic_Buffer);
m_CurrentPic_Buffer = NULL;
}
- DecodeImage (filename, true, unscaled);
- DisplayNextImage ();
+ if (DecodeImage (filename, true, unscaled))
+ DisplayNextImage ();
// dbout("Show Image }\n");
return true;
}
@@ -302,8 +304,8 @@ void CPictureViewer::Zoom (float factor)
int oldx = m_CurrentPic_X;
int oldy = m_CurrentPic_Y;
unsigned char *oldBuf = m_CurrentPic_Buffer;
- m_CurrentPic_X = (int) (factor * m_CurrentPic_X);
- m_CurrentPic_Y = (int) (factor * m_CurrentPic_Y);
+ m_CurrentPic_X = int(factor * (float)m_CurrentPic_X);
+ m_CurrentPic_Y = int(factor * (float)m_CurrentPic_Y);
m_CurrentPic_Buffer = Resize(m_CurrentPic_Buffer, oldx, oldy, m_CurrentPic_X, m_CurrentPic_Y, m_scaling);
@@ -377,7 +379,7 @@ CPictureViewer::CPictureViewer ()
fh_root = NULL;
m_scaling = COLOR;
//m_aspect = 4.0 / 3;
- m_aspect = 16.0 / 9;
+ m_aspect = float(16.0 / 9.0);
m_CurrentPic_Name = "";
m_CurrentPic_Buffer = NULL;
m_CurrentPic_X = 0;
@@ -434,7 +436,7 @@ void CPictureViewer::showBusy (int sx, int sy, int width, char r, char g, char b
fb_buffer = (unsigned char *) CFrameBuffer::getInstance()->convertRGB2FB (rgb_buffer, 1, 1);
if (fb_buffer == NULL) {
- printf ("showBusy: Error: malloc 1\n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: malloc\n", __func__, __LINE__);
return;
}
if (m_busy_buffer != NULL) {
@@ -443,7 +445,7 @@ void CPictureViewer::showBusy (int sx, int sy, int width, char r, char g, char b
}
m_busy_buffer = (unsigned char *) malloc (width * width * cpp);
if (m_busy_buffer == NULL) {
- printf ("showBusy: Error: malloc 2: \n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: malloc\n", __func__, __LINE__);
return;
}
busy_buffer_wrk = m_busy_buffer;
@@ -511,9 +513,6 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
}
}
-#define LOGO_FLASH_DIR DATADIR "/neutrino/icons/logo"
-#define LOGO_FLASH_DIR_VAR "/var/tuxbox/icons/logo"
-
bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string& ChannelName, std::string & name, int *width, int *height)
{
std::string fileType[] = { ".png", ".jpg" , ".gif" };
@@ -537,25 +536,25 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
id_tmp_path += strChnId + fileType[i];
v_path.push_back(id_tmp_path);
- if(g_settings.logo_hdd_dir != LOGO_FLASH_DIR_VAR){
- //create filename with channel name (LOGO_FLASH_DIR_VAR)
- id_tmp_path = LOGO_FLASH_DIR_VAR "/";
+ if(g_settings.logo_hdd_dir != LOGODIR_VAR){
+ //create filename with channel name (LOGODIR_VAR)
+ id_tmp_path = LOGODIR_VAR "/";
id_tmp_path += ChannelName + fileType[i];
v_path.push_back(id_tmp_path);
- //create filename with id (LOGO_FLASH_DIR_VAR)
- id_tmp_path = LOGO_FLASH_DIR_VAR "/";
+ //create filename with id (LOGODIR_VAR)
+ id_tmp_path = LOGODIR_VAR "/";
id_tmp_path += strChnId + fileType[i];
v_path.push_back(id_tmp_path);
}
- if(g_settings.logo_hdd_dir != LOGO_FLASH_DIR){
- //create filename with channel name (LOGO_FLASH_DIR)
- id_tmp_path = LOGO_FLASH_DIR "/";
+ if(g_settings.logo_hdd_dir != LOGODIR){
+ //create filename with channel name (LOGODIR)
+ id_tmp_path = LOGODIR "/";
id_tmp_path += ChannelName + fileType[i];
v_path.push_back(id_tmp_path);
- //create filename with id (LOGO_FLASH_DIR)
- id_tmp_path = LOGO_FLASH_DIR "/";
+ //create filename with id (LOGODIR)
+ id_tmp_path = LOGODIR "/";
id_tmp_path += strChnId + fileType[i];
v_path.push_back(id_tmp_path);
}
@@ -607,10 +606,10 @@ void CPictureViewer::rescaleImageDimensions(int *width, int *height, const int m
aspect = (float)(*width) / (float)(*height);
if (((float)(*width) / (float)max_width) > ((float)(*height) / (float)max_height)) {
*width = max_width;
- *height = (int)(max_width / aspect);
+ *height = int((float)max_width / aspect);
}else{
*height = max_height;
- *width = (int)(max_height * aspect);
+ *width = int((float)max_height * aspect);
}
}
@@ -623,22 +622,27 @@ bool CPictureViewer::DisplayImage(const std::string & name, int posx, int posy,
/* TODO: cache or check for same */
fb_pixel_t * data = getImage(name, width, height);
- if (transp > CFrameBuffer::TM_EMPTY)
- frameBuffer->SetTransparentDefault();
+ if (data){
+ if (transp > CFrameBuffer::TM_EMPTY)
+ frameBuffer->SetTransparentDefault();
- if(data) {
- frameBuffer->blit2FB(data, width, height, posx, posy);
- cs_free_uncached(data);
- return true;
+ if(data) {
+ frameBuffer->blit2FB(data, width, height, posx, posy);
+ cs_free_uncached(data);
+ return true;
+ }
}
return false;
}
fb_pixel_t * CPictureViewer::int_getImage(const std::string & name, int *width, int *height, bool GetImage)
{
+ if (access(name.c_str(), R_OK) == -1)
+ return NULL;
+
int x, y, load_ret, bpp = 0;
- CFormathandler *fh;
- unsigned char * buffer;
+ CFormathandler *fh = NULL;
+ unsigned char * buffer = NULL;
fb_pixel_t * ret = NULL;
std::string mode_str;
@@ -653,8 +657,8 @@ fb_pixel_t * CPictureViewer::int_getImage(const std::string & name, int *width,
buffer = (unsigned char *) malloc(x * y * 4);
if (buffer == NULL)
{
- printf("%s: Error: malloc\n", mode_str.c_str());
- return 0;
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] mode %s: Error: malloc\n", __func__, __LINE__, mode_str.c_str());
+ return NULL;
}
#ifdef FBV_SUPPORT_PNG
if ((name.find(".png") == (name.length() - 4)) && (fh_png_id(name.c_str())))
@@ -662,13 +666,15 @@ fb_pixel_t * CPictureViewer::int_getImage(const std::string & name, int *width,
else
#endif
load_ret = fh->get_pic(name.c_str (), &buffer, &x, &y);
+ dprintf(DEBUG_INFO, "[CPictureViewer] [%s - %d] load_result: %d \n", __func__, __LINE__, load_ret);
+
if (load_ret == FH_ERROR_OK)
{
-// printf("%s: decoded %s, %d x %d \n", mode_str.c_str(), name.c_str(), x, y);
+ dprintf(DEBUG_INFO, "[CPictureViewer] [%s - %d] mode %s, decoded %s, (Pos: %d %d) ,bpp = %d \n", __func__, __LINE__, mode_str.c_str(), name.c_str(), x, y, bpp);
// resize only getImage
if ((GetImage) && (x != *width || y != *height))
{
- printf("%s: resize %s to %d x %d \n", mode_str.c_str(), name.c_str(), *width, *height);
+ dprintf(DEBUG_INFO, "[CPictureViewer] [%s - %d] resize %s to %d x %d \n", __func__, __LINE__, name.c_str(), *width, *height);
if (bpp == 4)
buffer = ResizeA(buffer, x, y, *width, *height);
else
@@ -682,11 +688,13 @@ fb_pixel_t * CPictureViewer::int_getImage(const std::string & name, int *width,
ret = (fb_pixel_t *) CFrameBuffer::getInstance()->convertRGB2FB(buffer, x, y, convertSetupAlpha2Alpha(g_settings.theme.infobar_alpha));
*width = x;
*height = y;
- }else
- printf("%s: Error decoding file %s\n", mode_str.c_str(), name.c_str());
+ }else{
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] mode %s: Error decoding file %s\n", __func__, __LINE__, mode_str.c_str(), name.c_str());
+ return NULL;
+ }
free(buffer);
}else
- printf("%s: Error open file %s\n", mode_str.c_str(), name.c_str());
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] mode: %s, file: %s Error: %s, buffer = %p (Pos: %d %d, Dim: %d x %d)\n", __func__, __LINE__, mode_str.c_str(), name.c_str(), strerror(errno), buffer, x, y, *width, *height);
return ret;
}
@@ -709,7 +717,7 @@ unsigned char * CPictureViewer::int_Resize(unsigned char *orgin, int ox, int oy,
if(cr == NULL)
{
- printf("Resize Error: malloc\n");
+ dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Resize Error: malloc\n", __func__, __LINE__);
return(orgin);
}
}else
@@ -765,7 +773,10 @@ unsigned char * CPictureViewer::int_Resize(unsigned char *orgin, int ox, int oy,
r+=q[0]; g+=q[1]; b+=q[2]; a+=q[3];
}
}
- p[0]=r/sq; p[1]=g/sq; p[2]=b/sq; p[3]=a/sq;
+ p[0]= uint8_t(r/sq);
+ p[1]= uint8_t(g/sq);
+ p[2]= uint8_t(b/sq);
+ p[3]= uint8_t(a/sq);
}
}
}else
@@ -784,7 +795,9 @@ unsigned char * CPictureViewer::int_Resize(unsigned char *orgin, int ox, int oy,
r+=q[0]; g+=q[1]; b+=q[2];
}
}
- p[0]=r/sq; p[1]=g/sq; p[2]=b/sq;
+ p[0]= uint8_t(r/sq);
+ p[1]= uint8_t(g/sq);
+ p[2]= uint8_t(b/sq);
}
}
}
diff --git a/src/driver/record.cpp b/src/driver/record.cpp
index 6311cc607..a0e6aae87 100644
--- a/src/driver/record.cpp
+++ b/src/driver/record.cpp
@@ -53,6 +53,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -60,6 +61,7 @@
#include
#include
#include
+#include
/* TODO:
* nextRecording / pending recordings - needs testing
@@ -114,7 +116,7 @@ bool CRecordInstance::SaveXml()
int fd;
std::string xmlfile = std::string(filename) + ".xml";
- if ((fd = open(xmlfile.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) >= 0) {
+ if ((fd = open(xmlfile.c_str(), O_CREAT | O_TRUNC | O_SYNC | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) >= 0) {
std::string extMessage;
cMovieInfo->encodeMovieInfoXml(&extMessage, recMovieInfo);
write(fd, extMessage.c_str(), extMessage.size() /*strlen(info)*/);
@@ -152,7 +154,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
std::string tsfile = std::string(filename) + ".ts";
printf("%s: file %s vpid %x apid %x\n", __FUNCTION__, tsfile.c_str(), allpids.PIDs.vpid, apids[0]);
- int fd = open(tsfile.c_str(), O_CREAT | O_RDWR | O_LARGEFILE | O_TRUNC , S_IRWXO | S_IRWXG | S_IRWXU);
+ int fd = open(tsfile.c_str(), O_CREAT | O_TRUNC | O_SYNC | O_RDWR | O_LARGEFILE | O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if(fd < 0) {
perror(tsfile.c_str());
hintBox.hide();
@@ -566,7 +568,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis
CEPGData epgdata;
bool epg_ok = CEitManager::getInstance()->getEPGid(epgid, epg_time, &epgdata);
if(!epg_ok){//if old epgid removed check currurrent epgid
- epg_ok = CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgdata );
+ epg_ok = CEitManager::getInstance()->getActualEPGServiceKey(channel->getEpgID(), &epgdata );
if(epg_ok && !epgTitle.empty()){
std::string tmp_title = epgdata.title;
@@ -857,6 +859,17 @@ CRecordInstance * CRecordManager::FindTimeshift()
return NULL;
}
+bool CRecordManager::CheckRecordingId_if_Timeshift(int recid)
+{
+ if(recid > 0){
+ CRecordInstance * inst = FindInstanceID(recid);
+ if(inst){
+ return inst->Timeshift();
+ }
+ }
+ return false;
+}
+
MI_MOVIE_INFO * CRecordManager::GetMovieInfo(t_channel_id channel_id, bool timeshift)
{
//FIXME copy MI_MOVIE_INFO ?
@@ -918,9 +931,13 @@ bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, boo
CTimerd::RecordingInfo eventinfo;
CEPGData epgData;
+ CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
+ if (!channel)
+ return false;
+
eventinfo.eventID = 0;
eventinfo.channel_id = channel_id;
- if (CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgData )) {
+ if (CEitManager::getInstance()->getActualEPGServiceKey(channel->getEpgID(), &epgData )) {
eventinfo.epgID = epgData.eventID;
eventinfo.epg_starttime = epgData.epg_times.startzeit;
strncpy(eventinfo.epgTitle, epgData.title.c_str(), EPG_TITLE_MAXLEN-1);
@@ -948,7 +965,7 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons
printf("%s channel_id %" PRIx64 " epg: %" PRIx64 ", apidmode 0x%X\n", __func__,
eventinfo->channel_id, eventinfo->epgID, eventinfo->apids);
- if (g_settings.recording_type == CNeutrinoApp::RECORDING_OFF || IS_WEBTV(eventinfo->channel_id))
+ if (g_settings.recording_type == CNeutrinoApp::RECORDING_OFF /* || IS_WEBTV(eventinfo->channel_id) */)
return false;
#if 1 // FIXME test
@@ -958,17 +975,29 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons
#endif
RunStartScript();
+ std::string newdir;
+ if(dir && strlen(dir))
+ newdir = std::string(dir);
+ else if(strlen(eventinfo->recordingDir))
+ newdir = std::string(eventinfo->recordingDir);
+ else
+ newdir = Directory;
+
mutex.lock();
- if(recmap.size() < RECORD_MAX_COUNT) {
+ if (IS_WEBTV(eventinfo->channel_id)) {
+ inst = new CStreamRec(eventinfo, newdir, timeshift, StreamVTxtPid, StreamPmtPid, StreamSubtitlePids);
+ error_msg = inst->Record();
+ if(error_msg == RECORD_OK) {
+ g_Zapit->setRecordMode(true);
+ recmap.insert(recmap_pair_t(inst->GetRecordingId(), inst));
+ if(timeshift)
+ autoshift = true;
+ } else {
+ delete inst;
+ }
+ } else if(recmap.size() < RECORD_MAX_COUNT) {
CFrontend * frontend = NULL;
if(CutBackNeutrino(eventinfo->channel_id, frontend)) {
- std::string newdir;
- if(dir && strlen(dir))
- newdir = std::string(dir);
- else if(strlen(eventinfo->recordingDir))
- newdir = std::string(eventinfo->recordingDir);
- else
- newdir = Directory;
inst = new CRecordInstance(eventinfo, newdir, timeshift, StreamVTxtPid, StreamPmtPid, StreamSubtitlePids);
@@ -1814,3 +1843,342 @@ bool CRecordManager::LinkTimeshift()
}
}
#endif
+
+CStreamRec::CStreamRec(const CTimerd::RecordingInfo * const eventinfo, std::string &dir, bool timeshift, bool stream_vtxt_pid, bool stream_pmt_pid, bool stream_subtitle_pids)
+ : CRecordInstance(eventinfo, dir, timeshift, stream_vtxt_pid, stream_pmt_pid, stream_subtitle_pids)
+{
+ ifcx = NULL;
+ ofcx = NULL;
+ stopped = true;
+ interrupt = false;
+}
+
+CStreamRec::~CStreamRec()
+{
+ Stop();
+ Close();
+}
+
+void CStreamRec::Close()
+{
+ if (ifcx) {
+ avformat_close_input(&ifcx);
+ }
+ if (ofcx) {
+ if (ofcx->pb) {
+ avio_close(ofcx->pb);
+ ofcx->pb = NULL;
+ }
+ avformat_free_context(ofcx);
+ }
+
+ ifcx = NULL;
+ ofcx = NULL;
+}
+
+void CStreamRec::GetPids(CZapitChannel * channel)
+{
+ channel = channel;
+}
+
+void CStreamRec::FillMovieInfo(CZapitChannel * channel, APIDList & apid_list)
+{
+ CRecordInstance::FillMovieInfo(channel, apid_list);
+ recMovieInfo->VideoType = 0;
+
+ for (unsigned i = 0; i < ofcx->nb_streams; i++) {
+ AVStream *st = ofcx->streams[i];
+ AVCodecContext * codec = st->codec;
+ if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
+ EPG_AUDIO_PIDS audio_pids;
+ AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
+ AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
+
+ std::string desc;
+ if (lang)
+ desc += lang->value;
+
+ if (title) {
+ if (desc.length() != 0)
+ desc += " ";
+ desc += title->value;
+ }
+ switch(codec->codec_id) {
+ case AV_CODEC_ID_AC3:
+ audio_pids.atype = 1;
+ break;
+ case AV_CODEC_ID_AAC:
+ audio_pids.atype = 5;
+ break;
+ case AV_CODEC_ID_EAC3:
+ audio_pids.atype = 7;
+ break;
+ case AV_CODEC_ID_MP2:
+ default:
+ audio_pids.atype = 0;
+ break;
+ }
+
+ audio_pids.selected = 0;
+ audio_pids.epgAudioPidName = desc;
+ audio_pids.epgAudioPid = st->id;
+ recMovieInfo->audioPids.push_back(audio_pids);
+ printf("%s: [AUDIO] 0x%x [%s]\n", __FUNCTION__, audio_pids.epgAudioPid, desc.c_str());
+
+ } else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ recMovieInfo->epgVideoPid = st->id;
+ if (codec->codec_id == AV_CODEC_ID_H264)
+ recMovieInfo->VideoType = 1;
+ printf("%s: [VIDEO] 0x%x \n", __FUNCTION__, recMovieInfo->epgVideoPid);
+ }
+ }
+}
+
+bool CStreamRec::Start()
+{
+ if (!stopped)
+ return false;
+ stopped = false;
+ int ret = start();
+ return (ret == 0);
+}
+
+bool CStreamRec::Stop(bool remove_event)
+{
+ if (stopped)
+ return false;
+
+ time_t end_time = time_monotonic();
+ CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, rec_stop_msg.c_str());
+ if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg)
+ hintBox.paint();
+
+ printf("%s: Stopping...\n", __FUNCTION__);
+ interrupt = true;
+ stopped = true;
+ int ret = join();
+ interrupt = false;
+
+ if(recording_id && remove_event) {
+ g_Timerd->stopTimerEvent(recording_id);
+ recording_id = 0;
+ }
+
+ struct stat test;
+ std::string xmlfile = std::string(filename) + ".xml";
+ if(stat(xmlfile.c_str(), &test) == 0){
+ recMovieInfo->clear();
+ std::string tsfile = std::string(filename) + ".ts";
+ recMovieInfo->file.Name = tsfile;
+ cMovieInfo->loadMovieInfo(recMovieInfo);//restore user bookmark
+ }
+
+ recMovieInfo->length = (int) round((double) (end_time - time_started) / (double) 60);
+ printf("%s: len %d\n", __FUNCTION__, recMovieInfo->length);
+
+ SaveXml();
+ hintBox.hide();
+ return (ret == 0);
+}
+
+record_error_msg_t CStreamRec::Record()
+{
+ APIDList apid_list;
+
+ CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_RECORDING_START));
+ if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg)
+ hintBox.paint();
+
+ printf("%s: channel %" PRIx64 " recording_id %d\n", __func__, channel_id, recording_id);
+ CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
+ if(channel == NULL) {
+ printf("%s: channel %" PRIx64 " not found!\n", __func__, channel_id);
+ hintBox.hide();
+ return RECORD_INVALID_CHANNEL;
+ }
+
+ record_error_msg_t ret = MakeFileName(channel);
+ if(ret != RECORD_OK) {
+ hintBox.hide();
+ return ret;
+ }
+
+ if (!Open(channel) || !Start()) {
+ Close();
+ hintBox.hide();
+ return RECORD_FAILURE;
+ }
+
+ FillMovieInfo(channel, apid_list);
+ SaveXml();
+ if(recording_id == 0) {
+ time_t now = time(NULL);
+ int record_end;
+ if (autoshift) {
+ record_end = now+g_settings.timeshift_hours*60*60;
+ } else {
+ record_end = now+g_settings.record_hours*60*60;
+ if (g_settings.recording_epg_for_end) {
+ int pre=0, post=0;
+ CEPGData epgData;
+ if (CEitManager::getInstance()->getActualEPGServiceKey(channel->getEpgID(), &epgData )) {
+ g_Timerd->getRecordingSafety(pre, post);
+ if (epgData.epg_times.startzeit > 0)
+ record_end = epgData.epg_times.startzeit + epgData.epg_times.dauer + post;
+ }
+ }
+ }
+ recording_id = g_Timerd->addImmediateRecordTimerEvent(channel_id, now, record_end, epgid, epg_time, apidmode);
+ printf("%s: channel %" PRIx64 " -> timer eventID %d\n", __func__, channel_id, recording_id);
+ }
+ hintBox.hide();
+
+ return RECORD_OK;
+}
+
+int CStreamRec::Interrupt(void * data)
+{
+ CStreamRec * sr = (CStreamRec*) data;
+ if (sr->interrupt)
+ return 1;
+ return 0;
+}
+
+bool CStreamRec::Open(CZapitChannel * channel)
+{
+ std::string url = channel->getUrl();
+
+ if (url.empty())
+ return false;
+
+ //av_log_set_level(AV_LOG_VERBOSE);
+ av_register_all();
+ avcodec_register_all();
+ avformat_network_init();
+ printf("%s: Open input [%s]....\n", __FUNCTION__, url.c_str());
+
+ AVDictionary *options = NULL;
+
+ if (avformat_open_input(&ifcx, url.c_str(), NULL, &options) != 0) {
+ printf("%s: Cannot open input [%s]!\n", __FUNCTION__, url.c_str());
+ return false;
+ }
+
+ if (avformat_find_stream_info(ifcx, NULL) < 0) {
+ printf("%s: Cannot find stream info [%s]!\n", __FUNCTION__, channel->getUrl().c_str());
+ return false;
+ }
+ if (!strstr(ifcx->iformat->name, "applehttp") && !strstr(ifcx->iformat->name, "mpegts")) {
+ printf("%s: not supported format [%s]!\n", __FUNCTION__, ifcx->iformat->name);
+ return false;
+ }
+
+ AVIOInterruptCB int_cb = { Interrupt, this };
+ ifcx->interrupt_callback = int_cb;
+
+ snprintf(ifcx->filename, sizeof(ifcx->filename), "%s", channel->getUrl().c_str());
+ av_dump_format(ifcx, 0, ifcx->filename, 0);
+
+ std::string tsfile = std::string(filename) + ".ts";
+ AVOutputFormat *ofmt = av_guess_format(NULL, tsfile.c_str(), NULL);
+ if (ofmt == NULL) {
+ printf("%s: av_guess_format for [%s] failed!\n", __FUNCTION__, tsfile.c_str());
+ return false;
+ }
+
+ ofcx = avformat_alloc_context();
+ ofcx->oformat = ofmt;
+
+ if (avio_open2(&ofcx->pb, tsfile.c_str(), AVIO_FLAG_WRITE, NULL, NULL) < 0) {
+ printf("%s: avio_open2 for [%s] failed!\n", __FUNCTION__, tsfile.c_str());
+ return false;
+ }
+
+ av_dict_copy(&ofcx->metadata, ifcx->metadata, 0);
+ snprintf(ofcx->filename, sizeof(ofcx->filename), "%s", tsfile.c_str());
+
+ stream_index = -1;
+ int stid = 0x200;
+ for (unsigned i = 0; i < ifcx->nb_streams; i++) {
+ AVCodecContext * iccx = ifcx->streams[i]->codec;
+
+ AVStream *ost = avformat_new_stream(ofcx, iccx->codec);
+ avcodec_copy_context(ost->codec, iccx);
+ av_dict_copy(&ost->metadata, ifcx->streams[i]->metadata, 0);
+ ost->time_base = iccx->time_base;
+ ost->id = stid++;
+ if (iccx->codec_type == AVMEDIA_TYPE_VIDEO) {
+ stream_index = i;
+ } else if (stream_index < 0)
+ stream_index = i;
+ }
+ av_log_set_level(AV_LOG_VERBOSE);
+ av_dump_format(ofcx, 0, ofcx->filename, 1);
+ av_log_set_level(AV_LOG_WARNING);
+
+ return true;
+}
+
+void CStreamRec::run()
+{
+ AVPacket pkt;
+
+ time_t now = 0;
+ time_t tstart = time_monotonic();
+ time_started = tstart;
+ start_time = time(0);
+ avformat_write_header(ofcx, NULL);
+
+ double total = 0;
+ while (!stopped) {
+ av_init_packet(&pkt);
+ if (av_read_frame(ifcx, &pkt) < 0)
+ break;
+ if (pkt.stream_index < 0)
+ continue;
+ av_write_frame(ofcx, &pkt);
+ av_free_packet(&pkt);
+
+ if (pkt.stream_index == stream_index) {
+ total += (double) 1000 * pkt.duration * av_q2d(ifcx->streams[stream_index]->time_base);
+ //printf("PKT: duration %d (%f) total %f (ifcx->duration %016llx\n", pkt.duration, duration, total, ifcx->duration);
+ }
+
+ if (now == 0)
+ WriteHeader(1000);
+ now = time_monotonic();
+ if (now - tstart > 1) {
+ tstart = now;
+ WriteHeader(total);
+ }
+ }
+
+ av_read_pause(ifcx);
+ av_write_trailer(ofcx);
+ WriteHeader(total);
+ printf("%s: Stopped.\n", __FUNCTION__);
+}
+
+typedef struct pvr_file_info
+{
+ uint32_t uDuration; /* Time duration in Ms */
+ uint32_t uTSPacketSize;
+} PVR_FILE_INFO;
+
+void CStreamRec::WriteHeader(uint32_t duration)
+{
+ std::string tsfile = std::string(filename) + ".ts";
+ //printf("%s: [%s] duration %d\n", __FUNCTION__, tsfile.c_str(), duration);
+
+ int srcfd = open(tsfile.c_str(), O_WRONLY | O_LARGEFILE);
+ if (srcfd >= 0) {
+ if (lseek64(srcfd, 188-sizeof(PVR_FILE_INFO), SEEK_SET) >= 0) {
+ PVR_FILE_INFO pinfo;
+ pinfo.uDuration = duration;
+ pinfo.uTSPacketSize = 188;
+ write(srcfd, (uint8_t *)&pinfo, sizeof(PVR_FILE_INFO));
+ }
+ close(srcfd);
+ } else
+ perror(tsfile.c_str());
+}
diff --git a/src/driver/record.h b/src/driver/record.h
index 7ef9b5b8f..509cc46e2 100644
--- a/src/driver/record.h
+++ b/src/driver/record.h
@@ -40,6 +40,11 @@
#endif
#include
+#include
+
+extern "C" {
+#include
+}
#define REC_MAX_APIDS 10
#define FILENAMEBUFFERSIZE 1024
@@ -69,7 +74,7 @@ enum record_error_msg_t
class CRecordInstance
{
- private:
+ protected:
typedef struct {
uint32_t apid;
unsigned int index;//FIXME not used ?
@@ -101,22 +106,22 @@ class CRecordInstance
MI_MOVIE_INFO * recMovieInfo;
cRecord * record;
- void GetPids(CZapitChannel * channel);
+ virtual void GetPids(CZapitChannel * channel);
+ virtual void FillMovieInfo(CZapitChannel * channel, APIDList & apid_list);
+ record_error_msg_t Start(CZapitChannel * channel);
void ProcessAPIDnames();
void FilterPids(APIDList & apid_list);
- void FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis);
record_error_msg_t MakeFileName(CZapitChannel * channel);
bool SaveXml();
- record_error_msg_t Start(CZapitChannel * channel);
void WaitRecMsg(time_t StartTime, time_t WaitTime);
void MakeExtFileName(CZapitChannel * channel, std::string &FilenameTemplate);
void StringReplace(std::string &str, const std::string search, const std::string rstr);
public:
CRecordInstance(const CTimerd::RecordingInfo * const eventinfo, std::string &dir, bool timeshift = false, bool stream_vtxt_pid = false, bool stream_pmt_pid = false, bool stream_subtitle_pids = false);
- ~CRecordInstance();
+ virtual ~CRecordInstance();
- record_error_msg_t Record();
- bool Stop(bool remove_event = true);
+ virtual record_error_msg_t Record();
+ virtual bool Stop(bool remove_event = true);
bool Update();
void SetRecordingId(int id) { recording_id = id; };
@@ -200,6 +205,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
bool StartAutoRecord();
bool StopAutoRecord(bool lock = true);
void StopAutoTimer();
+ bool CheckRecordingId_if_Timeshift(int recid);
MI_MOVIE_INFO * GetMovieInfo(const t_channel_id channel_id, bool timeshift = true);
const std::string GetFileName(const t_channel_id channel_id, bool timeshift = true);
@@ -235,4 +241,31 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/);
#endif
};
+
+class CStreamRec : public CRecordInstance, OpenThreads::Thread
+{
+ private:
+ AVFormatContext *ifcx;
+ AVFormatContext *ofcx;
+ bool stopped;
+ bool interrupt;
+ time_t time_started;
+ int stream_index;
+
+ void GetPids(CZapitChannel * channel);
+ void FillMovieInfo(CZapitChannel * channel, APIDList & apid_list);
+ bool Start();
+
+ void Close();
+ bool Open(CZapitChannel * channel);
+ void run();
+ void WriteHeader(uint32_t duration);
+ public:
+ CStreamRec(const CTimerd::RecordingInfo * const eventinfo, std::string &dir, bool timeshift = false, bool stream_vtxt_pid = false, bool stream_pmt_pid = false, bool stream_subtitle_pids = false);
+ ~CStreamRec();
+ record_error_msg_t Record();
+ bool Stop(bool remove_event = true);
+ static int Interrupt(void * data);
+};
+
#endif
diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp
index 45d384cf5..903b05ef8 100644
--- a/src/driver/streamts.cpp
+++ b/src/driver/streamts.cpp
@@ -504,7 +504,7 @@ bool CStreamManager::AddClient(int connfd)
int sendsize = 10*IN_SIZE;
unsigned int m = sizeof(sendsize);
- setsockopt(listenfd, SOL_SOCKET, SO_SNDBUF, (void *)&sendsize, m);
+ setsockopt(connfd, SOL_SOCKET, SO_SNDBUF, (void *)&sendsize, m);
if (stream->Start())
streams.insert(streammap_pair_t(channel_id, stream));
else
diff --git a/src/driver/volume.cpp b/src/driver/volume.cpp
index 52759f82f..a8407e172 100644
--- a/src/driver/volume.cpp
+++ b/src/driver/volume.cpp
@@ -37,6 +37,7 @@
#include
#include
#include
+#include
#include
#include
#include
diff --git a/src/eitd/SIsections.hpp b/src/eitd/SIsections.hpp
index b537cadaf..f5d652c31 100644
--- a/src/eitd/SIsections.hpp
+++ b/src/eitd/SIsections.hpp
@@ -194,7 +194,7 @@ class SIsectionTIME
parsed = 0;
parse(buf);
}
- time_t getTime() { return dvbtime; }
+ time_t getTime() const { return dvbtime; }
int is_parsed(void) const { return parsed; }
};
diff --git a/src/eitd/SIservices.hpp b/src/eitd/SIservices.hpp
index 186a58861..ee2c1d395 100644
--- a/src/eitd/SIservices.hpp
+++ b/src/eitd/SIservices.hpp
@@ -121,7 +121,7 @@ public:
int eitScheduleFlag(void) { return (int)flags.EIT_schedule_flag; }
int eitPresentFollowingFlag(void) { return (int)flags.EIT_present_following_flag; }
#endif
- int runningStatus(void) { return (int)flags.running_status; }
+ int runningStatus(void) const { return (int)flags.running_status; }
#if 0
// unused
int freeCAmode(void) { return (int)flags.free_CA_mode; }
diff --git a/src/eitd/SIutils.cpp b/src/eitd/SIutils.cpp
index 841fc04c3..7e225c2c2 100644
--- a/src/eitd/SIutils.cpp
+++ b/src/eitd/SIutils.cpp
@@ -139,6 +139,12 @@ int saveStringToXMLfile(FILE *out, const char *c, int /*withControlCodes*/)
case '\'':
fprintf(out, "'");
break;
+ case 0x0a:
+ fprintf(out,"
");
+ break;
+ case 0x0d:
+ fprintf(out,"
");
+ break;
#if 0
case 0x81:
case 0x82:
diff --git a/src/eitd/dmx.cpp b/src/eitd/dmx.cpp
index 36a7d0f78..87ee27e5c 100644
--- a/src/eitd/dmx.cpp
+++ b/src/eitd/dmx.cpp
@@ -276,8 +276,14 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
eit_extended_section_header *eit_extended_header;
+ bool use_viasat_epg_pid = false;
+#ifdef ENABLE_VIASATEPG
+ if (pID == 0x39)
+ use_viasat_epg_pid = true;
+#endif
+
/* filter == 0 && maks == 0 => EIT dummy filter to slow down EIT thread startup */
- if (pID == 0x12 && filters[filter_index].filter == 0 && filters[filter_index].mask == 0)
+ if ((pID == 0x12 || use_viasat_epg_pid) && filters[filter_index].filter == 0 && filters[filter_index].mask == 0)
{
//dprintf("dmx: dummy filter, sleeping for %d ms\n", timeoutInMSeconds);
usleep(timeoutInMSeconds * 1000);
@@ -397,7 +403,7 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
unsigned short current_tsid = 0;
uint8_t segment_last_section_number = last_section_number;
- if (pID == 0x12) {
+ if (pID == 0x12 || use_viasat_epg_pid) {
eit_extended_header = (eit_extended_section_header *)(buf+8);
current_onid = eit_extended_header->original_network_id_hi * 256 +
eit_extended_header->original_network_id_lo;
@@ -409,7 +415,7 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
sections_id_t s_id = create_sections_id(table_id, eh_tbl_extension_id, current_onid, current_tsid, section_number);
bool complete = false;
- if (pID == 0x12)
+ if (pID == 0x12 || use_viasat_epg_pid)
complete = check_complete(s_id, section_number, last_section_number, segment_last_section_number);
/* if we are not caching the already read sections (CN-thread), check EIT version and get out */
@@ -654,7 +660,12 @@ int DMX::change(const int new_filter_index, const t_channel_id new_current_servi
}
if (sections_debug) { // friendly debug output...
- if(pID==0x12 && filters[0].filter != 0x4e) { // Only EIT
+ bool use_viasat_epg_pid = false;
+#ifdef ENABLE_VIASATEPG
+ if (pID == 0x39)
+ use_viasat_epg_pid = true;
+#endif
+ if((pID==0x12 || use_viasat_epg_pid) && filters[0].filter != 0x4e) { // Only EIT
printdate_ms(stderr);
fprintf(stderr, "changeDMX [EIT]-> %d (0x%x/0x%x) %s (%ld seconds)\n",
new_filter_index, filters[new_filter_index].filter,
diff --git a/src/eitd/eitd.h b/src/eitd/eitd.h
index 81f4b5473..9018b4b2c 100644
--- a/src/eitd/eitd.h
+++ b/src/eitd/eitd.h
@@ -228,6 +228,7 @@ class CEitThread : public CEventsThread
void beforeSleep();
public:
CEitThread();
+ CEitThread(std::string tname, unsigned short pid = 0x12);
};
class CFreeSatThread : public CEventsThread
diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp
index cef1d1777..69689c3d3 100644
--- a/src/eitd/sectionsd.cpp
+++ b/src/eitd/sectionsd.cpp
@@ -37,7 +37,7 @@
#include
#include
#include
-
+#include
#include
#include
@@ -101,7 +101,7 @@ static bool messaging_zap_detected = false;
//NTP-Config
#define CONF_FILE CONFIGDIR "/neutrino.conf"
-std::string ntp_system_cmd_prefix = "ntpdate ";
+std::string ntp_system_cmd_prefix = find_executable("ntpdate") + " ";
std::string ntp_system_cmd;
std::string ntpserver;
@@ -134,6 +134,11 @@ static CTimeThread threadTIME;
static CEitThread threadEIT;
static CCNThread threadCN;
+#ifdef ENABLE_VIASATEPG
+// ViaSAT uses pid 0x39 instead of 0x12
+static CEitThread threadVSEIT("viasatThread", 0x39);
+#endif
+
#ifdef ENABLE_FREESATEPG
static CFreeSatThread threadFSEIT;
#endif
@@ -837,6 +842,10 @@ static void wakeupAll()
{
threadCN.change(0);
threadEIT.change(0);
+#ifdef ENABLE_VIASATEPG
+ threadVSEIT.change(0);
+#endif
+
#ifdef ENABLE_FREESATEPG
threadFSEIT.change(0);
#endif
@@ -959,6 +968,9 @@ static void commandserviceChanged(int connfd, char *data, const unsigned dataLen
threadCN.setCurrentService(messaging_current_servicekey);
threadEIT.setDemux(cmd->dnum);
threadEIT.setCurrentService(uniqueServiceKey /*messaging_current_servicekey*/);
+#ifdef ENABLE_VIASATEPG
+ threadVSEIT.setCurrentService(messaging_current_servicekey);
+#endif
#ifdef ENABLE_FREESATEPG
threadFSEIT.setCurrentService(messaging_current_servicekey);
#endif
@@ -1371,12 +1383,12 @@ void CTimeThread::waitForTimeset(void)
void CTimeThread::setSystemTime(time_t tim)
{
struct timeval tv;
-
+ struct tm t;
time_t now = time(NULL);
- struct tm *tmTime = localtime(&now);
+ struct tm *tmTime = localtime_r(&now, &t);
gettimeofday(&tv, NULL);
- timediff = (int64_t)tim * (int64_t)1000000 - (tv.tv_usec + tv.tv_sec * (int64_t)1000000);
+ timediff = int64_t(tim * 1000000 - (tv.tv_usec + tv.tv_sec * 1000000));
xprintf("%s: timediff %" PRId64 ", current: %02d.%02d.%04d %02d:%02d:%02d, dvb: %s", name.c_str(), timediff,
tmTime->tm_mday, tmTime->tm_mon+1, tmTime->tm_year+1900,
@@ -1392,8 +1404,8 @@ void CTimeThread::setSystemTime(time_t tim)
return;
if (timeset && abs(tim - tv.tv_sec) < 120) { /* abs() is int */
struct timeval oldd;
- tv.tv_sec = timediff / 1000000LL;
- tv.tv_usec = timediff % 1000000LL;
+ tv.tv_sec = time_t(timediff / 1000000LL);
+ tv.tv_usec = suseconds_t(timediff % 1000000LL);
if (adjtime(&tv, &oldd))
xprintf("adjtime(%d, %d) failed: %m\n", (int)tv.tv_sec, (int)tv.tv_usec);
else {
@@ -1728,6 +1740,11 @@ CEitThread::CEitThread()
{
}
+CEitThread::CEitThread(std::string tname, unsigned short pid)
+ : CEventsThread(tname, pid)
+{
+}
+
/* EIT thread hooks */
void CEitThread::addFilters()
{
@@ -2107,7 +2124,7 @@ static void *houseKeepingThread(void *)
if (*it == '/')
d.erase(it);
}
- writeEventsToFile((char *)d.c_str());
+ writeEventsToFile(d.c_str());
}
ecount = 0;
}
@@ -2167,12 +2184,21 @@ bool CEitManager::Start()
max_events = config.epg_max_events;
epg_save_frequently = config.epg_save_frequently;
- if (find_executable("ntpdate").empty())
- ntp_system_cmd_prefix = "ntpd -n -q -p ";
+ if (find_executable("ntpdate").empty()){
+ ntp_system_cmd_prefix = find_executable("ntpd");
+ if (!ntp_system_cmd_prefix.empty()){
+ ntp_system_cmd_prefix += " -n -q -p ";
+ ntp_system_cmd = ntp_system_cmd_prefix + ntpserver;
+ }
+ else{
+ printf("[sectionsd] NTP Error: time sync not possible, ntpdate/ntpd not found\n");
+ ntpenable = false;
+ }
+ }
printf("[sectionsd] Caching: %d days, %d hours Extended Text, max %d events, Events are old %d hours after end time\n",
config.epg_cache, config.epg_extendedcache, config.epg_max_events, config.epg_old_events);
- printf("[sectionsd] NTP: %s, server %s, command %s\n", ntpenable ? "enabled" : "disabled", ntpserver.c_str(), ntp_system_cmd_prefix.c_str());
+ printf("[sectionsd] NTP: %s, command %s\n", ntpenable ? "enabled" : "disabled", ntp_system_cmd.c_str());
xml_epg_filter = readEPGFilter();
@@ -2228,6 +2254,9 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
threadTIME.Start();
threadEIT.Start();
threadCN.Start();
+#ifdef ENABLE_VIASATEPG
+ threadVSEIT.Start();
+#endif
#ifdef ENABLE_FREESATEPG
threadFSEIT.Start();
@@ -2266,6 +2295,9 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
threadEIT.StopRun();
threadCN.StopRun();
threadTIME.StopRun();
+#ifdef ENABLE_VIASATEPG
+ threadVSEIT.StopRun();
+#endif
#ifdef ENABLE_SDT
threadSDT.StopRun();
#endif
@@ -2294,6 +2326,10 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
xprintf("join CN\n");
threadCN.Stop();
+#ifdef ENABLE_VIASATEPG
+ xprintf("join VSEIT\n");
+ threadVSEIT.Stop();
+#endif
#ifdef ENABLE_SDT
xprintf("join SDT\n");
@@ -2313,7 +2349,7 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
}
/* was: commandAllEventsChannelID sendAllEvents */
-void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text,bool all_chann)
+void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text,bool all_chann, int genre,int fsk)
{
dprintf("sendAllEvents for " PRINTF_CHANNEL_ID_TYPE "\n", serviceUniqueKey);
if(!eList.empty() && search == 0)//skip on search mode
@@ -2354,6 +2390,22 @@ void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEve
std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower);
copy = (eExtendedText.find(search_text) != std::string::npos);
}
+ if(copy && genre != 0xFF)
+ {
+ if((*e)->classifications.content==0)
+ copy=false;
+ if(copy && ((*e)->classifications.content < (genre & 0xf0 ) || (*e)->classifications.content > genre))
+ copy=false;
+ }
+ if(copy && fsk != 0)
+ {
+ if(fsk<0)
+ {
+ if( (*e)->getFSK() > abs(fsk))
+ copy=false;
+ }else if( (*e)->getFSK() < fsk)
+ copy=false;
+ }
}
if(copy) {
for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t)
@@ -2768,9 +2820,6 @@ void CEitManager::getChannelEvents(CChannelEventList &eList, t_channel_id *chidl
for (MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey::iterator e = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.begin(); e != mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end(); ++e)
{
uniqueNow = (*e)->get_channel_id();
- if (IS_WEBTV(uniqueNow))
- continue;
-
if (uniqueNow != uniqueOld)
{
diff --git a/src/eitd/sectionsd.h b/src/eitd/sectionsd.h
index 491a3963a..8972aa4ab 100644
--- a/src/eitd/sectionsd.h
+++ b/src/eitd/sectionsd.h
@@ -56,7 +56,7 @@ class CEitManager : public OpenThreads::Thread, public OpenThreads::Mutex
bool Stop();
void SetConfig(CSectionsdClient::epg_config &cfg) { config = cfg; };
- void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "", bool all_chann=false);
+ void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "", bool all_chann=false, int genre=0xFF,int fsk=0);
void getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next );
bool getEPGidShort(event_id_t epgID, CShortEPGData * epgdata);
bool getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata);
diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp
index 540135f7d..5c5835441 100644
--- a/src/eitd/xmlutil.cpp
+++ b/src/eitd/xmlutil.cpp
@@ -29,8 +29,9 @@
#include
#include
#include
-
+#include
#include
+#include
#include
#include
@@ -207,7 +208,7 @@ bool readEPGFilter(void)
epg_filter_is_whitelist = true;
if (xmlGetNumericAttribute(filter, "except_current_next", 10) == 1)
epg_filter_except_current_next = true;
- filter = filter->xmlChildrenNode;
+ filter = xmlChildrenNode(filter);
while (filter) {
@@ -219,7 +220,7 @@ bool readEPGFilter(void)
else
addEPGFilter(onid, tsid, sid);
- filter = filter->xmlNextNode;
+ filter = xmlNextNode(filter);
}
}
xmlFreeDoc(filter_parser);
@@ -239,7 +240,7 @@ void readDVBTimeFilter(void)
dprintf("Reading DVBTimeFilters\n");
xmlNodePtr filter = xmlDocGetRootElement(filter_parser);
- filter = filter->xmlChildrenNode;
+ filter = xmlChildrenNode(filter);
while (filter) {
@@ -248,7 +249,7 @@ void readDVBTimeFilter(void)
sid = xmlGetNumericAttribute(filter, "serviceID", 16);
addNoDVBTimelist(onid, tsid, sid);
- filter = filter->xmlNextNode;
+ filter = xmlNextNode(filter);
}
xmlFreeDoc(filter_parser);
}
@@ -258,7 +259,7 @@ void readDVBTimeFilter(void)
}
}
-void deleteOldfileEvents(char *epgdir)
+void deleteOldfileEvents(const char *epgdir)
{
std::string indexname = std::string(epgdir) + "/index.xml";
xmlDocPtr filter_parser = parseXmlFile(indexname.c_str());
@@ -268,199 +269,245 @@ void deleteOldfileEvents(char *epgdir)
if (filter_parser != NULL)
{
xmlNodePtr filter = xmlDocGetRootElement(filter_parser);
- filter = filter->xmlChildrenNode;
+ filter = xmlChildrenNode(filter);
while (filter) {
- filename = xmlGetAttribute(filter, "name");
- file = epgdir;
- file +="/";
- file +=filename;
- unlink(file.c_str());
- filter = filter->xmlNextNode;
+ const char * name = xmlGetAttribute(filter, "name");
+ if(name){
+ filename=name;
+ file = epgdir;
+ file +="/";
+ file +=filename;
+ unlink(file.c_str());
+ filter = xmlNextNode(filter);
+ }
}
xmlFreeDoc(filter_parser);
}
}
+bool readEventsFromFile(std::string &epgname, int &ev_count)
+{
+ xmlDocPtr event_parser = NULL;
+ xmlNodePtr service;
+ xmlNodePtr event;
+ t_original_network_id onid = 0;
+ t_transport_stream_id tsid = 0;
+ t_service_id sid = 0;
+
+ if (!(event_parser = parseXmlFile(epgname.c_str()))) {
+ dprintf("unable to open %s for reading\n", epgname.c_str());
+ return false;
+ }
+ service = xmlDocGetRootElement(event_parser);
+ service = xmlChildrenNode(service);
+
+ while (service) {
+ onid = xmlGetNumericAttribute(service, "original_network_id", 16);
+ tsid = xmlGetNumericAttribute(service, "transport_stream_id", 16);
+ sid = xmlGetNumericAttribute(service, "service_id", 16);
+
+ event = xmlChildrenNode(service);
+
+ while (event) {
+ SIevent e(onid,tsid,sid,xmlGetNumericAttribute(event, "id", 16));
+ uint8_t tid = xmlGetNumericAttribute(event, "tid", 16);
+ std::string contentClassification, userClassification;
+ if(tid)
+ e.table_id = tid;
+ e.table_id |= 0x80; /* make sure on-air data has a lower table_id */
+
+ xmlNodePtr node;
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "name"))) {
+ const char *s = xmlGetAttribute(node, "string");
+ if (s)
+ e.setName(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang")), s);
+ node = xmlNextNode(node);
+ }
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "text"))) {
+ const char *s = xmlGetAttribute(node, "string");
+ if (s)
+ e.setText(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang")), s);
+ node = xmlNextNode(node);
+ }
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "item"))) {
+#ifdef USE_ITEM_DESCRIPTION
+ const char *s = xmlGetAttribute(node, "string");
+ if (s)
+ e.item = s;
+#endif
+ node = xmlNextNode(node);
+ }
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "item_description"))) {
+#ifdef USE_ITEM_DESCRIPTION
+ const char *s = xmlGetAttribute(node, "string");
+ if (s)
+ e.itemDescription = s;
+#endif
+ node = xmlNextNode(node);
+ }
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "extended_text"))) {
+ const char *l = xmlGetAttribute(node, "lang");
+ const char *s = xmlGetAttribute(node, "string");
+ if (l && s)
+ e.appendExtendedText(ZapitTools::UTF8_to_Latin1(l), s);
+ node = xmlNextNode(node);
+ }
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "time"))) {
+ e.times.insert(SItime(xmlGetNumericAttribute(node, "start_time", 10),
+ xmlGetNumericAttribute(node, "duration", 10)));
+ node = xmlNextNode(node);
+ }
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "content"))) {
+ const char cl = xmlGetNumericAttribute(node, "class", 16);
+ contentClassification += cl;
+ const char cl2 = xmlGetNumericAttribute(node, "user", 16);
+ userClassification += cl2;
+ node = xmlNextNode(node);
+ }
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "component"))) {
+ SIcomponent c;
+ c.streamContent = xmlGetNumericAttribute(node, "stream_content", 16);
+ c.componentType = xmlGetNumericAttribute(node, "type", 16);
+ c.componentTag = xmlGetNumericAttribute(node, "tag", 16);
+ const char *s = xmlGetAttribute(node, "text");
+ if (s)
+ c.setComponent(s);
+ //e.components.insert(c);
+ e.components.push_back(c);
+ node = xmlNextNode(node);
+ }
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "parental_rating"))) {
+ const char *s = xmlGetAttribute(node, "country");
+ if (s)
+#if 0
+ e.ratings.insert(SIparentalRating(ZapitTools::UTF8_to_Latin1(s),
+ (unsigned char) xmlGetNumericAttribute(node, "rating", 10)));
+#endif
+ e.ratings.push_back(SIparentalRating(ZapitTools::UTF8_to_Latin1(s),
+ (unsigned char) xmlGetNumericAttribute(node, "rating", 10)));
+ node = xmlNextNode(node);
+ }
+
+ node = xmlChildrenNode(event);
+ while ((node = xmlGetNextOccurence(node, "linkage"))) {
+ SIlinkage l;
+ l.linkageType = xmlGetNumericAttribute(node, "type", 16);
+ l.transportStreamId = xmlGetNumericAttribute(node, "transport_stream_id", 16);
+ l.originalNetworkId = xmlGetNumericAttribute(node, "original_network_id", 16);
+ l.serviceId = xmlGetNumericAttribute(node, "service_id", 16);
+ const char *s = xmlGetAttribute(node, "linkage_descriptor");
+ if (s)
+ l.name = s;
+ e.linkage_descs.insert(e.linkage_descs.end(), l);
+ node = xmlNextNode(node);
+ }
+
+ if (!contentClassification.empty()) {
+#ifdef FULL_CONTENT_CLASSIFICATION
+ ssize_t off = e.classifications.reserve(2 * contentClassification.size());
+ if (off > -1)
+ for (unsigned i = 0; i < contentClassification.size(); i++)
+ off = e.classifications.set(off, contentClassification.at(i), userClassification.at(i));
+#else
+ e.classifications.content = contentClassification.at(0);
+ e.classifications.user = userClassification.at(0);
+#endif
+ }
+ addEvent(e, 0);
+ ev_count++;
+
+ event = xmlNextNode(event);
+ }
+
+ service = xmlNextNode(service);
+ }
+ xmlFreeDoc(event_parser);
+ return true;
+}
+
+static int my_filter(const struct dirent *entry)
+{
+ int len = strlen(entry->d_name);
+ if (len > 3 && entry->d_name[len-3] == 'x' && entry->d_name[len-2] == 'm' && entry->d_name[len-1] == 'l')
+ return 1;
+ return 0;
+}
+
+bool readEventsFromDir(std::string &epgdir, int &ev_count)
+{
+ struct dirent **namelist;
+ int n = scandir(epgdir.c_str(), &namelist, my_filter, NULL);
+ printf("[sectionsd] Reading Information from directory %s, file count %d\n", epgdir.c_str(), n);
+ if (n <= 0)
+ return false;
+
+ for (int i = 0; i < n; i++) {
+ std::string epgname = epgdir + namelist[i]->d_name;
+ readEventsFromFile(epgname, ev_count);
+ free(namelist[i]);
+ }
+ free(namelist);
+ return true;
+}
+
void *insertEventsfromFile(void * data)
{
set_threadname(__func__);
reader_ready=false;
- xmlDocPtr event_parser = NULL;
- xmlNodePtr eventfile = NULL;
- xmlNodePtr service = NULL;
- xmlNodePtr event = NULL;
- t_original_network_id onid = 0;
- t_transport_stream_id tsid = 0;
- t_service_id sid = 0;
std::string indexname;
std::string filename;
std::string epgname;
+ xmlNodePtr eventfile;
int ev_count = 0;
- char * epg_dir = (char *) data;
- indexname = std::string(epg_dir) + "index.xml";
-
- xmlDocPtr index_parser = parseXmlFile(indexname.c_str());
-
- if (index_parser == NULL) {
+ if (!data) {
reader_ready = true;
pthread_exit(NULL);
}
+ std::string epg_dir = (char *) data;
+ indexname = epg_dir + "index.xml";
+
time_t now = time_monotonic_ms();
+ xmlDocPtr index_parser = parseXmlFile(indexname.c_str());
+
+ if (index_parser == NULL) {
+ readEventsFromDir(epg_dir, ev_count);
+ printf("[sectionsd] Reading Information finished after %ld milliseconds (%d events)\n",
+ time_monotonic_ms()-now, ev_count);
+ reader_ready = true;
+ pthread_exit(NULL);
+ }
printdate_ms(stdout);
printf("[sectionsd] Reading Information from file %s:\n", indexname.c_str());
- eventfile = xmlDocGetRootElement(index_parser)->xmlChildrenNode;
+ eventfile = xmlDocGetRootElement(index_parser);
+ eventfile = xmlChildrenNode(eventfile);
while (eventfile) {
- filename = xmlGetAttribute(eventfile, "name");
+ const char * name = xmlGetAttribute(eventfile, "name");
+ if(name)
+ filename=name;
+
epgname = epg_dir + filename;
- if (!(event_parser = parseXmlFile(epgname.c_str()))) {
- dprintf("unable to open %s for reading\n", epgname.c_str());
- eventfile = eventfile->xmlNextNode;
- continue;
- }
- service = xmlDocGetRootElement(event_parser)->xmlChildrenNode;
+ readEventsFromFile(epgname, ev_count);
- while (service) {
- onid = xmlGetNumericAttribute(service, "original_network_id", 16);
- tsid = xmlGetNumericAttribute(service, "transport_stream_id", 16);
- sid = xmlGetNumericAttribute(service, "service_id", 16);
-
- event = service->xmlChildrenNode;
-
- while (event) {
- SIevent e(onid,tsid,sid,xmlGetNumericAttribute(event, "id", 16));
- uint8_t tid = xmlGetNumericAttribute(event, "tid", 16);
- std::string contentClassification, userClassification;
- if(tid)
- e.table_id = tid;
- e.table_id |= 0x80; /* make sure on-air data has a lower table_id */
-
- xmlNodePtr node;
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "name"))) {
- char *s = xmlGetAttribute(node, "string");
- if (s)
- e.setName(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang")), s);
- node = node->xmlNextNode;
- }
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "text"))) {
- char *s = xmlGetAttribute(node, "string");
- if (s)
- e.setText(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang")), s);
- node = node->xmlNextNode;
- }
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "item"))) {
-#ifdef USE_ITEM_DESCRIPTION
- char *s = xmlGetAttribute(node, "string");
- if (s)
- e.item = s;
-#endif
- node = node->xmlNextNode;
- }
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "item_description"))) {
-#ifdef USE_ITEM_DESCRIPTION
- char *s = xmlGetAttribute(node, "string");
- if (s)
- e.itemDescription = s;
-#endif
- node = node->xmlNextNode;
- }
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "extended_text"))) {
- char *l = xmlGetAttribute(node, "lang");
- char *s = xmlGetAttribute(node, "string");
- if (l && s)
- e.appendExtendedText(ZapitTools::UTF8_to_Latin1(l), s);
- node = node->xmlNextNode;
- }
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "time"))) {
- e.times.insert(SItime(xmlGetNumericAttribute(node, "start_time", 10),
- xmlGetNumericAttribute(node, "duration", 10)));
- node = node->xmlNextNode;
- }
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "content"))) {
- char cl = xmlGetNumericAttribute(node, "class", 16);
- contentClassification += cl;
- cl = xmlGetNumericAttribute(node, "user", 16);
- userClassification += cl;
- node = node->xmlNextNode;
- }
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "component"))) {
- SIcomponent c;
- c.streamContent = xmlGetNumericAttribute(node, "stream_content", 16);
- c.componentType = xmlGetNumericAttribute(node, "type", 16);
- c.componentTag = xmlGetNumericAttribute(node, "tag", 16);
- char *s = xmlGetAttribute(node, "text");
- if (s)
- c.setComponent(s);
- //e.components.insert(c);
- e.components.push_back(c);
- node = node->xmlNextNode;
- }
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "parental_rating"))) {
- char *s = xmlGetAttribute(node, "country");
- if (s)
-#if 0
- e.ratings.insert(SIparentalRating(ZapitTools::UTF8_to_Latin1(s),
- (unsigned char) xmlGetNumericAttribute(node, "rating", 10)));
-#endif
- e.ratings.push_back(SIparentalRating(ZapitTools::UTF8_to_Latin1(s),
- (unsigned char) xmlGetNumericAttribute(node, "rating", 10)));
- node = node->xmlNextNode;
- }
-
- node = event->xmlChildrenNode;
- while ((node = xmlGetNextOccurence(node, "linkage"))) {
- SIlinkage l;
- l.linkageType = xmlGetNumericAttribute(node, "type", 16);
- l.transportStreamId = xmlGetNumericAttribute(node, "transport_stream_id", 16);
- l.originalNetworkId = xmlGetNumericAttribute(node, "original_network_id", 16);
- l.serviceId = xmlGetNumericAttribute(node, "service_id", 16);
- char *s = xmlGetAttribute(node, "linkage_descriptor");
- if (s)
- l.name = s;
- e.linkage_descs.insert(e.linkage_descs.end(), l);
- node = node->xmlNextNode;
- }
-
- if (!contentClassification.empty()) {
-#ifdef FULL_CONTENT_CLASSIFICATION
- ssize_t off = e.classifications.reserve(2 * contentClassification.size());
- if (off > -1)
- for (unsigned i = 0; i < contentClassification.size(); i++)
- off = e.classifications.set(off, contentClassification.at(i), userClassification.at(i));
-#else
- e.classifications.content = contentClassification.at(0);
- e.classifications.user = userClassification.at(0);
-#endif
- }
- addEvent(e, 0);
- ev_count++;
-
- event = event->xmlNextNode;
- }
-
- service = service->xmlNextNode;
- }
- xmlFreeDoc(event_parser);
-
- eventfile = eventfile->xmlNextNode;
+ eventfile = xmlNextNode(eventfile);
}
xmlFreeDoc(index_parser);
@@ -509,8 +556,12 @@ static void write_indexxml_footer(FILE *fd)
fprintf(fd, "\n");
}
-void writeEventsToFile(char *epgdir)
+void writeEventsToFile(const char *epgdir)
{
+ if(check_dir(epgdir)){
+ return;
+ }
+
FILE * indexfile = NULL;
FILE * eventfile = NULL;
std::string filename("");
@@ -545,7 +596,7 @@ void writeEventsToFile(char *epgdir)
onid = (*e)->original_network_id;
tsid = (*e)->transport_stream_id;
sid = (*e)->service_id;
- snprintf(eventname, 17, "%04x%04x%04x.xml", onid, tsid, sid);
+ snprintf(eventname, 17, "%04x%04x%04x.xml", tsid, onid, sid);
filename = (std::string)epgdir + "/" + (std::string)eventname;
if (!(eventfile = fopen(filename.c_str(), "w"))) {
goto _done;
diff --git a/src/eitd/xmlutil.h b/src/eitd/xmlutil.h
index 298bb54c4..2fd3bb38a 100644
--- a/src/eitd/xmlutil.h
+++ b/src/eitd/xmlutil.h
@@ -35,7 +35,9 @@
#include
void *insertEventsfromFile(void * data);
-void writeEventsToFile(char *epgdir);
+bool readEventsFromFile(std::string &epgname, int &ev_count);
+bool readEventsFromDir(std::string &epgdir, int &ev_count);
+void writeEventsToFile(const char *epgdir);
bool readEPGFilter(void);
void readDVBTimeFilter(void);
diff --git a/src/global.h b/src/global.h
index c05a44822..94e5a781c 100644
--- a/src/global.h
+++ b/src/global.h
@@ -46,6 +46,15 @@
#define NEUTRINO_SCAN_SETTINGS_FILE CONFIGDIR "/scan.conf"
#define NEUTRINO_PARENTALLOCKED_FILE DATADIR "/neutrino/.plocked"
+#define ICONSDIR_VAR "/var/tuxbox/icons/"
+#define LOCALEDIR_VAR "/var/tuxbox/locale"
+#define THEMESDIR_VAR "/var/tuxbox/themes"
+#define PLUGINDIR_VAR "/var/tuxbox/plugins"
+#define PLUGINDIR_MNT "/mnt/plugins"
+
+#define LOGODIR ICONSDIR "/logo"
+#define LOGODIR_VAR ICONSDIR_VAR "/logo"
+
NEUTRINO_CPP SNeutrinoSettings g_settings;
NEUTRINO_CPP SglobalInfo g_info;
@@ -75,8 +84,8 @@ class CEpgData;
NEUTRINO_CPP CEpgData *g_EpgData;
class CInfoViewer;
NEUTRINO_CPP CInfoViewer *g_InfoViewer;
-class CNeutrinoEventList;
-NEUTRINO_CPP CNeutrinoEventList *g_EventList;
+class CEventList;
+NEUTRINO_CPP CEventList *g_EventList;
class CLocaleManager;
NEUTRINO_CPP CLocaleManager *g_Locale;
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
index ed220d62f..d9dcc780f 100644
--- a/src/gui/Makefile.am
+++ b/src/gui/Makefile.am
@@ -6,15 +6,20 @@ version.h:
echo '#define BUILT_DATE "'`date`'"' > $@
@if test -d $(top_srcdir)/.git ; then \
pushd $(top_srcdir) ; \
- GITDESCRIBE=$$(git describe --always --dirty || echo 'VCS failed') ; \
+ GITBRANCH=$$(git rev-parse --abbrev-ref HEAD) ; \
+ GITDESCRIBE=$$(git describe --always --tags --dirty || echo 'VCS failed') ; \
popd ; \
- echo '#define VCS "'$${GITDESCRIBE}'"' >> $@ ; \
+ echo '#define VCS "'$${GITDESCRIBE} [$${GITBRANCH}]'"' >> $@ ; \
fi
noinst_HEADERS = version.h
.PHONY: version.h
SUBDIRS = bedit components widget
+#if ENABLE_LUA
+SUBDIRS += lua
+#endif
+
AM_CPPFLAGS += \
-I$(top_builddir) \
-I$(top_srcdir) \
@@ -29,7 +34,6 @@ AM_CPPFLAGS += \
-I$(top_srcdir)/lib/libupnpclient \
@SIGC_CFLAGS@ \
@CURL_CFLAGS@ \
- @LUA_CFLAGS@ \
@FREETYPE_CFLAGS@ \
@AVFORMAT_CFLAGS@ \
@HWLIB_CFLAGS@
@@ -113,9 +117,6 @@ libneutrino_gui_a_SOURCES += \
test_menu.cpp
endif
-libneutrino_gui_a_SOURCES += \
- luainstance.cpp
-
libneutrino_gui2_a_SOURCES = \
cam_menu.cpp \
color.cpp \
diff --git a/src/gui/audio_select.cpp b/src/gui/audio_select.cpp
index c95ff6b82..51935640b 100644
--- a/src/gui/audio_select.cpp
+++ b/src/gui/audio_select.cpp
@@ -58,7 +58,7 @@ extern CAudioSetupNotifier * audioSetupNotifier;
CAudioSelectMenuHandler::CAudioSelectMenuHandler()
{
- width = w_max (40, 10);
+ width = 40;
}
CAudioSelectMenuHandler::~CAudioSelectMenuHandler()
@@ -96,7 +96,7 @@ int CAudioSelectMenuHandler::doMenu ()
{
int mode = CNeutrinoApp::getInstance()->getMode();
if (mode == NeutrinoMessages::mode_webtv) {
- CMoviePlayerGui::getInstance().selectAudioPid();
+ CMoviePlayerGui::getInstance(true).selectAudioPid();
return menu_return::RETURN_EXIT;
}
CMenuWidget AudioSelector(LOCALE_AUDIOSELECTMENUE_HEAD, NEUTRINO_ICON_AUDIO, width);
diff --git a/src/gui/audio_setup.cpp b/src/gui/audio_setup.cpp
index 2cc879df6..48d4f8637 100644
--- a/src/gui/audio_setup.cpp
+++ b/src/gui/audio_setup.cpp
@@ -52,11 +52,11 @@
extern CAudioSetupNotifier * audioSetupNotifier;
extern cAudio *audioDecoder;
-CAudioSetup::CAudioSetup(bool wizard_mode)
+CAudioSetup::CAudioSetup(int wizard_mode)
{
is_wizard = wizard_mode;
- width = w_max (40, 10);
+ width = 40;
selected = -1;
}
@@ -271,13 +271,6 @@ int CAudioSetup::showAudioSetup()
return res;
}
-//sets menu mode to "wizard" or "default"
-void CAudioSetup::setWizardMode(bool mode)
-{
- printf("[neutrino audio setup] %s set audio settings menu to mode %d...\n", __FUNCTION__, mode);
- is_wizard = mode;
-}
-
CTruVolumeNotifier::CTruVolumeNotifier(CMenuOptionChooser* o1, CMenuOptionChooser* o2, CMenuOptionNumberChooser *n1)
{
toDisable_oj[0]=o1;
diff --git a/src/gui/audio_setup.h b/src/gui/audio_setup.h
index 603643c20..ecb54a3fa 100644
--- a/src/gui/audio_setup.h
+++ b/src/gui/audio_setup.h
@@ -39,22 +39,15 @@ class CAudioSetup : public CMenuTarget
{
private:
int width, selected;
- bool is_wizard;
+ int is_wizard;
int showAudioSetup();
public:
- enum AUDIO_SETUP_MODE
- {
- AUDIO_SETUP_MODE_WIZARD_NO = 0,
- AUDIO_SETUP_MODE_WIZARD = 1
- };
-
- CAudioSetup(bool wizard_mode = AUDIO_SETUP_MODE_WIZARD_NO);
+ CAudioSetup(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
~CAudioSetup();
- bool getWizardMode() {return is_wizard;};
- void setWizardMode(bool mode);
+ void setWizardMode(int mode) {is_wizard = mode;};
int exec(CMenuTarget* parent, const std::string & actionKey);
};
diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp
index 970974e13..dc62a420d 100644
--- a/src/gui/audiomute.cpp
+++ b/src/gui/audiomute.cpp
@@ -30,6 +30,7 @@
#endif
#include
#include
+#include
#include
#include
#include
diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp
index 9d8d74b35..c359b35fa 100644
--- a/src/gui/audioplayer.cpp
+++ b/src/gui/audioplayer.cpp
@@ -42,6 +42,7 @@
#include
#include
+#include
#include
#include