diff -Nru gnome-dvb-daemon-0.1.23/acinclude.m4 gnome-dvb-daemon-0.2.7/acinclude.m4 --- gnome-dvb-daemon-0.1.23/acinclude.m4 2010-04-01 09:50:35.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/acinclude.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -AC_DEFUN([SHAMROCK_EXPAND_LIBDIR], -[ - expanded_libdir=`( - case $prefix in - NONE) prefix=$ac_default_prefix ;; - *) ;; - esac - case $exec_prefix in - NONE) exec_prefix=$prefix ;; - *) ;; - esac - eval echo $libdir - )` - AC_SUBST(expanded_libdir) -]) - -AC_DEFUN([SHAMROCK_EXPAND_BINDIR], -[ - expanded_bindir=`( - case $prefix in - NONE) prefix=$ac_default_prefix ;; - *) ;; - esac - case $exec_prefix in - NONE) exec_prefix=$prefix ;; - *) ;; - esac - eval echo $bindir - )` - AC_SUBST(expanded_bindir) -]) - -AC_DEFUN([SHAMROCK_EXPAND_DATADIR], -[ - case $prefix in - NONE) prefix=$ac_default_prefix ;; - *) ;; - esac - - case $exec_prefix in - NONE) exec_prefix=$prefix ;; - *) ;; - esac - - expanded_datadir=`(eval echo $datadir)` - expanded_datadir=`(eval echo $expanded_datadir)` - - AC_SUBST(expanded_datadir) -]) - -AC_DEFUN([AS_AC_EXPAND], -[ - EXP_VAR=[$1] - FROM_VAR=[$2] - - dnl first expand prefix and exec_prefix if necessary - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - dnl if no prefix given, then use /usr/local, the default prefix - if test "x$prefix" = "xNONE"; then - prefix=$ac_default_prefix - fi - dnl if no exec_prefix given, then use prefix - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - dnl loop until it doesn't change anymore - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var"="x$full_var"; then break; fi - full_var=$new_full_var - done - - dnl clean up - full_var=$new_full_var - AC_SUBST([$1], "$full_var") - - dnl restore prefix and exec_prefix - prefix=$prefix_save - exec_prefix=$exec_prefix_save -]) - diff -Nru gnome-dvb-daemon-0.1.23/aclocal.m4 gnome-dvb-daemon-0.2.7/aclocal.m4 --- gnome-dvb-daemon-0.1.23/aclocal.m4 2011-01-14 13:59:43.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/aclocal.m4 2011-12-10 09:27:23.000000000 +0000 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -156,7 +156,7 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])dnl +_PKG_TEXT]) ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) @@ -167,7 +167,7 @@ _PKG_TEXT -To get pkg-config, see .])dnl +To get pkg-config, see .]) ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS @@ -1478,4 +1478,3 @@ m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) m4_include([m4/python.m4]) -m4_include([acinclude.m4]) diff -Nru gnome-dvb-daemon-0.1.23/ChangeLog gnome-dvb-daemon-0.2.7/ChangeLog --- gnome-dvb-daemon-0.1.23/ChangeLog 2011-01-15 17:03:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/ChangeLog 2011-12-10 09:36:05.000000000 +0000 @@ -1,5682 +1,9579 @@ # Generated by Makefile. Do not edit. -2011-01-15 Sebastian Pölsterl +2011-12-10 Sebastian Pölsterl - * NEWS: [1054] Added release notes + * NEWS: Modified. -2011-01-15 Sebastian Pölsterl + Prepare 0.2.7 release - * po/el.po, - * po/hu.po: Added. +2011-12-10 Sebastian Pölsterl - * po/LINGUAS, - * po/ar.po, - * po/cs.po, - * po/da.po, - * po/de.po, - * po/en_GB.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/it.po, - * po/lt.po, - * po/pl.po, - * po/pt_BR.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: Modified. + * client/gnomedvb/DBusWrapper.py: Modified. - [1053] Updated translations + gnomedvb: Let get_adapter_info return a dict - Added Greek and Hungarian + This makes it compatible with previous versions -2011-01-15 Sebastian Pölsterl +2011-12-09 Sebastian Pölsterl - * po/gnome-dvb-daemon.pot: [1052] Updated POT file + * configure.ac: Modified. -2011-01-14 Sebastian Pölsterl + Post release version bump to 0.2.7 - * vapi/cstuff.c: [1051] Removed useless if-else case +=== version-0.2.6 === +2011-12-09 Sebastian Pölsterl - * src/Channel.vala, - * src/rtsp/Server.vala: [1050] Do not use hostname in rtsp streaming - URL but use the IPv4 address of the interface specified in the - settings file. + * NEWS: Modified. - The default and fallback is localhost. + Prepare 0.2.6 release - * vapi/cstuff.c, - * vapi/cstuff.h, - * vapi/cutils.vapi: [1049] Added helper function to retrieve name and - IPv4 address of all network interfaces +2011-12-09 Sebastian Pölsterl - * src/EPGScanner.vala, - * src/Recorder.vala, - * src/Settings.vala: [1048] Added getters for values in settings file + * client/totem-plugin/dvb-daemon.py: Modified. - * Makefile.am, - * configure.ac: [1047] Use upstream gettext instead of glib one + totem: Use gettext from gnomedvb module - * data/Makefile.am: [1046] Removed desktop_DATA from EXTRA_DIST +2011-12-09 Sebastian Pölsterl -2011-01-07 Sebastian Pölsterl + * tests/test-dvb-daemon.py: Modified. - * src/EventStorage.vala: Added. + Removed obsolete import of gobject - * Makefile.am, - * src/Schedule.vala: Modified. +2011-12-09 Sebastian Pölsterl - [1045] Detect overlapping EPG events and remove outdated events. + * configure.ac, + * src/dbus/IDBusManager.vala, + * src/Manager.vala, + * client/gnomedvb/DBusWrapper.py: Modified. - Moved handling of GSequence to new class EventStorage. + Added GetAdapterInfo method to Manager DBus interface. -2011-01-07 Sebastian Pölsterl + Drop dependency on gstreamer python module. - * src/Utils.vala: [1044] Added t_min, t_max and strdiff methods +2011-12-09 Sebastian Pölsterl - * src/Event.vala: [1043] Added get_start_timestamp and - get_overlap_percentage methods + * client/gnomedvb/userdirs/__init__.py, + * client/gnomedvb/userdirs/__userdirsmodule.c: Removed. -2010-12-05 Sebastian Pölsterl + * client/gnomedvb/__init__.py, + * client/gnomedvb/Makefile.am: Modified. - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [1042] gnomedvb: - Display adapter and frontend for each device in the setup assistant; - https://launchpad.net/bugs/683950 fixed - - * configure.ac, - * src/EPGScanner.vala, - * src/Scanner.vala, - * src/Schedule.vala, - * src/Settings.vala, - * src/Utils.vala, - * src/io/ChannelListWriter.vala, - * src/io/RecordingWriter.vala: [1041] Fixed compiler errors. Requires - Vala >= 0.11.2; https://launchpad.net/bugs/676263 fixed - - * src/Terrestrial/TerrestrialScanner.vala: [1040] Fixed parsing of - guard interval - - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala: [1039] Use length property to - get array length + gnomedvb: Remove userdirs module and use GLib via introspection + instead -2010-11-24 Sebastian Pölsterl +2011-11-23 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [1038] Totem: use dgettext to - avoid overriding Totem's translations; - https://launchpad.net/bugs/680519 fixed + * client/totem-plugin/dvb-daemon.py: Modified. -2010-11-15 Sebastian Pölsterl + totem-plugin: Change title of window to the name of the channel + that is currently playing - * client/gnomedvb/ui/widgets/SchedulePaned.py: [1037] SchedulePaned: - Don't allow to edit TextView +2011-11-23 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ScheduleView.py: [1036] Make ScheduleView - searchable by using the title + * src/EPGScanner.vala: Modified. - Merged lp:~patrick-niklaus/gnome-dvb-daemon/searchable + EPGScanner: Retrieve sid only once -2010-11-14 Patrick Niklaus +2011-11-09 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ScheduleView.py: [1035.1.2] Ignore the - case when searching in the schedule + * client/gnomedvb/__init__.py: Modified. - * client/gnomedvb/ui/widgets/ScheduleView.py: [1035.1.1] Make - ScheduleView searchable + Use ugettext to make sure we always get an utf8 encoded string -2010-10-11 Sebastian Pölsterl +2011-11-07 Sebastian Pölsterl - * configure.ac: [1035] Post release version bump to 0.1.23 + * client/gnomedvb/__init__.py: Modified. -=== version-0.1.22 === -2010-10-11 Sebastian Pölsterl + Don't import gettext twice - * NEWS: [1034] Added release notes +2011-10-30 Sebastian Pölsterl -2010-10-11 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/SchedulePaned.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. - * po/lt.po: Added. + Don't use deprecated HPaned and VPaned anymore - * po/LINGUAS, - * po/ar.po, - * po/cs.po, - * po/da.po, - * po/de.po, - * po/en_GB.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/gnome-dvb-daemon.pot, - * po/it.po, - * po/pl.po, - * po/pt_BR.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: Modified. +2011-10-30 Sebastian Pölsterl - [1033] Updated translations + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. -2010-10-11 Sebastian Pölsterl + Replace deprecated Gtk.Table with Gtk.Grid - * configure.ac: [1032] Updated minimum version of vala to 0.10.0, - gstreamer to 0.10.29 and gst-rtsp to 0.10.7 +2011-10-30 Sebastian Pölsterl - * src/rtsp/Server.vala: [1031] rtsp: set address of RTSPServer + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnomedvb/ui/widgets/Frame.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. -2010-10-05 Sebastian Pölsterl + Don't use deprecated widgets HBox, VBox, HButtonBox and VButtonBox + anymore - * src/Device.vala, - * src/database/SqlError.vala: [1030] Made errors public +2011-10-10 Sebastian Pölsterl -2010-10-02 Sebastian Pölsterl + * configure.ac: Modified. - * src/Scanner.vala, - * src/io/ChannelListWriter.vala: [1029] Fixed deprecation warning: use - string.length - - * client/gnomedvb/ui/widgets/ChannelsStore.py: [1028] gnomedvb: Insert - channels into correct group when using more than one device group - - * src/Schedule.vala: [1027] Schedule: Lock access when adding epg - events to database; https://launchpad.net/bugs/642388 fixed - - * src/database/sqlite/SqliteConfigTimersStore.vala, - * src/database/sqlite/SqliteDatabase.vala, - * src/database/sqlite/SqliteEPGStore.vala: [1026] Sqlite: Reset - statement after it has been executed instead of before it gets - executed next time + Post release version bump to 0.2.6 -2010-08-23 Sebastian Pölsterl +=== version-0.2.5 === +2011-10-10 Sebastian Pölsterl - * configure.ac: [1025] Post release version bump to 0.1.22 + * NEWS: Modified. -=== version-0.1.21 === -2010-08-23 Sebastian Pölsterl + Prepare 0.2.5 release - * NEWS: [1024] Added release notes +2011-10-10 Sebastian Pölsterl -2010-08-23 Sebastian Pölsterl + * configure.ac: Modified. - * po/it.po: Added. + Don't generate gzip tarball - * po/LINGUAS, - * po/ar.po, - * po/cs.po, - * po/da.po, - * po/de.po, - * po/en_GB.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/pt_BR.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: Modified. +2011-10-10 Sebastian Pölsterl - [1023] Added Italian translation. Updated translations. + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. -2010-08-23 Sebastian Pölsterl + Added additional countries for dvb-c initial tuning data - * po/gnome-dvb-daemon.pot: [1022] Updated POT file + Czech Republic, Denmark, Spain, France, Hungary, Luxemburg - * client/totem-plugin/dvb-daemon.py: [1021] totem: Remove hack to - modify Totem's recently used entry +2011-10-10 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [1020] totem: Monitor DBus for - changing owner of org.gnome.DVB + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. - * src/Channel.vala: [1019] Append channel name to rtsp URL + Added additional countries for dvb-t initial tuning data - * src/Utils.vala: [1018] Utils: Allow more characters in - remove_nonalphanums + Andorra, Azerbaijan, Croatia, Hungary, Israel, Iran, Lithuania, + Latvia, Romania, Slovenia, Viet Nam - * src/Device.vala: [1017] Device: Replaced critical with warning +2011-10-08 Sebastian Pölsterl -2010-08-11 Sebastian Pölsterl + * client/totem-plugin/dvb-daemon.py: Modified. - * data/org.gnome.UPnP.MediaServer2.DVBDaemon.service.in: Added. + Append recordings to TreeStore with a single function call - * data/Makefile.am: Modified. +2011-10-07 Sebastian Pölsterl - [1016] Added D-Bus service file for - org.gnome.UPnP.MediaServer2.DVBDaemon interface + * configure.ac: Modified. -2010-08-11 Sebastian Pölsterl + Post release version bump to 0.2.5 - * src/Main.vala: [1015] Main: Renamed option disable-rygel to disable- - mediaserver +=== version-0.2.4 === +2011-10-07 Sebastian Pölsterl - * src/Main.vala: [1014] Main: Added enable-mediaserver2 option to - command line interface + * NEWS: Modified. - * src/rygel/Services2.vala: [1013] MediaServer2: Calculate array index - correctly + Prepare 0.2.4 release -2010-08-09 Sebastian Pölsterl +2011-10-06 Sebastian Pölsterl - * src/Main.vala, - * src/Recorder.vala, - * src/Scanner.vala, - * src/Utils.vala: [1012] Replaced error calls with critical to avoid - unreachable code warnings + * configure.ac: Modified. - * src/ChannelFactory.vala, - * src/EPGScanner.vala: [1011] More adjustments to libgee deprecations + Bump minimum vala version to 0.14.0 - * src/Manager.vala: [1010] Manager: Adjusted to libgee deprecations +2011-10-06 Sebastian Pölsterl - * src/Recorder.vala: [1009] Recorder: Adjusted to libgee deprecations + * src/io/RecordingReader.vala: Modified. - * src/RecordingsStore.vala: [1008] RecordingsStore: Adjusted to libgee - deprecations + When searching for recordings, skip hidden directories and set + maximum recursion depth to three. - * src/ChannelList.vala: [1007] ChannelList: Adjusted to libgee - deprecations + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=659685 - * src/Schedule.vala: [1006] Schedule: Adjusted to libgee deprecations +2011-10-03 Alexandre Franke - * src/rygel/Services.vala: [1005] Moved previous MediaServerSepc - implementation and fixed compiler warnings + * po/fr.po: Modified. -2010-08-09 Sebastian Pölsterl + Update French translation - * src/rygel/Interfaces2.vala, - * src/rygel/Services2.vala: Added. +2011-09-29 Sebastian Pölsterl - * Makefile.am, - * src/Main.vala: Modified. + * src/ChannelFactory.vala: Modified. - [1004] Added initial implementation of Rygel's MediaServerSpec2 + Mark ForcedStopNotify as unowned -2010-07-16 Sebastian Pölsterl + Fixes issue with Vala 0.14 - * src/ChannelFactory.vala, - * src/Device.vala, - * src/EPGScanner.vala, - * src/Scanner.vala: [1003] Build fixes for Vala 0.9.3 +2011-09-29 Sebastian Pölsterl -2010-06-21 Sebastian Pölsterl + * src/Schedule.vala, + * src/rtsp/Server.vala, + * src/Main.vala, + * src/Manager.vala, + * src/EPGScanner.vala, + * src/Recorder.vala, + * src/DeviceGroup.vala, + * src/ChannelList.vala, + * src/Factory.vala: Modified. - * configure.ac: [1002] Post release version bump to 0.1.21 + Converted Factory to a GObject class. -=== version-0.1.20 === -2010-06-21 Sebastian Pölsterl + Static fields can only be initialized with constants in compact + classes. Using a GObject class, the mutexes are initialized once + the first Factory instance is created. See also + https://bugzilla.gnome.org/show_bug.cgi?id=636509 - * NEWS: [1001] Added release notes +2011-09-29 Sebastian Pölsterl - * po/ar.po, - * po/cs.po, - * po/da.po, - * po/de.po, - * po/en_GB.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/pt_BR.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: [1000] Updated translations + * src/Satellite/SatelliteChannel.vala, + * src/Terrestrial/TerrestrialChannel.vala, + * src/Cable/CableChannel.vala: Modified. -2010-06-19 Sebastian Pölsterl + Use this instead of base in Channel subclasses - * po/gnome-dvb-daemon.pot: [999] Updated .pot file + This is a work-around for + https://bugzilla.gnome.org/show_bug.cgi?id=659863 - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [998] gnomedvb: - Display signal strength and signal-to-noise ratio when scanning +2011-09-22 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py: [997] gnomedvb: Added frontend-stats - signal to scanner + * src/EventStorage.vala: Modified. - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [996] Scanner: added - frontend_stats signal that emits signal strength and signal to noise - ratio + Removed obsolete destroy function -2010-06-09 Sebastian Pölsterl +2011-09-22 Sebastian Pölsterl - * Makefile.am, - * configure.ac: [995] Require valac 0.9.1 und automake 1.11 + * src/RecordingsStore.vala, + * src/Schedule.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/Recorder.vala, + * src/ChannelList.vala, + * src/Utils.vala, + * src/EventStorage.vala: Modified. - * src/ChannelFactory.vala, - * src/Device.vala, - * src/EPGScanner.vala, - * src/Scanner.vala: [994] Adjust to changes in Vala 0.9.1 - - * src/ChannelFactory.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Recording.vala: [993] Use connect instead of += to connect to - signals + Make sure out parameters are always assigned a value -2010-06-05 Sebastian Pölsterl +2011-09-15 dmustieles - * src/ChannelFactory.vala: [992] ChannelFactory: set pipeline back to - playing in remove_channel if others are still watching it + * po/es.po: Modified. - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/gnomedvb/ui/widgets/DateTime.py: [991] Fixed bug where - current time wasn't displayed in timer dialog + Updated Spanish translation -2010-05-27 Sebastian Pölsterl +2011-09-13 Matej Urbančič - * configure.ac: [990] Post release version bump to 0.1.20 + * po/sl.po: Modified. -=== version-0.1.19 === -2010-05-27 Sebastian Pölsterl + Updated Slovenian translation - * NEWS: [989] Added release notes +2011-09-13 Martin Srebotnjak - * client/totem-plugin/dvb-daemon.py: [988] totem-plugin: Fixed opening - of DVB preferences window + * po/sl.po: Modified. - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [987] gnomedvb: - Catch error when retrieving icon from icon theme + Updated Slovenian translation -2010-05-26 Sebastian Pölsterl +2011-09-11 Sebastian Pölsterl - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [986] Scanner: Create - channels with Channel.without_schedule - - * src/Cable/CableChannel.vala, - * src/Channel.vala, - * src/Satellite/SatelliteChannel.vala, - * src/Terrestrial/TerrestrialChannel.vala: [985] Channel: added - Channel.without_schedule constructor + * configure.ac: Modified. -2010-05-23 Sebastian Pölsterl + Post release version bump to 0.2.4 - * configure.ac: [984] Post release version bump +=== version-0.2.3 === +2011-09-11 Sebastian Pölsterl -=== version-0.1.18 === -2010-05-23 Sebastian Pölsterl + * NEWS: Modified. - * NEWS: [983] Added release notes + Prepare 0.2.3 release - * README: [982] Added gudev dependency to README +2011-09-11 Sebastian Pölsterl -2010-05-23 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/RecordingsView.py: Modified. - * po/pt_BR.po: Added. + Changed order of columns in RecordingsView - * po/LINGUAS, - * po/ar.po, - * po/cs.po, - * po/da.po, - * po/de.po, - * po/en_GB.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: Modified. +2011-09-11 Sebastian Pölsterl - [981] Updated translations + * configure.ac: Modified. -2010-05-23 Sebastian Pölsterl + Check version of pygobject-3.0 instead of pygobject-2.0 - * client/gnomedvb/ui/widgets/SchedulePaned.py: [980] Don't append - newline if short description is empty +2011-09-11 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ScheduleStore.py: [979] Don't escape - extended description because it is displayed in a gtk.TextView + * README: Modified. -2010-05-22 Sebastian Pölsterl + Updated dependencies in README - * src/Schedule.vala: [978] Schedule: Use remove_all_events_older_than - method. Check if get_event returns none null value. +2011-09-11 Sebastian Pölsterl - * src/database/EPGStore.vala, - * src/database/sqlite/SqliteEPGStore.vala: [977] EPGStore: Removed - remove_all_events method, added remove_events_older_than + * configure.ac: Modified. - The latter removes all expired events in a single statement. + Raised pygobject minimum version to 2.90.1 -2010-05-20 Sebastian Pölsterl +2011-09-11 Sebastian Pölsterl - * src/Event.vala: [976] Event: made get_end_timestamp public + * configure.ac: Modified. -2010-05-18 Sebastian Pölsterl + Enable maintainer mode by default - * src/Schedule.vala: [975] Schedule: remove all expired events in a - single transaction +2011-09-05 Kjartan Maraas - * src/database/EPGStore.vala, - * src/database/sqlite/SqliteEPGStore.vala: [974] EPGStore: added - remove_all_events method that remove all events in one transaction + * po/LINGUAS: Modified. -2010-05-15 Sebastian Pölsterl + Added nb - * src/EPGScanner.vala: [973] Initiate channel_events attrobite in - construct method to avoid crash when on_eit_structure is called before - EPG scan started +2011-09-05 Kjartan Maraas -2010-05-13 Sebastian Pölsterl + * po/nb.po: Added. - * src/database/sqlite/SqliteConfigTimersStore.vala: [972] Group sql - statements into one transaction where possible + Added Norwegian bokmål translation -2010-05-12 Sebastian Pölsterl +2011-08-27 Sebastian Pölsterl - * client/gnomedvb/udev, - * client/gnomedvb/udev/__init__.py, - * client/gnomedvb/udev/_dvbudevmodule.c: Removed. + * src/Device.vala, + * src/Settings.vala, + * src/Manager.vala, + * src/Main.vala: Modified. - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/Makefile.am: Modified. + Allow to add fake devices to settings.ini - [971] Removed python udev module and use new DBus method instead + Example of a fake DVB-T device in settings.ini. Keep in mind that + channels.conf must contain valid tuning data for the specified + adapter type. -2010-05-12 Sebastian Pölsterl + [device.1] name=Something type=DVB-T adapter=1 frontend=0 + channels_file=/home/sebp/channels.conf recordings_dir=/tmp - * src/Manager.vala, - * src/dbus/IDBusManager.vala: [970] Added GetDevices method to manager - DBus interface to retrieve informations about devices via udev +2011-08-27 Sebastian Pölsterl -2010-05-10 Sebastian Pölsterl + * src/Device.vala, + * src/Manager.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala: Modified. - * src/ChannelFactory.vala, - * src/DeviceGroup.vala, - * src/Manager.vala: [969] Added methods to start/stop EPGScanner where - it is checked if epgscanner is enabled + Device: Removed unused group_id parameter - * src/Main.vala, - * src/Manager.vala: [968] Added support for hotplugging devices +2011-08-19 Sebastian Pölsterl - * Makefile.am: [967] Compile daemon with gudev library + * client/gnomedvb/ui/widgets/ChannelsView.py, + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py, + * client/gnomedvb/ui/wizard/__init__.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnome-dvb-setup, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py, + * client/gnomedvb/ui/timers/MessageDialogs.py, + * client/gnomedvb/ui/widgets/RunningNextView.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/widgets/RecordingsView.py, + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnome-dvb-control, + * client/gnomedvb/__init__.py, + * client/gnomedvb/ui/widgets/ChannelGroupsView.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/timers/CalendarDialog.py, + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. - * src/database/ConfigStore.vala, - * src/database/sqlite/SqliteConfigTimersStore.vala: [966] Added - get_parent_group method + Don't bind gettext domain globally to avoid interfering with + applications that import gnomedvb - * src/DeviceGroup.vala: [965] Added add_and_emit and remove_and_emit - methods that emit device_(added|removed) signal. +2011-08-16 Fran Dieguez - If the reference device is removed a new reference is assigned. + * po/LINGUAS: Modified. -2010-05-08 Sebastian Pölsterl + Added Galician to LINGUAS file - * src/EPGScanner.vala, - * src/Event.vala, - * src/Schedule.vala: [964] Use HashSet to store events in EPGScanner +2011-08-16 Fran Dieguez -2010-05-07 Sebastian Pölsterl + * po/gl.po: Added. - * src/EPGScanner.vala: [963] Add all detected events at once using - Schedule.add_all before next channel is scanned + Updated Galician translations - Don't parse audio/video components of events. Ignore already expired - events. +2011-08-16 Yinghua Wang - * src/Schedule.vala: [962] Added add_all function to schedule that - adds/updates all events in one transaction + * po/zh_CN.po: Added. - * src/database/sqlite/SqliteDatabase.vala: [961] Added - (begin|end)_transaction functions to SqliteDatabase + * po/LINGUAS: Modified. - * src/database/sqlite/SqliteEPGStore.vala: [960] Set synchronous to - OFF of events db for speed reasons + Add Simplified Chinese translation. - * src/Factory.vala, - * src/Main.vala, - * src/Recorder.vala, - * src/Schedule.vala: [959] Return owned values in Factory +2011-08-15 Sebastian Pölsterl -2010-05-04 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/ScheduleStore.py: Modified. - * po/gnome-dvb-daemon.pot: [958] Updated .pot file + Fixed retrieving iter pointing to start of previous day in + ScheduleStore - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [957] Added text - that scanning for channels may take some time. +2011-08-15 Sebastian Pölsterl -2010-04-20 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/ChannelsView.py, + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py, + * client/gnomedvb/ui/widgets/CellRendererDatetime.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * client/gnomedvb/ui/widgets/SchedulePaned.py, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py, + * client/gnomedvb/ui/widgets/RunningNextView.py, + * client/gnomedvb/DBusWrapper.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/widgets/HelpBox.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/widgets/RecordingsView.py, + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnomedvb/ui/widgets/Frame.py, + * client/gnomedvb/ui/widgets/ChannelGroupsView.py, + * client/totem-plugin/dvb-daemon.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala, - * src/Utils.vala: [956] Use line-based reader to read initial tuning - data. Only do the actual parsing of a single line in sub-classes. + Use GObject instead of gobject module - * src/Recorder.vala, - * src/Utils.vala: [955] Store file attributes in const variable +2011-08-08 Sebastian Pölsterl -2010-04-20 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/ScheduleStore.py: Modified. - * src/io/RecordingReader.vala, - * src/io/RecordingWriter.vala: Added. + Fixed bug where extended event description was not displayed when + selecting an event in SchedulePaned - * Makefile.am, - * src/Recorder.vala, - * src/Recording.vala, - * src/RecordingsStore.vala: Modified. +2011-07-19 Matej Urbančič - [954] Refactored reading and writing recordings file + * po/sl.po: Modified. -2010-04-19 Sebastian Pölsterl + Updated Slovenian translation - * src/Main.vala: [953] Load channels file in main method +2011-07-15 Matej Urbančič - * src/Device.vala, - * src/DeviceGroup.vala, - * src/Manager.vala, - * src/database/sqlite/SqliteConfigTimersStore.vala: [952] Added - new_with_type and new_full methods to Device class and removed - duplicate code. - - * src/ChannelList.vala, - * src/io/ChannelListReader.vala: [951] Store channels read from file - in the provided ChannelList instance + * po/sl.po: Modified. - * Makefile.am: [950] Updated Makefile with new file locations + Updated Slovenian translation -2010-04-19 Sebastian Pölsterl +2011-06-20 Matej Urbančič - * src/io: Added. + * po/sl.po: Modified. - * src/ChannelList.vala, - * src/Scanner.vala: Modified. + Updated Slovenian translation - * src/ChannelListReader.vala: Renamed to src/io/ChannelListReader.vala - and modified. - * src/ChannelListWriter.vala: Renamed to src/io/ChannelListWriter.vala - and modified. +2011-06-20 Sebastian Pölsterl - [949] Moved ChannelList(Reader|Writer) to io package dir. - Reimplemented read method. + * configure.ac: Modified. -2010-04-17 Sebastian Pölsterl + Post release version bump to 0.2.2 - * client/totem-plugin/dvb-daemon.py: [948] Use gnome-dvb-daemon domain - for gettext and locale +=== version-0.2.2 === +2011-06-20 Sebastian Pölsterl -2010-04-13 Sebastian Pölsterl + * NEWS: Modified. - * configure.ac: [947] Post release version bump to 0.1.18 + Prepare release 0.2.2 -=== version-0.1.17 === -2010-04-13 Sebastian Pölsterl +2011-06-10 Yuri Myasoedov - * NEWS: [946] Added release notes + * po/ru.po: Added. - * po/ar.po, - * po/cs.po, - * po/da.po, - * po/de.po, - * po/en_GB.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: [945] Updated translations - - * po/gnome-dvb-daemon.pot: [944] Updated .pot file - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * src/Device.vala: [943] Use adapter and frontend to determine type of - device instead of adapter only; https://launchpad.net/bugs/558806 - fixed - - * src/Schedule.vala: [942] Don't restore EPG events in constructor of - Schedule but delay the whole process. - - * src/database/sqlite/SqliteConfigTimersStore.vala, - * src/database/sqlite/SqliteDatabase.vala, - * src/database/sqlite/SqliteEPGStore.vala: [941] Improve sql queries - so we only query the stuff we actually need - - * src/Main.vala: [940] set timezone to avoid that strftime stats - /etc/localtime on every call - - * client/gnomedvb/ui/wizard/SetupWizard.py: [939] Made the call to - destroy the scanner async and show dialog with progressbar in the - meantime; https://launchpad.net/bugs/519696 fixed - - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [938] - Check if filename of initial tuning data is formated as we expect; - https://launchpad.net/bugs/518327 fixed + * po/LINGUAS: Modified. -2010-04-12 Sebastian Pölsterl + Added Russian Translation - * client/gnomedvb/udev/_dvbudevmodule.c: [937] Check for NULL values - when retrieving informations about a device with udev; - https://launchpad.net/bugs/558806 fixed +2011-06-03 Sebastian Pölsterl -2010-04-11 Sebastian Pölsterl + * data/org.gnome.UPnP.MediaServer1.DVBDaemon.service.in: Removed. - * vapi/cstuff.c, - * vapi/cstuff.h, - * vapi/cutils.vapi: [936] Added function for debugging using strace + * data/Makefile.am: Modified. -2010-04-09 Sebastian Pölsterl + Removed MediaServer1 D-Bus service file - * src/Scanner.vala: [935] Use tuning parameters from initial tuning - data instead of NIT; https://launchpad.net/bugs/548738 fixed +2011-05-29 Sebastian Pölsterl - * client/gnomedvb/userdirs/__userdirsmodule.c: [934] Convert XDG user - dir path utf8; https://launchpad.net/bugs/558583 fixed + * client/gnomedvb/DBusWrapper.py: Modified. -2010-04-08 Sebastian Pölsterl + Removed shebang from DBusWrapper.py - * src/ChannelFactory.vala: [933] Fixed possibly unassigned local - variable error +2011-05-29 Sebastian Pölsterl - * src/Manager.vala, - * src/Recorder.vala, - * src/Scanner.vala: [932] Fixed uncaught DBus.Error warnings + * src/io/ChannelListReader.vala, + * src/Channel.vala, + * src/Satellite/SatelliteChannel.vala, + * src/Cable/CableChannel.vala, + * src/Terrestrial/TerrestrialChannel.vala: Modified. - * src/Recorder.vala, - * src/Schedule.vala: [931] Catch SqlError + Make sure that Channel's GroupId is set in the constructor. -2010-04-06 Sebastian Pölsterl + This fixes a bug where EPG events where not restored at start time. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [930] Set - icon of gnome-dvb-control window to gnome-dvb-daemon +2011-05-29 Sebastian Pölsterl - * client/gnomedvb/ui/wizard/SetupWizard.py: [929] Set window icon and - header image of assistant to gnome-dvb-setup; - https://launchpad.net/bugs/497377 fixed - - * client/gnomedvb/DBusWrapper.py: [928] Removed main method from - DBusWrapper - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py: [927] Use udev instead of HAL to - retrieve devices + * src/database/sqlite/SqliteEPGStore.vala, + * src/Schedule.vala: Modified. -2010-04-03 Sebastian Pölsterl + Added more debug output - * configure.ac: [926] Check if glib python module exists during - configure +2011-05-23 Sebastian Pölsterl -2010-04-03 Sebastian Pölsterl + * configure.ac: Modified. - * data/gnome-dvb-control.desktop.in.in, - * data/gnome-dvb-setup.desktop.in.in, - * data/icons, - * data/icons/Makefile.am, - * data/icons/hicolor_apps_16x16_gnome-dvb-daemon.png, - * data/icons/hicolor_apps_16x16_gnome-dvb-setup.png, - * data/icons/hicolor_apps_22x22_gnome-dvb-daemon.png, - * data/icons/hicolor_apps_22x22_gnome-dvb-setup.png, - * data/icons/hicolor_apps_24x24_gnome-dvb-daemon.png, - * data/icons/hicolor_apps_24x24_gnome-dvb-setup.png, - * data/icons/hicolor_apps_32x32_gnome-dvb-daemon.png, - * data/icons/hicolor_apps_32x32_gnome-dvb-setup.png, - * data/icons/hicolor_apps_48x48_gnome-dvb-daemon.png, - * data/icons/hicolor_apps_48x48_gnome-dvb-setup.png, - * data/icons/hicolor_apps_64x64_gnome-dvb-daemon.png, - * data/icons/hicolor_apps_64x64_gnome-dvb-generic.png, - * data/icons/hicolor_apps_64x64_gnome-dvb-setup.png, - * data/icons/hicolor_apps_scalable_gnome-dvb-daemon.svg, - * data/icons/hicolor_apps_scalable_gnome-dvb-generic.svg, - * data/icons/hicolor_apps_scalable_gnome-dvb-setup.svg: Added. - - * .bzrignore, - * configure.ac, - * data/Makefile.am, - * po/POTFILES.in, - * po/POTFILES.skip, - * po/gnome-dvb-daemon.pot: Modified. + Post release version bump to 0.2.2 - [925] Added icons for gnome-dvb-control and gnome-dvb-setup (many - thanks to Klaus Staedler). +=== version-0.2.1 === +2011-05-23 Sebastian Pölsterl - Added .desktop files for gnome-dvb-control and gnome-dvb-setup. + * NEWS: Modified. -2010-04-02 Sebastian Pölsterl + Prepare 0.2.1 release - * src/Scanner.vala: [924] Don't destroy scanner if error is posted on - bus; https://launchpad.net/bugs/540937 fixed +2011-05-22 Giannis Katsampirhs - Avoid scheduling start_scan timeout multiple times. + * po/el.po: Modified. -2010-03-29 Sebastian Pölsterl + l10n: Updated Greek translation for gnome-dvb-daemon - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [923] Set - cursor to watch while reading list of antennas/providers; - https://launchpad.net/bugs/540948 fixed +2011-05-22 Mel Argyropoulou -2010-03-27 Sebastian Pölsterl + * po/el.po: Modified. - * client/gnomedvb/udev, - * client/gnomedvb/udev/__init__.py, - * client/gnomedvb/udev/_dvbudevmodule.c: Added. + l10n: Updated Greek translation for gnome-dvb-daemon - * client/gnomedvb/Makefile.am, - * configure.ac: Modified. +2011-05-22 Sebastian Pölsterl - [922] Added udev module to retrieve connected devices using gudev + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. -2010-03-23 Sebastian Pölsterl + Adjusted DVB-T brute-force scan to new signature of AddScanningData + method - * src/Recorder.vala: [921] Call ChannelFactory.stop_channel if setting - pipeline to playing failed + https://bugzilla.gnome.org/show_bug.cgi?id=650316 -2010-03-22 Sebastian Pölsterl +2011-05-18 Sebastian Pölsterl - * po/gnome-dvb-daemon.pot: [920] Updated pot file + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/RunningNextView.py: Modified. - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/BasePage.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/ui/wizard/pages/IntroPage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [919] Adjusted - layout of assistant - - * client/gnomedvb/ui/wizard/SetupWizard.py: [918] Fixed crash of - assistant on last page if in expert mode - - * src/Factory.vala, - * src/Manager.vala, - * src/RecordingsStore.vala: [917] Use unowned instead of deprecated - weak + gnomedvb: Check if return value of get_schedule is not None -2010-03-18 Sebastian Pölsterl +2011-05-18 Sebastian Pölsterl - * po/gnome-dvb-daemon.pot: [916] Updated pot file + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [915] Use - TreeView to display satellites, antennas and cable providers. Added - mnemonics; https://launchpad.net/bugs/540952 fixed + gnomedvb: Check if return value of get_scanner_for_device is not + None - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [914] Change - page type of ChannelScanPage to CONTENT marking the cancel button - sensitive; https://launchpad.net/bugs/540945 fixed +2011-05-18 Sebastian Pölsterl - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [913] Made - progressbar pulsing when fraction is not known, yet; - https://launchpad.net/bugs/540945 fixed + * client/gnomedvb/ui/preferences/Preferences.py, + * client/totem-plugin/dvb-daemon.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. - * configure.ac: [912] Post release version bump to 0.1.17 + gnomedvb: Always check if return value of get_device_group is not + None -=== version-0.1.16 === -2010-03-17 Sebastian Pölsterl +2011-05-18 Sebastian Pölsterl - * NEWS: [911] Added release notes + * src/Manager.vala: Modified. -2010-03-17 Sebastian Pölsterl + Manager: disconnect from destroyed signal before destroying + Scanners in shutdown. This fixes a concurrent modification + exception. - * po/cs.po, - * po/da.po, - * po/en_GB.po: Added. - - * po/LINGUAS, - * po/ar.po, - * po/de.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: Modified. +2011-05-13 Sebastian Pölsterl - [910] Added Czech, British English and Danisch translations. Updated - others. + * client/gnomedvb/ui/preferences/Preferences.py: Modified. -2010-03-17 Sebastian Pölsterl + gnomedvb: Launch gnome-dvb-setup when pressing on preferences + button - * tests/test-dvb-daemon.py: [909] Updated test suite to changes in - ChannelInfo struct +2011-05-13 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ChannelsStore.py, - * client/gnomedvb/ui/widgets/RunningNextStore.py: [908] Adjusted to - changes in ChannelInfo struct - - * po/gnome-dvb-daemon.pot: [907] Updated .pot file - - * client/gnomedvb/ui/widgets/ChannelsStore.py: [906] When grouping - channels add TV and Radio group by default. Escape names of groups and - channels. - - * src/ChannelList.vala, - * src/dbus/IDBusChannelList.vala: [905] Added is_radio field to - ChannelInfo struct - - * src/Channel.vala, - * src/ChannelList.vala, - * src/Scanner.vala: [904] Added is_radio method to Channel class + * client/gnomedvb/ui/preferences/Preferences.py: Modified. -2010-03-11 Sebastian Pölsterl + gnomedvb: Set window position of preferences window - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [903] Show error - message if no channels were found; https://launchpad.net/bugs/533533 - fixed - - * src/ChannelListWriter.vala: [902] Fixed crash when trying to close - stream that never was opened before; https://launchpad.net/bugs/533533 - fixed - - * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py: [901] Display - error message in the assitant instead as a dialog - - * client/gnomedvb/ui/wizard/SetupWizard.py: [900] Allow getting back - to adapters page when not in expert mode; - https://launchpad.net/bugs/531237 fixed +2011-05-10 Sebastian Pölsterl - * src/Scanner.vala: [899] Fixed crash in Scanner.Destroy; - https://launchpad.net/bugs/528849 fixed + * client/gnomedvb/__init__.py: Modified. -2010-02-23 Sebastian Pölsterl + Updated copyright - * configure.ac: [898] Post release version bump to 0.1.16 +2011-05-10 Sebastian Pölsterl -=== version-0.1.15 === -2010-02-23 Sebastian Pölsterl + * client/gnomedvb/defs.py.in: Modified. - * NEWS: [897] Added release notes + Removed unused variables from defs.py.in -2010-02-23 Sebastian Pölsterl +2011-05-10 Sebastian Pölsterl - * po/ar.po: Added. + * client/gnomedvb/__init__.py: Modified. - * po/LINGUAS, - * po/de.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/sv.po, - * po/te.po, - * po/tr.po: Modified. + Fixed binding gettext domain - [896] Updated translations +2011-05-10 Sebastian Pölsterl -2010-02-15 Sebastian Pölsterl + * configure.ac: Modified. - * src/EPGScanner.vala: [895] Check if loop is not null + Post release version bump to 0.2.1 - * src/Scanner.vala: [894] Avoid unhandled DBus.Error warning +=== version-0.2.0 === +2011-05-10 Sebastian Pölsterl -2010-02-05 Sebastian Pölsterl + * NEWS, + * configure.ac: Modified. - * src/ChannelFactory.vala, - * vapi/cutils.vapi: [893] Fixed Vala compiler warnings + Prepare 0.2.0 release -2010-02-04 Sebastian Pölsterl +2011-05-06 Sebastian Pölsterl - * configure.ac: [892] Updated configure.ac + * src/Channel.vala, + * src/Schedule.vala, + * src/rtsp/Server.vala, + * src/rygel/Services2.vala, + * src/Main.vala: Modified. -2010-01-30 Sebastian Pölsterl + Use async methods instead of calling the methods with Idle.add - * po/gnome-dvb-daemon.pot: [891] Updated .pot file + https://bugs.launchpad.net/bugs/769531 - * src/Recorder.vala: [890] Edit changed signal in SetDuration and - SetStartTime +2011-04-28 Matej Urbančič - * client/gnomedvb/ui/timers/TimerDialog.py: [889] Don't provide - default height + * po/sl.po: Modified. - * client/gnomedvb/ui/timers/EditTimersDialog.py: [888] Use - CellRendererDatetime. Added Edit button. + Updated Slovenian translation - * client/gnomedvb/ui/timers/TimerDialog.py: [887] Use DateTimeBox - widget to edit start time. Added option to provide channel, start time - and duration in the constructor. +2011-04-27 Piotr Drąg - * client/gnomedvb/ui/widgets/DateTime.py: [886] Converted DateTimeBox - to a gtk.Bin subclass. Implemented mnemonic_activate. Added mark_valid - method. + * po/pl.po: Modified. - * src/Manager.vala: [885] Made get_device_group_if_exist public + Updated Polish translation -2010-01-30 Sebastian Pölsterl +2011-04-26 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/DateTime.py: Added. + * src/EPGScanner.vala, + * src/Scanner.vala: Modified. - * client/gnomedvb/Makefile.am, - * po/POTFILES.in: Modified. + Use void* instead of bool as return value in GThread function - [884] Added DateTime widget + https://bugs.launchpad.net/gnome-dvb-daemon/+bug/704036 Patch by + DimStar -2010-01-30 Sebastian Pölsterl +2011-04-24 Marek Černocký - * client/gnomedvb/ui/widgets/CellRendererDatetime.py, - * client/gnomedvb/ui/widgets/RecordingsView.py: [883] Set default - format of CellRendererDatetime to %c + * po/cs.po: Modified. -2010-01-28 Sebastian Pölsterl + Updated Czech translation - * src/Scanner.vala: [882] Lock access to new_channels ArrayList; - https://launchpad.net/bugs/511271 fixed +2011-04-24 Sebastian Pölsterl -2010-01-26 Sebastian Pölsterl + * configure.ac: Modified. - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py: - [881] Use set_default_size rather than set_size_request + Updated url to bug tracker in configure.ac - * client/gnomedvb/ui/recordings/RecordingsDialog.py, - * client/gnomedvb/ui/widgets/RecordingsStore.py, - * client/gnomedvb/ui/widgets/RecordingsView.py: [880] Use - CellRendererDatetime in RecordingsView +2011-04-24 Jorge González -2010-01-26 Sebastian Pölsterl + * po/es.po: Modified. - * client/gnomedvb/ui/widgets/CellRendererDatetime.py: Added. + Updated Spanish translation - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. +2011-04-24 Jorge González - [879] Added CellRendererDatetime + * po/es.po: Modified. -2010-01-05 Sebastian Pölsterl + Updated Spanish translation - * tests/test-dvb-daemon.py: [878] Added tests for SetStartTime and - SetDuration +2011-04-23 Mario Blättermann - * client/gnomedvb/DBusWrapper.py: [877] Wrapped SetStartTime and - SetDuration + * po/de.po: Modified. - * src/Recorder.vala, - * src/dbus/IDBusRecorder.vala: [876] Added methods SetStartTime and - SetDuration to Recorder DBus interface + [l10n] Updated German translation - * src/Timer.vala: [875] Added methods set_start_time and - update_epg_event +2011-04-23 Sebastian Pölsterl -2010-01-03 Sebastian Pölsterl + * client/totem-plugin/dvb-daemon.py: Modified. - * client/gnomedvb/ui/recordings/DetailsDialog.py, - * client/gnomedvb/ui/widgets/DetailsDialog.py, - * client/gnomedvb/ui/widgets/RunningNextView.py, - * client/totem-plugin/dvb-daemon.py: [874] Added button to - DetailsDialog to schedule a recording; - https://launchpad.net/bugs/486771 fixed + Totem: Fixed a couple of issues revealed by pylint -2010-01-03 Sebastian Pölsterl +2011-04-23 Sebastian Pölsterl - * client/gnomedvb/ui/timers/MessageDialogs.py: Added. + * client/totem-plugin/dvb-daemon.py: Modified. - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/totem-plugin/dvb-daemon.py, - * po/POTFILES.in: Modified. + Totem: Fixed spawning of gnome-dvb-setup - [873] Moved dialogs informing the user about success/failure of - scheduling recording to seperate file +2011-04-22 Sebastian Pölsterl -2010-01-03 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/widgets/CellRendererDatetime.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/timers/MessageDialogs.py, + * client/gnomedvb/ui/timers/CalendarDialog.py, + * client/gnomedvb/ui/widgets/RunningNextView.py, + * client/gnomedvb/ui/widgets/ChannelGroupsStore.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py, + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/widgets/RunningNextStore.py, + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/recordings/RecordingsDialog.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/gnomedvb/ui/widgets/DetailsDialog.py: [872] Adjusted borders - and paddings between content area and buttons in dialogs + gnomedvb: Fixed a couple of issues revealed by pylint - * client/gnomedvb/ui/widgets/RunningNextView.py: [871] Avoid empty - line in description of event if short event information is empty +2011-04-21 Marek Černocký -2009-12-23 Sebastian Pölsterl + * po/cs.po: Modified. - * configure.ac: [870] Post release version bump to 0.1.15 + Updated Czech translation -=== version-0.1.14 === -2009-12-23 Sebastian Pölsterl +2011-04-21 Matej Urbančič - * client/gnomedvb/ui/widgets/ChannelsStore.py: [869] Fixed bug in - ChannelsStore when group has been added + * po/sl.po: Modified. - * client/totem-plugin/dvb-daemon.py: [868] Remember sort order when - changing sort type + Updated Slovenian translation -2009-12-23 Sebastian Pölsterl +2011-04-21 Daniel Mustieles - * po/tr.po: Added. + * po/es.po: Modified. - * po/LINGUAS, - * po/de.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/sv.po, - * po/te.po: Modified. + Updated Spanish translation - [867] Added Turkish translation and updated remaining. +2011-04-21 Sebastian Pölsterl -2009-12-23 Sebastian Pölsterl + * configure.ac: Modified. - * NEWS: [866] Added release notes + Post release version bump to 0.1.91 - * po/gnome-dvb-daemon.pot: [865] Updated .pot file +=== version-0.1.90 === +2011-04-21 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.totem-plugin.in: [864] Marked Totem - plugin as builtin so it is enabled by default; - https://launchpad.net/bugs/497381 fixed + * NEWS, + * configure.ac: Modified. -2009-12-22 Sebastian Pölsterl + Prepare 0.1.90 release - * client/totem-plugin/dvb-daemon.py: [863] Removed dialog asking the - user to start the setup. Only display DVB related stuff if at least - one device has been detected on startup. Re-wrote the way gnome-dvb- - setup is started. +2011-04-21 Sebastian Pölsterl -2009-12-21 Sebastian Pölsterl + * configure.ac: Modified. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [862] Use - gtk.image_new_from_icon_name to create icons for menus + Updated pygobject required version to 2.28.4 - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [861] Display - message if no devices could be found even if not in expert mode; - https://launchpad.net/bugs/497376 fixed +2011-04-21 Sebastian Pölsterl -2009-12-10 Sebastian Pölsterl + * gen-changelog.py: Added. - * src/ChannelFactory.vala: [860] Fixed bug when recording and rtsp - streaming of the same channel took place at the same time and the - pipeline stalled + * Makefile.am: Modified. -2009-12-01 Sebastian Pölsterl + Added script to generate ChangeLog file - * po/gnome-dvb-daemon.pot: [859] Updated translation template +2011-04-20 Matej Urbančič - * client/gnomedvb/ui/recordings/RecordingsDialog.py: [858] Made close - button default widget + * po/sl.po: Modified. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [857] - Adjusted mnemonics and shortcuts + Updated Slovenian translation - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/widgets/DetailsDialog.py: [856] Made close button - the default action +2011-04-19 Sebastian Pölsterl - * client/gnomedvb/ui/timers/CalendarDialog.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py: [855] Made Timers dialog - more HIG compliant + * src/Logging.vala: Added. - * client/gnomedvb/ui/widgets/DetailsDialog.py: [854] Use - TextFieldLabel + * src/ChannelFactory.vala, + * src/Scanner.vala, + * src/rtsp/Server.vala, + * vapi/cutils.vapi, + * src/Device.vala, + * src/rtsp/MediaFactory.vala, + * src/ScannedItem.vala, + * src/io/RecordingReader.vala, + * Makefile.am, + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/rygel/Services2.vala, + * src/Recorder.vala, + * src/DeviceGroup.vala, + * src/Utils.vala, + * src/RecordingsStore.vala, + * src/database/sqlite/SqliteDatabase.vala, + * src/io/ChannelListReader.vala, + * src/Main.vala, + * src/EPGScanner.vala, + * src/Settings.vala, + * src/ChannelList.vala, + * src/io/RecordingWriter.vala, + * src/Schedule.vala, + * src/Manager.vala, + * src/Recording.vala, + * src/Factory.vala: Modified. - * client/gnomedvb/__init__.py: [853] Only print hour, minute and - second if it's not 0 + Use new logging facility - * client/gnomedvb/ui/recordings/RecordingsDialog.py, - * client/gnomedvb/ui/widgets/DetailsDialog.py: [852] Made recordings - dialog more HIG compliant + Removed trailing whitespaces - * client/gnomedvb/ui/preferences/Dialogs.py: [851] Made dialogs in - preferences more HIG compliant +2011-04-19 Matej Urbančič - * client/gnomedvb/ui/preferences/Preferences.py: [850] Set border - width to 12 + * po/LINGUAS: Modified. - * client/gnomedvb/ui/widgets/Frame.py: [849] Added TextFieldLabel + Added sl for Slovenian translation -2009-11-29 Sebastian Pölsterl +2011-04-19 Matej Urbančič - * client/gnomedvb/ui/widgets/DetailsDialog.py: [848] Arrange labels in - table instead of VBox in DetailsDialog + * po/sl.po: Added. -2009-11-28 Sebastian Pölsterl + Added Slovenian translation - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py: - [847] Only display channel groups combobox if there's more than one - group - - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [846] Don't - display device groups combobox if there's only one group. Removed - label of combo box. +2011-04-19 Piotr Drąg - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [845] Fixed crash - when not supported adapter type was used + * po/pl.po: Modified. -2009-11-27 Sebastian Pölsterl + Updated Polish translation - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/BasePage.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/ui/wizard/pages/IntroPage.py, - * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [844] Use label of - BasePage in all pages. Added right-click menu to ChannelScanPage to - de-/select all channels; https://launchpad.net/bugs/486610 fixed - - * src/ChannelFactory.vala, - * src/Recorder.vala: [843] Check if setting pipeline to playing was - successful +2011-04-18 Mario Blättermann -2009-11-21 Sebastian Pölsterl + * po/de.po: Modified. - * configure.ac: [842] Link against gstreamer-rtsp-0.10 as well + [l10n] Updated German translation -2009-11-19 Sebastian Pölsterl +2011-04-18 Sebastian Pölsterl - * configure.ac: [841] Post release version bump to 0.1.14 + * configure.ac: Modified. -=== version-0.1.13 === -2009-11-19 Sebastian Pölsterl + Set required GLib version to 2.28.5 - * README: [840] Updated dependencies in README +2011-04-17 Claude Paroz - * po/de.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/sv.po, - * po/te.po: [839] Added updated translations + * po/fr.po: Modified. -2009-11-18 Sebastian Pölsterl + Updated French translation - * NEWS: [838] Added release notes +2011-04-17 Khaled Hosny - * src/ChannelFactory.vala: [837] Reorganized locking. Watch for errors - and warnins on the bus. Call set_active on the sink ghost pad. + * po/ar.po: Modified. - * src/rtsp/MediaFactory.vala: [836] Added debug calls + Updated Arabic translation -2009-11-17 Sebastian Pölsterl +2011-04-17 Khaled Hosny - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [835] - Added Mandriva specific directory of dvb-apps initial tuning data + * po/ar.po: Modified. - * configure.ac: [834] gst-rtsp-server depends on gstreamer 0.10.25, - depend on it as well + Various translation fixes - * configure.ac: [833] Depend on gst-rtsp-server 0.1.5 +2011-04-17 Daniel Nylander - * src/Schedule.vala: [832] Fixed bug in getting EPG information for - timer if the timer was completely contained in the event + * po/sv.po: Modified. -2009-11-16 Sebastian Pölsterl + Updated Swedish translation - * src/Recorder.vala, - * src/Schedule.vala: [831] Reverted r829 and r830 +2011-04-17 Sebastian Pölsterl - * src/Schedule.vala: [830] Made Channel private + * client/totem-plugin/dvb-daemon.py: Modified. - * src/Recorder.vala: [829] Made DeviceGroup private + Totem: Ported to GDBus - * src/EPGScanner.vala: [828] Made DeviceGroup private +2011-04-17 Sebastian Pölsterl -2009-11-14 Sebastian Pölsterl + * client/gnomedvb/DBusWrapper.py: Modified. - * po/gnome-dvb-daemon.pot: [827] Updated .pot file + gnomedvb: Fixed recording-(started|finished) signal - * client/gnomedvb/ui/recordings/RecordingsDialog.py: [826] Removed - markup from translatable string +2011-04-17 Sebastian Pölsterl - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/ScannedItem.vala, - * src/Terrestrial/TerrestrialScanner.vala, - * src/rtsp/MediaFactory.vala, - * src/rygel/Services.vala: [825] Fixed additional compiler warnings - with latest Vala + * client/gnomedvb/ui/preferences/Preferences.py: Modified. -2009-11-13 Sebastian Pölsterl + gnomedvb: Fix preferences if devices and groups are added - * src/database/sqlite/SqliteDatabase.vala: [824] new_version attribute - is no property +2011-04-17 Sebastian Pölsterl -2009-11-12 Sebastian Pölsterl + * client/gnomedvb/ui/preferences/Dialogs.py: Modified. - * src/ChannelFactory.vala, - * src/ChannelList.vala, - * src/ChannelListReader.vala, - * src/ChannelListWriter.vala, - * src/Device.vala, - * src/DeviceGroup.vala, - * src/Recorder.vala, - * src/Schedule.vala, - * src/Timer.vala, - * src/database/sqlite/SqliteDatabase.vala: [823] Fixed some compiler - warnings with latest Vala - - Chain-up constructor to set construct-only properties where possible - - * src/ChannelFactory.vala: [822] Fixed crash when streaming is forced - to stop because a recording is about to start - - * src/Scanner.vala: [821] Fixed compile error with latest Vala - - * src/ChannelFactory.vala: [820] Fixed a couple of bugs when - recording/watching multiple channels at the same time on the same - device + gnomedvb: Set parent and mnemonic - * src/rtsp/MediaFactory.vala: [819] Supply payloader element to - stop_channel +2011-04-17 Sebastian Pölsterl - * src/Schedule.vala: [818] Don't return expired events in GetAllEvents - and GetAllEventInfos + * client/gnomedvb/DVBModel.py: Modified. -2009-11-03 Sebastian Pölsterl + gnomedvb: Added method signature for DBus call - * src/database/sqlite/SqliteEPGStore.vala, - * src/database/sqlite/SqliteUtils.vala: [817] Unescape ' when - retrieving text from sqlite db +2011-04-17 Sebastian Pölsterl - * src/database/SqlError.vala, - * src/database/sqlite/SqliteDatabase.vala: [816] Fixed typo NOMEN -> - NOMEM + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py: Modified. - * src/EPGScanner.vala: [815] Always scan EPG on all channels + gnomedvb: Fix wrong data type issue in Preferences - * tests/test-dvb-daemon.py: [814] Added test where non-existend device - is added +2011-04-17 Sebastian Pölsterl - * src/Manager.vala: [813] Don't allow to create devices where - retrieving the adapter's type failed + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. - * src/Timer.vala, - * src/database/sqlite/SqliteConfigTimersStore.vala: [812] Removed - Year,Month,Day,Hour,Minute properties from Timer class and work - directly with starttime + gnomedvb: Use appointment-soon icon instead of stock_timer - * src/Recorder.vala, - * src/Timer.vala: [811] Removed unused property Name from Timer class +2011-04-17 Sebastian Pölsterl - * src/Recorder.vala: [810] Check if recording doesn't already exist - before starting the actual recording + * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. -2009-10-31 Sebastian Pölsterl + gnomedvb: Set colors in ScheduleView correctly - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/widgets/RunningNextView.py: [809] Handle - displaying DetailsDialog when clicking on event directly in - RunningNextView +2011-04-16 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/RunningNextStore.py: [808] Added - get_device_group method + * po/pl.po, + * po/es.po, + * po/te.po, + * po/it.po, + * po/lt.po, + * po/hu.po, + * po/cs.po, + * po/el.po, + * po/tr.po, + * po/da.po, + * po/pt_BR.po, + * po/sr.po, + * po/en_GB.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. - * src/Recorder.vala: [807] Check if check_timers_event_id > 0 when - removing check_timers timeout + Imported latest translations from launchpad -2009-10-29 Sebastian Pölsterl +2011-04-16 Sebastian Pölsterl - * po/gnome-dvb-daemon.pot: [806] Updated .pot file + * po/gnome-dvb-daemon.pot: Removed. - * src/Recorder.vala: [805] Remove check_timers timeout in Recorder's - stop method + Removed .pot file - * src/Manager.vala, - * src/database/TimersStore.vala, - * src/database/sqlite/SqliteConfigTimersStore.vala: [804] Added - remove_all_timers_from_device_group method to TimersStore. - - Delete all timers of device group when it gets deleted. - - * src/Main.vala: [803] Only remove Timers could be added to Recorder - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [802] - get_adapter_info returns tuple where the first item indicates if the - information could be retrieved successfully. Display error message if - retrieving devices fails. +2011-04-16 Sebastian Pölsterl -2009-10-22 Sebastian Pölsterl + * .gitignore, + * src/.gitignore: Added. - * po/gnome-dvb-daemon.pot: [801] Updated translations template + * .bzrignore: Removed. - * client/gnomedvb/ui/widgets/ChannelsStore.py: [800] When displaying - channel groups add virtual group that contains all channels + Updated list of ignored files - * client/totem-plugin/dvb-daemon.py: [799] Added option to order - channels by name or group +2011-04-16 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ChannelsStore.py: [798] Added - set_sort_order method + * gnome-dvb-daemon.doap: Modified. - * client/gnomedvb/ui/widgets/ChannelsView.py: [797] Allow - ChannelsTreeStore in set_model + Update download-page -2009-10-14 Sebastian Pölsterl +2011-04-16 Sebastian Pölsterl - * configure.ac: [796] Post release version bump to 0.1.13 + * gnome-dvb-daemon.doap: Added. -=== version-0.1.12 === -2009-10-14 Sebastian Pölsterl + Added DOAP file - * NEWS: [795] Added release notes +2011-04-15 Sebastian Pölsterl - * Makefile.am: [794] Generate ChangeLog automatically when creating - tarball + * client/gnomedvb/__init__.py: Modified. - * po/de.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/sv.po, - * po/te.po: [793] Imported translations from launchpad + Assign return value of get_xdg_user_dir - * client/gnomedvb/ui/preferences/Preferences.py: [792] Call - RemoveDevice, AddDeviceToNewGroup and AddDevice async +2011-04-15 Sebastian Pölsterl - * client/gnomedvb/DVBModel.py: [791] Made remove_device async + * configure.ac: Modified. -2009-10-14 Sebastian Pölsterl + Don't print datadir and libdir - * client/gnomedvb/Callback.py: Added. +2011-04-15 Sebastian Pölsterl - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + * acinclude.m4: Removed. - [790] Moved Callback to own file + * configure.ac, + * data/Makefile.am: Modified. -2009-10-14 Sebastian Pölsterl + Cleanup configure.ac - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, - * client/gnomedvb/ui/preferences/Preferences.py: [789] Fixed markup - errors - - * client/gnomedvb/ui/recordings/DetailsDialog.py: [788] Call - GetAllInformations async - - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py: [787] Call AddTimer and - DeleteTimer async +2011-04-15 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py: [786] Provide **kwargs for more - methods so they can be used async + * configure.ac: Modified. - * client/gnomedvb/ui/preferences/Preferences.py: [785] Remove device - from unassigned devices if device or group is added + Updated required glib version to 2.28.6 -2009-10-13 Sebastian Pölsterl +2011-04-15 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [784] Catch exception when - removing item from GtkRecentManager + * configure.ac: Modified. -2009-10-12 Sebastian Pölsterl + Require pygobject >= 2.28.3 and removed checks for obsolete python + modules - [783] Moved TestRecordingsStore to the bottom +2011-04-15 Sebastian Pölsterl -2009-10-12 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/RunningNextView.py, + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * client/gnomedvb/ui/recordings/DetailsDialog.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * client/gnomedvb/DBusWrapper.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/widgets/RunningNextStore.py, + * tests/test-dvb-daemon.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py: Modified. - * src/rtsp/MediaFactory.vala: [780.1.2] pipeline is unref'ed in - remove_elements + Ported GUI to use GDBus -2009-10-12 Sebastian Pölsterl +2011-04-15 Sebastian Pölsterl - * tests, - * tests/test-dvb-daemon.py: Added. + * src/dbus/IDBusScanner.vala: Added. - [780.1.1] Added unit test suite + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala, + * src/Manager.vala, + * Makefile.am, + * src/Satellite/SatelliteScanner.vala: Modified. -2009-10-12 Sebastian Pölsterl + Use a single Scanner DBus interface for all adapter types - * src/rtsp/MediaFactory.vala: [782] pipeline is unref'ed in - remove_elements +2011-04-08 Sebastian Pölsterl -2009-10-12 Sebastian Pölsterl + * src/rtsp/MediaFactory.vala, + * src/Scanner.vala, + * src/io/RecordingReader.vala, + * src/io/ChannelListReader.vala, + * src/Cable/CableScanner.vala, + * configure.ac, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Satellite/SatelliteScanner.vala: Modified. - * tests, - * tests/test-dvb-daemon.py: Added. + Don't use deprecated function anymore. Requires Vala >= 0.12.0 - [781] Added unit test suite +2011-04-08 Sebastian Pölsterl -2009-10-12 Sebastian Pölsterl + * src/rygel/Services.vala, + * src/rygel/Interfaces.vala: Removed. - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, - * src/Manager.vala, - * src/database/ConfigStore.vala, - * src/database/sqlite/SqliteConfigTimersStore.vala, - * src/dbus/IDBusManager.vala: [780] AddChannelGroup returns the id of - the group in an out parameter - - * client/gnomedvb/DBusWrapper.py, - * src/DeviceGroup.vala, - * src/dbus/IDBusDeviceGroup.vala: [779] GetSchedule returns true on - success, ObjectPath is returned as out parameter + * src/Scanner.vala, + * src/rygel/Interfaces2.vala, + * src/dbus/IDBusDeviceGroup.vala, + * src/dbus/IDBusRecordingsStore.vala, + * configure.ac, + * src/dbus/IDBusRecorder.vala, + * src/Cable/CableScanner.vala, + * Makefile.am, + * src/rygel/Services2.vala, + * src/Recorder.vala, + * src/dbus/IDBusChannelList.vala, + * src/Utils.vala, + * src/RecordingsStore.vala, + * src/dbus/IDBusSchedule.vala, + * src/Main.vala, + * src/dbus/IDBusManager.vala, + * src/ChannelList.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Schedule.vala, + * src/Manager.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/DeviceGroup.vala: Modified. - * src/Schedule.vala: [778] Fixed crasher in GetInformations if invalid - id was provided + Ported the daemon to use gdbus instead of libdbus, requires glib >= + 2.26. Removed support for Rygel's MediaServer1 interface. - * src/Recorder.vala: [777] Fixed crasher in GetAllInformations if - provided id does not exist. +2011-03-26 Sebastian Pölsterl - GetTitle returns true if the id is valid but no title is available. + * client/gnomedvb/__init__.py: Modified. -2009-10-11 Sebastian Pölsterl + Removed unused function launch_default_for_uri. Enabled + gnomedvb.userdirs module. - * src/ChannelList.vala: [776] Return true if id is valid but channel - has no name/network in GetChannelName and GetChannelNetwork +2011-03-26 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py: [775] Make - get_registered_device_groups work sync and async + * client/totem-plugin/dvb-daemon.py: Modified. - * src/RecordingsStore.vala: [774] Fixed crasher in GetAllInformations - if id doesn't exist. + Totem: Set totem_object after do_activate has been called instead + of in __init__ - GetDescription and GetName return true for a valid id even if the - name/description doesn't exist. +2011-03-25 Sebastian Pölsterl - ------------- This line and the following will be ignored - -------------- + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. - modified: src/RecordingsStore.vala + gnomedvb: Use Gtk.IconTheme instead of Gtk.Image to retrieve pixbuf + for gnome-dvb-setup icon -2009-10-08 Sebastian Pölsterl +2011-03-24 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ChannelsStore.py: [773] Added option to - display channel groups to ChannelsTreeStore + * client/totem-plugin/dvb-daemon.py: Modified. - * src/ChannelList.vala, - * src/DeviceGroup.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala: [772] Reverted r756: Use libgee's to_array - methods where applicable + Totem: check self.totem_object in deactivate -2009-10-07 Sebastian Pölsterl +2011-02-23 Marvin Schmidt - * src/Schedule.vala: [771] Catch SqlError + * configure.ac: Modified. - * src/ChannelList.vala: [770] Fixed crash in GetChannelURL if - channel_id doesn't exist + build: Fix totem-plugin option -2009-10-06 Sebastian Pölsterl + The third argument to AC_ARG_ENABLE is action-if-present, it will + be used when either --{enable,disable}-totem-plugin is passed. + Using enable_totem="yes" would mean that the totem plugin is always + enabled, so instead we have to use $enableval here to get what we + want. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/preferences/DeviceGroupsView.py, - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/gnomedvb/ui/widgets/DetailsDialog.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, - * po/gnome-dvb-daemon.pot: [769] Removed most markups from the - translatable strings + Also check if we got a valid plugin directory with pkg-config and + bail out if we didn't. Otherwise TOTEM_PLUGIN_DIR would have been + empty in the case that --enable-totem-plugin was passed but totem + wasn't installed. - * configure.ac: [768] Post release version bump to 0.1.12 +2011-02-22 Sebastian Pölsterl -=== version-0.1.11 === -2009-10-06 Sebastian Pölsterl + * client/totem-plugin/dvb-daemon.py: Modified. - * NEWS: [767] Added release notes + Totem: Display recordings when changing 'group by' type. - * po/gnome-dvb-daemon.pot: [766] Updated .pot file +2011-02-22 Sebastian Pölsterl - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [765] Use - iso_3166 to translate countries; https://launchpad.net/bugs/442490 - fixed + * client/totem-plugin/dvb-daemon.py: Modified. - Use locale.strcoll to sort country names. + Totem: Added data parameter to gtk_menu_popup call -2009-10-05 Sebastian Pölsterl +2011-02-22 Sebastian Pölsterl - * client/gnomedvb/ui/preferences/Dialogs.py: [764] Import AlignedLabel - from the correct module; https://launchpad.net/bugs/442428 fixed + * client/gnomedvb/ui/widgets/DateTime.py: Modified. -2009-10-03 Sebastian Pölsterl + Updated usage of grad_add, grab_remove to latest pygobject - * src/database/sqlite/SqliteDatabase.vala: [763] Create parent - directories of databse file if they don't exist +2011-02-22 Sebastian Pölsterl -2009-10-01 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/Frame.py: Modified. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [762] Fixed - duplicate actiongroup name + Remove old child_widget before adding new one in BaseFrame -2009-10-01 Sebastian Pölsterl +2011-02-20 Marvin Schmidt - * po/de.po, - * po/es.po, - * po/fi.po, - * po/fr.po, - * po/pl.po, - * po/sr.po, - * po/te.po: Added. + * client/totem-plugin/dvb-daemon.py: Modified. - [761] Added .po files + Adjust to new libpeas API -2009-09-30 Sebastian Pölsterl +2011-02-19 Marvin Schmidt - * configure.ac: [760] Post release version bump to 0.1.11 + * vapi/cstuff.c: Modified. -=== version-0.1.10 === -2009-09-30 Sebastian Pölsterl + Avoid NULL pointer dereference in get_adapters() - * po/LINGUAS, - * po/sv.po: [759] Added Translations for German, Spanish, Finnish, - French, Polish, Serbian and Telugu. - - Updated Swedish translations. - - * NEWS: [758] Added release notes - - * README: [757] Updated libgee requirement - - * src/ChannelList.vala, - * src/DeviceGroup.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala: [756] Use libgee's to_array methods where - applicable - - * configure.ac, - * src/ChannelFactory.vala, - * src/ChannelList.vala, - * src/EPGScanner.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala, - * src/Scanner.vala, - * src/rygel/Services.vala: [755] Moved to libgee 0.5.0 + The ifa_addr field in a ifa_addrs structure might be NULL. This + leads to a segfaults when trying to access + iter->ifa_addr->sa_family unconditionally. Therefore we have to + skip all interfaces without address. - * po/gnome-dvb-daemon.pot: [754] Updated pot file +2011-01-25 Sebastian Pölsterl -2009-09-30 Sebastian Pölsterl + * po/POTFILES.in: Modified. - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, - * po/POTFILES.in: Modified. - - * client/gnomedvb/ui/widgets/ChannelsGroupStore.py: Renamed to - client/gnomedvb/ui/widgets/ChannelGroupsStore.py and modified. - * client/gnomedvb/ui/widgets/ChannelsGroupView.py: Renamed to - client/gnomedvb/ui/widgets/ChannelGroupsView.py and modified. + Added dvb-daemon.plugin.in to POTFILES - [753] Fixed typo in class name +2011-01-25 Sebastian Pölsterl -2009-09-30 Sebastian Pölsterl + * client/totem-plugin/dvb-daemon.plugin.in: Added. - * client/gnomedvb/ui/widgets/ChannelsGroupView.py: [752] Fixed typo + * client/totem-plugin/dvb-daemon.totem-plugin.in: Removed. -2009-09-30 Sebastian Pölsterl + * client/totem-plugin/dvb-daemon.py, + * client/totem-plugin/Makefile.am: Modified. - * client/gnomedvb/ui/channellisteditor, - * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, - * client/gnomedvb/ui/channellisteditor/__init__.py, - * client/gnomedvb/ui/widgets/ChannelsGroupStore.py, - * client/gnomedvb/ui/widgets/ChannelsGroupView.py: Added. - - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * po/POTFILES.in: Modified. + Totem plugin: Initial port to PyGI and GTK+3 - [751] Added ChannelListEditorDialog +2011-01-25 Sebastian Pölsterl -2009-09-30 Sebastian Pölsterl + * client/gnomedvb/ui/wizard/pages/SummaryPage.py: Modified. - * client/gnomedvb/ui/widgets/Frame.py: [750] Added set_aligned_child - method + Pack correct widget -2009-09-30 Sebastian Pölsterl +2011-01-25 Sebastian Pölsterl - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/preferences/Preferences.py: Modified. + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. - * client/gnomedvb/ui/preferences/Frame.py: Renamed to - client/gnomedvb/ui/widgets/Frame.py. + Set user_data to None by default - [749] Moved Frame.py to widgets +2011-01-25 Sebastian Pölsterl -2009-09-30 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. - * client/gnomedvb/ui/widgets/HelpBox.py: Added. + Fixed column types of ChannelsTreeStore - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. +2011-01-24 Sebastian Pölsterl - [748] Moved HelpBox to own file + * configure.ac: Modified. -2009-09-30 Sebastian Pölsterl + Retrieve totem plugin dir from pkg-config variable - * client/gnomedvb/ui/preferences/Frame.py: [747] Provide expand, fill - and padding paramters +2011-01-24 Sebastian Pölsterl -2009-09-29 Sebastian Pölsterl + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. - * client/gnomedvb/ui/preferences/Frame.py: [746] Added BaseFrame class + Mark what's on buttons insensitive if no device has been setup -2009-09-26 Sebastian Pölsterl +2011-01-24 Sebastian Pölsterl - * src/ChannelList.vala, - * src/Manager.vala: [745] Return value returned by ConfigStore + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/ui/widgets/HelpBox.py: Modified. - * src/database/sqlite/SqliteConfigTimersStore.vala: [744] Fixed bug - that removing channel groups did not work + Ported to GTK+3 theme changes - * src/database/sqlite/SqliteConfigTimersStore.vala: [743] Created - channel_groups and channels tables, too +2011-01-24 Sebastian Pölsterl - * src/database/sqlite/SqliteDatabase.vala: [742] Check if database - file exists before opening connection + * client/rhythmbox-plugin/dvb-rhythm.py, + * client/rhythmbox-plugin/Makefile.am, + * client/rhythmbox-plugin/dvb-rhythm.rb-plugin.in: Removed. - * client/gnomedvb/DBusWrapper.py: [741] Wrapped new methods + Removed Rhytmbox plugin - * src/ChannelList.vala, - * src/Manager.vala, - * src/dbus/IDBusChannelList.vala, - * src/dbus/IDBusManager.vala: [740] Moved GetChannelGroups, - AddChannelGroup and RemoveChannelGroup to Manager DBus interface +2011-01-24 Sebastian Pölsterl -2009-09-25 Sebastian Pölsterl + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/timers/TimerDialog.py, + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnomedvb/ui/widgets/Frame.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py: Modified. - * src/database/sqlite/SqliteDatabase.vala: [739] Assign database file - to variable + Do not use Gtk.Alignment anymore -2009-09-24 Sebastian Pölsterl +2011-01-22 Sebastian Pölsterl - * src/EPGScanner.vala, - * src/Scanner.vala: [738] Catch error when creating a thread + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. - * src/Cable/CableScanner.vala, - * src/ChannelList.vala, - * src/DeviceGroup.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Schedule.vala, - * src/Terrestrial/TerrestrialScanner.vala: [737] Added throws - DBus.Error to implementations of DBus interfaces - - * src/DeviceGroup.vala: [736] Set ChannelList.GroupId of referene - device in constructor - - * src/ChannelList.vala, - * src/dbus/IDBusChannelList.vala: [735] Implemented DBus methods for - channel groups. Added GroupId property to ChannelList. + Use appointment-soon icon instead of stock_timer -2009-09-24 Sebastian Pölsterl +2011-01-22 Sebastian Pölsterl - * src/dbus: Added. + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. - * Makefile.am: Modified. + Use gobject instead of GLib module, removed comments. - * src/IDBusChannelList.vala: Renamed to - src/dbus/IDBusChannelList.vala. - * src/IDBusDeviceGroup.vala: Renamed to - src/dbus/IDBusDeviceGroup.vala. - * src/IDBusManager.vala: Renamed to src/dbus/IDBusManager.vala. - * src/IDBusRecorder.vala: Renamed to src/dbus/IDBusRecorder.vala. - * src/IDBusRecordingsStore.vala: Renamed to - src/dbus/IDBusRecordingsStore.vala. - * src/IDBusSchedule.vala: Renamed to src/dbus/IDBusSchedule.vala. +2011-01-21 Sebastian Pölsterl - [734] Moved DBus interfaces to dbus directory + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/ChannelsView.py, + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * client/gnomedvb/ui/widgets/ChannelGroupsStore.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py, + * client/gnomedvb/ui/widgets/RunningNextStore.py, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py, + * client/gnomedvb/ui/widgets/CellRendererDatetime.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/recordings/DetailsDialog.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * client/gnomedvb/ui/widgets/SchedulePaned.py, + * client/gnome-dvb-setup, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py, + * client/gnomedvb/ui/timers/MessageDialogs.py, + * client/gnomedvb/ui/widgets/RunningNextView.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/widgets/HelpBox.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/widgets/RecordingsView.py, + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnomedvb/ui/widgets/Frame.py, + * client/gnome-dvb-control, + * client/gnomedvb/__init__.py, + * client/gnomedvb/ui/widgets/ChannelGroupsView.py, + * client/totem-plugin/dvb-daemon.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/timers/CalendarDialog.py, + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/rhythmbox-plugin/dvb-rhythm.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. -2009-09-24 Sebastian Pölsterl + Port to PyGI and GTK+3 - * src/ChannelGroup.vala, - * src/database/ConfigStore.vala, - * src/database/sqlite/SqliteConfigTimersStore.vala: [733] Removed - get_group_for_channel and added get_channel_groups and - get_channels_of_group methods. - - ChannelGroup is now a real class. - - * src/database/ConfigStore.vala, - * src/database/sqlite/SqliteConfigTimersStore.vala: [732] Added - support for assigning channels to one or more groups in database - scheme +2011-01-15 Sebastian Pölsterl - * src/ChannelGroup.vala: [731] Removed parent field + * configure.ac: Modified. -2009-09-24 Sebastian Pölsterl + Post release version bump to 0.1.24 - * src/database, - * src/database/SqlError.vala, - * src/database/sqlite, - * src/database/sqlite/SqliteDatabase.vala, - * src/database/sqlite/SqliteUtils.vala: Added. - - * Makefile.am, - * src/DeviceGroup.vala, - * src/Factory.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Schedule.vala: Modified. - - * src/ConfigStore.vala: Renamed to src/database/ConfigStore.vala and - modified. - * src/EPGStore.vala: Renamed to src/database/EPGStore.vala and - modified. - * src/SqliteConfigTimersStore.vala: Renamed to - src/database/sqlite/SqliteConfigTimersStore.vala and modified. - * src/SqliteEPGStore.vala: Renamed to - src/database/sqlite/SqliteEPGStore.vala and modified. - * src/TimersStore.vala: Renamed to src/database/TimersStore.vala and - modified. +=== version-0.1.23 === +2011-01-15 Sebastian Pölsterl - [730] Refactored Sqlite database access + * NEWS: Modified. -2009-09-24 Sebastian Pölsterl + Added release notes - * src/database, - * src/database/SqlError.vala, - * src/database/sqlite, - * src/database/sqlite/SqliteDatabase.vala, - * src/database/sqlite/SqliteUtils.vala: Added. - - * Makefile.am, - * src/DeviceGroup.vala, - * src/Factory.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Schedule.vala: Modified. - - * src/ConfigStore.vala: Renamed to src/database/ConfigStore.vala and - modified. - * src/EPGStore.vala: Renamed to src/database/EPGStore.vala and - modified. - * src/SqliteConfigTimersStore.vala: Renamed to - src/database/sqlite/SqliteConfigTimersStore.vala and modified. - * src/SqliteEPGStore.vala: Renamed to - src/database/sqlite/SqliteEPGStore.vala and modified. - * src/TimersStore.vala: Renamed to src/database/TimersStore.vala and - modified. +2011-01-15 Sebastian Pölsterl - [728.1.1] Refactored Sqlite database access + * po/hu.po, + * po/el.po: Added. - This adds support for versioned database schemes and the possibility - to upgrade them. + * po/pl.po, + * po/es.po, + * po/te.po, + * po/it.po, + * po/lt.po, + * po/cs.po, + * po/tr.po, + * po/pt_BR.po, + * po/da.po, + * po/LINGUAS, + * po/sr.po, + * po/en_GB.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. -2009-09-24 Sebastian Pölsterl + Updated translations - * src/ChannelGroup.vala: Added. + Added Greek and Hungarian - * Makefile.am: Modified. +2011-01-15 Sebastian Pölsterl - [729] Added ChannelGroup class + * po/gnome-dvb-daemon.pot: Modified. -2009-09-20 Sebastian Pölsterl + Updated POT file - * po/gnome-dvb-daemon.pot: [728] Updated .pot file +2011-01-14 Sebastian Pölsterl - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py: [727] Fixed buttons - for error dialogs + * vapi/cstuff.c: Modified. - * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py: [726] Display - error dialog if writing channels.conf fails + Removed useless if-else case - * Makefile.am: [725] Added vapi/config.vapi to EXTRA_DIST target +2011-01-14 Sebastian Pölsterl -2009-09-17 Sebastian Pölsterl + * src/Channel.vala, + * src/rtsp/Server.vala: Modified. - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/preferences/Preferences.py: [724] Fixed crash - when new group has been added - - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [723] Check - newly added channels depending on 'Select scrambled channels' - checkbutton - - * src/Timer.vala: [722] Overlapping timers on the same channel never - conflict - - * src/Schedule.vala: [721] Fixed critical warning - - * src/Cable/CableScanner.vala, - * src/IDBusChannelList.vala, - * src/IDBusDeviceGroup.vala, - * src/IDBusManager.vala, - * src/IDBusRecorder.vala, - * src/IDBusRecordingsStore.vala, - * src/IDBusSchedule.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [720] Fixed compiler errors - with latest Vala + Do not use hostname in rtsp streaming URL but use the IPv4 address + of the interface specified in the settings file. -2009-09-15 Sebastian Pölsterl + The default and fallback is localhost. - * client/gnomedvb/ui/widgets/DetailsDialog.py: Added. +2011-01-14 Sebastian Pölsterl - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/recordings/DetailsDialog.py, - * client/gnomedvb/ui/widgets/RunningNextStore.py, - * client/gnomedvb/ui/widgets/RunningNextView.py, - * po/POTFILES.in, - * po/gnome-dvb-daemon.pot: Modified. + * vapi/cstuff.h, + * vapi/cstuff.c, + * vapi/cutils.vapi: Modified. - [719] Display dialog with details when double-clicking on an event in - What's on now view on control center + Added helper function to retrieve name and IPv4 address of all + network interfaces -2009-09-15 Sebastian Pölsterl +2011-01-14 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [718] Use SchedulePaned in Totem - plugin + * src/Recorder.vala, + * src/EPGScanner.vala, + * src/Settings.vala: Modified. -2009-09-15 Sebastian Pölsterl + Added getters for values in settings file - * client/gnomedvb/ui/widgets/SchedulePaned.py: Added. +2011-01-14 Sebastian Pölsterl - * client/gnomedvb/Makefile.am, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. + * configure.ac, + * Makefile.am: Modified. - [717] Display extended event description in textview instead of - expanding the selected row + Use upstream gettext instead of glib one -2009-09-14 Sebastian Pölsterl +2011-01-14 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [716] Adjusted Totem plugin to - API changes + * data/Makefile.am: Modified. - * src/Recorder.vala: [715] Fixed bug that timer was marked as - conflicts if it doesn't + Removed desktop_DATA from EXTRA_DIST - * client/gnomedvb/ui/widgets/RunningNextStore.py, - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * src/IDBusSchedule.vala, - * src/Schedule.vala: [714] Use out parameters and return true for - GetInformations, GetName, GetShortDescription, GetExtendedDescription, - GetDuration, GetLocalStartTime, GetLocalStartTimestamp, IsRunning and - IsScrambled - - * client/gnomedvb/ui/recordings/DetailsDialog.py, - * client/gnomedvb/ui/widgets/RecordingsStore.py, - * src/IDBusRecordingsStore.vala, - * src/RecordingsStore.vala: [713] Use out parameters and return true - on success for GetLocation, GetName, GetDescription, GetStartTime, - GetStartTimestamp, GetLength, GetChannelName, GetAllInformations - - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py, - * src/IDBusRecorder.vala, - * src/Main.vala, - * src/Recorder.vala: [712] Use out parameters and return true on - success for AddTimer, AddTimerWithMargin, AddTimerForEPGEvent, - GetStartTime, GetEndTime, GetDuration, GetChannelName, GetTitle, - GetAllInformations - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/widgets/ChannelsStore.py, - * src/IDBusManager.vala, - * src/Manager.vala: [711] Use out parameters and return true on - success for GetScannerForDevice, GetDeviceGroup and - GetNameOfRegisteredDevice - - * src/ChannelList.vala, - * src/IDBusChannelList.vala: [710] Updated DBus API for ChannelList +2011-01-07 Sebastian Pölsterl - Use out parameter and return TRUE on success where applicable + * src/EventStorage.vala: Added. - * po/gnome-dvb-daemon.pot: [709] Updated .pot file + * Makefile.am, + * src/Schedule.vala: Modified. - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [708] Added - CheckButton to (de)select scrambled channels + Detect overlapping EPG events and remove outdated events. -2009-09-06 Sebastian Pölsterl + Moved handling of GSequence to new class EventStorage. - * po/gnome-dvb-daemon.pot: Added. +2011-01-07 Sebastian Pölsterl - * .bzrignore: Modified. + * src/Utils.vala: Modified. - [707] Added pot file to repository + Added t_min, t_max and strdiff methods -2009-08-25 Sebastian Pölsterl +2011-01-07 Sebastian Pölsterl - * client/gnomedvb/ui/timers/EditTimersDialog.py: [706] Increased width - of EditTimersDialog + * src/Event.vala: Modified. - * src/Recorder.vala, - * src/Timer.vala: [705] Print debug output of start time in better - format + Added get_start_timestamp and get_overlap_percentage methods -2009-08-24 Sebastian Pölsterl +2010-12-05 Sebastian Pölsterl - * configure.ac: [704] Post release version bump to 0.1.10 + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. -=== version-0.1.9 === -2009-08-24 Sebastian Pölsterl + gnomedvb: Display adapter and frontend for each device in the setup + assistant - * README: [703] Updated libgee requirement in README +2010-12-05 Sebastian Pölsterl - * NEWS: [702] Added release notes + * src/Scanner.vala, + * src/Schedule.vala, + * configure.ac, + * src/EPGScanner.vala, + * src/Settings.vala, + * src/Utils.vala, + * src/io/RecordingWriter.vala, + * src/io/ChannelListWriter.vala: Modified. -2009-08-22 Sebastian Pölsterl + Fixed compiler errors. Requires Vala >= 0.11.2 - * client/gnomedvb/ui/timers/EditTimersDialog.py: [701] Use - GetAllInformations +2010-12-05 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py, - * src/IDBusRecorder.vala, - * src/Recorder.vala: [700] Added GetAllInformations to Recorder D-Bus - interface - - * client/gnomedvb/ui/timers/EditTimersDialog.py: [699] Added Title - column to EditTimersDialog - - * client/gnomedvb/DBusWrapper.py, - * src/IDBusRecorder.vala, - * src/Recorder.vala: [698] Added GetTitle method to Recorder D-Bus - interface + * src/Terrestrial/TerrestrialScanner.vala: Modified. - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [697] Show - error message if initial tuning data was not found + Fixed parsing of guard interval -2009-08-19 Sebastian Pölsterl +2010-12-05 Sebastian Pölsterl - * src/ChannelListWriter.vala, - * src/Settings.vala: [696] Use write_all instead of write + * src/Satellite/SatelliteScanner.vala, + * src/Cable/CableScanner.vala: Modified. -2009-08-18 Sebastian Pölsterl + Use length property to get array length - * src/Scanner.vala: [695] Use own main loop for Scanner +2010-11-24 Sebastian Pölsterl - * src/EPGScanner.vala: [694] Run bus watch function in EPGScanner's - main loop + * client/totem-plugin/dvb-daemon.py: Modified. -2009-08-18 Sebastian Pölsterl + Totem: use dgettext to avoid overriding Totem's translations - * vapi/cstuff.c, - * vapi/cstuff.h: Added. +2010-11-15 Sebastian Pölsterl - * Makefile.am, - * configure.ac, - * vapi/cutils.vapi: Modified. + * client/gnomedvb/ui/widgets/SchedulePaned.py: Modified. - [693] Added cstuff.c with helper function gst_bus_add_watch_context + SchedulePaned: Don't allow to edit TextView -2009-08-17 Sebastian Pölsterl +2010-11-14 Patrick Niklaus - * client/gnomedvb/ui/Makefile.am, - * client/gnomedvb/ui/controlcenter/Makefile.am, - * client/gnomedvb/ui/preferences/Makefile.am, - * client/gnomedvb/ui/recordings/Makefile.am, - * client/gnomedvb/ui/timers/Makefile.am, - * client/gnomedvb/ui/widgets/Makefile.am, - * client/gnomedvb/ui/wizard/Makefile.am, - * client/gnomedvb/ui/wizard/pages/Makefile.am, - * client/gnomedvb/userdirs/Makefile.am: Removed. - - * Makefile.am, - * client/gnomedvb/Makefile.am, - * configure.ac: Modified. + * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. - [692] Use a single Makefile.am for client/gnomedvb + Ignore the case when searching in the schedule -2009-08-16 Sebastian Pölsterl +2010-11-14 Patrick Niklaus - * src/EPGScanner.vala: [691] Removed unused variable do_stop + * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. -2009-08-15 Sebastian Pölsterl + Make ScheduleView searchable - * src/DeviceGroup.vala, - * src/EPGScanner.vala: [690] Use own main loop in EPGScanner +2010-10-11 Sebastian Pölsterl -2009-08-15 Götz Waschk + * configure.ac: Modified. - * configure.ac, - * src/ChannelList.vala, - * src/DeviceGroup.vala, - * src/Recorder.vala: [689] Moved to libgee 0.3.0 + Post release version bump to 0.1.23 -2009-08-15 Sebastian Pölsterl +=== version-0.1.22 === +2010-10-11 Sebastian Pölsterl - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [688] Fixed - exception when scheduling selected event for recording was canceled + * NEWS: Modified. - * client/gnomedvb/ui/widgets/ScheduleView.py: [687] Don't cause - endless loop causing 100% CPU usage when selected an entry in - ScheduleView + Added release notes -2009-08-14 Chris Elston +2010-10-11 Sebastian Pölsterl - * src/Channel.vala: [686] Fixed bug #588611: RTSP server exposes local - RTPS URL for live TV + * po/lt.po: Added. -2009-08-12 Chris Elston + * po/pl.po, + * po/es.po, + * po/te.po, + * po/it.po, + * po/cs.po, + * po/gnome-dvb-daemon.pot, + * po/tr.po, + * po/pt_BR.po, + * po/da.po, + * po/LINGUAS, + * po/sr.po, + * po/en_GB.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. - * client/gnomedvb/userdirs/Makefile.am: [685] Fixed bug #591542 – Make - install rule not working correctly for client/gnomedvb/userdirs/ - subdir on x86_64 + Updated translations -2009-08-09 Sebastian Pölsterl +2010-10-11 Sebastian Pölsterl - * README: [684] Updated requirements in README + * configure.ac: Modified. - * .bzrignore: [683] Updated .bzrignore + Updated minimum version of vala to 0.10.0, gstreamer to 0.10.29 and + gst-rtsp to 0.10.7 - * src/DeviceGroup.vala: [682] Call EPGScanner.destroy +2010-10-11 Sebastian Pölsterl - * src/EPGScanner.vala: [681] Don't create timeout again after calling - destroy + * src/rtsp/Server.vala: Modified. - * src/Recorder.vala: [680] Don't remove name and description of - Recording after setting it + rtsp: set address of RTSPServer - * src/Event.vala, - * src/Utils.vala: [679] Use time_t instead of int64 where applicable +2010-10-05 Sebastian Pölsterl - * src/Recorder.vala: [678] Use timer's EPG event id to assign the - correct values to Recording + * src/Device.vala, + * src/database/SqlError.vala: Modified. - * src/SqliteConfigTimersStore.vala: [677] Added event_id column + Made errors public - * src/Schedule.vala: [676] Added get_event_around method. Use time_t - instead of int64 where applicable +2010-10-02 Sebastian Pölsterl - * src/Timer.vala: [675] Added EventID property + * src/io/ChannelListWriter.vala, + * src/Scanner.vala: Modified. -2009-08-05 Sebastian Pölsterl + Fixed deprecation warning: use string.length - * configure.ac: [674] Post release version bump to 0.1.9 +2010-10-02 Sebastian Pölsterl -=== version-0.1.8 === -2009-08-05 Sebastian Pölsterl + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. - * NEWS: [673] Added release notes + gnomedvb: Insert channels into correct group when using more than + one device group - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [672] Use - set_is_important on first three toolbuttons +2010-10-02 Sebastian Pölsterl - * configure.ac: [671] Depend on gst-rtsp-server 0.10.4 + * src/Schedule.vala: Modified. -2009-08-02 Sebastian Pölsterl + Schedule: Lock access when adding epg events to database - * client/totem-plugin/dvb-daemon.py: [670] Override information that - Totem writes to GtkRecentManager +2010-10-02 Sebastian Pölsterl -2009-08-01 Sebastian Pölsterl + * src/database/sqlite/SqliteEPGStore.vala, + * src/database/sqlite/SqliteDatabase.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala: Modified. - * src/SqliteEPGStore.vala, - * src/Utils.vala: [669] Use -1 as string length in - regex.replace_literl to indicate NULL-terminated strings and to avoid - that strings get cut off + Sqlite: Reset statement after it has been executed instead of + before it gets executed next time -2009-07-29 Sebastian Pölsterl +2010-08-23 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [668] Connect to loading-finished - signal of ChannelsTreeStore instead of waiting 2 seconds + * configure.ac: Modified. - * client/gnomedvb/ui/widgets/ChannelsStore.py: [667] Added loading- - finished signal + Post release version bump to 0.1.22 -2009-07-27 Sebastian Pölsterl +=== version-0.1.21 === +2010-08-23 Sebastian Pölsterl - * src/ChannelListWriter.vala, - * src/Scanner.vala, - * src/SqliteEPGStore.vala, - * src/Utils.vala: [666] Use string.len() instead of .size() to adjust - to latest changes in Vala + * NEWS: Modified. -2009-07-26 Sebastian Pölsterl + Added release notes - * src/Main.vala: [665] Check if all required GStreamer elements are - available, if not print an error message and quit. +2010-08-23 Sebastian Pölsterl - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [664] - Display message if schedule of channel has no events + * po/it.po: Added. - * client/gnomedvb/ui/widgets/ScheduleStore.py: [663] Added loading- - finished signal + * po/pl.po, + * po/es.po, + * po/te.po, + * po/tr.po, + * po/cs.po, + * po/pt_BR.po, + * po/da.po, + * po/LINGUAS, + * po/sr.po, + * po/en_GB.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. - * src/Schedule.vala: [662] Fixed criticals in GetAllEventInfos + Added Italian translation. Updated translations. - * src/ChannelFactory.vala: [661] Check if we get_sink_bin actually - returned an element +2010-08-23 Sebastian Pölsterl -2009-07-22 Sebastian Pölsterl + * po/gnome-dvb-daemon.pot: Modified. - * client/totem-plugin/dvb-daemon.py: [660] Don't mark "What's on now" - button sensitive when loading the plugin and channels are added for - the first time + Updated POT file - * configure.ac: [659] Set minimum required version of libgee to 0.1.6 +2010-08-23 Sebastian Pölsterl -2009-07-20 Sebastian Pölsterl + * client/totem-plugin/dvb-daemon.py: Modified. - * src/Recorder.vala, - * src/Recording.vala, - * src/RecordingsStore.vala: [658] Keep reference to FileMonitor of - recorded file. Don't monitor the file as long as the recording is - still active - - * src/ChannelFactory.vala, - * src/Recorder.vala, - * src/Timer.vala, - * src/rtsp/MediaFactory.vala: [657] Fixed bug where all streams of a - channel were stopped when a single client/recording stopped + totem: Remove hack to modify Totem's recently used entry -2009-07-15 Sebastian Pölsterl +2010-08-23 Sebastian Pölsterl - * src/ChannelFactory.vala: [656] Pause pipeline before linking with - tee + * client/totem-plugin/dvb-daemon.py: Modified. -2009-07-11 Sebastian Pölsterl + totem: Monitor DBus for changing owner of org.gnome.DVB - * client/gnomedvb/ui/timers/EditTimersDialog.py: [655] Removed ID - column +2010-08-23 Sebastian Pölsterl -2009-07-09 Sebastian Pölsterl + * src/Channel.vala: Modified. - * src/EPGScanner.vala: [654] Fix bug introduced in last commit + Append channel name to rtsp URL - * src/EPGScanner.vala: [653] Make sure that stop_counter doesn't get - smaller than 0 +2010-08-23 Sebastian Pölsterl - * src/Main.vala, - * src/rtsp/Server.vala, - * src/rygel/Services.vala: [652] Use Idle.add to start RTSP server and - Rygel services + * src/Utils.vala: Modified. - * src/SqliteEPGStore.vala, - * src/Utils.vala: [651] inline some functions + Utils: Allow more characters in remove_nonalphanums -2009-07-07 Sebastian Pölsterl +2010-08-23 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * client/gnomedvb/ui/widgets/ScheduleView.py: [650] Use - GetAllEventInfos. Retrieve extended description only when a event is - selected - - * client/gnomedvb/ui/widgets/RunningNextStore.py: [649] Use - GetChannelInfos - - * client/gnomedvb/DBusWrapper.py, - * src/IDBusSchedule.vala, - * src/Schedule.vala: [648] Added GetAllEventInfos and GetInformations - to Schedule D-Bus interface - - * src/rtsp/Server.vala: [647] Remove timeout in shutdown - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/ui/widgets/ChannelsStore.py: [646] Use - GetChannelInfos in ChannelsStore - - * src/ChannelList.vala, - * src/IDBusChannelList.vala: [645] Added GetChannelInfos to - ChannelList D-Bus interface to retrieve id and name for all channels - with one call + * src/Device.vala: Modified. -2009-07-06 Sebastian Pölsterl + Device: Replaced critical with warning - * client/gnomedvb/__init__.py: [644] Use fallback if get_xdg_user_dir - returns None +2010-08-11 Sebastian Pölsterl - * client/gnomedvb/userdirs/__userdirsmodule.c: [643] Don't throw - exception if g_get_user_special_dir returns NULL, just return None + * data/org.gnome.UPnP.MediaServer2.DVBDaemon.service.in: Added. -2009-07-05 Sebastian Pölsterl + * data/Makefile.am: Modified. - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [642] Skip all lines that - contain a # as first visible character, no matter if whitespaces are - in front + Added D-Bus service file for org.gnome.UPnP.MediaServer2.DVBDaemon + interface -2009-07-02 Sebastian Pölsterl +2010-08-11 Sebastian Pölsterl - * client/gnome-dvb-setup: [641] Set modal and on center of parent when - --transient-for is specified + * src/Main.vala: Modified. - * configure.ac: [640] Removed gconf references from configure.ac + Main: Renamed option disable-rygel to disable-mediaserver -2009-07-01 Sebastian Pölsterl +2010-08-11 Sebastian Pölsterl - * src/RecordingsStore.vala: [639] Made additional sections in - RecordnigsStore thread-safe + * src/Main.vala: Modified. - * src/Recorder.vala: [638] Made additional sections in Recorder - thread-safe + Main: Added enable-mediaserver2 option to command line interface - * src/Manager.vala: [637] Made Manager thread-safe +2010-08-11 Sebastian Pölsterl - * src/DeviceGroup.vala: [636] Made DeviceGroup thread-safe + * src/rygel/Services2.vala: Modified. - * src/EPGScanner.vala: [635] EPGScanner remembers how often stop was - called and only is activated again, if the start has been called the - same number of times + MediaServer2: Calculate array index correctly - * src/ChannelFactory.vala: [634] Made ChannelFactory and PlayerThread - thread-safe +2010-08-09 Sebastian Pölsterl - * src/rtsp/MediaFactory.vala: [633] Set pipeline to null in unprepare - so gst-rtsp-server doesn't stop the pipeline + * src/Recorder.vala, + * src/Utils.vala, + * src/Scanner.vala, + * src/Main.vala: Modified. - * src/rtsp/Server.vala: [632] Adjusted to latest changes in gst-rtsp- - server + Replaced error calls with critical to avoid unreachable code + warnings -2009-06-30 Sebastian Pölsterl +2010-08-09 Sebastian Pölsterl - * src/rtsp/Server.vala: [631] Added timeout function to cleanup timed - out sessions + * src/ChannelFactory.vala, + * src/EPGScanner.vala: Modified. - * src/rtsp/MediaFactory.vala: [630] Set payloader type + More adjustments to libgee deprecations -2009-06-29 Sebastian Pölsterl +2010-08-09 Sebastian Pölsterl - * src/ChannelFactory.vala, - * src/rtsp/MediaFactory.vala, - * src/rtsp/Server.vala: [629] Stop streaming channels when a recording - is about to start on a different transport stream and no free devices - are available + * src/Manager.vala: Modified. -2009-06-29 Sebastian Pölsterl + Manager: Adjusted to libgee deprecations - * src/rtsp/Server.vala: Added. +2010-08-09 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Recorder: Adjusted to libgee deprecations + +2010-08-09 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + RecordingsStore: Adjusted to libgee deprecations + +2010-08-09 Sebastian Pölsterl + + * src/ChannelList.vala: Modified. + + ChannelList: Adjusted to libgee deprecations + +2010-08-09 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Schedule: Adjusted to libgee deprecations + +2010-08-09 Sebastian Pölsterl + + * src/rygel/Services.vala: Modified. + + Moved previous MediaServerSepc implementation and fixed compiler + warnings + +2010-08-09 Sebastian Pölsterl + + * src/rygel/Interfaces2.vala, + * src/rygel/Services2.vala: Added. + + * Makefile.am, + * src/Main.vala: Modified. + + Added initial implementation of Rygel's MediaServerSpec2 + +2010-07-16 Sebastian Pölsterl + + * src/Device.vala, + * src/ChannelFactory.vala, + * src/EPGScanner.vala, + * src/Scanner.vala: Modified. + + Build fixes for Vala 0.9.3 + +2010-06-21 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.21 + +=== version-0.1.20 === +2010-06-21 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2010-06-21 Sebastian Pölsterl + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/tr.po, + * po/cs.po, + * po/da.po, + * po/pt_BR.po, + * po/sr.po, + * po/en_GB.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Updated translations + +2010-06-19 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2010-06-19 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + gnomedvb: Display signal strength and signal-to-noise ratio when + scanning + +2010-06-19 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + gnomedvb: Added frontend-stats signal to scanner + +2010-06-19 Sebastian Pölsterl + + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + Scanner: added frontend_stats signal that emits signal strength and + signal to noise ratio + +2010-06-09 Sebastian Pölsterl + + * configure.ac, + * Makefile.am: Modified. + + Require valac 0.9.1 und automake 1.11 + +2010-06-09 Sebastian Pölsterl + + * src/Device.vala, + * src/ChannelFactory.vala, + * src/EPGScanner.vala, + * src/Scanner.vala: Modified. + + Adjust to changes in Vala 0.9.1 + +2010-06-09 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Manager.vala, + * src/ChannelFactory.vala, + * src/Recording.vala: Modified. + + Use connect instead of += to connect to signals + +2010-06-05 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + ChannelFactory: set pipeline back to playing in remove_channel if + others are still watching it + +2010-06-05 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DateTime.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Fixed bug where current time wasn't displayed in timer dialog + +2010-05-27 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.20 + +=== version-0.1.19 === +2010-05-27 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2010-05-27 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + totem-plugin: Fixed opening of DVB preferences window + +2010-05-27 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + gnomedvb: Catch error when retrieving icon from icon theme + +2010-05-26 Sebastian Pölsterl + + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + Scanner: Create channels with Channel.without_schedule + +2010-05-26 Sebastian Pölsterl + + * src/Channel.vala, + * src/Satellite/SatelliteChannel.vala, + * src/Cable/CableChannel.vala, + * src/Terrestrial/TerrestrialChannel.vala: Modified. + + Channel: added Channel.without_schedule constructor + +2010-05-23 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump + +=== version-0.1.18 === +2010-05-23 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2010-05-23 Sebastian Pölsterl + + * README: Modified. + + Added gudev dependency to README + +2010-05-23 Sebastian Pölsterl + + * po/pt_BR.po: Added. + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/tr.po, + * po/cs.po, + * po/da.po, + * po/LINGUAS, + * po/sr.po, + * po/en_GB.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Updated translations + +2010-05-23 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/SchedulePaned.py: Modified. + + Don't append newline if short description is empty + +2010-05-23 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py: Modified. + + Don't escape extended description because it is displayed in a + gtk.TextView + +2010-05-22 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Schedule: Use remove_all_events_older_than method. Check if + get_event returns none null value. + +2010-05-22 Sebastian Pölsterl + + * src/database/sqlite/SqliteEPGStore.vala, + * src/database/EPGStore.vala: Modified. + + EPGStore: Removed remove_all_events method, added + remove_events_older_than + + The latter removes all expired events in a single statement. + +2010-05-20 Sebastian Pölsterl + + * src/Event.vala: Modified. + + Event: made get_end_timestamp public + +2010-05-18 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Schedule: remove all expired events in a single transaction + +2010-05-18 Sebastian Pölsterl + + * src/database/sqlite/SqliteEPGStore.vala, + * src/database/EPGStore.vala: Modified. + + EPGStore: added remove_all_events method that remove all events in + one transaction + +2010-05-15 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Initiate channel_events attrobite in construct method to avoid + crash when on_eit_structure is called before EPG scan started + +2010-05-13 Sebastian Pölsterl + + * src/database/sqlite/SqliteConfigTimersStore.vala: Modified. + + Group sql statements into one transaction where possible + +2010-05-12 Sebastian Pölsterl + + * client/gnomedvb/udev/__init__.py, + * client/gnomedvb/udev/_dvbudevmodule.c: Removed. + + * client/gnomedvb/Makefile.am, + * client/gnomedvb/DBusWrapper.py: Modified. + + Removed python udev module and use new DBus method instead + +2010-05-12 Sebastian Pölsterl + + * src/Manager.vala, + * src/dbus/IDBusManager.vala: Modified. + + Added GetDevices method to manager DBus interface to retrieve + informations about devices via udev + +2010-05-10 Sebastian Pölsterl + + * src/Manager.vala, + * src/ChannelFactory.vala, + * src/DeviceGroup.vala: Modified. + + Added methods to start/stop EPGScanner where it is checked if + epgscanner is enabled + +2010-05-10 Sebastian Pölsterl + + * src/Manager.vala, + * src/Main.vala: Modified. + + Added support for hotplugging devices + +2010-05-10 Sebastian Pölsterl + + * Makefile.am: Modified. + + Compile daemon with gudev library + +2010-05-10 Sebastian Pölsterl + + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/database/ConfigStore.vala: Modified. + + Added get_parent_group method + +2010-05-10 Sebastian Pölsterl + + * src/DeviceGroup.vala: Modified. + + Added add_and_emit and remove_and_emit methods that emit + device_(added|removed) signal. + + If the reference device is removed a new reference is assigned. + +2010-05-08 Sebastian Pölsterl + + * src/Event.vala, + * src/EPGScanner.vala, + * src/Schedule.vala: Modified. + + Use HashSet to store events in EPGScanner + +2010-05-07 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Add all detected events at once using Schedule.add_all before next + channel is scanned + + Don't parse audio/video components of events. Ignore already + expired events. + +2010-05-07 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Added add_all function to schedule that adds/updates all events in + one transaction + +2010-05-07 Sebastian Pölsterl + + * src/database/sqlite/SqliteDatabase.vala: Modified. + + Added (begin|end)_transaction functions to SqliteDatabase + +2010-05-07 Sebastian Pölsterl + + * src/database/sqlite/SqliteEPGStore.vala: Modified. + + Set synchronous to OFF of events db for speed reasons + +2010-05-07 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Factory.vala, + * src/Schedule.vala, + * src/Main.vala: Modified. + + Return owned values in Factory + +2010-05-04 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2010-05-04 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Added text that scanning for channels may take some time. + +2010-04-20 Sebastian Pölsterl + + * src/Scanner.vala, + * src/Utils.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + Use line-based reader to read initial tuning data. Only do the + actual parsing of a single line in sub-classes. + +2010-04-20 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Utils.vala: Modified. + + Store file attributes in const variable + +2010-04-20 Sebastian Pölsterl + + * src/io/RecordingReader.vala, + * src/io/RecordingWriter.vala: Added. + + * src/RecordingsStore.vala, + * Makefile.am, + * src/Recording.vala, + * src/Recorder.vala: Modified. + + Refactored reading and writing recordings file + +2010-04-19 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Load channels file in main method + +2010-04-19 Sebastian Pölsterl + + * src/Device.vala, + * src/DeviceGroup.vala, + * src/Manager.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala: Modified. + + Added new_with_type and new_full methods to Device class and + removed duplicate code. + +2010-04-19 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/io/ChannelListReader.vala: Modified. + + Store channels read from file in the provided ChannelList instance + +2010-04-19 Sebastian Pölsterl + + * Makefile.am: Modified. + + Updated Makefile with new file locations + +2010-04-19 Sebastian Pölsterl + + * src/io/ChannelListReader.vala, + * src/io/ChannelListWriter.vala: Added. + + * src/ChannelListWriter.vala, + * src/ChannelListReader.vala: Removed. + + * src/Scanner.vala, + * src/ChannelList.vala: Modified. + + Moved ChannelList(Reader|Writer) to io package dir. Reimplemented + read method. + +2010-04-17 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Use gnome-dvb-daemon domain for gettext and locale + +2010-04-13 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.18 + +=== version-0.1.17 === +2010-04-13 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2010-04-13 Sebastian Pölsterl + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/cs.po, + * po/da.po, + * po/tr.po, + * po/sr.po, + * po/en_GB.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Updated translations + +2010-04-13 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2010-04-13 Sebastian Pölsterl + + * src/Device.vala, + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/DBusWrapper.py: Modified. + + Use adapter and frontend to determine type of device instead of + adapter only + +2010-04-13 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Don't restore EPG events in constructor of Schedule but delay the + whole process. + +2010-04-13 Sebastian Pölsterl + + * src/database/sqlite/SqliteEPGStore.vala, + * src/database/sqlite/SqliteDatabase.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala: Modified. + + Improve sql queries so we only query the stuff we actually need + +2010-04-13 Sebastian Pölsterl + + * src/Main.vala: Modified. + + set timezone to avoid that strftime stats /etc/localtime on every + call + +2010-04-13 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Made the call to destroy the scanner async and show dialog with + progressbar in the meantime + +2010-04-13 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. + + Check if filename of initial tuning data is formated as we expect + +2010-04-12 Sebastian Pölsterl + + * client/gnomedvb/udev/_dvbudevmodule.c: Modified. + + Check for NULL values when retrieving informations about a device + with udev + +2010-04-11 Sebastian Pölsterl + + * vapi/cstuff.h, + * vapi/cstuff.c, + * vapi/cutils.vapi: Modified. + + Added function for debugging using strace + +2010-04-09 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Use tuning parameters from initial tuning data instead of NIT + +2010-04-09 Sebastian Pölsterl + + * client/gnomedvb/userdirs/__userdirsmodule.c: Modified. + + Convert XDG user dir path utf8 + +2010-04-08 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Fixed possibly unassigned local variable error + +2010-04-08 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Manager.vala, + * src/Scanner.vala: Modified. + + Fixed uncaught DBus.Error warnings + +2010-04-08 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Schedule.vala: Modified. + + Catch SqlError + +2010-04-06 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Set icon of gnome-dvb-control window to gnome-dvb-daemon + +2010-04-06 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Set window icon and header image of assistant to gnome-dvb-setup + +2010-04-06 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Removed main method from DBusWrapper + +2010-04-06 Sebastian Pölsterl + + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/DBusWrapper.py: Modified. + + Use udev instead of HAL to retrieve devices + +2010-04-03 Sebastian Pölsterl + + * configure.ac: Modified. + + Check if glib python module exists during configure + +2010-04-03 Sebastian Pölsterl + + * data/icons/hicolor_apps_16x16_gnome-dvb-setup.png, + * data/icons/hicolor_apps_24x24_gnome-dvb-setup.png, + * data/icons/hicolor_apps_scalable_gnome-dvb-daemon.svg, + * data/icons/hicolor_apps_16x16_gnome-dvb-daemon.png, + * data/icons/Makefile.am, + * data/icons/hicolor_apps_64x64_gnome-dvb-setup.png, + * data/icons/hicolor_apps_32x32_gnome-dvb-setup.png, + * data/icons/hicolor_apps_22x22_gnome-dvb-setup.png, + * data/icons/hicolor_apps_64x64_gnome-dvb-generic.png, + * data/icons/hicolor_apps_22x22_gnome-dvb-daemon.png, + * data/icons/hicolor_apps_scalable_gnome-dvb-generic.svg, + * data/icons/hicolor_apps_24x24_gnome-dvb-daemon.png, + * data/icons/hicolor_apps_48x48_gnome-dvb-setup.png, + * data/gnome-dvb-control.desktop.in.in, + * data/gnome-dvb-setup.desktop.in.in, + * data/icons/hicolor_apps_64x64_gnome-dvb-daemon.png, + * data/icons/hicolor_apps_48x48_gnome-dvb-daemon.png, + * data/icons/hicolor_apps_32x32_gnome-dvb-daemon.png, + * data/icons/hicolor_apps_scalable_gnome-dvb-setup.svg: Added. + + * configure.ac, + * data/Makefile.am, + * po/gnome-dvb-daemon.pot, + * po/POTFILES.skip, + * .bzrignore, + * po/POTFILES.in: Modified. + + Added icons for gnome-dvb-control and gnome-dvb-setup (many thanks + to Klaus Staedler). Added .desktop files for gnome-dvb-control and + gnome-dvb-setup. + +2010-04-02 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Don't destroy scanner if error is posted on bus. Avoid scheduling + start_scan timeout multiple times. + +2010-03-29 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. + + Set cursor to watch while reading list of antennas/providers + +2010-03-27 Sebastian Pölsterl + + * client/gnomedvb/udev/__init__.py, + * client/gnomedvb/udev/_dvbudevmodule.c: Added. + + * configure.ac, + * client/gnomedvb/Makefile.am: Modified. + + Added udev module to retrieve connected devices using gudev + +2010-03-23 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Call ChannelFactory.stop_channel if setting pipeline to playing + failed + +2010-03-22 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated pot file + +2010-03-22 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py: Modified. + + Adjusted layout of assistant + +2010-03-22 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Fixed crash of assistant on last page if in expert mode + +2010-03-22 Sebastian Pölsterl + + * src/RecordingsStore.vala, + * src/Manager.vala, + * src/Factory.vala: Modified. + + Use unowned instead of deprecated weak + +2010-03-18 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated pot file + +2010-03-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. + + Use TreeView to display satellites, antennas and cable providers. + Added mnemonics. + +2010-03-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Change page type of ChannelScanPage to CONTENT marking the cancel + button sensitive + +2010-03-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Made progressbar pulsing when fraction is not known, yet + +2010-03-18 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.17 + +=== version-0.1.16 === +2010-03-17 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2010-03-17 Sebastian Pölsterl + + * po/en_GB.po, + * po/da.po, + * po/cs.po: Added. + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/tr.po, + * po/LINGUAS, + * po/sr.po, + * po/de.po, + * po/ar.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Added Czech, British English and Danisch translations. Updated + others. + +2010-03-17 Sebastian Pölsterl + + * tests/test-dvb-daemon.py: Modified. + + Updated test suite to changes in ChannelInfo struct + +2010-03-17 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextStore.py, + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + Adjusted to changes in ChannelInfo struct + +2010-03-17 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2010-03-17 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + When grouping channels add TV and Radio group by default. Escape + names of groups and channels. + +2010-03-17 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/dbus/IDBusChannelList.vala: Modified. + + Added is_radio field to ChannelInfo struct + +2010-03-17 Sebastian Pölsterl + + * src/Channel.vala, + * src/ChannelList.vala, + * src/Scanner.vala: Modified. + + Added is_radio method to Channel class + +2010-03-11 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py: Modified. + + Show error message if no channels were found + +2010-03-11 Sebastian Pölsterl + + * src/ChannelListWriter.vala: Modified. + + Fixed crash when trying to close stream that never was opened + before + +2010-03-11 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py: Modified. + + Display error message in the assitant instead as a dialog + +2010-03-11 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Allow getting back to adapters page when not in expert mode + +2010-03-11 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Fixed crash in Scanner.Destroy + +2010-02-23 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.16 + +=== version-0.1.15 === +2010-02-23 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2010-02-23 Sebastian Pölsterl + + * po/ar.po: Added. + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/tr.po, + * po/LINGUAS, + * po/sr.po, + * po/de.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Updated translations + +2010-02-15 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Check if loop is not null + +2010-02-15 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Avoid unhandled DBus.Error warning + +2010-02-05 Sebastian Pölsterl + + * src/ChannelFactory.vala, + * vapi/cutils.vapi: Modified. + + Fixed Vala compiler warnings + +2010-02-04 Sebastian Pölsterl + + * configure.ac: Modified. + + Updated configure.ac + +2010-01-30 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2010-01-30 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Edit changed signal in SetDuration and SetStartTime + +2010-01-30 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Don't provide default height + +2010-01-30 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Use CellRendererDatetime. Added Edit button. + +2010-01-30 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Use DateTimeBox widget to edit start time. Added option to provide + channel, start time and duration in the constructor. + +2010-01-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DateTime.py: Modified. + + Converted DateTimeBox to a gtk.Bin subclass. Implemented + mnemonic_activate. Added mark_valid method. + +2010-01-30 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Made get_device_group_if_exist public + +2010-01-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DateTime.py: Added. + + * po/POTFILES.in, + * client/gnomedvb/Makefile.am: Modified. + + Added DateTime widget + +2010-01-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RecordingsView.py, + * client/gnomedvb/ui/widgets/CellRendererDatetime.py: Modified. + + Set default format of CellRendererDatetime to %c + +2010-01-28 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Lock access to new_channels ArrayList + +2010-01-26 Sebastian Pölsterl + + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py: Modified. + + Use set_default_size rather than set_size_request + +2010-01-26 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RecordingsView.py, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py: Modified. + + Use CellRendererDatetime in RecordingsView + +2010-01-26 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/CellRendererDatetime.py: Added. + + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/Makefile.am: Modified. + + Added CellRendererDatetime + +2010-01-05 Sebastian Pölsterl + + * tests/test-dvb-daemon.py: Modified. + + Added tests for SetStartTime and SetDuration + +2010-01-05 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Wrapped SetStartTime and SetDuration + +2010-01-05 Sebastian Pölsterl + + * src/Recorder.vala, + * src/dbus/IDBusRecorder.vala: Modified. + + Added methods SetStartTime and SetDuration to Recorder DBus + interface + +2010-01-05 Sebastian Pölsterl + + * src/Timer.vala: Modified. + + Added methods set_start_time and update_epg_event + +2010-01-03 Sebastian Pölsterl + + * client/gnomedvb/ui/recordings/DetailsDialog.py, + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/widgets/RunningNextView.py, + * client/totem-plugin/dvb-daemon.py: Modified. + + Added button to DetailsDialog to schedule a recording + +2010-01-03 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/MessageDialogs.py: Added. + + * client/totem-plugin/dvb-daemon.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * po/POTFILES.in, + * client/gnomedvb/Makefile.am, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Moved dialogs informing the user about success/failure of + scheduling recording to seperate file + +2010-01-03 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py, + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Adjusted borders and paddings between content area and buttons in + dialogs + +2010-01-03 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextView.py: Modified. + + Avoid empty line in description of event if short event information + is empty + +2009-12-23 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.15 + +=== version-0.1.14 === +2009-12-23 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + Fixed bug in ChannelsStore when group has been added + +2009-12-23 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Remember sort order when changing sort type + +2009-12-23 Sebastian Pölsterl + + * po/tr.po: Added. + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/LINGUAS, + * po/sr.po, + * po/de.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Added Turkish translation and updated remaining. + +2009-12-23 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-12-23 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2009-12-23 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.totem-plugin.in: Modified. + + Marked Totem plugin as builtin so it is enabled by default + +2009-12-22 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Removed dialog asking the user to start the setup. Only display DVB + related stuff if at least one device has been detected on startup. + Re-wrote the way gnome-dvb-setup is started. + +2009-12-21 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Use gtk.image_new_from_icon_name to create icons for menus + +2009-12-21 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. + + Display message if no devices could be found even if not in expert + mode + +2009-12-10 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Fixed bug when recording and rtsp streaming of the same channel + took place at the same time and the pipeline stalled + +2009-12-01 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated translation template + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/recordings/RecordingsDialog.py: Modified. + + Made close button default widget + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Adjusted mnemonics and shortcuts + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py: Modified. + + Made close button the default action + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/CalendarDialog.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Made Timers dialog more HIG compliant + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DetailsDialog.py: Modified. + + Use TextFieldLabel + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/__init__.py: Modified. + + Only print hour, minute and second if it's not 0 + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py: Modified. + + Made recordings dialog more HIG compliant + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Dialogs.py: Modified. + + Made dialogs in preferences more HIG compliant + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py: Modified. + + Set border width to 12 + +2009-12-01 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/Frame.py: Modified. + + Added TextFieldLabel + +2009-11-29 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DetailsDialog.py: Modified. + + Arrange labels in table instead of VBox in DetailsDialog + +2009-11-28 Sebastian Pölsterl + + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py: Modified. + + Only display channel groups combobox if there's more than one group + +2009-11-28 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Don't display device groups combobox if there's only one group. + Removed label of combo box. + +2009-11-28 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. + + Fixed crash when not supported adapter type was used + +2009-11-27 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py: Modified. + + Use label of BasePage in all pages. Added right-click menu to + ChannelScanPage to de-/select all channels. + +2009-11-27 Sebastian Pölsterl + + * src/Recorder.vala, + * src/ChannelFactory.vala: Modified. + + Check if setting pipeline to playing was successful + +2009-11-21 Sebastian Pölsterl + + * configure.ac: Modified. + + Link against gstreamer-rtsp-0.10 as well + +2009-11-19 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.14 + +=== version-0.1.13 === +2009-11-19 Sebastian Pölsterl + + * README: Modified. + + Updated dependencies in README + +2009-11-19 Sebastian Pölsterl + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/sr.po, + * po/de.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Added updated translations + +2009-11-18 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-11-18 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Reorganized locking. Watch for errors and warnins on the bus. Call + set_active on the sink ghost pad. + +2009-11-18 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala: Modified. + + Added debug calls + +2009-11-17 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. + + Added Mandriva specific directory of dvb-apps initial tuning data + +2009-11-17 Sebastian Pölsterl + + * configure.ac: Modified. + + gst-rtsp-server depends on gstreamer 0.10.25, depend on it as well + +2009-11-17 Sebastian Pölsterl + + * configure.ac: Modified. + + Depend on gst-rtsp-server 0.1.5 + +2009-11-17 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Fixed bug in getting EPG information for timer if the timer was + completely contained in the event + +2009-11-16 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Schedule.vala: Modified. + + Reverted r829 and r830 + +2009-11-16 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Made Channel private + +2009-11-16 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Made DeviceGroup private + +2009-11-16 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Made DeviceGroup private + +2009-11-14 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2009-11-14 Sebastian Pölsterl + + * client/gnomedvb/ui/recordings/RecordingsDialog.py: Modified. + + Removed markup from translatable string + +2009-11-14 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala, + * src/rygel/Services.vala, + * src/ScannedItem.vala, + * src/Cable/CableScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Satellite/SatelliteScanner.vala: Modified. + + Fixed additional compiler warnings with latest Vala + +2009-11-13 Sebastian Pölsterl + + * src/database/sqlite/SqliteDatabase.vala: Modified. + + new_version attribute is no property + +2009-11-12 Sebastian Pölsterl + + * src/ChannelFactory.vala, + * src/database/sqlite/SqliteDatabase.vala, + * src/Schedule.vala, + * src/ChannelListWriter.vala, + * src/DeviceGroup.vala, + * src/Timer.vala, + * src/Recorder.vala, + * src/ChannelList.vala, + * src/ChannelListReader.vala, + * src/Device.vala: Modified. + + Fixed some compiler warnings with latest Vala + + Chain-up constructor to set construct-only properties where + possible + +2009-11-12 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Fixed crash when streaming is forced to stop because a recording is + about to start + +2009-11-12 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Fixed compile error with latest Vala + +2009-11-12 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Fixed a couple of bugs when recording/watching multiple channels at + the same time on the same device + +2009-11-12 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala: Modified. + + Supply payloader element to stop_channel + +2009-11-12 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Don't return expired events in GetAllEvents and GetAllEventInfos + +2009-11-03 Sebastian Pölsterl + + * src/database/sqlite/SqliteEPGStore.vala, + * src/database/sqlite/SqliteUtils.vala: Modified. + + Unescape ' when retrieving text from sqlite db + +2009-11-03 Sebastian Pölsterl + + * src/database/sqlite/SqliteDatabase.vala, + * src/database/SqlError.vala: Modified. + + Fixed typo NOMEN -> NOMEM + +2009-11-03 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Always scan EPG on all channels + +2009-11-03 Sebastian Pölsterl + + * tests/test-dvb-daemon.py: Modified. + + Added test where non-existend device is added + +2009-11-03 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Don't allow to create devices where retrieving the adapter's type + failed + +2009-11-03 Sebastian Pölsterl + + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/Timer.vala: Modified. + + Removed Year,Month,Day,Hour,Minute properties from Timer class and + work directly with starttime + +2009-11-03 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Timer.vala: Modified. + + Removed unused property Name from Timer class + +2009-11-03 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Check if recording doesn't already exist before starting the actual + recording + +2009-10-31 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextView.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Handle displaying DetailsDialog when clicking on event directly in + RunningNextView + +2009-10-31 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextStore.py: Modified. + + Added get_device_group method + +2009-10-31 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Check if check_timers_event_id > 0 when removing check_timers + timeout + +2009-10-29 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2009-10-29 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Remove check_timers timeout in Recorder's stop method + +2009-10-29 Sebastian Pölsterl + + * src/Manager.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/database/TimersStore.vala: Modified. + + Added remove_all_timers_from_device_group method to TimersStore. + + Delete all timers of device group when it gets deleted. + +2009-10-29 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Only remove Timers could be added to Recorder + +2009-10-29 Sebastian Pölsterl + + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/DBusWrapper.py: Modified. + + get_adapter_info returns tuple where the first item indicates if + the information could be retrieved successfully. Display error + message if retrieving devices fails. + +2009-10-22 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated translations template + +2009-10-22 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + When displaying channel groups add virtual group that contains all + channels + +2009-10-22 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Added option to order channels by name or group + +2009-10-22 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + Added set_sort_order method + +2009-10-22 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsView.py: Modified. + + Allow ChannelsTreeStore in set_model + +2009-10-14 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.13 + +=== version-0.1.12 === +2009-10-14 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-10-14 Sebastian Pölsterl + + * Makefile.am: Modified. + + Generate ChangeLog automatically when creating tarball + +2009-10-14 Sebastian Pölsterl + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/sr.po, + * po/de.po, + * po/fi.po, + * po/sv.po, + * po/fr.po: Modified. + + Imported translations from launchpad + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py: Modified. + + Call RemoveDevice, AddDeviceToNewGroup and AddDevice async + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/DVBModel.py: Modified. + + Made remove_device async + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/Callback.py: Added. + + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/Makefile.am: Modified. + + Moved Callback to own file + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py: Modified. + + Fixed markup errors + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/ui/recordings/DetailsDialog.py: Modified. + + Call GetAllInformations async + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Call AddTimer and DeleteTimer async + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Provide **kwargs for more methods so they can be used async + +2009-10-14 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py: Modified. + + Remove device from unassigned devices if device or group is added + +2009-10-13 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Catch exception when removing item from GtkRecentManager + +2009-10-12 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala: Modified. + + pipeline is unref'ed in remove_elements + +2009-10-12 Sebastian Pölsterl + + * tests/test-dvb-daemon.py: Added. + + Added unit test suite + +2009-10-12 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala: Modified. + + pipeline is unref'ed in remove_elements + +2009-10-12 Sebastian Pölsterl + + * tests/test-dvb-daemon.py: Added. + + Added unit test suite + +2009-10-12 Sebastian Pölsterl + + * src/Manager.vala, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * src/dbus/IDBusManager.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/database/ConfigStore.vala: Modified. + + AddChannelGroup returns the id of the group in an out parameter + +2009-10-12 Sebastian Pölsterl + + * src/dbus/IDBusDeviceGroup.vala, + * src/DeviceGroup.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + GetSchedule returns true on success, ObjectPath is returned as out + parameter + +2009-10-12 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Fixed crasher in GetInformations if invalid id was provided + +2009-10-12 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Fixed crasher in GetAllInformations if provided id does not exist. + GetTitle returns true if the id is valid but no title is available. + +2009-10-11 Sebastian Pölsterl + + * src/ChannelList.vala: Modified. + + Return true if id is valid but channel has no name/network in + GetChannelName and GetChannelNetwork + +2009-10-11 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Make get_registered_device_groups work sync and async + +2009-10-11 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + Fixed crasher in GetAllInformations if id doesn't exist. + GetDescription and GetName return true for a valid id even if the + name/description doesn't exist. + + ------------- This line and the following will be ignored + -------------- + + modified: src/RecordingsStore.vala + +2009-10-08 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + Added option to display channel groups to ChannelsTreeStore + +2009-10-08 Sebastian Pölsterl + + * src/Recorder.vala, + * src/RecordingsStore.vala, + * src/ChannelList.vala, + * src/DeviceGroup.vala: Modified. + + Reverted r756: Use libgee's to_array methods where applicable + +2009-10-07 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Catch SqlError + +2009-10-07 Sebastian Pölsterl + + * src/ChannelList.vala: Modified. + + Fixed crash in GetChannelURL if channel_id doesn't exist + +2009-10-06 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * po/gnome-dvb-daemon.pot, + * client/gnomedvb/ui/widgets/DetailsDialog.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Removed most markups from the translatable strings + +2009-10-06 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.12 + +=== version-0.1.11 === +2009-10-06 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-10-06 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2009-10-06 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. + + Use iso_3166 to translate countries. Use locale.strcoll to sort + country names. + +2009-10-05 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Dialogs.py: Modified. + + Import AlignedLabel from the correct module + +2009-10-03 Sebastian Pölsterl + + * src/database/sqlite/SqliteDatabase.vala: Modified. + + Create parent directories of databse file if they don't exist + +2009-10-01 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Fixed duplicate actiongroup name + +2009-10-01 Sebastian Pölsterl + + * po/pl.po, + * po/es.po, + * po/te.po, + * po/sr.po, + * po/de.po, + * po/fi.po, + * po/fr.po: Added. + + Added .po files + +2009-09-30 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.11 + +=== version-0.1.10 === +2009-09-30 Sebastian Pölsterl + + * po/sv.po, + * po/LINGUAS: Modified. + + Added Translations for German, Spanish, Finnish, French, Polish, + Serbian and Telugu. Updated Swedish translations. + +2009-09-30 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-09-30 Sebastian Pölsterl + + * README: Modified. + + Updated libgee requirement + +2009-09-30 Sebastian Pölsterl + + * src/Recorder.vala, + * src/RecordingsStore.vala, + * src/ChannelList.vala, + * src/DeviceGroup.vala: Modified. + + Use libgee's to_array methods where applicable + +2009-09-30 Sebastian Pölsterl + + * src/ChannelFactory.vala, + * src/Scanner.vala, + * src/RecordingsStore.vala, + * configure.ac, + * src/rygel/Services.vala, + * src/Manager.vala, + * src/EPGScanner.vala, + * src/Recorder.vala, + * src/ChannelList.vala: Modified. + + Moved to libgee 0.5.0 + +2009-09-30 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated pot file + +2009-09-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelGroupsView.py, + * client/gnomedvb/ui/widgets/ChannelGroupsStore.py: Added. + + * client/gnomedvb/ui/widgets/ChannelsGroupView.py, + * client/gnomedvb/ui/widgets/ChannelsGroupStore.py: Removed. + + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * po/POTFILES.in, + * client/gnomedvb/Makefile.am: Modified. + + Fixed typo in class name + +2009-09-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsGroupView.py: Modified. + + Fixed typo + +2009-09-30 Sebastian Pölsterl + + * client/gnomedvb/ui/channellisteditor/__init__.py, + * client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py, + * client/gnomedvb/ui/widgets/ChannelsGroupView.py, + * client/gnomedvb/ui/widgets/ChannelsGroupStore.py: Added. + + * po/POTFILES.in, + * client/gnomedvb/Makefile.am, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Added ChannelListEditorDialog + +2009-09-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/Frame.py: Modified. + + Added set_aligned_child method + +2009-09-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/Frame.py: Added. + + * client/gnomedvb/ui/preferences/Frame.py: Removed. + + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/Makefile.am: Modified. + + Moved Frame.py to widgets + +2009-09-30 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/HelpBox.py: Added. + + * client/gnomedvb/Makefile.am, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Moved HelpBox to own file + +2009-09-30 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Frame.py: Modified. + + Provide expand, fill and padding paramters + +2009-09-29 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Frame.py: Modified. + + Added BaseFrame class + +2009-09-26 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/Manager.vala: Modified. + + Return value returned by ConfigStore + +2009-09-26 Sebastian Pölsterl + + * src/database/sqlite/SqliteConfigTimersStore.vala: Modified. + + Fixed bug that removing channel groups did not work + +2009-09-26 Sebastian Pölsterl + + * src/database/sqlite/SqliteConfigTimersStore.vala: Modified. + + Created channel_groups and channels tables, too + +2009-09-26 Sebastian Pölsterl + + * src/database/sqlite/SqliteDatabase.vala: Modified. + + Check if database file exists before opening connection + +2009-09-26 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Wrapped new methods + +2009-09-26 Sebastian Pölsterl + + * src/dbus/IDBusManager.vala, + * src/ChannelList.vala, + * src/dbus/IDBusChannelList.vala, + * src/Manager.vala: Modified. + + Moved GetChannelGroups, AddChannelGroup and RemoveChannelGroup to + Manager DBus interface + +2009-09-25 Sebastian Pölsterl + + * src/database/sqlite/SqliteDatabase.vala: Modified. + + Assign database file to variable + +2009-09-24 Sebastian Pölsterl + + * src/EPGScanner.vala, + * src/Scanner.vala: Modified. + + Catch error when creating a thread + +2009-09-24 Sebastian Pölsterl + + * src/Scanner.vala, + * src/RecordingsStore.vala, + * src/Schedule.vala, + * src/Cable/CableScanner.vala, + * src/Manager.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/DeviceGroup.vala, + * src/Recorder.vala, + * src/ChannelList.vala, + * src/Satellite/SatelliteScanner.vala: Modified. + + Added throws DBus.Error to implementations of DBus interfaces + +2009-09-24 Sebastian Pölsterl + + * src/DeviceGroup.vala: Modified. + + Set ChannelList.GroupId of referene device in constructor + +2009-09-24 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/dbus/IDBusChannelList.vala: Modified. + + Implemented DBus methods for channel groups. Added GroupId property + to ChannelList. + +2009-09-24 Sebastian Pölsterl + + * src/dbus/IDBusRecorder.vala, + * src/dbus/IDBusDeviceGroup.vala, + * src/dbus/IDBusSchedule.vala, + * src/dbus/IDBusRecordingsStore.vala, + * src/dbus/IDBusManager.vala, + * src/dbus/IDBusChannelList.vala: Added. + + * src/IDBusDeviceGroup.vala, + * src/IDBusManager.vala, + * src/IDBusRecordingsStore.vala, + * src/IDBusRecorder.vala, + * src/IDBusChannelList.vala, + * src/IDBusSchedule.vala: Removed. + + * Makefile.am: Modified. + + Moved DBus interfaces to dbus directory + +2009-09-24 Sebastian Pölsterl + + * src/ChannelGroup.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/database/ConfigStore.vala: Modified. + + Removed get_group_for_channel and added get_channel_groups and + get_channels_of_group methods. + + ChannelGroup is now a real class. + +2009-09-24 Sebastian Pölsterl + + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/database/ConfigStore.vala: Modified. + + Added support for assigning channels to one or more groups in + database scheme + +2009-09-24 Sebastian Pölsterl + + * src/ChannelGroup.vala: Modified. + + Removed parent field + +2009-09-24 Sebastian Pölsterl + + * src/ChannelGroup.vala: Added. + + * Makefile.am: Modified. + + Added ChannelGroup class + +2009-09-24 Sebastian Pölsterl + + * src/database/sqlite/SqliteUtils.vala, + * src/database/sqlite/SqliteDatabase.vala, + * src/database/TimersStore.vala, + * src/database/sqlite/SqliteEPGStore.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala, + * src/database/EPGStore.vala, + * src/database/SqlError.vala, + * src/database/ConfigStore.vala: Added. + + * src/TimersStore.vala, + * src/SqliteConfigTimersStore.vala, + * src/EPGStore.vala, + * src/ConfigStore.vala, + * src/SqliteEPGStore.vala: Removed. + + * src/Schedule.vala, + * src/Main.vala, + * src/Manager.vala, + * Makefile.am, + * src/DeviceGroup.vala, + * src/Recorder.vala, + * src/Factory.vala: Modified. + + Refactored Sqlite database access + + This adds support for versioned database schemes and the + possibility to upgrade them. + +2009-09-20 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2009-09-20 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Fixed buttons for error dialogs + +2009-09-20 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py: Modified. + + Display error dialog if writing channels.conf fails + +2009-09-20 Sebastian Pölsterl + + * Makefile.am: Modified. + + Added vapi/config.vapi to EXTRA_DIST target + +2009-09-17 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Fixed crash when new group has been added + +2009-09-17 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Check newly added channels depending on 'Select scrambled channels' + checkbutton + +2009-09-17 Sebastian Pölsterl + + * src/Timer.vala: Modified. + + Overlapping timers on the same channel never conflict + +2009-09-17 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Fixed critical warning + +2009-09-17 Sebastian Pölsterl + + * src/IDBusDeviceGroup.vala, + * src/IDBusSchedule.vala, + * src/IDBusManager.vala, + * src/Cable/CableScanner.vala, + * src/IDBusRecorder.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/IDBusChannelList.vala, + * src/IDBusRecordingsStore.vala, + * src/Satellite/SatelliteScanner.vala: Modified. + + Fixed compiler errors with latest Vala + +2009-09-15 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/DetailsDialog.py: Added. + + * client/gnomedvb/ui/recordings/DetailsDialog.py, + * client/gnomedvb/ui/widgets/RunningNextView.py, + * po/gnome-dvb-daemon.pot, + * po/POTFILES.in, + * client/gnomedvb/Makefile.am, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/widgets/RunningNextStore.py: Modified. + + Display dialog with details when double-clicking on an event in + What's on now view on control center + +2009-09-15 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Use SchedulePaned in Totem plugin + +2009-09-15 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/SchedulePaned.py: Added. + + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/Makefile.am, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Display extended event description in textview instead of expanding + the selected row + +2009-09-14 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Adjusted Totem plugin to API changes + +2009-09-14 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Fixed bug that timer was marked as conflicts if it doesn't + +2009-09-14 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextStore.py, + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * src/Schedule.vala, + * src/IDBusSchedule.vala: Modified. + + Use out parameters and return true for GetInformations, GetName, + GetShortDescription, GetExtendedDescription, GetDuration, + GetLocalStartTime, GetLocalStartTimestamp, IsRunning and + IsScrambled + +2009-09-14 Sebastian Pölsterl + + * client/gnomedvb/ui/recordings/DetailsDialog.py, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * src/RecordingsStore.vala, + * src/IDBusRecordingsStore.vala: Modified. + + Use out parameters and return true on success for GetLocation, + GetName, GetDescription, GetStartTime, GetStartTimestamp, + GetLength, GetChannelName, GetAllInformations + +2009-09-14 Sebastian Pölsterl + + * src/IDBusRecorder.vala, + * src/Main.vala, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * src/Recorder.vala, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Use out parameters and return true on success for AddTimer, + AddTimerWithMargin, AddTimerForEPGEvent, GetStartTime, GetEndTime, + GetDuration, GetChannelName, GetTitle, GetAllInformations + +2009-09-14 Sebastian Pölsterl + + * client/gnomedvb/DVBModel.py, + * src/IDBusManager.vala, + * client/gnomedvb/DBusWrapper.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * src/Manager.vala, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Use out parameters and return true on success for + GetScannerForDevice, GetDeviceGroup and GetNameOfRegisteredDevice + +2009-09-14 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/IDBusChannelList.vala: Modified. + + Updated DBus API for ChannelList + + Use out parameter and return TRUE on success where applicable + +2009-09-14 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Modified. + + Updated .pot file + +2009-09-14 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Added CheckButton to (de)select scrambled channels + +2009-09-06 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: Added. + + * .bzrignore: Modified. + + Added pot file to repository + +2009-08-25 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Increased width of EditTimersDialog + +2009-08-25 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Timer.vala: Modified. + + Print debug output of start time in better format + +2009-08-24 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.10 + +=== version-0.1.9 === +2009-08-24 Sebastian Pölsterl + + * README: Modified. + + Updated libgee requirement in README + +2009-08-24 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-08-22 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Use GetAllInformations + +2009-08-22 Sebastian Pölsterl + + * src/IDBusRecorder.vala, + * src/Recorder.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added GetAllInformations to Recorder D-Bus interface + +2009-08-22 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Added Title column to EditTimersDialog + +2009-08-22 Sebastian Pölsterl + + * src/IDBusRecorder.vala, + * src/Recorder.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added GetTitle method to Recorder D-Bus interface + +2009-08-22 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. + + Show error message if initial tuning data was not found + +2009-08-19 Sebastian Pölsterl + + * src/Settings.vala, + * src/ChannelListWriter.vala: Modified. + + Use write_all instead of write + +2009-08-18 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Use own main loop for Scanner + +2009-08-18 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Run bus watch function in EPGScanner's main loop + +2009-08-18 Sebastian Pölsterl + + * vapi/cstuff.h, + * vapi/cstuff.c: Added. + + * configure.ac, + * Makefile.am, + * vapi/cutils.vapi: Modified. + + Added cstuff.c with helper function gst_bus_add_watch_context + +2009-08-17 Sebastian Pölsterl + + * client/gnomedvb/ui/Makefile.am, + * client/gnomedvb/ui/wizard/pages/Makefile.am, + * client/gnomedvb/userdirs/Makefile.am, + * client/gnomedvb/ui/widgets/Makefile.am, + * client/gnomedvb/ui/recordings/Makefile.am, + * client/gnomedvb/ui/controlcenter/Makefile.am, + * client/gnomedvb/ui/wizard/Makefile.am, + * client/gnomedvb/ui/preferences/Makefile.am, + * client/gnomedvb/ui/timers/Makefile.am: Removed. + + * configure.ac, + * Makefile.am, + * client/gnomedvb/Makefile.am: Modified. + + Use a single Makefile.am for client/gnomedvb + +2009-08-16 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Removed unused variable do_stop + +2009-08-15 Sebastian Pölsterl + + * src/EPGScanner.vala, + * src/DeviceGroup.vala: Modified. + + Use own main loop in EPGScanner + +2009-08-15 Götz Waschk + + * src/Recorder.vala, + * configure.ac, + * src/DeviceGroup.vala, + * src/ChannelList.vala: Modified. + + Moved to libgee 0.3.0 + +2009-08-15 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Fixed exception when scheduling selected event for recording was + canceled + +2009-08-15 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. + + Don't cause endless loop causing 100% CPU usage when selected an + entry in ScheduleView + +2009-08-14 Chris Elston + + * src/Channel.vala: Modified. + + Fixed bug #588611: RTSP server exposes local RTPS URL for live TV + +2009-08-12 Chris Elston + + * client/gnomedvb/userdirs/Makefile.am: Modified. + + Fixed bug #591542 – Make install rule not working correctly for + client/gnomedvb/userdirs/ subdir on x86_64 + +2009-08-09 Sebastian Pölsterl + + * README: Modified. + + Updated requirements in README + +2009-08-09 Sebastian Pölsterl + + * .bzrignore: Modified. + + Updated .bzrignore + +2009-08-09 Sebastian Pölsterl + + * src/DeviceGroup.vala: Modified. + + Call EPGScanner.destroy + +2009-08-09 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Don't create timeout again after calling destroy + +2009-08-09 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Don't remove name and description of Recording after setting it + +2009-08-09 Sebastian Pölsterl + + * src/Utils.vala, + * src/Event.vala: Modified. + + Use time_t instead of int64 where applicable + +2009-08-09 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Use timer's EPG event id to assign the correct values to Recording + +2009-08-09 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala: Modified. + + Added event_id column + +2009-08-09 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Added get_event_around method. Use time_t instead of int64 where + applicable + +2009-08-09 Sebastian Pölsterl + + * src/Timer.vala: Modified. + + Added EventID property + +2009-08-05 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.9 + +=== version-0.1.8 === +2009-08-05 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-08-05 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Use set_is_important on first three toolbuttons + +2009-08-05 Sebastian Pölsterl + + * configure.ac: Modified. + + Depend on gst-rtsp-server 0.10.4 + +2009-08-02 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Override information that Totem writes to GtkRecentManager + +2009-08-01 Sebastian Pölsterl + + * src/Utils.vala, + * src/SqliteEPGStore.vala: Modified. + + Use -1 as string length in regex.replace_literl to indicate NULL- + terminated strings and to avoid that strings get cut off + +2009-07-29 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Connect to loading-finished signal of ChannelsTreeStore instead of + waiting 2 seconds + +2009-07-29 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + Added loading-finished signal + +2009-07-27 Sebastian Pölsterl + + * src/SqliteEPGStore.vala, + * src/Utils.vala, + * src/Scanner.vala, + * src/ChannelListWriter.vala: Modified. + + Use string.len() instead of .size() to adjust to latest changes in + Vala + +2009-07-26 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Check if all required GStreamer elements are available, if not + print an error message and quit. + +2009-07-26 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Display message if schedule of channel has no events + +2009-07-26 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py: Modified. + + Added loading-finished signal + +2009-07-26 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Fixed criticals in GetAllEventInfos + +2009-07-26 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Check if we get_sink_bin actually returned an element + +2009-07-22 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Don't mark "What's on now" button sensitive when loading the plugin + and channels are added for the first time + +2009-07-22 Sebastian Pölsterl + + * configure.ac: Modified. + + Set minimum required version of libgee to 0.1.6 + +2009-07-20 Sebastian Pölsterl + + * src/Recorder.vala, + * src/RecordingsStore.vala, + * src/Recording.vala: Modified. + + Keep reference to FileMonitor of recorded file. Don't monitor the + file as long as the recording is still active + +2009-07-20 Sebastian Pölsterl + + * src/Recorder.vala, + * src/ChannelFactory.vala, + * src/rtsp/MediaFactory.vala, + * src/Timer.vala: Modified. + + Fixed bug where all streams of a channel were stopped when a single + client/recording stopped + +2009-07-15 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Pause pipeline before linking with tee + +2009-07-11 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Removed ID column + +2009-07-09 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Fix bug introduced in last commit + +2009-07-09 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Make sure that stop_counter doesn't get smaller than 0 + +2009-07-09 Sebastian Pölsterl + + * src/rygel/Services.vala, + * src/rtsp/Server.vala, + * src/Main.vala: Modified. + + Use Idle.add to start RTSP server and Rygel services + +2009-07-09 Sebastian Pölsterl + + * src/Utils.vala, + * src/SqliteEPGStore.vala: Modified. + + inline some functions + +2009-07-07 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. + + Use GetAllEventInfos. Retrieve extended description only when a + event is selected + +2009-07-07 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextStore.py: Modified. + + Use GetChannelInfos + +2009-07-07 Sebastian Pölsterl + + * src/IDBusSchedule.vala, + * src/Schedule.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added GetAllEventInfos and GetInformations to Schedule D-Bus + interface + +2009-07-07 Sebastian Pölsterl + + * src/rtsp/Server.vala: Modified. + + Remove timeout in shutdown + +2009-07-07 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/DBusWrapper.py: Modified. + + Use GetChannelInfos in ChannelsStore + +2009-07-07 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/IDBusChannelList.vala: Modified. + + Added GetChannelInfos to ChannelList D-Bus interface to retrieve id + and name for all channels with one call + +2009-07-06 Sebastian Pölsterl + + * client/gnomedvb/__init__.py: Modified. + + Use fallback if get_xdg_user_dir returns None + +2009-07-06 Sebastian Pölsterl + + * client/gnomedvb/userdirs/__userdirsmodule.c: Modified. + + Don't throw exception if g_get_user_special_dir returns NULL, just + return None + +2009-07-05 Sebastian Pölsterl + + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + Skip all lines that contain a # as first visible character, no + matter if whitespaces are in front + +2009-07-02 Sebastian Pölsterl + + * client/gnome-dvb-setup: Modified. + + Set modal and on center of parent when --transient-for is specified + +2009-07-02 Sebastian Pölsterl + + * configure.ac: Modified. + + Removed gconf references from configure.ac + +2009-07-01 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + Made additional sections in RecordnigsStore thread-safe + +2009-07-01 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Made additional sections in Recorder thread-safe + +2009-07-01 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Made Manager thread-safe + +2009-07-01 Sebastian Pölsterl + + * src/DeviceGroup.vala: Modified. + + Made DeviceGroup thread-safe + +2009-07-01 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + EPGScanner remembers how often stop was called and only is + activated again, if the start has been called the same number of + times + +2009-07-01 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Made ChannelFactory and PlayerThread thread-safe + +2009-07-01 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala: Modified. + + Set pipeline to null in unprepare so gst-rtsp-server doesn't stop + the pipeline + +2009-07-01 Sebastian Pölsterl + + * src/rtsp/Server.vala: Modified. + + Adjusted to latest changes in gst-rtsp-server + +2009-06-30 Sebastian Pölsterl + + * src/rtsp/Server.vala: Modified. + + Added timeout function to cleanup timed out sessions + +2009-06-30 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala: Modified. + + Set payloader type + +2009-06-29 Sebastian Pölsterl + + * src/ChannelFactory.vala, + * src/rtsp/Server.vala, + * src/rtsp/MediaFactory.vala: Modified. + + Stop streaming channels when a recording is about to start on a + different transport stream and no free devices are available + +2009-06-29 Sebastian Pölsterl + + * src/rtsp/Server.vala: Added. + + * Makefile.am, + * src/Main.vala: Modified. + + Moved creation of RTSPServer from Main to RTSPServer namespace + +2009-06-29 Sebastian Pölsterl + + * src/rygel/Services.vala, + * src/Main.vala: Modified. + + Use nested namespace instead of class in static classes + +2009-06-28 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Use get_device_group_size to determine if the daemon is setup + +2009-06-28 Sebastian Pölsterl + + * src/Manager.vala, + * src/IDBusManager.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added GetDeviceGroupSize method to Manager + +2009-06-28 Sebastian Pölsterl + + * src/Recorder.vala, + * src/ChannelFactory.vala: Modified. + + Added way to force watching a channel + +2009-06-26 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Use uimanager.add_ui to add menu items + +2009-06-26 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Removed print statement + +2009-06-26 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. + + Reset adapter_info + +2009-06-26 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Removed start control center checkbutton + +2009-06-26 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/__init__.py, + * client/gnomedvb/ui/recordings/DetailsDialog.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/widgets/RecordingsView.py: Modified. + + Convert duration in hours and minutes string + +2009-06-26 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Adjusted wording + +2009-06-26 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Adjusted sensivity of buttons + +2009-06-26 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py: Modified. + + Display group's name in dialog when removing device instead of ID + +2009-06-26 Sebastian Pölsterl + + * client/gnomedvb/Device.py, + * client/gnomedvb/DVBModel.py: Modified. + + Save group's name Device class + +2009-06-25 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py: Modified. + + Renamed preferences button to edit and added a new button that + starts gnome-dvb-setup with additional options for creating group + or adding device to group manually + +2009-06-25 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Merged menu items into existing menus + +2009-06-21 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Use --transient-for when starting gnome-dvb-setup + +2009-06-21 Sebastian Pölsterl + + * client/gnome-dvb-setup: Modified. + + Added --transient-for switch to set parent window + +2009-06-21 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Check if dvb-daemon is already configured with a 2 second delay, + because the channels and groups are retrieved async + +2009-06-20 H. W. Wan + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: Modified. + + Add Hong Kong to list of countries in Initial Tuning Data Page + +2009-06-20 Sebastian Pölsterl + + * po/POTFILES.in: Modified. + + Added SetupDevicePage.py to POTFILES.in + +2009-06-20 Sebastian Pölsterl + + * client/gnomedvb/userdirs/__userdirsmodule.c: Added. + + Added __userdirsmodule.c + +2009-06-20 Sebastian Pölsterl + + * .bzrignore: Modified. + + Ignore .c and .h files only in src directory + +2009-06-19 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py: Added. + + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/pages/Makefile.am, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. + + Made assistant more async and added progressbars where applicable. + Added SetupDevicePage which actually takes care of configuring + devices. + +2009-06-19 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Prepared additional methods to be called async + +2009-06-19 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Retrieve devices and groups async + +2009-06-19 Sebastian Pölsterl + + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/DBusWrapper.py: Modified. + + Get devices async + +2009-06-18 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Update sensitivity of buttons when groups are added or removed + +2009-06-18 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Added buttons to see what's on now and to see the program guide of + the selected channel to the sidebar + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Start scanner after adding brute-force tuning data + +2009-06-18 Sebastian Pölsterl + + * po/POTFILES.in: Modified. + + Added client/gnomedvb/ui/wizard/__init__.py to POTFILES.in + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/__init__.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Re-designed big portions of gnome-dvb-setup + + Fixed bugs #586227, #586228 and #586232 + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/__init__.py: Modified. + + Fixed typo and get subdir Recordings as default recodings dir + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. + + Fixed bug #586226: Device type not user-friendly + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: Modified. + + Fixed bug #586224: No need for device selection in setup wizard + + Don't show page to select device if there's only one device + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Fixed bug #586231: Removed frequency column and never show + horizontal scrollbars + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: Modified. + + Fixed bug #586230: Channel results should pack checkbox in first + column + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/__init__.py: Modified. + + Added get_config_dir and get_default_recordings_dir functions + +2009-06-18 Sebastian Pölsterl + + * client/gnomedvb/userdirs/__init__.py, + * client/gnomedvb/userdirs/Makefile.am: Added. + + * configure.ac, + * client/gnomedvb/Makefile.am: Modified. + + Added userdirs module from deskbar-applet + +2009-06-18 Sebastian Pölsterl + + * data/Makefile.am: Modified. + + Removed comment + +2009-06-18 Sebastian Pölsterl + + * data/Makefile.am: Modified. + + Fixed autofoo that .service files end up with correct contents + +2009-06-17 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Added option to start control center to last page of channel scan + assistant + +2009-06-17 Sebastian Pölsterl + + * data/org.gnome.UPnP.MediaServer1.DVBDaemon.service.in: Added. + + * data/org.gnome.UPnP.MediaServer1.DVBDaemon.service: Removed. + + Added .service.in file and removed .service file + +2009-06-17 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Enable Rygel support by default and provide --disable-rygel switch + +2009-06-17 Sebastian Pölsterl + + * data/org.gnome.UPnP.MediaServer1.DVBDaemon.service: Added. + + * data/Makefile.am: Modified. + + Install .service file for org.gnome.UPnP.MediaServer1.DVBDaemon + +2009-06-17 Sebastian Pölsterl + + * src/rygel/Services.vala: Modified. + + Adjusted DisplayName of root container + +2009-06-17 Sebastian Pölsterl + + * src/rygel/Services.vala: Modified. + + Use video/mpeg as mime type + +2009-06-17 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Added What's on now menu item and bring up dialog if channel search + should be started if no groups are configured + +2009-06-17 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Added menu entry and toolbar button to show what's currently + running and what's next + +2009-06-15 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + Check for NULL values in GetAllInformations + +2009-06-15 Sebastian Pölsterl + + * src/Utils.vala, + * src/Scanner.vala, + * src/Settings.vala, + * src/ChannelListWriter.vala: Modified. + + Fixed warnings about uncatched Exceptions or never occuring + Exceptions + +2009-06-15 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Added --enable-rygel switch + +2009-06-15 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/totem-plugin/dvb-daemon.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Use 'Recording schedule' instead of 'Timers' in GUI + +2009-06-15 Sebastian Pölsterl + + * Makefile.am: Modified. + + Adjusted build system to vala 0.7.x + +2009-06-15 Sebastian Pölsterl + + * src/rygel/Services.vala, + * src/rygel/Interfaces.vala: Modified. + + Use owned getters + +2009-06-14 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala: Modified. + + Call remote_elements in unprepare + +2009-06-14 Sebastian Pölsterl + + * src/rygel/Services.vala: Modified. + + Made RygelService class Compact + +2009-06-13 Sebastian Pölsterl + + * src/DeviceGroup.vala: Modified. + + Fixed crash when last device of group has been removed + +2009-06-13 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + Connect to manager's group-added and group-removed signals + +2009-06-12 Sebastian + + * src/rtsp/MediaFactory.vala: Modified. + + Adjusted to changes in my gst-rtsp-server branch to inject dvb- + daemon's pipeline + +2009-06-11 Sebastian Pölsterl + + * src/rygel/Services.vala, + * src/rygel/Interfaces.vala: Added. + + * Makefile.am: Modified. + + Implemented Rygel MediaServer spec. It still doesn't work due to a + bug in vala + +2009-06-11 Sebastian Pölsterl + + * src/Channel.vala, + * src/ChannelList.vala: Modified. + + Added URL property to Channel + +2009-06-11 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Added device_groups property to Manager + +2009-06-08 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Display help message if no group is selected + +2009-06-07 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala: Modified. + + Delete all devices of group in remove_device_group, too + +2009-06-07 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Don't require selecting a device group when there's only one + +2009-06-07 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py: Modified. + + Don't use focus-in-event for DeviceGroupsView anymore + +2009-06-07 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Use new DetailsDialog in Totem plugin + +2009-06-07 Sebastian Pölsterl + + * client/gnomedvb/ui/recordings/DetailsDialog.py: Added. + + * client/gnomedvb/ui/recordings/Makefile.am, + * po/POTFILES.in, + * client/gnomedvb/ui/recordings/RecordingsDialog.py: Modified. + + Added DetailDialog showing all informations about the recordings + +2009-06-07 Sebastian Pölsterl + + * src/IDBusRecordingsStore.vala, + * src/RecordingsStore.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added GetAllInformations method to RecordingsStore + +2009-06-07 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + remove_channel returns true when everything went fine + +2009-06-07 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Show Running/Next when no channel is selected + +2009-06-07 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextStore.py, + * client/gnomedvb/ui/widgets/RunningNextView.py: Modified. + + Display start time of running and next event + +2009-06-07 Sebastian Pölsterl + + * src/IDBusSchedule.vala, + * src/Schedule.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added GetLocalStartTimestamp method + +2009-06-06 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Added RunningNext dialog and display date and time of recording + +2009-06-06 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RunningNextStore.py, + * client/gnomedvb/ui/widgets/RunningNextView.py: Added. + + * client/gnomedvb/ui/widgets/Makefile.am, + * po/POTFILES.in: Modified. + + Added RunningNext(Store|View).py + +2009-06-05 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Added DVB menu, schedule dialog, timers dialog, preferences dialog + and right-click menus + +2009-06-05 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py: Modified. + + Added columng to store device group client to ChannelsTreeStore + +2009-05-31 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Don't remove event from map and sequence when we already have an + event with the same id. This also fixes a mem leak + +2009-05-31 Sebastian Pölsterl + + * src/Recorder.vala, + * src/EPGScanner.vala, + * src/ChannelFactory.vala, + * src/DeviceGroup.vala: Modified. + + Removed ref cycles + +2009-05-31 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Start EPGScanner again if DeviceGroup is idle. Only remove + PlayerThread if no channels are watched anymore + +2009-05-31 Sebastian Pölsterl + + * src/ChannelFactory.vala: Modified. + + Added API comments + +2009-05-31 Sebastian Pölsterl + + * src/ChannelFactory.vala: Added. + + * src/Recorder.vala, + * Makefile.am, + * src/DeviceGroup.vala, + * src/rtsp/MediaFactory.vala: Modified. + + Moved handling of devices and creating dvbbasebin elements to new + ChannelFactory and PlayerThread classes. + + gst-rtsp-sever doesn't work well currently. + +2009-05-24 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Delete EPG events of group when it gets destroyed + +2009-05-24 Sebastian Pölsterl + + * src/EPGStore.vala, + * src/SqliteEPGStore.vala: Modified. + + Added remove_events_of_group method + +2009-05-24 Sebastian Pölsterl + + * src/IDBusDeviceGroup.vala, + * src/Manager.vala, + * src/DeviceGroup.vala, + * src/IDBusManager.vala: Modified. + + Use DBus.ObjectPath where applicable + +2009-05-24 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Adjusted to changes in DBus interfaces + +2009-05-23 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/widgets/ChannelsView.py, + * client/gnomedvb/__init__.py, + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/DBusWrapper.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/widgets/RecordingsView.py, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Fixed some issues revealed by pylint + +2009-05-23 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/DBusWrapper.py, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Adjusted to changes in DBus interfaces + +2009-05-23 Sebastian Pölsterl + + * src/Manager.vala, + * src/IDBusManager.vala: Modified. + + Added GetDeviceGroup method. Only destroy DeviceGroup if it + contains no more devices + +2009-05-23 Sebastian Pölsterl + + * src/DeviceGroup.vala: Modified. + + Use this + +2009-05-23 Sebastian Pölsterl + + * src/SqliteEPGStore.vala: Modified. + + Fixed crash when adding same epg event of different device group. + Primary key is now group_id, sid, event_id. + +2009-05-23 Sebastian Pölsterl + + * src/IDBusDeviceGroup.vala: Added. + + * src/Constants.vala, + * src/IDBusManager.vala, + * client/gnomedvb/DBusWrapper.py, + * src/Manager.vala, + * Makefile.am, + * src/DeviceGroup.vala, + * src/Utils.vala: Modified. + + Moved many methods related to DeviceGroups to DeviceGroup itsself + and expose them via DBus on org.gnome.DVB.DeviceGroup. Adjusted + DBus paths of Recorder, Schedule and ChannelList. + +2009-05-23 Sebastian Pölsterl + + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/preferences/Dialogs.py: Modified. + + Added EditGroupDialog + +2009-05-23 Sebastian Pölsterl + + * src/Manager.vala, + * src/IDBusManager.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added SetDeviceGroupName, (Get|Set)RecordingsDirectory methods + +2009-05-23 Sebastian Pölsterl + + * src/DeviceGroup.vala: Modified. + + Updata all devices if RecordingsDirecoty property changes + +2009-05-23 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala, + * src/ConfigStore.vala: Modified. + + Added update_from_group method to store current settings stored in + DeviceGroup + +2009-05-22 Sebastian + + * src/Cable/CableChannel.vala, + * src/ChannelListReader.vala: Modified. + + Fixed ChannelListReader that it can correctly read symbol rate + +2009-05-21 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py: Modified. + + Added the possibility to choose and reorder channels after the scan + completed. + +2009-05-21 Sebastian Pölsterl + + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Cable/CableScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Renamed method WriteChannelsToFile to WriteAllChannelsToFile. + WriteChannels now expects a list of SIDs and a path and will store + all channels in the given order to the file. + +2009-05-21 Sebastian Pölsterl + + * src/ChannelListWriter.vala: Modified. + + Multiply symbol rate by 1000 + +2009-05-21 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Wait for PMT tables to arrive + +2009-05-18 Sebastian Pölsterl + + * src/Cable/CableScanner.vala: Modified. + + Fixed bug #582925: Symbol-rate unit mismatch + +2009-05-18 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Fixed bug #582927: Totem plugin fails to start: Non-ASCII character + in python source + +2009-05-18 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.8 + +=== version-0.1.7 === +2009-05-16 Sebastian Pölsterl + + * po/Makefile.in.in: Removed. + + Removed Makefile.in.in because it's autogenerated + +2009-05-16 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-05-16 Sebastian Pölsterl + + * .bzrignore: Modified. + + Ignore ChangelLog and *.gmo + +2009-05-16 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + AddTimerForEPGEvent calls AddTimerWithMargin now + +2009-05-16 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.7 + +=== version-0.1.6 === +2009-05-15 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-05-15 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Use Settings' variables to retrieve margin_(start|stop) + +2009-05-15 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Read value of CHECK_EIT_INTERVAL from settings file + +2009-05-15 Sebastian Pölsterl + + * src/Settings.vala: Modified. + + Store name of sections and keys in variables + +2009-05-15 Sebastian Pölsterl + + * ChangeLog: Removed. + + * autogen.sh: Modified. + + Removed ChangeLog. Create empty ChangeLog in autogen.sh + +2009-05-15 Sebastian Pölsterl + + * src/Timer.vala: Modified. + + Timers don't conflict if the are on the same TS but on different + channels + +2009-05-15 Sebastian Pölsterl + + * src/Channel.vala: Modified. + + Added equals method + +2009-05-15 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Set state of queue and sink to NULL and remove both elements from + the pipeline when I recordings is stopped while another recording + on the same TS is still active + +2009-05-11 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Put SIDs of channels that have to get linked to queue in HashSet. + Provide getters for queue, sink and dvbbasebin + +2009-05-11 Sebastian Pölsterl + + * src/Timer.vala: Modified. + + conflicts_with returns false if channels of timers are on the same + transport stream + +2009-05-11 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Added more debug messages and jsuted levels + +2009-05-11 Sebastian Pölsterl + + * src/Recorder.vala, + * src/SqliteConfigTimersStore.vala, + * src/Timer.vala: Modified. + + Replaced Timer's Sid attribute with Channel property + +2009-05-05 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/DeviceGroup.vala, + * src/ChannelListReader.vala: Modified. + + Removed group_id property from ChannelList. Set channel's GroupId + in ChanelListReader when creating channels + +2009-05-05 Sebastian Pölsterl + + * src/Channel.vala: Modified. + + Made GroupId a property + +2009-05-05 Sebastian Pölsterl + + * src/SqliteEPGStore.vala, + * src/Scanner.vala: Modified. + + Don't use deprecated # syntax anymore + +2009-05-04 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Fixed bug that timers didn't get scheduled even if the didn't + conflict + +2009-05-04 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Wrapped AddTimerWithMargin + +2009-05-04 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Recording.vala: Modified. + + Use int64.FORMAT when printing int64 + +2009-05-04 Sebastian Pölsterl + + * src/RecordingsStore.vala, + * src/Settings.vala: Modified. + + Fixed some compiler warnings + +2009-05-04 Sebastian Pölsterl + + * src/IDBusRecorder.vala, + * src/Recorder.vala: Modified. + + Added AddTimerWithMargin method. Restored old behaviour of AddTimer + method. + +2009-05-02 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Timer.vala: Modified. + + Add default early start and late finish values to timers. Allow + changing start time and duration of timers. Timer is now due if the + current time is greater or equal the timer's start time and ther + timer didn't expire, yet. + +2009-05-02 Sebastian Pölsterl + + * src/Event.vala: Modified. + + Adjust assertion + +2009-05-02 Sebastian Pölsterl + + * src/Settings.vala: Added. + + * Makefile.am, + * src/Factory.vala: Modified. + + Added Settings class that will be used for retrieving early + start/late finish values in the future. + +2009-05-02 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala, + * src/TimersStore.vala, + * src/ConfigStore.vala: Modified. + + Add and remove methods of ConfigStore and TimersStore return true + now if the operation was successful. + +2009-05-02 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala, + * src/EPGStore.vala, + * src/Schedule.vala, + * src/ChannelListReader.vala, + * src/Manager.vala, + * src/Recorder.vala, + * src/ChannelList.vala, + * src/SqliteEPGStore.vala: Modified. + + Store EPG information for each device group seperately. Group ID is + stored in Channel now. + +2009-05-01 Sebastian Pölsterl + + * src/Channel.vala: Modified. + + Added GroupId property + +2009-05-01 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/rtsp/MediaFactory.vala: Modified. + + Adjust to latest gst-rtsp-server from git + +2009-04-30 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Fixed bug that channel scanner did not find all channels + + If we received a NIT but haven't seen the TS ID of a channel, yet, + don't continue scanning but wait for additional NITs + +2009-04-18 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Moved pipeline description into static const variable + +2009-04-17 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala, + * src/DeviceGroup.vala: Modified. + + Only create EPGScanner in DeviceGroup if with_epg_scanner is true + +2009-04-17 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Use get_static_pad instead of get_pad + +2009-04-17 Sebastian Pölsterl + + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + Use owned instead of # + +2009-03-31 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/ChannelsView.py, + * src/Schedule.vala, + * client/gnomedvb/DVBModel.py, + * src/ChannelListWriter.vala, + * src/Scanner.vala, + * src/Terrestrial/TerrestrialChannel.vala, + * src/IDBusSchedule.vala, + * src/ConfigStore.vala, + * client/gnomedvb/ui/recordings/RecordingsDialog.py, + * src/rtsp/MediaMapping.vala, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/rhythmbox-plugin/dvb-rhythm.py, + * src/Cable/CableChannel.vala, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * src/Main.vala, + * src/MpegTsEnums.vala, + * src/Device.vala, + * client/gnomedvb/ui/wizard/pages/BasePage.py, + * src/Event.vala, + * src/SqliteConfigTimersStore.vala, + * client/gnomedvb/ui/preferences/Dialogs.py, + * src/Terrestrial/TerrestrialScanner.vala, + * src/IDBusRecordingsStore.vala, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * src/Recording.vala, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * src/Cable/CableScanner.vala, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * src/Factory.vala, + * client/gnomedvb/ui/preferences/Frame.py, + * src/Recorder.vala, + * client/gnomedvb/Device.py, + * src/OverlapType.vala, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * src/Satellite/SatelliteScanner.vala, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py, + * src/IDBusRecorder.vala, + * src/Channel.vala, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * src/rtsp/MediaFactory.vala, + * src/IDBusChannelList.vala, + * client/gnomedvb/DBusWrapper.py, + * src/EPGStore.vala, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * src/EPGScanner.vala, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnome-dvb-setup, + * client/gnomedvb/ui/widgets/RecordingsView.py, + * src/ChannelList.vala, + * src/ChannelListReader.vala, + * src/Satellite/SatelliteChannel.vala, + * src/Utils.vala, + * client/gnome-dvb-control, + * client/gnomedvb/__init__.py, + * client/totem-plugin/dvb-daemon.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * src/SqliteEPGStore.vala, + * client/gnomedvb/ui/timers/CalendarDialog.py, + * src/Constants.vala, + * src/Manager.vala, + * src/RecordingsStore.vala, + * src/DeviceGroup.vala, + * src/Timer.vala, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * src/ChangeType.vala, + * client/gnomedvb/defs.py.in, + * src/IDBusManager.vala, + * src/ScannedItem.vala, + * src/TimersStore.vala, + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Added GPLv3 header to each file + +2009-03-31 Sebastian Pölsterl + + * COPYING: Modified. + + Actually ship GPLv3 instead of LGPLv3 + +2009-03-08 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/RecordingsView.py: Modified. + + Display full date and time of recording + +2009-03-08 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Added Recordings button to manage recordings + +2009-03-08 Sebastian Pölsterl + + * client/gnomedvb/ui/recordings/Makefile.am, + * client/gnomedvb/ui/widgets/RecordingsStore.py, + * client/gnomedvb/ui/widgets/RecordingsView.py, + * client/gnomedvb/ui/recordings/__init__.py, + * client/gnomedvb/ui/recordings/RecordingsDialog.py: Added. + + * client/gnomedvb/ui/Makefile.am, + * client/gnomedvb/ui/widgets/Makefile.am, + * configure.ac, + * po/POTFILES.in: Modified. + + Added RecordingsStore and RecordingsView widgets and + RecordingsDialog + +2009-03-08 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Added kwargs to delete of RecordingsStore + +2009-03-08 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Wrapped GetChannelName + +2009-03-08 Sebastian Pölsterl + + * src/IDBusRecordingsStore.vala, + * src/RecordingsStore.vala: Modified. + + Added GetChannelName method to RecordingsStore + +2009-03-08 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Recording.vala: Modified. + + Save channel's name in Recording + +2009-03-02 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.6 + +=== version-0.1.5 === +2009-03-02 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-02-24 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Added refresh button which reloads the program guide + +2009-02-24 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py: Modified. + + Added reload_all method + +2009-02-24 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py: Modified. + + Improved the wording in the assistant to be HIG compliant + +2009-02-24 Sebastian Pölsterl + + * src/Device.vala: Modified. + + Retrieve adapter type and name in a single pipeline + +2009-02-23 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/DBusWrapper.py: Modified. + + Made call to add_scanning_data_from_file async + +2009-02-23 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/totem-plugin/dvb-daemon.py, + * client/gnomedvb/DBusWrapper.py, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Made some of the DBus calls in clients async + +2009-02-22 Sebastian Pölsterl + + * src/ChannelListReader.vala: Modified. + + Removed debug print of channel + +2009-02-22 Sebastian Pölsterl + + * src/Utils.vala, + * src/ChannelListReader.vala: Modified. + + Use out parameter to provide enum value to avoid unwanted free. Use + unowned instead of weak. + +2009-02-22 Sebastian Pölsterl + + * src/ChannelListReader.vala: Modified. + + Abort parsing line when converting enum failed + +2009-02-22 Sebastian Pölsterl + + * src/ChannelListWriter.vala, + * src/ChannelListReader.vala: Modified. + + Improved sanity checks for values + +2009-02-22 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala: Modified. + + Adjusted to changes in AdapterType enum. Fixes error when parsing + channels.conf. + +2009-02-22 Sebastian Pölsterl + + * src/Utils.vala: Modified. + + Added sanity checks when getting values, names and nicks from enums + +2009-02-22 Sebastian Pölsterl + + * src/Manager.vala, + * src/Main.vala: Modified. + + Start EPG scanner after group has been created + +2009-02-22 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Replaced debug with warning + +2009-02-18 Sebastian Pölsterl + + * m4/python.m4: Modified. + + Display error if Python module was not found + +2009-02-16 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.5 + +=== version-0.1.4 === +2009-02-16 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-02-16 Sebastian Pölsterl + + * src/rtsp/MediaFactory.vala, + * src/Scanner.vala, + * src/Manager.vala, + * src/EPGScanner.vala, + * src/Recorder.vala, + * src/ChannelList.vala: Modified. + + Renamed get to get_channel to avoid confusions with GObject's get + method + +2009-02-16 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Renamed get to get_event to avoid confusions with GObject's get + method + +2009-02-16 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + GetLocation returns a URI instead of a path now + +2009-02-16 Sebastian Pölsterl + + * src/Device.vala: Modified. + + Use UNKNOWN as first item + +2009-02-16 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Don't add device groups of unknown type + +2009-02-14 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Mark timers button sensitive when group is selected + +2009-02-14 Sebastian Pölsterl + + * vapi/cutils.vapi, + * src/Main.vala: Modified. + + Only print debug messages with --debug is provided. + +2009-02-12 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Display help message if no devices are configured + +2009-02-12 Sebastian Pölsterl + + * src/EPGScanner.vala, + * src/DeviceGroup.vala: Modified. + + Restored old behavior of stop in EPGScanner and added destroy + function. + +2009-02-12 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/ScheduleView.py: Modified. + + Display timer icon in the first column if a timer exists that + overlaps with the event. + +2009-02-12 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Wrapped has_timer_for_event. Added get_group_id and get_channel_sid + method to ScheduleClient. + +2009-02-12 Sebastian Pölsterl + + * src/OverlapType.vala: Added. + + * src/IDBusRecorder.vala, + * src/Recorder.vala, + * Makefile.am, + * src/Timer.vala: Modified. + + Renamed Timer.is_in_range to get_overlap_local. It now returns the + type of the overlap, too. Added HasTimerForEvent method to Recorder + DBus interface. + +2009-02-12 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Fixed problem when epg scanner was stopped during an active scan. + +2009-02-12 Sebastian Pölsterl + + * src/IDBusManager.vala: Added. + + * src/Manager.vala, + * Makefile.am: Modified. + + Moved DBus methods and signals to IDBusManager interface. + +2009-02-10 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Use action_remote instead of set_mrl_and play + +2009-02-10 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: Modified. + + Fixed imports in Totem plugin + +2009-02-08 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Manager.vala, + * src/rtsp/MediaFactory.vala, + * src/DeviceGroup.vala, + * src/Main.vala: Modified. + + Moved instances of Recorder and EPGScanner to DeviceGroup class. + Cleanup correctly when device group is destroyed in + RemoveDeviceFromGroup. + +2009-02-08 Sebastian Pölsterl + + * client/gnome-dvb-setup: Modified. + + Import correct module + +2009-02-02 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.4 + +=== version-0.1.3 === +2009-02-02 Sebastian Pölsterl + + * po/POTFILES.in: Modified. + + Added __init__.py to POTFILES.in + +2009-02-01 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Mark Timers->Manage menu item insensitive when toolbutton is + insensitive + +2009-02-01 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Monitor changes of device group + +2009-02-01 Sebastian Pölsterl + + * README: Modified. + + Updated requirements + +2009-02-01 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes for 0.1.3 + +2009-02-01 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Show error message when timer for epg event could not be created + +2009-02-01 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Extracted NoTimerCreatedDialog + +2009-01-29 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Removed Preferences ToolButton. Added ToolButton and MenuItem for + 'Previous Day' and 'Next Day' + +2009-01-29 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py: Modified. + + Added get_next_day_iter and get_previous_day_iter methods + +2009-01-29 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/TimerDialog.py: Modified. + + Use minutes instead of Minutes + +2009-01-29 Sebastian Pölsterl + + * client/gnomedvb/__init__.py, + * client/gnome-dvb-control: Modified. + + Setup hooks for about dialog in gnome-dvb-control + +2009-01-29 Sebastian Pölsterl + + * configure.ac: Modified. + + Check for python gio module + +2009-01-29 Sebastian Pölsterl + + * client/gnomedvb/__init__.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Added about dialog + +2009-01-29 Sebastian Pölsterl + + * client/gnomedvb/ui/timers/EditTimersDialog.py: Modified. + + Removed label + +2009-01-29 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Changed timers icon and wording + +2009-01-26 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Display help message if no channel is selected + +2009-01-25 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Added menu bar + +2009-01-24 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Modified. + + Changed window title + +2009-01-24 Sebastian Pölsterl + + * client/gnome-dvb-control: Modified. + + Initialize i18n + +2009-01-24 Sebastian Pölsterl + + * client/gnome-dvb-setup, + * client/gnome-dvb-control: Added. + + * client/gnome-dvb-control.py, + * client/gnome-dvb-setup.py: Removed. + + * client/Makefile.am: Modified. + + Removed .py extension from UI executables + +2009-01-24 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/Makefile.am, + * client/gnomedvb/ui/controlcenter/__init__.py, + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: Added. + + * client/gnome-dvb-control.py, + * client/gnomedvb/ui/Makefile.am, + * configure.ac, + * po/POTFILES.in: Modified. + + Added ControlCenterWindow.py + +2009-01-24 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/ScheduleStore.py, + * client/gnomedvb/ui/widgets/ChannelsView.py, + * client/gnomedvb/DVBModel.py, + * client/gnomedvb/ui/wizard/__init__.py, + * client/gnomedvb/ui/widgets/ChannelsStore.py, + * client/gnomedvb/ui/wizard/pages/BasePage.py, + * client/gnomedvb/ui/Makefile.am, + * client/gnomedvb/ui/wizard/pages/SummaryPage.py, + * client/gnomedvb/ui/wizard/pages/Makefile.am, + * client/gnomedvb/ui/widgets/ScheduleView.py, + * client/gnomedvb/ui/preferences/Frame.py, + * client/gnomedvb/ui/wizard/Makefile.am, + * client/gnomedvb/ui/timers/TimerDialog.py, + * client/gnomedvb/Device.py, + * client/gnomedvb/ui/preferences/__init__.py, + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/ui/preferences/DeviceGroupsView.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/ui/widgets/Makefile.am, + * client/gnomedvb/ui/preferences/Preferences.py, + * client/gnomedvb/ui/timers/EditTimersDialog.py, + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/ui/timers/Makefile.am, + * client/gnomedvb/ui/widgets/__init__.py, + * client/gnomedvb/ui/preferences/Dialogs.py, + * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, + * client/gnomedvb/ui/wizard/pages/IntroPage.py, + * client/gnomedvb/ui/timers/CalendarDialog.py, + * client/gnomedvb/ui/wizard/pages/__init__.py, + * client/gnomedvb/ui/__init__.py, + * client/gnomedvb/ui/preferences/Makefile.am, + * client/gnomedvb/ui/timers/__init__.py: Added. + + * client/gnomedvb/timers/Makefile.am, + * client/gnomedvb/timers/ui/__init__.py, + * client/gnomedvb/preferences/ui/Dialogs.py, + * client/gnomedvb/wizard/SetupWizard.py, + * client/gnomedvb/wizard/pages/AdaptersPage.py, + * client/gnomedvb/wizard/Makefile.am, + * client/gnomedvb/widgets/ChannelsView.py, + * client/gnomedvb/preferences/Makefile.am, + * client/gnomedvb/widgets/DVBModel.py, + * client/gnomedvb/preferences/ui/Preferences.py, + * client/gnomedvb/wizard/pages/Makefile.am, + * client/gnomedvb/preferences/ui/Frame.py, + * client/gnomedvb/wizard/pages/SummaryPage.py, + * client/gnomedvb/wizard/__init__.py, + * client/gnomedvb/timers/ui/TimerDialog.py, + * client/gnomedvb/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/timers/__init__.py, + * client/gnomedvb/widgets/Makefile.am, + * client/gnomedvb/preferences/ui/DeviceGroupsView.py, + * client/gnomedvb/widgets/ScheduleView.py, + * client/gnomedvb/widgets/ScheduleStore.py, + * client/gnomedvb/widgets/EditTimersDialog.py, + * client/gnomedvb/widgets/__init__.py, + * client/gnomedvb/timers/ui/CalendarDialog.py, + * client/gnomedvb/widgets/ChannelsStore.py, + * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/timers/ui/Makefile.am, + * client/gnomedvb/wizard/pages/BasePage.py, + * client/gnomedvb/preferences/ui/Makefile.am, + * client/gnomedvb/wizard/pages/IntroPage.py, + * client/gnomedvb/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/widgets/Device.py, + * client/gnomedvb/preferences/__init__.py, + * client/gnomedvb/wizard/pages/__init__.py, + * client/gnomedvb/preferences/ui/__init__.py: Removed. + + * configure.ac, + * client/gnome-dvb-control.py, + * client/gnomedvb/Makefile.am, + * po/POTFILES.in: Modified. + + Reorganized directory structure + +2009-01-24 Sebastian Pölsterl + + * client/gnome-dvb-control.py, + * client/gnomedvb/widgets/EditTimersDialog.py: Added. + + * client/gnome-dvb-preferences.py, + * client/gnome-dvb-timers.py, + * client/gnomedvb/timers/ui/RecorderWindow.py, + * client/gnome-dvb-schedule.py: Removed. + + * client/gnomedvb/widgets/Makefile.am, + * client/gnomedvb/timers/ui/Makefile.am, + * client/gnomedvb/timers/ui/TimerDialog.py, + * client/gnomedvb/widgets/DVBModel.py, + * po/POTFILES.in, + * client/Makefile.am, + * client/gnomedvb/preferences/ui/Preferences.py: Modified. + + Integrated gnome-dvb-timers and gnmome-dvb-preferences into new + gnome-dvb-control (previously gnome-dvb-schedule). + +2009-01-23 Sebastian Pölsterl + + * src/rtsp/MediaMapping.vala, + * src/rtsp/MediaFactory.vala: Added. + + * src/livetv/Server.vala: Removed. + + * Makefile.am, + * src/Main.vala: Modified. + + Adjusted to latest changes of gst-rtsp-server + +2009-01-19 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.3 + +=== version-0.1.2 === +2009-01-19 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2009-01-19 Sebastian Pölsterl + + * po/POTFILES.in: Modified. + + Added ScheduleView.py + +2009-01-19 Sebastian Pölsterl + + * client/gnomedvb/widgets/ScheduleView.py, + * client/gnomedvb/widgets/ScheduleStore.py, + * client/gnome-dvb-schedule.py: Modified. + + Improved epg browser to look much nicer + +2009-01-19 Sebastian Pölsterl + + * client/gnomedvb/widgets/ScheduleView.py, + * client/gnomedvb/widgets/ScheduleStore.py: Added. + + * client/gnomedvb/widgets/Makefile.am, + * client/gnome-dvb-schedule.py: Modified. + + Moved ScheduleStore and ScheduleView to widgets + +2009-01-19 Sebastian Pölsterl + + * client/gnomedvb/timers/ui/TimerDialog.py: Modified. + + Minor UI tweaks in new timer dialog + +2009-01-18 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala, + * src/Scanner.vala, + * src/RecordingsStore.vala, + * src/Schedule.vala, + * src/Cable/CableScanner.vala, + * src/Manager.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/EPGScanner.vala, + * src/Recorder.vala, + * src/Device.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Utils.vala, + * src/SqliteEPGStore.vala: Modified. + + Fixed some compiler warnings with debug messages + +2009-01-18 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Set pids property only one time when pat arrived for all new pmt + pids. Print the pmt pids and whether we found all tables. + +2009-01-16 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala: Modified. + + Add all devices to DeviceGroup + +2009-01-15 Sebastian Pölsterl + + * src/Device.vala: Modified. + + Duplicate adapter_name and adapter_type string + +2009-01-14 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Print name and description of recording + +2009-01-14 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Add recording to RecordingsStore when recording begins. Use event's + short and extended description as Recording's description + +2009-01-14 Sebastian Pölsterl + + * src/Recording.vala: Modified. + + In serialized recording save name and description in as last two + items + +2009-01-14 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Fixed crash when D-Bus functions that return string actually return + null + +2009-01-14 Sebastian Pölsterl + + * src/ChannelList.vala: Modified. + + Fixed crashes in GetChannelName and GetChannelNetwork when returned + string is null + +2009-01-14 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Check if event with given id exists + +2009-01-14 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Remove signal watch + +2009-01-11 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala, + * src/SqliteEPGStore.vala: Modified. + + Make sure Sqlite.Database is always the last parameter. + +2009-01-11 Sebastian Pölsterl + + * src/Device.vala: Modified. + + Remove weak from Gst.Message variables + +2009-01-11 Sebastian Pölsterl + + * src/Recorder.vala, + * src/EPGScanner.vala: Modified. + + Remove signal watch + +2009-01-10 Sebastian Pölsterl + + * configure.ac: Modified. + + Check for signal.h + +2009-01-06 Sebastian Pölsterl + + * configure.ac, + * m4/gstreamer.m4: Modified. + + Check for rtpmp2tpay element which is part of gst-plugins-good + +2009-01-06 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Device.vala, + * src/livetv/Server.vala: Modified. + + Check if return value of Gst.ElementFactory.make is not null + +2009-01-06 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Made EventElement a GObject. Destroy EventElement properly when + Sequence is destroyed + +2009-01-06 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Lock access to this.pipeline + +2009-01-06 Sebastian Pölsterl + + * src/Schedule.vala, + * src/EPGScanner.vala: Modified. + + Avoid ref cycle so that channels get finalized + +2009-01-04 Sebastian Pölsterl + + * README: Modified. + + Removed gconf dependency + +2009-01-04 Sebastian Pölsterl + + * client/gnomedvb/widgets/ChannelsStore.py: Modified. + + Retrieve and display device group's name + +2009-01-03 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Use static const variable for pipeline template + +2009-01-01 Sebastian Pölsterl + + * src/ChannelListReader.vala: Modified. + + Don't use hash sign with variable + +2009-01-01 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Marked Manager instance as weak + +2009-01-01 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Schedule.vala, + * src/Main.vala: Modified. + + Marked instances retrieved from Factory as weak + +2009-01-01 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala, + * src/SqliteEPGStore.vala: Modified. + + Made get_db_handler a static function + +2009-01-01 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Replaced tabs with spaces + +2009-01-01 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Cleanup when ctrl+c is pressed + +2009-01-01 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Added shutdown function to Manager class + +2009-01-01 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + Added shutdown function to RecordingsStore class + +2009-01-01 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Addded stop function to Recorder class + +2009-01-01 Sebastian Pölsterl + + * src/Factory.vala: Modified. + + Addded shutdown function to Factory class + +2009-01-01 Sebastian Pölsterl + + * vapi/cutils.vapi: Modified. + + Added Signal namespace + +2008-12-31 Sebastian Pölsterl + + * ChangeLog: Added. + + Re-add ChangeLog, because it's required during configure + +2008-12-31 Sebastian Pölsterl + + * src/ChannelListWriter.vala: Modified. + + Fixed critical in substring call + +2008-12-31 Sebastian Pölsterl + + * ChangeLog: Removed. + + Removed ChangeLog + +2008-12-30 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + Fixed crash when returning NULL string over DBus + +2008-12-30 Sebastian Pölsterl + + * src/ChannelListReader.vala: Modified. + + Check if parsed channel is valid + +2008-12-30 Sebastian Pölsterl + + * src/Satellite/SatelliteChannel.vala: Modified. + + Check if SymbolRate is not 0 in is_valid + +2008-12-30 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Replace all whitespaces in channel's name with space + +2008-12-30 Sebastian Pölsterl + + * src/Factory.vala: Added. + + * src/EPGStore.vala, + * src/RecordingsStore.vala, + * src/Schedule.vala, + * src/Main.vala, + * src/Manager.vala, + * Makefile.am, + * src/Recorder.vala: Modified. + + Made all get_instance methods thread-safe. Moved getters for + (EPG|Timers|Config)Store to Factory class. + +2008-12-30 Sebastian Pölsterl + + * src/SqliteConfigTimersStore.vala: Added. + + * src/GConfStore.vala: Removed. + + * src/Manager.vala, + * src/ConfigStore.vala, + * src/Main.vala, + * configure.ac, + * Makefile.am, + * src/Recorder.vala, + * src/TimersStore.vala: Modified. + + GConfStore got replaced with SqliteConfigTimersStore which stores + everything in a Sqlite DB. Drop gconf dependency. Added getter for + TimersStore and ConfigStore to Main. + +2008-12-30 Sebastian Pölsterl + + * src/TimersStore.vala, + * src/ConfigStore.vala: Added. + + * Makefile.am, + * src/GConfStore.vala: Modified. + + Added interfaces ConfigStore which stores device groups and + TimersStore which stores timers. + +2008-12-30 Sebastian Pölsterl + + * src/SqliteEPGStore.vala: Added. + + * Makefile.am, + * src/EPGStore.vala: Modified. + + Moved EPGStore to SqliteEPGStore and made EPGStore an interface. + +2008-12-30 Sebastian Pölsterl + + * src/Scanner.vala, + * src/Channel.vala, + * src/ChannelListWriter.vala, + * src/Cable/CableChannel.vala, + * src/Satellite/SatelliteChannel.vala, + * src/ChannelListReader.vala, + * src/Terrestrial/TerrestrialChannel.vala: Modified. + + A Channel can have more than one audio pid. + +2008-12-29 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + If channel isn't valid don't delete it right away. We might come + across the data later + +2008-12-27 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Retrieve channel's frequency only from data from NIT. + +2008-12-27 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Fixed a couple of bugs in the Scanner that caused the output to + change on each scan. Retrieve network name correctly. Parse sdt no + matter if the sdt is for the actual transport stream or not. Keep + channels in new_channels as long as we didn't came across the TS + for this channel. Set name to SID for channels with invalid name. + +2008-12-26 Sebastian Pölsterl + + * client/gnomedvb/wizard/pages/ChannelScanPage.py: Modified. + + If channel is scrambled display emblem-readonly icon + +2008-12-26 Sebastian Pölsterl + + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Cable/CableScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added scrambled parameter to channel_added signal. Print + audio/video pid. Wait 10 instead of 5 seconds for all tables. + +2008-12-26 Sebastian Pölsterl + + * src/Channel.vala: Modified. + + Added Scrambled property + +2008-12-24 Sebastian Pölsterl + + * client/gnomedvb/wizard/pages/ChannelScanPage.py: Modified. + + Replace & by & in channel's name + +2008-12-24 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Remove channels again when we didn't receive all necessary tables. + Did some minor refactoring. + +2008-12-23 Sebastian Pölsterl + + * src/livetv/Server.vala: Modified. + + Check if EPG scanner exists before forwarding eit data + +2008-12-23 Sebastian Pölsterl + + * src/GConfStore.vala, + * src/DeviceGroup.vala: Modified. - * Makefile.am, - * src/Main.vala: Modified. + Set ChannlList's group_id in the constructor of DeviceGroup - [628] Moved creation of RTSPServer from Main to RTSPServer namespace +2008-12-23 Sebastian Pölsterl -2009-06-29 Sebastian Pölsterl + * client/gnomedvb/wizard/pages/ChannelScanPage.py: Modified. - * src/Main.vala, - * src/rygel/Services.vala: [627] Use nested namespace instead of class - in static classes + Use only one TreeView in ChannelScanPage and display channel type + as icon. -2009-06-28 Sebastian Pölsterl +2008-12-23 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [626] Use get_device_group_size - to determine if the daemon is setup + * client/gnomedvb/wizard/pages/ChannelScanPage.py: Modified. - * client/gnomedvb/DBusWrapper.py, - * src/IDBusManager.vala, - * src/Manager.vala: [625] Added GetDeviceGroupSize method to Manager + Fixed bug #565247: Progressbar while scanning channels doesn't work + correctly - * src/ChannelFactory.vala, - * src/Recorder.vala: [624] Added way to force watching a channel +2008-12-23 Sebastian Pölsterl -2009-06-26 Sebastian Pölsterl + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Cable/CableScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * client/gnomedvb/DBusWrapper.py: Modified. - * client/totem-plugin/dvb-daemon.py: [623] Use uimanager.add_ui to add - menu items + Added freq_left parameter to frquency_scanned signal. Removed + GetQueueSize method from Scanner interface. + +2008-12-21 Sebastian Pölsterl - * client/gnomedvb/ui/wizard/SetupWizard.py: [622] Removed print - statement + * client/gnomedvb/timers/ui/RecorderWindow.py, + * client/gnomedvb/wizard/pages/AdaptersPage.py: Modified. - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [621] Reset - adapter_info - - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [620] Removed start - control center checkbutton - - * client/gnomedvb/__init__.py, - * client/gnomedvb/ui/recordings/DetailsDialog.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/widgets/RecordingsStore.py, - * client/gnomedvb/ui/widgets/RecordingsView.py, - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * client/gnomedvb/ui/widgets/ScheduleView.py: [619] Convert duration - in hours and minutes string - - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [618] - Adjusted wording + Adjusted to changes of previous commit - * client/totem-plugin/dvb-daemon.py: [617] Adjusted sensivity of - buttons +2008-12-21 Sebastian Pölsterl - * client/gnomedvb/ui/preferences/Preferences.py: [616] Display group's - name in dialog when removing device instead of ID + * client/gnomedvb/widgets/DVBModel.py, + * client/gnomedvb/preferences/ui/Preferences.py, + * client/gnomedvb/preferences/ui/Dialogs.py, + * client/gnomedvb/preferences/ui/DeviceGroupsView.py: Modified. - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/Device.py: [615] Save group's name Device class + Added name field to dialog to create new group. Adjust to changes + of previous commit. -2009-06-25 Sebastian Pölsterl +2008-12-21 Sebastian Pölsterl - * client/gnomedvb/ui/preferences/Preferences.py: [614] Renamed - preferences button to edit and added a new button that starts gnome- - dvb-setup with additional options for creating group or adding device - to group manually + * src/GConfStore.vala, + * src/Manager.vala, + * src/DeviceGroup.vala, + * client/gnomedvb/DBusWrapper.py: Modified. - * client/totem-plugin/dvb-daemon.py: [613] Merged menu items into - existing menus + Added GetDeviceGroupName method to Manager DBus interface. Added + parameter name to AddDeviceToNewGroup method. -2009-06-21 Sebastian Pölsterl +2008-12-20 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [612] Use --transient-for when - starting gnome-dvb-setup + * src/ChannelList.vala, + * src/ChannelListReader.vala: Modified. - * client/gnome-dvb-setup: [611] Added --transient-for switch to set - parent window + Save location of channels file in ChannelList object. Fixes problem + when creating a new group. - * client/totem-plugin/dvb-daemon.py: [610] Check if dvb-daemon is - already configured with a 2 second delay, because the channels and - groups are retrieved async +2008-12-20 Sebastian Pölsterl -2009-06-20 H. W. Wan + * src/Scanner.vala: Modified. - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [609] Add - Hong Kong to list of countries in Initial Tuning Data Page + Fixed warning when using substring. Fixed crash when channel's + network was not set. -2009-06-20 Sebastian Pölsterl +2008-12-20 Sebastian Pölsterl - * po/POTFILES.in: [608] Added SetupDevicePage.py to POTFILES.in + * src/GConfStore.vala: Modified. -2009-06-20 Sebastian Pölsterl + Check if writing values to GConf was successful - * client/gnomedvb/userdirs/__userdirsmodule.c: Added. +2008-12-20 Sebastian Pölsterl - [607] Added __userdirsmodule.c + * src/EPGStore.vala: Modified. -2009-06-20 Sebastian Pölsterl + Removed unused execute method. Adjust to changes of sqlite3 + bindings - * .bzrignore: [606] Ignore .c and .h files only in src directory +2008-12-18 Sebastian Pölsterl -2009-06-19 Sebastian Pölsterl + * src/Event.vala: Modified. - * client/gnomedvb/ui/wizard/pages/SetupDevicePage.py: Added. + Use name constructor instead of construct for Event class. Fixes + Vala compiling error. - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/Makefile.am, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: Modified. - - [605] Made assistant more async and added progressbars where - applicable. Added SetupDevicePage which actually takes care of - configuring devices. +2008-12-15 Sebastian Pölsterl -2009-06-19 Sebastian Pölsterl + * configure.ac: Modified. - * client/gnomedvb/DBusWrapper.py: [604] Prepared additional methods to - be called async + Post release version bump to 0.1.2 - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/widgets/ChannelsStore.py, - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [603] Retrieve - devices and groups async +=== version-0.1.1 === +2008-12-15 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py: [602] Get devices async + * src/Schedule.vala: Modified. -2009-06-18 Sebastian Pölsterl + Fixed vala compiling errors + +2008-12-15 Sebastian Pölsterl + + * NEWS: Modified. + + Added release notes + +2008-12-15 Sebastian Pölsterl + + * README: Modified. + + Updated README + +2008-12-15 Sebastian Pölsterl + + * src/Main.vala, + * configure.ac, + * Makefile.am, + * po/POTFILES.in, + * client/Makefile.am, + * client/totem-plugin/Makefile.am: Modified. + + Made gst-rtsp-server a requirement. Added Totem plugin to autofoo. + +2008-12-14 Sebastian Pölsterl + + * Makefile.am: Modified. + + Fixed distcheck issue + +2008-12-14 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.totem-plugin.in, + * client/totem-plugin/dvb-daemon.py, + * client/totem-plugin/Makefile.am: Added. + + Added Totem plugin + +2008-12-14 Sebastian Pölsterl + + * client/gnomedvb/DBusWrapper.py: Modified. + + Added get_name and get_description to DVBRecordingsStoreClient + +2008-12-14 Sebastian Pölsterl + + * client/gnomedvb/widgets/ChannelsView.py: Modified. + + name_col variable to constructor to specify which column contains + the name + +2008-12-14 Sebastian Pölsterl + + * client/gnomedvb/widgets/ChannelsStore.py: Modified. + + Added ChannelsTreeStore + +2008-12-14 Sebastian Pölsterl + + * client/gnomedvb/widgets/ChannelsView.py: Modified. + + Use markup instead of text for name column + +2008-12-14 Sebastian Pölsterl + + * client/rhythmbox-plugin/dvb-rhythm.rb-plugin.in: Modified. + + Updated my e-mail address + +2008-12-14 Sebastian Pölsterl + + * src/Main.vala: Modified. + + Disable RTSPServer for now + +2008-12-14 Sebastian Pölsterl + + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + Accept any number of whitespaces between values in initial tuning + data + +2008-12-14 Sebastian Pölsterl + + * Makefile.am: Modified. + + Updated gst-rtsp-server package name + +2008-12-14 Sebastian Pölsterl + + * src/ChannelList.vala, + * src/GConfStore.vala, + * src/IDBusChannelList.vala, + * client/gnomedvb/DBusWrapper.py: Modified. + + Added GetChannelURL to ChannelList DBus interface + +2008-12-14 Sebastian Pölsterl + + * src/Manager.vala: Modified. + + Use devgroup variable name instead of device where applicable + +2008-12-14 Sebastian Pölsterl + + * src/Recorder.vala, + * src/Channel.vala: Modified. + + Added on_same_transport_stream method + +2008-12-14 Sebastian Pölsterl + + * src/livetv/Server.vala: Modified. + + Stop EPG scanner before streaming and start again when client + disconnected. In the mean time forward all eit events to + EPGScanner. + +2008-12-12 Sebastian Pölsterl + + * src/livetv/Server.vala: Modified. + + Adjust to signature changeo of prepare_media. Monitor bus of + pipeline. + +2008-12-10 Sebastian Pölsterl + + * src/livetv/Server.vala: Added. + + * configure.ac, + * Makefile.am, + * src/Manager.vala, + * src/Main.vala: Modified. + + Added experimental live TV streaming support via RTSP. + +2008-12-08 Sebastian Pölsterl + + * src/Recorder.vala: Modified. + + Use .mpeg extension instead of .ts for recordings + +2008-12-08 Sebastian Pölsterl + + * configure.ac: Modified. + + Added --enable-gstrtspserver option to configure + +2008-12-08 Sebastian Pölsterl + + * MAINTAINERS, + * AUTHORS: Modified. + + Updated my e-mail address + +2008-12-08 Sebastian Pölsterl + + * configure.ac: Modified. + + Use bugzilla address to report bugs to + +2008-12-01 Sebastian Pölsterl + + * src/GConfStore.vala: Modified. + + Check if values retrieved from GConf are actually set + +2008-11-30 Sebastian Pölsterl + + * src/RecordingsStore.vala: Modified. + + Initialize Recording variable - * client/totem-plugin/dvb-daemon.py: [601] Update sensitivity of - buttons when groups are added or removed +2008-11-30 Sebastian Pölsterl + + * src/ChannelListReader.vala: Modified. + + Cast ints to enum types + +2008-11-18 Sebastian Pölsterl + + * src/Timer.vala: Modified. + + Removed (de)serialize methods + +2008-11-16 Sebastian Pölsterl + + * src/ChannelListReader.vala, + * src/Manager.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Recording.vala, + * src/Timer.vala, + * src/Recorder.vala, + * src/ChannelList.vala, + * src/MpegTsEnums.vala: Modified. + + Fix some compiler errors and warnings returned by latest vala. Vala + still segfaults, though + +2008-11-16 Sebastian Pölsterl + + * src/Schedule.vala: Modified. + + Print debug message if event id doesn't exist + +2008-11-09 Sebastian Pölsterl + + * po/sv.po: Added. + + * po/ChangeLog, + * po/LINGUAS: Modified. + + Added Swedish translation by Daniel Nylander + +2008-11-03 Sebastian Pölsterl + + * configure.ac: Modified. + + Post release version bump to 0.1.1 + +=== version-0.1.0 === +2008-11-03 Sebastian Pölsterl + + * po/POTFILES.in: Modified. + + Added gnome-dvb-schedule.py to POTFILES.in + +2008-11-03 Sebastian Pölsterl + + * client/Makefile.am: Modified. + + Added gnome-dvb-schedule to package + +2008-11-03 Sebastian Pölsterl + + * README, + * NEWS: Modified. + + Added release notes and README + +2008-11-03 Sebastian Pölsterl + + * m4/gstreamer.m4: Added. + + * configure.ac: Modified. + + Check if required gstreamer modules are available in configure step + +2008-10-26 Sebastian Pölsterl + + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + get_scanned_item retrieves information from Gst.Structure. Remove + invalid channels from ChannelList + +2008-10-26 Sebastian Pölsterl + + * src/ChannelList.vala: Modified. + + Added remove method + +2008-10-26 Sebastian Pölsterl + + * src/Channel.vala, + * src/Satellite/SatelliteChannel.vala: Modified. + + Added is_valid method + +2008-10-26 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Reset dvbsrc's pids property in start_scan + +2008-10-25 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Assign Radio type if VideoPID is 0 not AudioPID + +2008-10-25 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [600] Added buttons to see what's - on now and to see the program guide of the selected channel to the - sidebar + * src/Satellite/SatelliteScanner.vala: Modified. - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [599] Start - scanner after adding brute-force tuning data + Duplicate polarization string - * po/POTFILES.in: [598] Added client/gnomedvb/ui/wizard/__init__.py to - POTFILES.in +2008-10-25 Sebastian Pölsterl + + * src/ChannelList.vala: Modified. + + add doesn't tranfser ownership anymore + +2008-10-25 Sebastian Pölsterl + + * src/ScannedItem.vala: Modified. + + Check for ScannedSatteliteItem in hash function first + +2008-10-25 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Don't scan one frequency multiple times. Added debug calls + +2008-10-25 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Cleanup scanner correctly to avoid memory leaks + +2008-10-18 Sebastian Pölsterl + + * src/EPGScanner.vala: Modified. + + Check if strings are valid utf-8 + +2008-10-16 Sebastian Pölsterl + + * src/Terrestrial/TerrestrialScanner.vala, + * src/Scanner.vala: Modified. + + Fixed memory leaks + +2008-10-16 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Check if provider is not NULL before validating + +2008-10-15 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Check for valid utf8 strings + +2008-10-13 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Fixed memory leak + +2008-10-13 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Wait 5 seconds for SDT, NIT and PAT to arrive, otherwise continue + with next frequency + +2008-10-11 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Clean up lost of channels, too, when destroyed. Make sure only one + channel is scanned at a time + +2008-10-11 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Fixed bug when iterating over channels + +2008-10-11 Sebastian Pölsterl + + * src/Scanner.vala: Modified. + + Removed debug call + +2008-10-11 Sebastian Pölsterl + + * src/ChannelListWriter.vala: Modified. + + Don't divide symbol rate by 1000 + +2008-10-09 Sebastian Pölsterl + + * client/gnomedvb/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/DBusWrapper.py: Modified. + + Display progress while scanning + +2008-10-09 Sebastian Pölsterl + + * src/Manager.vala: Modified. - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/__init__.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/ui/wizard/pages/IntroPage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [597] Re-designed - big portions of gnome-dvb-setup + Fixed crash when scanner was requested for already registered + device + +2008-10-09 Sebastian Pölsterl - Fixed bugs #586227, #586228 and #586232 + * src/Scanner.vala: Modified. - * client/gnomedvb/__init__.py: [596] Fixed typo and get subdir - Recordings as default recodings dir + Emit frequency scanned signal - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [595] Fixed bug - #586226: Device type not user-friendly +2008-10-07 Sebastian Pölsterl - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py: [594] Fixed bug - #586224: No need for device selection in setup wizard + * data/org.gnome.DVB.service.in: Modified. - Don't show page to select device if there's only one device + Use correct binary name in D-Bus .servive file - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [593] Fixed bug - #586231: Removed frequency column and never show horizontal scrollbars +2008-10-07 Sebastian Pölsterl - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [592] Fixed bug - #586230: Channel results should pack checkbox in first column + * client/gnomedvb/widgets/Makefile.am: Modified. - * client/gnomedvb/__init__.py: [591] Added get_config_dir and - get_default_recordings_dir functions + Fixed wrong installation directory of python widgets -2009-06-18 Sebastian Pölsterl +2008-10-03 Sebastian Pölsterl - * client/gnomedvb/userdirs, - * client/gnomedvb/userdirs/Makefile.am, - * client/gnomedvb/userdirs/__init__.py: Added. + * client/gnome-dvb-schedule.py: Modified. - * client/gnomedvb/Makefile.am, - * configure.ac: Modified. + Display all events - [590] Added userdirs module from deskbar-applet +2008-10-03 Sebastian Pölsterl -2009-06-18 Sebastian Pölsterl + * src/IDBusSchedule.vala, + * src/EPGStore.vala, + * src/Schedule.vala, + * client/gnomedvb/DBusWrapper.py: Modified. - * data/Makefile.am: [589] Removed comment + Added GetAllEvents method to Schedule D-Bus interface - * data/Makefile.am: [588] Fixed autofoo that .service files end up - with correct contents +2008-09-30 Sebastian Pölsterl -2009-06-17 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [587] Added option - to start control center to last page of channel scan assistant + Delete timer also for active recording -2009-06-17 Sebastian Pölsterl +2008-09-30 Sebastian Pölsterl - * data/org.gnome.UPnP.MediaServer1.DVBDaemon.service.in: Added. + * client/gnome-dvb-schedule.py: Modified. - * data/org.gnome.UPnP.MediaServer1.DVBDaemon.service: Removed. + Double clicking event will schedule recording - [586] Added .service.in file and removed .service file +2008-09-30 Sebastian Pölsterl -2009-06-17 Sebastian Pölsterl + * src/IDBusRecorder.vala, + * src/Recorder.vala, + * src/Schedule.vala, + * src/EPGStore.vala, + * client/gnomedvb/DBusWrapper.py: Modified. - * src/Main.vala: [585] Enable Rygel support by default and provide - --disable-rygel switch + Added AddTimerForEPGEvent to Recorder D-Bus interface -2009-06-17 Sebastian Pölsterl +2008-09-30 Sebastian Pölsterl - * data/org.gnome.UPnP.MediaServer1.DVBDaemon.service: Added. + * src/RecordingsStore.vala: Modified. - * data/Makefile.am: Modified. + Monitor recordings for deletion - [584] Install .service file for org.gnome.UPnP.MediaServer1.DVBDaemon +2008-09-30 Sebastian Pölsterl -2009-06-17 Sebastian Pölsterl + * src/Recorder.vala, + * src/Device.vala, + * src/Schedule.vala, + * src/EPGScanner.vala, + * src/Scanner.vala: Modified. - * src/rygel/Services.vala: [583] Adjusted DisplayName of root - container + Adjusted to Vala changes. Now compiles with vala trunk - * src/rygel/Services.vala: [582] Use video/mpeg as mime type +2008-09-11 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [581] Added What's on now menu - item and bring up dialog if channel search should be started if no - groups are configured - - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [580] Added - menu entry and toolbar button to show what's currently running and - what's next + * src/EPGScanner.vala: Modified. -2009-06-15 Sebastian Pölsterl + Time next EPG scan when all channels have been scanned - * src/RecordingsStore.vala: [579] Check for NULL values in - GetAllInformations +2008-09-10 Sebastian Pölsterl - * src/ChannelListWriter.vala, - * src/Scanner.vala, - * src/Settings.vala, - * src/Utils.vala: [578] Fixed warnings about uncatched Exceptions or - never occuring Exceptions - - * src/Main.vala: [577] Added --enable-rygel switch - - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/totem-plugin/dvb-daemon.py: [576] Use 'Recording schedule' - instead of 'Timers' in GUI + * src/Schedule.vala: Modified. - * Makefile.am: [575] Adjusted build system to vala 0.7.x + Don't add events that are already expired - * src/rygel/Interfaces.vala, - * src/rygel/Services.vala: [574] Use owned getters +2008-09-10 Sebastian Pölsterl -2009-06-14 Sebastian Pölsterl + * src/Channel.vala, + * src/Schedule.vala: Modified. - * src/rtsp/MediaFactory.vala: [573] Call remote_elements in unprepare + Restore events from SQLite db correctly - * src/rygel/Services.vala: [572] Made RygelService class Compact +2008-09-10 Sebastian Pölsterl -2009-06-13 Sebastian Pölsterl + * client/gnome-dvb-schedule.py: Added. - * src/DeviceGroup.vala: [571] Fixed crash when last device of group - has been removed + Added gnome-dvb-schedule program that displays schdule for each + channel - * client/gnomedvb/ui/widgets/ChannelsStore.py: [570] Connect to - manager's group-added and group-removed signals +2008-09-10 Sebastian Pölsterl -2009-06-12 Sebastian + * vapi/cutils.vapi: Added. - * src/rtsp/MediaFactory.vala: [569] Adjusted to changes in my gst- - rtsp-server branch to inject dvb-daemon's pipeline + * src/Event.vala, + * configure.ac, + * Makefile.am, + * src/Schedule.vala: Modified. + + Added is_running method to Event that compares start and end time + with current time instead of RUNNING_STATUS. Got + get_local_start_time right. Wrapped timegm function. -2009-06-11 Sebastian Pölsterl +2008-08-28 Sebastian Pölsterl - * src/rygel, - * src/rygel/Interfaces.vala, - * src/rygel/Services.vala: Added. + * src/Recorder.vala: Modified. - * Makefile.am: Modified. + Add queue element between dvbbasebin and each filesink to get + multiple recordings on same TS working. - [568] Implemented Rygel MediaServer spec. It still doesn't work due to - a bug in vala +2008-08-27 Sebastian Pölsterl -2009-06-11 Sebastian Pölsterl + * src/GConfStore.vala: Modified. - * src/Channel.vala, - * src/ChannelList.vala: [567] Added URL property to Channel + Made checking for correct values more strict when restoring event. - * src/Manager.vala: [566] Added device_groups property to Manager +2008-08-27 Sebastian Pölsterl -2009-06-08 Sebastian Pölsterl + * src/Recorder.vala, + * src/Manager.vala, + * src/Main.vala: Modified. + + Added --disable-epg-scanner option which will turn of that EPG is + scanned. Adjusted Recorder and Manager that they can deal with + epgscanner being null. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [565] - Display help message if no group is selected +2008-08-24 Sebastian Pölsterl -2009-06-07 Sebastian Pölsterl + * src/Schedule.vala: Modified. - * src/SqliteConfigTimersStore.vala: [564] Delete all devices of group - in remove_device_group, too + Fixed bug in Next and GetLocalStartTime. However, the latter still + returns wrong time. - * client/totem-plugin/dvb-daemon.py: [563] Don't require selecting a - device group when there's only one +2008-08-24 Sebastian Pölsterl - * client/gnomedvb/ui/preferences/Preferences.py: [562] Don't use - focus-in-event for DeviceGroupsView anymore + * client/gnomedvb/widgets/ChannelsView.py: Modified. - * client/totem-plugin/dvb-daemon.py: [561] Use new DetailsDialog in - Totem plugin + Work around pygtk bug when model is None -2009-06-07 Sebastian Pölsterl +2008-08-24 Sebastian Pölsterl - * client/gnomedvb/ui/recordings/DetailsDialog.py: Added. + * client/gnomedvb/preferences/ui/Preferences.py: Modified. - * client/gnomedvb/ui/recordings/Makefile.am, - * client/gnomedvb/ui/recordings/RecordingsDialog.py, - * po/POTFILES.in: Modified. + Marked title as translateable - [560] Added DetailDialog showing all informations about the recordings +2008-08-24 Sebastian Pölsterl -2009-06-07 Sebastian Pölsterl + * client/gnomedvb/preferences/ui/Preferences.py: Modified. - * client/gnomedvb/DBusWrapper.py, - * src/IDBusRecordingsStore.vala, - * src/RecordingsStore.vala: [559] Added GetAllInformations method to - RecordingsStore - - * src/ChannelFactory.vala: [558] remove_channel returns true when - everything went fine - - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [557] Show - Running/Next when no channel is selected - - * client/gnomedvb/ui/widgets/RunningNextStore.py, - * client/gnomedvb/ui/widgets/RunningNextView.py: [556] Display start - time of running and next event - - * client/gnomedvb/DBusWrapper.py, - * src/IDBusSchedule.vala, - * src/Schedule.vala: [555] Added GetLocalStartTimestamp method + Show error message when something went wrong when adding devices or + creating groups -2009-06-06 Sebastian Pölsterl +2008-08-24 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [554] Added RunningNext dialog - and display date and time of recording + * client/gnomedvb/timers/ui/RecorderWindow.py: Modified. -2009-06-06 Sebastian Pölsterl + Show error message when something went wrong when adding or + deleting timer - * client/gnomedvb/ui/widgets/RunningNextStore.py, - * client/gnomedvb/ui/widgets/RunningNextView.py: Added. +2008-08-24 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/Makefile.am, - * po/POTFILES.in: Modified. + * client/gnomedvb/wizard/SetupWizard.py: Modified. - [553] Added RunningNext(Store|View).py + Set window title of assistant -2009-06-05 Sebastian Pölsterl +2008-08-24 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [552] Added DVB menu, schedule - dialog, timers dialog, preferences dialog and right-click menus + * client/gnomedvb/widgets/ChannelsStore.py, + * client/gnomedvb/widgets/ChannelsView.py: Added. - * client/gnomedvb/ui/widgets/ChannelsStore.py: [551] Added columng to - store device group client to ChannelsTreeStore + * client/gnomedvb/widgets/Makefile.am, + * client/gnomedvb/timers/ui/TimerDialog.py, + * po/POTFILES.in: Modified. -2009-05-31 Sebastian Pölsterl + Moved widget to display a list of channels to widgets module - * src/Schedule.vala: [550] Don't remove event from map and sequence - when we already have an event with the same id. This also fixes a mem - leak - - * src/ChannelFactory.vala, - * src/DeviceGroup.vala, - * src/EPGScanner.vala, - * src/Recorder.vala: [549] Removed ref cycles +2008-08-24 Sebastian Pölsterl - * src/ChannelFactory.vala: [548] Start EPGScanner again if DeviceGroup - is idle. Only remove PlayerThread if no channels are watched anymore + * client/gnomedvb/widgets/Makefile.am, + * client/gnomedvb/widgets/__init__.py, + * client/gnomedvb/widgets/DVBModel.py, + * client/gnomedvb/widgets/Device.py: Added. + + * client/gnomedvb/preferences/model/__init__.py, + * client/gnomedvb/preferences/model/DVBModel.py, + * client/gnomedvb/preferences/model/Makefile.am, + * client/gnomedvb/preferences/model/Device.py: Removed. + + * client/gnomedvb/preferences/Makefile.am, + * client/gnomedvb/preferences/ui/Preferences.py, + * client/gnomedvb/preferences/ui/DeviceGroupsView.py, + * configure.ac, + * client/gnomedvb/DBusWrapper.py, + * client/gnome-dvb-preferences.py, + * client/gnomedvb/wizard/pages/AdaptersPage.py, + * client/gnomedvb/Makefile.am: Modified. - * src/ChannelFactory.vala: [547] Added API comments + Moved preferences.model to new widgets module -2009-05-31 Sebastian Pölsterl +2008-08-21 Sebastian Pölsterl - * src/ChannelFactory.vala: Added. + * src/Manager.vala: Modified. - * Makefile.am, - * src/DeviceGroup.vala, - * src/Recorder.vala, - * src/rtsp/MediaFactory.vala: Modified. + Print debug message when trying to register already registered + device. Stop EPGScanner when device is removed from group and start + it again if the group has devices remaining, otherwise drop + EPGScanner. - [546] Moved handling of devices and creating dvbbasebin elements to - new ChannelFactory and PlayerThread classes. +2008-08-21 Sebastian Pölsterl - gst-rtsp-sever doesn't work well currently. + * src/DeviceGroup.vala: Modified. -2009-05-24 Sebastian Pölsterl + Print warning if device couldn't be added. - * src/Manager.vala: [545] Delete EPG events of group when it gets - destroyed +2008-08-21 Sebastian Pölsterl - * src/EPGStore.vala, - * src/SqliteEPGStore.vala: [544] Added remove_events_of_group method + * src/Device.vala: Modified. - * src/DeviceGroup.vala, - * src/IDBusDeviceGroup.vala, - * src/IDBusManager.vala, - * src/Manager.vala: [543] Use DBus.ObjectPath where applicable + Only retrieve type AND name if requested. - * client/totem-plugin/dvb-daemon.py: [542] Adjusted to changes in DBus - interfaces +2008-08-21 Sebastian Pölsterl -2009-05-23 Sebastian Pölsterl + * src/Manager.vala, + * src/Main.vala: Modified. - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/__init__.py, - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/gnomedvb/ui/widgets/ChannelsView.py, - * client/gnomedvb/ui/widgets/RecordingsView.py, - * client/gnomedvb/ui/widgets/ScheduleView.py, - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/BasePage.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/ui/wizard/pages/IntroPage.py, - * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [541] Fixed some - issues revealed by pylint - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/preferences/DeviceGroupsView.py, - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/gnomedvb/ui/widgets/ChannelsStore.py, - * client/gnomedvb/ui/widgets/ScheduleStore.py: [540] Adjusted to - changes in DBus interfaces - - * src/IDBusManager.vala, - * src/Manager.vala: [539] Added GetDeviceGroup method. Only destroy - DeviceGroup if it contains no more devices - - * src/DeviceGroup.vala: [538] Use this - - * src/SqliteEPGStore.vala: [537] Fixed crash when adding same epg - event of different device group. Primary key is now group_id, sid, - event_id. + Create EPG scanner in Manager.add_device_group instead of Main. + That way when a new group is added while running the EPG scanner is + started, too. -2009-05-23 Sebastian Pölsterl +2008-08-21 Sebastian Pölsterl - * src/IDBusDeviceGroup.vala: Added. + * client/gnomedvb/wizard/pages/AdaptersPage.py: Modified. - * Makefile.am, - * client/gnomedvb/DBusWrapper.py, - * src/Constants.vala, - * src/DeviceGroup.vala, - * src/IDBusManager.vala, - * src/Manager.vala, - * src/Utils.vala: Modified. - - [536] Moved many methods related to DeviceGroups to DeviceGroup - itsself and expose them via DBus on org.gnome.DVB.DeviceGroup. - Adjusted DBus paths of Recorder, Schedule and ChannelList. + Retrieve name and type of all devices correctly. -2009-05-23 Sebastian Pölsterl +2008-08-21 Sebastian Pölsterl - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Preferences.py: [535] Added - EditGroupDialog - - * client/gnomedvb/DBusWrapper.py, - * src/IDBusManager.vala, - * src/Manager.vala: [534] Added SetDeviceGroupName, - (Get|Set)RecordingsDirectory methods - - * src/DeviceGroup.vala: [533] Updata all devices if RecordingsDirecoty - property changes - - * src/ConfigStore.vala, - * src/SqliteConfigTimersStore.vala: [532] Added update_from_group - method to store current settings stored in DeviceGroup + * client/gnomedvb/preferences/model/DVBModel.py: Modified. -2009-05-22 Sebastian + Fixed crash when retrieving unregistered devices - * src/Cable/CableChannel.vala, - * src/ChannelListReader.vala: [531] Fixed ChannelListReader that it - can correctly read symbol rate +2008-08-21 Sebastian Pölsterl -2009-05-21 Sebastian Pölsterl + * src/EPGStore.vala: Modified. - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py: [530] Added - the possibility to choose and reorder channels after the scan - completed. - - * client/gnomedvb/DBusWrapper.py, - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [529] Renamed method - WriteChannelsToFile to WriteAllChannelsToFile. WriteChannels now - expects a list of SIDs and a path and will store all channels in the - given order to the file. + Fixed bug that running_status was overridden by extended + description. - * src/ChannelListWriter.vala: [528] Multiply symbol rate by 1000 +2008-08-21 Sebastian Pölsterl - * src/Scanner.vala: [527] Wait for PMT tables to arrive + * src/Schedule.vala, + * src/Main.vala: Modified. -2009-05-18 Sebastian Pölsterl + Add stored events in constructor of Schedule to the Schedule. - * src/Cable/CableScanner.vala: [526] Fixed bug #582925: Symbol-rate - unit mismatch +2008-08-21 Sebastian Pölsterl - * client/totem-plugin/dvb-daemon.py: [525] Fixed bug #582927: Totem - plugin fails to start: Non-ASCII character in python source + * src/Utils.vala, + * src/Event.vala: Modified. - * configure.ac: [524] Post release version bump to 0.1.8 + When figuring out if an event has expired compare the end time to + the current UTC time. -=== version-0.1.7 === -2009-05-16 Sebastian Pölsterl +2008-08-20 Sebastian Pölsterl - * po/Makefile.in.in: Removed. + * src/EPGStore.vala: Modified. - [523] Removed Makefile.in.in because it's autogenerated + Fixed bug that event weren't deleted. Check for DONE return code in + get_event, too. -2009-05-16 Sebastian Pölsterl +2008-08-20 Sebastian Pölsterl - * NEWS: [522] Added release notes + * src/Recorder.vala, + * src/Event.vala, + * src/EPGScanner.vala, + * src/EPGStore.vala, + * src/Schedule.vala: Modified. - * .bzrignore: [521] Ignore ChangelLog and *.gmo + Only store start time and id of event in memory and retrieve rest + from sqlite db. - * src/Recorder.vala: [520] AddTimerForEPGEvent calls - AddTimerWithMargin now +2008-08-20 Sebastian Pölsterl - * configure.ac: [519] Post release version bump to 0.1.7 + * src/EPGStore.vala: Modified. -=== version-0.1.6 === -2009-05-15 Sebastian Pölsterl + Store starttime in julian time format. Use prepared statements for + queries. - * NEWS: [518] Added release notes +2008-08-18 Sebastian Pölsterl - * src/Recorder.vala: [517] Use Settings' variables to retrieve - margin_(start|stop) + * src/EPGStore.vala: Added. - * src/EPGScanner.vala: [516] Read value of CHECK_EIT_INTERVAL from - settings file + * src/Channel.vala, + * src/Schedule.vala, + * src/Main.vala, + * configure.ac, + * Makefile.am: Modified. + + Added EPGStore class that stores EPG data in a sqlite database. + However, events are still stored in memory, too. This has to change + in the future. Schedule class expects Channel paramater in the + constructor. - * src/Settings.vala: [515] Store name of sections and keys in - variables +2008-08-14 Sebastian Pölsterl -2009-05-15 Sebastian Pölsterl + * src/Main.vala: Modified. - * ChangeLog: Removed. + Removed obsolete code that previously was for testing purposes - * autogen.sh: Modified. +2008-08-14 Sebastian Pölsterl - [514] Removed ChangeLog. Create empty ChangeLog in autogen.sh + * src/Recorder.vala, + * src/EPGScanner.vala: Modified. -2009-05-15 Sebastian Pölsterl + Fixed bug that prevented two simultanious recordings on different + TS. - * src/Timer.vala: [513] Timers don't conflict if the are on the same - TS but on different channels +2008-08-14 Sebastian Pölsterl - * src/Channel.vala: [512] Added equals method + * client/gnomedvb/timers/ui/RecorderWindow.py: Modified. - * src/Recorder.vala: [511] Set state of queue and sink to NULL and - remove both elements from the pipeline when I recordings is stopped - while another recording on the same TS is still active + Fixed bug that only active timers could be deleted -2009-05-11 Sebastian Pölsterl +2008-08-14 Sebastian Pölsterl - * src/Recorder.vala: [510] Put SIDs of channels that have to get - linked to queue in HashSet. Provide getters for queue, sink and - dvbbasebin - - * src/Timer.vala: [509] conflicts_with returns false if channels of - timers are on the same transport stream - - * src/Main.vala: [508] Added more debug messages and jsuted levels - - * src/Recorder.vala, - * src/SqliteConfigTimersStore.vala, - * src/Timer.vala: [507] Replaced Timer's Sid attribute with Channel - property + * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/wizard/pages/SummaryPage.py, + * client/gnomedvb/wizard/SetupWizard.py, + * client/gnomedvb/wizard/pages/AdaptersPage.py, + * client/gnomedvb/wizard/pages/IntroPage.py, + * client/gnomedvb/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/wizard/pages/BasePage.py, + * client/gnomedvb/wizard/pages/SaveChannelListPage.py: Modified. -2009-05-05 Sebastian Pölsterl + Refactored wizard. Show error message when no devices where + detected or when unsupported device type has been chosen. - * src/ChannelList.vala, - * src/ChannelListReader.vala, - * src/DeviceGroup.vala: [506] Removed group_id property from - ChannelList. Set channel's GroupId in ChanelListReader when creating - channels +2008-08-14 Sebastian Pölsterl - * src/Channel.vala: [505] Made GroupId a property + * src/Manager.vala: Modified. - * src/Scanner.vala, - * src/SqliteEPGStore.vala: [504] Don't use deprecated # syntax anymore + Stop epgscanner when channel scanner is request. Start epgscanner + again when channel scanner got disposed. -2009-05-04 Sebastian Pölsterl +2008-08-14 Sebastian Pölsterl - * src/Recorder.vala: [503] Fixed bug that timers didn't get scheduled - even if the didn't conflict + * client/gnomedvb/preferences/model/DVBModel.py, + * client/gnomedvb/preferences/ui/Preferences.py, + * client/gnomedvb/DBusWrapper.py: Modified. - * client/gnomedvb/DBusWrapper.py: [502] Wrapped AddTimerWithMargin + Only use get_adapter_info for unregistered devices. For registered + devices use GetNameOfRegisteredDevice and GetTypeOfDeviceGroup. - * src/Recorder.vala, - * src/Recording.vala: [501] Use int64.FORMAT when printing int64 +2008-08-14 Sebastian Pölsterl - * src/RecordingsStore.vala, - * src/Settings.vala: [500] Fixed some compiler warnings + * src/Device.vala, + * src/Manager.vala: Modified. - * src/IDBusRecorder.vala, - * src/Recorder.vala: [499] Added AddTimerWithMargin method. Restored - old behaviour of AddTimer method. + Added GetNameOfRegisteredDevice method to Manager. Added Name + property to Device. -2009-05-02 Sebastian Pölsterl +2008-08-14 Sebastian Pölsterl - * src/Recorder.vala, - * src/Timer.vala: [498] Add default early start and late finish values - to timers. Allow changing start time and duration of timers. Timer is - now due if the current time is greater or equal the timer's start time - and ther timer didn't expire, yet. + * src/Recorder.vala, + * src/EPGScanner.vala: Modified. - * src/Event.vala: [497] Adjust assertion + Stop EPGScanner before recording starts. Start it again when + recording ended. Collect EPG inside RecordingThread when recording + is active. -2009-05-02 Sebastian Pölsterl +2008-08-14 Sebastian Pölsterl - * src/Settings.vala: Added. + * src/Schedule.vala: Modified. - * Makefile.am, - * src/Factory.vala: Modified. + Made Schedule thread-safe - [496] Added Settings class that will be used for retrieving early - start/late finish values in the future. +2008-08-14 Sebastian Pölsterl -2009-05-02 Sebastian Pölsterl + * src/Manager.vala, + * src/Main.vala: Modified. - * src/ConfigStore.vala, - * src/SqliteConfigTimersStore.vala, - * src/TimersStore.vala: [495] Add and remove methods of ConfigStore - and TimersStore return true now if the operation was successful. - - * src/ChannelList.vala, - * src/ChannelListReader.vala, - * src/EPGStore.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Schedule.vala, - * src/SqliteConfigTimersStore.vala, - * src/SqliteEPGStore.vala: [494] Store EPG information for each device - group seperately. Group ID is stored in Channel now. + Added get_epg_scanner method to Manager. Made Manager a singleton. + Use new get_instance method in Main. -2009-05-01 Sebastian Pölsterl +2008-08-10 Sebastian Pölsterl - * src/Channel.vala: [493] Added GroupId property + * src/Event.vala, + * src/Schedule.vala, + * client/gnomedvb/DBusWrapper.py: Modified. - * src/ChannelList.vala, - * src/rtsp/MediaFactory.vala: [492] Adjust to latest gst-rtsp-server - from git + Added get_local_start_time method to Event. Implemented + GetLocalStartTime in Schedule. -2009-04-30 Sebastian Pölsterl +2008-08-10 Sebastian Pölsterl - * src/Scanner.vala: [491] Fixed bug that channel scanner did not find - all channels + * src/Event.vala: Modified. - If we received a NIT but haven't seen the TS ID of a channel, yet, - don't continue scanning but wait for additional NITs + Removed debug call -2009-04-18 Sebastian Pölsterl +2008-08-09 Sebastian - * src/Scanner.vala: [490] Moved pipeline description into static const - variable + * client/gnomedvb/timers/ui/TimerDialog.py: Modified. -2009-04-17 Sebastian Pölsterl + Put list of channels in a treeview instead of combobox - * src/DeviceGroup.vala, - * src/SqliteConfigTimersStore.vala: [489] Only create EPGScanner in - DeviceGroup if with_epg_scanner is true - - * src/Recorder.vala: [488] Use get_static_pad instead of get_pad - - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [487] Use owned instead of - # +2008-08-09 Sebastian -2009-03-31 Sebastian Pölsterl + * client/gnomedvb/DBusWrapper.py: Modified. - * client/gnome-dvb-control, - * client/gnome-dvb-setup, - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/Device.py, - * client/gnomedvb/__init__.py, - * client/gnomedvb/defs.py.in, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/preferences/DeviceGroupsView.py, - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Frame.py, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/recordings/RecordingsDialog.py, - * client/gnomedvb/ui/timers/CalendarDialog.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/gnomedvb/ui/widgets/ChannelsStore.py, - * client/gnomedvb/ui/widgets/ChannelsView.py, - * client/gnomedvb/ui/widgets/RecordingsStore.py, - * client/gnomedvb/ui/widgets/RecordingsView.py, - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * client/gnomedvb/ui/widgets/ScheduleView.py, - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/BasePage.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/ui/wizard/pages/IntroPage.py, - * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py, - * client/rhythmbox-plugin/dvb-rhythm.py, - * client/totem-plugin/dvb-daemon.py, - * src/Cable/CableChannel.vala, - * src/Cable/CableScanner.vala, - * src/ChangeType.vala, - * src/Channel.vala, - * src/ChannelList.vala, - * src/ChannelListReader.vala, - * src/ChannelListWriter.vala, - * src/ConfigStore.vala, - * src/Constants.vala, - * src/Device.vala, - * src/DeviceGroup.vala, - * src/EPGScanner.vala, - * src/EPGStore.vala, - * src/Event.vala, - * src/Factory.vala, - * src/IDBusChannelList.vala, - * src/IDBusManager.vala, - * src/IDBusRecorder.vala, - * src/IDBusRecordingsStore.vala, - * src/IDBusSchedule.vala, - * src/Main.vala, - * src/Manager.vala, - * src/MpegTsEnums.vala, - * src/OverlapType.vala, - * src/Recorder.vala, - * src/Recording.vala, - * src/RecordingsStore.vala, - * src/Satellite/SatelliteChannel.vala, - * src/Satellite/SatelliteScanner.vala, - * src/ScannedItem.vala, - * src/Scanner.vala, - * src/Schedule.vala, - * src/SqliteConfigTimersStore.vala, - * src/SqliteEPGStore.vala, - * src/Terrestrial/TerrestrialChannel.vala, - * src/Terrestrial/TerrestrialScanner.vala, - * src/Timer.vala, - * src/TimersStore.vala, - * src/Utils.vala, - * src/rtsp/MediaFactory.vala, - * src/rtsp/MediaMapping.vala: [486] Added GPLv3 header to each file + Removed print statements - * COPYING: [485] Actually ship GPLv3 instead of LGPLv3 +2008-08-09 Sebastian -2009-03-08 Sebastian Pölsterl + * client/gnomedvb/timers/ui/RecorderWindow.py: Modified. - * client/gnomedvb/ui/widgets/RecordingsView.py: [484] Display full - date and time of recording + Adjust view to recording-(started|finished) and changed signals of + Recorder. Ask for confirmation when aborting active recording. Show + record image in front of item when the timer belongs to an active + recording. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [483] Added - Recordings button to manage recordings +2008-08-09 Sebastian -2009-03-08 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * client/gnomedvb/ui/recordings, - * client/gnomedvb/ui/recordings/Makefile.am, - * client/gnomedvb/ui/recordings/RecordingsDialog.py, - * client/gnomedvb/ui/recordings/__init__.py, - * client/gnomedvb/ui/widgets/RecordingsStore.py, - * client/gnomedvb/ui/widgets/RecordingsView.py: Added. - - * client/gnomedvb/ui/Makefile.am, - * client/gnomedvb/ui/widgets/Makefile.am, - * configure.ac, - * po/POTFILES.in: Modified. + Delete timer when recording is aborted from the user calling + DeleteTimer - [482] Added RecordingsStore and RecordingsView widgets and - RecordingsDialog +2008-08-09 Sebastian -2009-03-08 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * client/gnomedvb/DBusWrapper.py: [481] Added kwargs to delete of - RecordingsStore + Store active timers in this.timers. this.active_timers is a now a + set of ids for each active timer. - * client/gnomedvb/DBusWrapper.py: [480] Wrapped GetChannelName +2008-08-09 Sebastian - * src/IDBusRecordingsStore.vala, - * src/RecordingsStore.vala: [479] Added GetChannelName method to - RecordingsStore + * src/Recorder.vala: Modified. - * src/Recorder.vala, - * src/Recording.vala: [478] Save channel's name in Recording + Emit changed signal when timer of active recording is deleted -2009-03-02 Sebastian Pölsterl +2008-08-09 Sebastian - * configure.ac: [477] Post release version bump to 0.1.6 + * client/gnomedvb/timers/ui/RecorderWindow.py: Modified. -=== version-0.1.5 === -2009-03-02 Sebastian Pölsterl + Improved UI - * NEWS: [476] Added release notes +2008-08-09 Sebastian -2009-02-24 Sebastian Pölsterl + * client/gnomedvb/DBusWrapper.py: Modified. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [475] Added - refresh button which reloads the program guide + Renamed DVBSchedule to DVBScheduleClient to be consistent - * client/gnomedvb/ui/widgets/ScheduleStore.py: [474] Added reload_all - method +2008-08-09 Sebastian - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/ui/wizard/pages/IntroPage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py: [473] Improved the - wording in the assistant to be HIG compliant + * src/Schedule.vala, + * src/EPGScanner.vala: Modified. - * src/Device.vala: [472] Retrieve adapter type and name in a single - pipeline + Replace old events with new one -2009-02-23 Sebastian Pölsterl +2008-08-09 Sebastian - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [471] Made call - to add_scanning_data_from_file async - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/widgets/ChannelsStore.py, - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * client/totem-plugin/dvb-daemon.py: [470] Made some of the DBus calls - in clients async + * src/Manager.vala, + * src/Constants.vala, + * client/gnomedvb/DBusWrapper.py: Modified. -2009-02-22 Sebastian Pölsterl + Added GetSchedule method to Manager - * src/ChannelListReader.vala: [469] Removed debug print of channel +2008-08-09 Sebastian - * src/ChannelListReader.vala, - * src/Utils.vala: [468] Use out parameter to provide enum value to - avoid unwanted free. Use unowned instead of weak. + * src/IDBusSchedule.vala: Added. - * src/ChannelListReader.vala: [467] Abort parsing line when converting - enum failed + * src/EPGStore.vala: Removed. - * src/ChannelListReader.vala, - * src/ChannelListWriter.vala: [466] Improved sanity checks for values + * Makefile.am, + * src/Schedule.vala: Modified. - * src/SqliteConfigTimersStore.vala: [465] Adjusted to changes in - AdapterType enum. Fixes error when parsing channels.conf. + Schedule implements IDBusSchedule now. - * src/Utils.vala: [464] Added sanity checks when getting values, names - and nicks from enums +2008-08-09 Sebastian - * src/Main.vala, - * src/Manager.vala: [463] Start EPG scanner after group has been - created + * src/Manager.vala, + * src/Main.vala: Modified. - * src/Recorder.vala: [462] Replaced debug with warning + Create EPGScanner for each device group -2009-02-18 Sebastian Pölsterl +2008-08-09 Sebastian - * m4/python.m4: [461] Display error if Python module was not found + * src/Recorder.vala, + * src/Event.vala, + * src/EPGScanner.vala, + * src/Schedule.vala: Modified. -2009-02-16 Sebastian Pölsterl + Store free-ca-mode and extended-text for each event. Added method + to Schedule that retuns currently running event. - * configure.ac: [460] Post release version bump to 0.1.5 +2008-08-09 Sebastian -=== version-0.1.4 === -2009-02-16 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * NEWS: [459] Added release notes + Collect name and description of recording from EIT. However, we + might not see the currently running event. - * src/ChannelList.vala, - * src/EPGScanner.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Scanner.vala, - * src/rtsp/MediaFactory.vala: [458] Renamed get to get_channel to - avoid confusions with GObject's get method +2008-08-08 Sebastian Pölsterl - * src/Schedule.vala: [457] Renamed get to get_event to avoid - confusions with GObject's get method + * src/Event.vala, + * src/EPGScanner.vala, + * src/Schedule.vala: Modified. - * src/RecordingsStore.vala: [456] GetLocation returns a URI instead of - a path now + Remove expired events - * src/Device.vala: [455] Use UNKNOWN as first item +2008-08-08 Sebastian Pölsterl - * src/Manager.vala: [454] Don't add device groups of unknown type + * src/Utils.vala: Modified. -2009-02-14 Sebastian Pölsterl + Added create_utc_time method to create a timestamp from UTC time + instead of locale time how create_time does. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [453] Mark - timers button sensitive when group is selected +2008-08-07 Sebastian Pölsterl - * src/Main.vala, - * vapi/cutils.vapi: [452] Only print debug messages with --debug is - provided. + * client/gnomedvb/wizard/SetupWizard.py, + * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/wizard/pages/SaveChannelListPage.py: Modified. -2009-02-12 Sebastian Pölsterl + Added option to do a brute force scan for DVB-T - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [451] - Display help message if no devices are configured +2008-08-04 Sebastian Pölsterl - * src/DeviceGroup.vala, - * src/EPGScanner.vala: [450] Restored old behavior of stop in - EPGScanner and added destroy function. - - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * client/gnomedvb/ui/widgets/ScheduleView.py: [449] Display timer icon - in the first column if a timer exists that overlaps with the event. + * client/gnome-dvb-preferences.py: Added. - * client/gnomedvb/DBusWrapper.py: [448] Wrapped has_timer_for_event. - Added get_group_id and get_channel_sid method to ScheduleClient. + * client/dvb-preferences.py: Removed. -2009-02-12 Sebastian Pölsterl + * client/Makefile.am: Modified. - * src/OverlapType.vala: Added. + Renamed dvb-preferences.py to gnome-dvb-preferences.py - * Makefile.am, - * src/IDBusRecorder.vala, - * src/Recorder.vala, - * src/Timer.vala: Modified. - - [447] Renamed Timer.is_in_range to get_overlap_local. It now returns - the type of the overlap, too. Added HasTimerForEvent method to - Recorder DBus interface. +2008-08-04 Sebastian Pölsterl -2009-02-12 Sebastian Pölsterl + * client/dvb-preferences.py, + * client/gnome-dvb-setup.py, + * client/gnomedvb/__init__.py, + * client/gnome-dvb-timers.py: Modified. - * src/EPGScanner.vala: [446] Fixed problem when epg scanner was - stopped during an active scan. + Moved init of i18n to gnomedvb module -2009-02-12 Sebastian Pölsterl +2008-08-04 Sebastian Pölsterl - * src/IDBusManager.vala: Added. + * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, + * client/gnomedvb/wizard/pages/Makefile.am, + * client/gnomedvb/wizard/pages/SummaryPage.py, + * client/gnomedvb/wizard/SetupWizard.py, + * client/gnome-dvb-setup.py, + * client/gnomedvb/wizard/pages/AdaptersPage.py, + * client/gnomedvb/wizard/pages/IntroPage.py, + * client/gnomedvb/wizard/pages/ChannelScanPage.py, + * client/gnomedvb/wizard/__init__.py, + * client/gnomedvb/wizard/Makefile.am, + * client/gnomedvb/wizard/pages/BasePage.py, + * client/gnomedvb/wizard/pages/SaveChannelListPage.py, + * client/gnomedvb/wizard/pages/__init__.py: Added. + + * client/wizard.py: Removed. + + * po/POTFILES.in, + * configure.ac, + * client/gnomedvb/Makefile.am, + * client/Makefile.am: Modified. - * Makefile.am, - * src/Manager.vala: Modified. + Split wizard in separate files and marked string translateable - [445] Moved DBus methods and signals to IDBusManager interface. +2008-08-04 Sebastian Pölsterl -2009-02-10 Sebastian Pölsterl + * client/gnomedvb/timers/ui/Makefile.am: Modified. - * client/totem-plugin/dvb-daemon.py: [444] Use action_remote instead - of set_mrl_and play + Fixed path in Makefile - * client/totem-plugin/dvb-daemon.py: [443] Fixed imports in Totem - plugin +2008-08-04 Sebastian Pölsterl -2009-02-08 Sebastian Pölsterl + * client/gnomedvb/timers/ui/Makefile.am, + * client/gnomedvb/timers/ui/__init__.py, + * client/gnomedvb/timers/ui/RecorderWindow.py, + * client/gnome-dvb-timers.py, + * client/gnomedvb/timers/Makefile.am, + * client/gnomedvb/timers/ui/CalendarDialog.py, + * client/gnomedvb/timers/ui/TimerDialog.py, + * client/gnomedvb/timers/__init__.py: Added. + + * client/gui.py: Removed. + + * po/POTFILES.in, + * configure.ac, + * client/gnomedvb/Makefile.am, + * client/Makefile.am: Modified. - * src/DeviceGroup.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/rtsp/MediaFactory.vala: [442] Moved instances of Recorder and - EPGScanner to DeviceGroup class. Cleanup correctly when device group - is destroyed in RemoveDeviceFromGroup. + Split UI to configure timers in separate files and marked strings + translateable. - * client/gnome-dvb-setup: [441] Import correct module +2008-08-04 Sebastian Pölsterl -2009-02-02 Sebastian Pölsterl + * client/gnomedvb/defs.py.in: Added. - * configure.ac: [440] Post release version bump to 0.1.4 + * .bzrignore, + * client/gnomedvb/preferences/ui/Preferences.py, + * client/gnomedvb/preferences/ui/Dialogs.py, + * client/gnomedvb/preferences/ui/DeviceGroupsView.py, + * client/dvb-preferences.py, + * configure.ac, + * po/POTFILES.in, + * client/gnomedvb/Makefile.am: Modified. -=== version-0.1.3 === -2009-02-02 Sebastian Pölsterl + Marked strings as translateable - * po/POTFILES.in: [439] Added __init__.py to POTFILES.in +2008-08-02 Sebastian Pölsterl -2009-02-01 Sebastian Pölsterl + * m4/python.m4: Added. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [438] Mark - Timers->Manage menu item insensitive when toolbutton is insensitive + * .bzrignore, + * configure.ac, + * Makefile.am, + * autogen.sh: Modified. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [437] - Monitor changes of device group + Renamed binary and package to gnome-dvb-daemon - * README: [436] Updated requirements +2008-08-02 Sebastian Pölsterl - * NEWS: [435] Added release notes for 0.1.3 + * configure.ac: Modified. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [434] Show - error message when timer for epg event could not be created + Check for gconf, Python 2.5 and required python modules - * client/gnomedvb/ui/timers/TimerDialog.py: [433] Extracted - NoTimerCreatedDialog +2008-08-01 Sebastian Pölsterl -2009-01-29 Sebastian Pölsterl + * client/gnomedvb/preferences/model/__init__.py, + * client/gnomedvb/preferences/Makefile.am, + * client/gnomedvb/preferences/ui/Makefile.am, + * client/gnomedvb/__init__.py, + * client/gnomedvb/preferences/ui/Dialogs.py, + * client/gnomedvb/preferences/ui/DeviceGroupsView.py, + * client/gnomedvb/preferences/ui/Frame.py, + * client/gnomedvb/preferences/ui/__init__.py, + * client/gnomedvb/preferences/model/Device.py, + * client/gnomedvb/DBusWrapper.py, + * client/dvb-preferences.py, + * client/gnomedvb/Makefile.am, + * client/gnomedvb/preferences/__init__.py, + * client/gnomedvb/preferences/model/DVBModel.py, + * client/gnomedvb/preferences/model/Makefile.am, + * client/gnomedvb/preferences/ui/Preferences.py: Added. + + * client/preferences.py, + * client/gnomedvb.py: Removed. + + * .bzrignore, + * configure.ac, + * client/Makefile.am: Modified. + + Refactored preferences. But everything in the gnomedvb model. + Splitted classes into seperate files. Install dvb-preferences.py + into bindir. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [432] - Removed Preferences ToolButton. Added ToolButton and MenuItem for - 'Previous Day' and 'Next Day' +2008-08-01 Sebastian Pölsterl - * client/gnomedvb/ui/widgets/ScheduleStore.py: [431] Added - get_next_day_iter and get_previous_day_iter methods + * client/preferences.py: Modified. - * client/gnomedvb/ui/timers/TimerDialog.py: [430] Use minutes instead - of Minutes + Added buttons to toolbar. Ask for confirmation when removing device + from group - * client/gnome-dvb-control, - * client/gnomedvb/__init__.py: [429] Setup hooks for about dialog in - gnome-dvb-control +2008-08-01 Sebastian Pölsterl - * configure.ac: [428] Check for python gio module + * client/preferences.py: Modified. - * client/gnomedvb/__init__.py, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [427] Added - about dialog + Mark button (in)sensitive correctly - * client/gnomedvb/ui/timers/EditTimersDialog.py: [426] Removed label +2008-07-31 Sebastian Pölsterl - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [425] - Changed timers icon and wording + * client/wizard.py: Modified. -2009-01-26 Sebastian Pölsterl + Added support for DVB-C - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [424] - Display help message if no channel is selected +2008-07-28 Sebastian Pölsterl -2009-01-25 Sebastian Pölsterl + * client/preferences.py: Modified. - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [423] Added - menu bar + Improved the UI a little bit -2009-01-24 Sebastian Pölsterl +2008-07-28 Sebastian Pölsterl - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [422] - Changed window title + * client/preferences.py: Modified. - * client/gnome-dvb-control: [421] Initialize i18n + When adding device to existing group only show those groups that + are of the same type. -2009-01-24 Sebastian Pölsterl +2008-07-28 Sebastian Pölsterl - * client/Makefile.am: Modified. + * client/gnomedvb.py, + * src/Manager.vala: Modified. - * client/gnome-dvb-control.py: Renamed to client/gnome-dvb-control. - * client/gnome-dvb-setup.py: Renamed to client/gnome-dvb-setup. + Added GetTypeOfDeviceGroup method - [420] Removed .py extension from UI executables +2008-07-28 Sebastian Pölsterl -2009-01-24 Sebastian Pölsterl + * client/preferences.py, + * client/gnomedvb.py, + * src/Manager.vala: Modified. - * client/gnomedvb/ui/controlcenter, - * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py, - * client/gnomedvb/ui/controlcenter/Makefile.am, - * client/gnomedvb/ui/controlcenter/__init__.py: Added. - - * client/gnome-dvb-control.py, - * client/gnomedvb/ui/Makefile.am, - * configure.ac, - * po/POTFILES.in: Modified. + Removed DeleteDeviceGroup method from Manager. A group will be + deleted automatically when it contains no devices anymore. - [419] Added ControlCenterWindow.py +2008-07-27 Sebastian Pölsterl -2009-01-24 Sebastian Pölsterl + * client/preferences.py: Modified. - * client/gnomedvb/DVBModel.py, - * client/gnomedvb/Device.py, - * client/gnomedvb/ui, - * client/gnomedvb/ui/Makefile.am, - * client/gnomedvb/ui/__init__.py, - * client/gnomedvb/ui/preferences, - * client/gnomedvb/ui/preferences/DeviceGroupsView.py, - * client/gnomedvb/ui/preferences/Dialogs.py, - * client/gnomedvb/ui/preferences/Frame.py, - * client/gnomedvb/ui/preferences/Makefile.am, - * client/gnomedvb/ui/preferences/Preferences.py, - * client/gnomedvb/ui/preferences/__init__.py, - * client/gnomedvb/ui/timers, - * client/gnomedvb/ui/timers/CalendarDialog.py, - * client/gnomedvb/ui/timers/EditTimersDialog.py, - * client/gnomedvb/ui/timers/Makefile.am, - * client/gnomedvb/ui/timers/TimerDialog.py, - * client/gnomedvb/ui/timers/__init__.py, - * client/gnomedvb/ui/widgets, - * client/gnomedvb/ui/widgets/ChannelsStore.py, - * client/gnomedvb/ui/widgets/ChannelsView.py, - * client/gnomedvb/ui/widgets/Makefile.am, - * client/gnomedvb/ui/widgets/ScheduleStore.py, - * client/gnomedvb/ui/widgets/ScheduleView.py, - * client/gnomedvb/ui/widgets/__init__.py, - * client/gnomedvb/ui/wizard, - * client/gnomedvb/ui/wizard/Makefile.am, - * client/gnomedvb/ui/wizard/SetupWizard.py, - * client/gnomedvb/ui/wizard/__init__.py, - * client/gnomedvb/ui/wizard/pages, - * client/gnomedvb/ui/wizard/pages/AdaptersPage.py, - * client/gnomedvb/ui/wizard/pages/BasePage.py, - * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/ui/wizard/pages/IntroPage.py, - * client/gnomedvb/ui/wizard/pages/Makefile.am, - * client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py, - * client/gnomedvb/ui/wizard/pages/SummaryPage.py, - * client/gnomedvb/ui/wizard/pages/__init__.py: Added. - - * client/gnomedvb/preferences, - * client/gnomedvb/preferences/Makefile.am, - * client/gnomedvb/preferences/__init__.py, - * client/gnomedvb/preferences/ui, - * client/gnomedvb/preferences/ui/DeviceGroupsView.py, - * client/gnomedvb/preferences/ui/Dialogs.py, - * client/gnomedvb/preferences/ui/Frame.py, - * client/gnomedvb/preferences/ui/Makefile.am, - * client/gnomedvb/preferences/ui/Preferences.py, - * client/gnomedvb/preferences/ui/__init__.py, - * client/gnomedvb/timers, - * client/gnomedvb/timers/Makefile.am, - * client/gnomedvb/timers/__init__.py, - * client/gnomedvb/timers/ui, - * client/gnomedvb/timers/ui/CalendarDialog.py, - * client/gnomedvb/timers/ui/Makefile.am, - * client/gnomedvb/timers/ui/TimerDialog.py, - * client/gnomedvb/timers/ui/__init__.py, - * client/gnomedvb/widgets, - * client/gnomedvb/widgets/ChannelsStore.py, - * client/gnomedvb/widgets/ChannelsView.py, - * client/gnomedvb/widgets/DVBModel.py, - * client/gnomedvb/widgets/Device.py, - * client/gnomedvb/widgets/EditTimersDialog.py, - * client/gnomedvb/widgets/Makefile.am, - * client/gnomedvb/widgets/ScheduleStore.py, - * client/gnomedvb/widgets/ScheduleView.py, - * client/gnomedvb/widgets/__init__.py, - * client/gnomedvb/wizard, - * client/gnomedvb/wizard/Makefile.am, - * client/gnomedvb/wizard/SetupWizard.py, - * client/gnomedvb/wizard/__init__.py, - * client/gnomedvb/wizard/pages, - * client/gnomedvb/wizard/pages/AdaptersPage.py, - * client/gnomedvb/wizard/pages/BasePage.py, - * client/gnomedvb/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/wizard/pages/IntroPage.py, - * client/gnomedvb/wizard/pages/Makefile.am, - * client/gnomedvb/wizard/pages/SaveChannelListPage.py, - * client/gnomedvb/wizard/pages/SummaryPage.py, - * client/gnomedvb/wizard/pages/__init__.py: Removed. - - * client/gnome-dvb-control.py, - * client/gnomedvb/Makefile.am, - * configure.ac, - * po/POTFILES.in: Modified. + Change UI when group has been added or removed - [418] Reorganized directory structure +2008-07-27 Sebastian Pölsterl -2009-01-24 Sebastian Pölsterl + * client/preferences.py: Modified. - * client/gnome-dvb-control.py, - * client/gnomedvb/widgets/EditTimersDialog.py: Added. + Change UI when device has been added to or removed from group. + Delete group automatically when last device has been removed. - * client/gnome-dvb-preferences.py, - * client/gnome-dvb-schedule.py, - * client/gnome-dvb-timers.py, - * client/gnomedvb/timers/ui/RecorderWindow.py: Removed. - - * client/Makefile.am, - * client/gnomedvb/preferences/ui/Preferences.py, - * client/gnomedvb/timers/ui/Makefile.am, - * client/gnomedvb/timers/ui/TimerDialog.py, - * client/gnomedvb/widgets/DVBModel.py, - * client/gnomedvb/widgets/Makefile.am, - * po/POTFILES.in: Modified. +2008-07-27 Sebastian Pölsterl - [417] Integrated gnome-dvb-timers and gnmome-dvb-preferences into new - gnome-dvb-control (previously gnome-dvb-schedule). + * src/Manager.vala: Modified. -2009-01-23 Sebastian Pölsterl + DeleteDeviceGroup returns true on success. - * src/rtsp, - * src/rtsp/MediaFactory.vala, - * src/rtsp/MediaMapping.vala: Added. +2008-07-26 Sebastian - * src/livetv, - * src/livetv/Server.vala: Removed. + * client/preferences.py: Modified. - * Makefile.am, - * src/Main.vala: Modified. + Added: Assign unregistered device to existing group. - [416] Adjusted to latest changes of gst-rtsp-server +2008-07-26 Sebastian -2009-01-19 Sebastian Pölsterl + * src/Manager.vala: Modified. - * configure.ac: [415] Post release version bump to 0.1.3 + AddDeviceToExistingGroup returns false when device has wrong type. -=== version-0.1.2 === -2009-01-19 Sebastian Pölsterl +2008-07-26 Sebastian - * NEWS: [414] Added release notes + * client/wizard.py: Modified. - * po/POTFILES.in: [413] Added ScheduleView.py + Added UI for DVB-S scan. - * client/gnome-dvb-schedule.py, - * client/gnomedvb/widgets/ScheduleStore.py, - * client/gnomedvb/widgets/ScheduleView.py: [412] Improved epg browser - to look much nicer +2008-07-26 Sebastian -2009-01-19 Sebastian Pölsterl + * src/Scanner.vala, + * client/gnomedvb.py, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. - * client/gnomedvb/widgets/ScheduleStore.py, - * client/gnomedvb/widgets/ScheduleView.py: Added. + Added GetQueueSize method. Removed queue_size property. - * client/gnome-dvb-schedule.py, - * client/gnomedvb/widgets/Makefile.am: Modified. +2008-07-26 Sebastian - [411] Moved ScheduleStore and ScheduleView to widgets + * src/Satellite/SatelliteScanner.vala: Modified. -2009-01-19 Sebastian Pölsterl + Parse symbol rate andy polarization correctly. - * client/gnomedvb/timers/ui/TimerDialog.py: [410] Minor UI tweaks in - new timer dialog +2008-07-25 Sebastian Pölsterl -2009-01-18 Sebastian Pölsterl + * client/preferences.py: Modified. - * src/Cable/CableScanner.vala, - * src/Device.vala, - * src/EPGScanner.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Schedule.vala, - * src/SqliteConfigTimersStore.vala, - * src/SqliteEPGStore.vala, - * src/Terrestrial/TerrestrialScanner.vala, - * src/Utils.vala: [409] Fixed some compiler warnings with debug - messages - - * src/Scanner.vala: [408] Set pids property only one time when pat - arrived for all new pmt pids. Print the pmt pids and whether we found - all tables. + Added possibility to remove device from group and to create a new + group. However, the change is only visible after restart. -2009-01-16 Sebastian Pölsterl +2008-07-25 Sebastian Pölsterl - * src/SqliteConfigTimersStore.vala: [407] Add all devices to - DeviceGroup + * src/Manager.vala, + * src/GConfStore.vala: Modified. -2009-01-15 Sebastian Pölsterl + When device is removed from a group or a group is deleted mage + changes to GConf, too. - * src/Device.vala: [406] Duplicate adapter_name and adapter_type - string +2008-07-25 Sebastian Pölsterl -2009-01-14 Sebastian Pölsterl + * client/gnomedvb.py: Modified. - * client/gnomedvb/DBusWrapper.py: [405] Print name and description of - recording + Forgot to make DVBManagerClient a GObject - * src/Recorder.vala: [404] Add recording to RecordingsStore when - recording begins. Use event's short and extended description as - Recording's description +2008-07-25 Sebastian Pölsterl - * src/Recording.vala: [403] In serialized recording save name and - description in as last two items + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. - * src/Schedule.vala: [402] Fixed crash when D-Bus functions that - return string actually return null + Implemented AddScanningDataFromFile for Satellite and Cable + scanner. - * src/ChannelList.vala: [401] Fixed crashes in GetChannelName and - GetChannelNetwork when returned string is null +2008-07-25 Sebastian Pölsterl - * src/Recorder.vala: [400] Check if event with given id exists + * client/wizard.py: Modified. - * src/Scanner.vala: [399] Remove signal watch + Added page to select initial tuning data. Currently only working + for DVB-T. -2009-01-11 Sebastian Pölsterl +2008-07-25 Sebastian Pölsterl - * src/SqliteConfigTimersStore.vala, - * src/SqliteEPGStore.vala: [398] Make sure Sqlite.Database is always - the last parameter. + * client/gnomedvb.py, + * src/Terrestrial/TerrestrialScanner.vala: Modified. - * src/Device.vala: [397] Remove weak from Gst.Message variables + Added AddScanningDataFromFile method to TerrestrialScanner. Will be + added for other scanners, too. - * src/EPGScanner.vala, - * src/Recorder.vala: [396] Remove signal watch +2008-07-24 Sebastian Pölsterl -2009-01-10 Sebastian Pölsterl + * client/gnomedvb.py, + * src/Manager.vala: Modified. - * configure.ac: [395] Check for signal.h + Added changed and group_changed signals to Manager -2009-01-06 Sebastian Pölsterl +2008-07-24 Sebastian Pölsterl - * configure.ac, - * m4/gstreamer.m4: [394] Check for rtpmp2tpay element which is part of - gst-plugins-good - - * src/Device.vala, - * src/Recorder.vala, - * src/livetv/Server.vala: [393] Check if return value of - Gst.ElementFactory.make is not null - - * src/Schedule.vala: [392] Made EventElement a GObject. Destroy - EventElement properly when Sequence is destroyed - - * src/EPGScanner.vala: [391] Lock access to this.pipeline - - * src/EPGScanner.vala, - * src/Schedule.vala: [390] Avoid ref cycle so that channels get - finalized + * client/preferences.py: Modified. -2009-01-04 Sebastian Pölsterl + Registered and unregistered devices are displayed. There's still no + functionality. - * README: [389] Removed gconf dependency +2008-07-24 Sebastian Pölsterl - * client/gnomedvb/widgets/ChannelsStore.py: [388] Retrieve and display - device group's name + * client/wizard.py, + * client/gnomedvb.py: Modified. -2009-01-03 Sebastian Pölsterl + Added get_dvb_devices method. It retrieces name, type, adapter and + frontend for all devices on the system through HAL. - * src/EPGScanner.vala: [387] Use static const variable for pipeline - template +2008-07-24 Sebastian Pölsterl -2009-01-01 Sebastian Pölsterl + * client/preferences.py: Added. - * src/ChannelListReader.vala: [386] Don't use hash sign with variable + Started work on a preferences dialog to manage devices and groups - * src/Main.vala: [385] Marked Manager instance as weak +2008-07-24 Sebastian Pölsterl - * src/Main.vala, - * src/Recorder.vala, - * src/Schedule.vala: [384] Marked instances retrieved from Factory as - weak + * client/gnomedvb.py, + * src/Manager.vala, + * src/Constants.vala: Modified. - * src/SqliteConfigTimersStore.vala, - * src/SqliteEPGStore.vala: [383] Made get_db_handler a static function + Added GetDeviceGroupMembers method. Fixed small bug in python + wrapper. - * src/Main.vala: [382] Replaced tabs with spaces +2008-07-24 Sebastian Pölsterl - * src/Main.vala: [381] Cleanup when ctrl+c is pressed + * client/wizard.py: Modified. - * src/Manager.vala: [380] Added shutdown function to Manager class + Added treeview for tv channels and radio channels. Destroy scanner + on exit. - * src/RecordingsStore.vala: [379] Added shutdown function to - RecordingsStore class +2008-07-24 Sebastian Pölsterl - * src/Recorder.vala: [378] Addded stop function to Recorder class + * src/Scanner.vala, + * src/Cable/CableScanner.vala, + * client/gnomedvb.py, + * src/Manager.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Satellite/SatelliteScanner.vala: Modified. + + Renamed Scanner.Abort to Destroy. Added destroyes signal. Destroy + scanner in Manager when destroyed singal is emitted. Fixed bug that + caused segfault when Destroy is called. - * src/Factory.vala: [377] Addded shutdown function to Factory class +2008-07-24 Sebastian Pölsterl - * vapi/cutils.vapi: [376] Added Signal namespace + * src/Manager.vala: Modified. -2008-12-31 Sebastian Pölsterl + Fixed bug that caused daemon to crash when an already running + Scanner is created again - * ChangeLog: Added. +2008-07-23 Sebastian Pölsterl - [375] Re-add ChangeLog, because it's required during configure + * client/wizard.py: Modified. -2008-12-31 Sebastian Pölsterl + Do actual scanning on selected device. Added page that asks the + user for a location to store the channel list at. Still have to + provide proper initial data for scanning. - * src/ChannelListWriter.vala: [374] Fixed critical in substring call +2008-07-23 Sebastian Pölsterl -2008-12-31 Sebastian Pölsterl + * client/gnomedvb.py: Modified. - * ChangeLog: Removed. + Wrapped channel_added and frequency_scanned signals - [373] Removed ChangeLog +2008-07-23 Sebastian Pölsterl -2008-12-30 Sebastian Pölsterl + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. - * src/RecordingsStore.vala: [372] Fixed crash when returning NULL - string over DBus + Changed signature of channel_added signal. Export it over D-Bus. + Added queue_size property. - * src/ChannelListReader.vala: [371] Check if parsed channel is valid +2008-07-23 Sebastian Pölsterl - * src/Satellite/SatelliteChannel.vala: [370] Check if SymbolRate is - not 0 in is_valid + * client/wizard.py, + * client/gnomedvb.py: Modified. - * src/Scanner.vala: [369] Replace all whitespaces in channel's name - with space + Renamed get_adapter_type to get_adapter_info. It returns a + dictionary with keys 'type' and 'name' now -2008-12-30 Sebastian Pölsterl +2008-07-21 Sebastian - * src/Factory.vala: Added. + * client/wizard.py: Modified. - * Makefile.am, - * src/EPGStore.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala, - * src/Schedule.vala: Modified. + Added check if adapter type is supported - [368] Made all get_instance methods thread-safe. Moved getters for - (EPG|Timers|Config)Store to Factory class. +2008-07-20 Sebastian -2008-12-30 Sebastian Pölsterl + * client/gui.py: Modified. - * src/SqliteConfigTimersStore.vala: Added. + Adjusted to changes in gnomedvb. Order channellist alphabetically - * src/GConfStore.vala: Removed. +2008-07-20 Sebastian - * Makefile.am, - * configure.ac, - * src/ConfigStore.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/TimersStore.vala: Modified. - - [367] GConfStore got replaced with SqliteConfigTimersStore which - stores everything in a Sqlite DB. Drop gconf dependency. Added getter - for TimersStore and ConfigStore to Main. + * client/gnomedvb.py: Modified. -2008-12-30 Sebastian Pölsterl + Fixed typo - * src/ConfigStore.vala, - * src/TimersStore.vala: Added. +2008-07-20 Sebastian - * Makefile.am, - * src/GConfStore.vala: Modified. + * client/wizard.py: Added. - [366] Added interfaces ConfigStore which stores device groups and - TimersStore which stores timers. + Added wizard.py. This is going to guide the user through the setup + process of her DVB cards -2008-12-30 Sebastian Pölsterl +2008-07-20 Sebastian - * src/SqliteEPGStore.vala: Added. + * client/gnomedvb.py: Modified. - * Makefile.am, - * src/EPGStore.vala: Modified. + Added get_adapter_type method - [365] Moved EPGStore to SqliteEPGStore and made EPGStore an interface. +2008-07-19 Sebastian -2008-12-30 Sebastian Pölsterl + * client/gnomedvb.py: Modified. - * src/Cable/CableChannel.vala, - * src/Channel.vala, - * src/ChannelListReader.vala, - * src/ChannelListWriter.vala, - * src/Satellite/SatelliteChannel.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialChannel.vala: [364] A Channel can have - more than one audio pid. + DVBChannelListClient and DVBRecorderClient expect group_id in + constructur instead of object path -2008-12-29 Sebastian Pölsterl +2008-07-19 Sebastian - * src/Scanner.vala: [363] If channel isn't valid don't delete it right - away. We might come across the data later + * client/Makefile.am: Added. -2008-12-27 Sebastian Pölsterl + * acinclude.m4, + * Makefile.am, + * configure.ac: Modified. - * src/Scanner.vala: [362] Retrieve channel's frequency only from data - from NIT. + Install gnomedvb.py into Python's site-packages dir - * src/Scanner.vala: [361] Fixed a couple of bugs in the Scanner that - caused the output to change on each scan. Retrieve network name - correctly. Parse sdt no matter if the sdt is for the actual transport - stream or not. Keep channels in new_channels as long as we didn't came - across the TS for this channel. Set name to SID for channels with - invalid name. +2008-07-19 Sebastian -2008-12-26 Sebastian Pölsterl + * client/rhythmbox-plugin/dvb-rhythm.py, + * client/rhythmbox-plugin/Makefile.am, + * client/rhythmbox-plugin/dvb-rhythm.rb-plugin.in: Added. - * client/gnomedvb/wizard/pages/ChannelScanPage.py: [360] If channel is - scrambled display emblem-readonly icon + Added Rhythmbox radio plugin - * client/gnomedvb/DBusWrapper.py, - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [359] Added scrambled - parameter to channel_added signal. Print audio/video pid. Wait 10 - instead of 5 seconds for all tables. +2008-07-19 Sebastian - * src/Channel.vala: [358] Added Scrambled property + * client/gnomedvb.py, + * src/ChannelList.vala, + * src/IDBusChannelList.vala: Modified. -2008-12-24 Sebastian Pölsterl + Added Get(Radio|TV)Channels and IsRadioChannel methods to + ChannelList interface - * client/gnomedvb/wizard/pages/ChannelScanPage.py: [357] Replace & by - & in channel's name +2008-07-17 Sebastian Pölsterl - * src/Scanner.vala: [356] Remove channels again when we didn't receive - all necessary tables. Did some minor refactoring. + * src/Recorder.vala: Modified. -2008-12-23 Sebastian Pölsterl + Refactored RecordingThread and Recorder to get recording of + multiple channels in the same transport stream right. + Unfortunately, this doesn't work, yet. Problem is under + investigation. - * src/livetv/Server.vala: [355] Check if EPG scanner exists before - forwarding eit data +2008-07-17 Sebastian Pölsterl - * src/DeviceGroup.vala, - * src/GConfStore.vala: [354] Set ChannlList's group_id in the - constructor of DeviceGroup - - * client/gnomedvb/wizard/pages/ChannelScanPage.py: [353] Use only one - TreeView in ChannelScanPage and display channel type as icon. - - * client/gnomedvb/wizard/pages/ChannelScanPage.py: [352] Fixed bug - #565247: Progressbar while scanning channels doesn't work correctly - - * client/gnomedvb/DBusWrapper.py, - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [351] Added freq_left - parameter to frquency_scanned signal. Removed GetQueueSize method from - Scanner interface. + * src/Manager.vala: Modified. -2008-12-21 Sebastian Pölsterl + Better debug output - * client/gnomedvb/timers/ui/RecorderWindow.py, - * client/gnomedvb/wizard/pages/AdaptersPage.py: [350] Adjusted to - changes of previous commit - - * client/gnomedvb/preferences/ui/DeviceGroupsView.py, - * client/gnomedvb/preferences/ui/Dialogs.py, - * client/gnomedvb/preferences/ui/Preferences.py, - * client/gnomedvb/widgets/DVBModel.py: [349] Added name field to - dialog to create new group. Adjust to changes of previous commit. - - * client/gnomedvb/DBusWrapper.py, - * src/DeviceGroup.vala, - * src/GConfStore.vala, - * src/Manager.vala: [348] Added GetDeviceGroupName method to Manager - DBus interface. Added parameter name to AddDeviceToNewGroup method. +2008-07-16 Sebastian Pölsterl -2008-12-20 Sebastian Pölsterl + * src/Manager.vala: Modified. - * src/ChannelList.vala, - * src/ChannelListReader.vala: [347] Save location of channels file in - ChannelList object. Fixes problem when creating a new group. + Check if device is already part of another group when calling + AddDeviceToExistingGroup or AddDeviceToNewGroup - * src/Scanner.vala: [346] Fixed warning when using substring. Fixed - crash when channel's network was not set. +2008-07-16 Sebastian Pölsterl - * src/GConfStore.vala: [345] Check if writing values to GConf was - successful + * src/IDBusRecorder.vala, + * client/gnomedvb.py, + * src/Recorder.vala: Modified. + + RecordingThread class that does the actual recording now. This + makes simultaneously recordings possible (tested). Changed + GetActiveTimer method to GetActiveTimers, because each recorder can + have more than one active recording now. - * src/EPGStore.vala: [344] Removed unused execute method. Adjust to - changes of sqlite3 bindings +2008-07-16 Sebastian Pölsterl -2008-12-18 Sebastian Pölsterl + * src/Manager.vala, + * src/GConfStore.vala: Modified. - * src/Event.vala: [343] Use name constructor instead of construct for - Event class. Fixes Vala compiling error. + Added additional debug messages. Save device to GConf when added to + group -2008-12-15 Sebastian Pölsterl +2008-07-16 Sebastian Pölsterl - * configure.ac: [342] Post release version bump to 0.1.2 + * client/gnomedvb.py, + * src/Manager.vala: Modified. -=== version-0.1.1 === -2008-12-15 Sebastian Pölsterl + Remove channels_conf and recordings_dir parameter from + AddDeviceToExistingGroup because they are overwritten anyway - * src/Schedule.vala: [341] Fixed vala compiling errors +2008-07-15 Sebastian Pölsterl - * NEWS: [340] Added release notes + * src/Schedule.vala: Modified. - * README: [339] Updated README + Use weak SequenceIter. That way it works with patched glib vapi - * Makefile.am, - * client/Makefile.am, - * client/totem-plugin/Makefile.am, - * configure.ac, - * po/POTFILES.in, - * src/Main.vala: [338] Made gst-rtsp-server a requirement. Added Totem - plugin to autofoo. +2008-07-15 Sebastian Pölsterl -2008-12-14 Sebastian Pölsterl + * src/EPGScanner.vala: Modified. - * Makefile.am: [337] Fixed distcheck issue + Use DeviceGroup instead of Device -2008-12-14 Sebastian Pölsterl +2008-07-15 Sebastian Pölsterl - * client/totem-plugin, - * client/totem-plugin/Makefile.am, - * client/totem-plugin/dvb-daemon.py, - * client/totem-plugin/dvb-daemon.totem-plugin.in: Added. + * client/gnomedvb.py: Modified. - [336] Added Totem plugin + Added wrapper for RemoveDeviceFromGroup and DeleteDeviceGroup + methods -2008-12-14 Sebastian Pölsterl +2008-07-15 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py: [335] Added get_name and - get_description to DVBRecordingsStoreClient + * src/Manager.vala: Modified. - * client/gnomedvb/widgets/ChannelsView.py: [334] name_col variable to - constructor to specify which column contains the name + Added RemoveDeviceFromGroup and DeleteDeviceGroup methods - * client/gnomedvb/widgets/ChannelsStore.py: [333] Added - ChannelsTreeStore +2008-07-15 Sebastian Pölsterl - * client/gnomedvb/widgets/ChannelsView.py: [332] Use markup instead of - text for name column + * src/Device.vala: Modified. - * client/rhythmbox-plugin/dvb-rhythm.rb-plugin.in: [331] Updated my - e-mail address + Added optional parameter get_type to constructur of Device class. + When get_type is true the adapter's type is retrieved, otherwise it + remains unknown. - * src/Main.vala: [330] Disable RTSPServer for now +2008-07-15 Sebastian Pölsterl - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [329] Accept any number of - whitespaces between values in initial tuning data + * src/Manager.vala: Modified. - * Makefile.am: [328] Updated gst-rtsp-server package name + Updated API doc - * client/gnomedvb/DBusWrapper.py, - * src/ChannelList.vala, - * src/GConfStore.vala, - * src/IDBusChannelList.vala: [327] Added GetChannelURL to ChannelList - DBus interface +2008-07-13 Sebastian Pölsterl - * src/Manager.vala: [326] Use devgroup variable name instead of device - where applicable + * vapi/config.vapi: Added. - * src/Channel.vala, - * src/Recorder.vala: [325] Added on_same_transport_stream method + * Makefile.am, + * src/Main.vala: Modified. - * src/livetv/Server.vala: [324] Stop EPG scanner before streaming and - start again when client disconnected. In the mean time forward all eit - events to EPGScanner. + Addec config.vapi to access config.h. Print version and package + name when --version option is provided -2008-12-12 Sebastian Pölsterl +2008-07-12 Sebastian Pölsterl - * src/livetv/Server.vala: [323] Adjust to signature changeo of - prepare_media. Monitor bus of pipeline. + * src/Main.vala: Modified. -2008-12-10 Sebastian Pölsterl + Added -d/--debug command line option though it currently does + nothing - * src/livetv, - * src/livetv/Server.vala: Added. +2008-07-12 Sebastian Pölsterl - * Makefile.am, - * configure.ac, - * src/Main.vala, - * src/Manager.vala: Modified. + * Makefile.am: Modified. - [322] Added experimental live TV streaming support via RTSP. + Added --thread to valac call -2008-12-08 Sebastian Pölsterl +2008-07-12 Sebastian Pölsterl - * src/Recorder.vala: [321] Use .mpeg extension instead of .ts for - recordings + * src/Recorder.vala: Modified. - * configure.ac: [320] Added --enable-gstrtspserver option to configure + Checking for conflicting timers takes into account how much devices + belong to the DeviceGroup - * AUTHORS, - * MAINTAINERS: [319] Updated my e-mail address +2008-07-12 Sebastian Pölsterl - * configure.ac: [318] Use bugzilla address to report bugs to + * src/DeviceGroup.vala: Modified. -2008-12-01 Sebastian Pölsterl + Store Devices in a Set - * src/GConfStore.vala: [317] Check if values retrieved from GConf are - actually set +2008-07-12 Sebastian Pölsterl -2008-11-30 Sebastian Pölsterl + * src/Constants.vala, + * client/gui.py, + * src/GConfStore.vala, + * src/Main.vala, + * client/gnomedvb.py, + * src/Manager.vala, + * src/DeviceGroup.vala, + * src/Recorder.vala: Modified. + + Each Device must be part of a DeviceGroup now. All devices in a + DeviceGroup must be of same type and share one channels.conf and + recordings dir. The goal is that Timers are automatically assigned + to a Device for recording. However, this is not implemented, yet. - * src/RecordingsStore.vala: [316] Initialize Recording variable +2008-07-12 Sebastian Pölsterl - * src/ChannelListReader.vala: [315] Cast ints to enum types + * client/gui.py: Modified. -2008-11-18 Sebastian Pölsterl + Make list of channels available in GUI - * src/Timer.vala: [314] Removed (de)serialize methods +2008-07-07 Sebastian Pölsterl -2008-11-16 Sebastian Pölsterl + * src/Recorder.vala, + * src/Device.vala: Modified. - * src/ChannelList.vala, - * src/ChannelListReader.vala, - * src/Manager.vala, - * src/MpegTsEnums.vala, - * src/Recorder.vala, - * src/Recording.vala, - * src/Terrestrial/TerrestrialScanner.vala, - * src/Timer.vala: [313] Fix some compiler errors and warnings returned - by latest vala. Vala still segfaults, though + Added is_busy method to Device class. Did some cleanup in Recorder - * src/Schedule.vala: [312] Print debug message if event id doesn't - exist +2008-07-07 Sebastian Pölsterl -2008-11-09 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * po/sv.po: Added. + Removed obsolete DBus attribute - * po/ChangeLog, - * po/LINGUAS: Modified. +2008-07-07 Sebastian Pölsterl - [311] Added Swedish translation by Daniel Nylander + * src/Main.vala: Modified. -2008-11-03 Sebastian Pölsterl + Remove dead timers from GConf - * configure.ac: [310] Post release version bump to 0.1.1 +2008-07-07 Sebastian Pölsterl -=== version-0.1.0 === -2008-11-03 Sebastian Pölsterl + * src/DeviceGroup.vala: Added. - * po/POTFILES.in: [309] Added gnome-dvb-schedule.py to POTFILES.in + * Makefile.am: Modified. - * client/Makefile.am: [308] Added gnome-dvb-schedule to package + Added DeviceGroup class. Currently unused - * NEWS, - * README: [307] Added release notes and README +2008-07-07 Sebastian Pölsterl -2008-11-03 Sebastian Pölsterl + * src/Device.vala, + * src/Manager.vala: Modified. - * m4/gstreamer.m4: Added. + Added hash and equal methods to Device class. Replaced + generate_device_id with Device.hash in Manager - * configure.ac: Modified. +2008-07-07 Sebastian Pölsterl - [306] Check if required gstreamer modules are available in configure - step + * src/Manager.vala, + * src/Main.vala: Modified. -2008-10-26 Sebastian Pölsterl + Exit when D-Bus name is already owned. Skip device when error + appears during restoring. Cleanup Main - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [305] get_scanned_item - retrieves information from Gst.Structure. Remove invalid channels from - ChannelList +2008-07-06 Sebastian Pölsterl - * src/ChannelList.vala: [304] Added remove method + * client/gnomedvb.py: Modified. - * src/Channel.vala, - * src/Satellite/SatelliteChannel.vala: [303] Added is_valid method + Wrap ChannelList D-Bus interface - * src/Scanner.vala: [302] Reset dvbsrc's pids property in start_scan +2008-07-06 Sebastian Pölsterl -2008-10-25 Sebastian Pölsterl + * src/ChannelListReader.vala: Modified. - * src/Scanner.vala: [301] Assign Radio type if VideoPID is 0 not - AudioPID + Check if channel names are properly utf-8 encoded and warn if they + aren't - * src/Satellite/SatelliteScanner.vala: [300] Duplicate polarization - string +2008-07-06 Sebastian Pölsterl - * src/ChannelList.vala: [299] add doesn't tranfser ownership anymore + * src/Recorder.vala: Modified. - * src/ScannedItem.vala: [298] Check for ScannedSatteliteItem in hash - function first + Fixed possible dead lock - * src/Scanner.vala: [297] Don't scan one frequency multiple times. - Added debug calls +2008-07-06 Sebastian Pölsterl - * src/Scanner.vala: [296] Cleanup scanner correctly to avoid memory - leaks + * src/ChannelList.vala, + * src/IDBusChannelList.vala: Modified. -2008-10-18 Sebastian Pölsterl + Removed GetChannelSid method, because GetChannels already returns + SIDs - * src/EPGScanner.vala: [295] Check if strings are valid utf-8 +2008-07-06 Sebastian Pölsterl -2008-10-16 Sebastian Pölsterl + * src/Manager.vala: Modified. - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [294] Fixed memory leaks + Fixed bug that AdapterType was hard coded to DVB-T - * src/Scanner.vala: [293] Check if provider is not NULL before - validating +2008-07-06 Sebastian Pölsterl -2008-10-15 Sebastian Pölsterl + * src/IDBusChannelList.vala: Added. - * src/Scanner.vala: [292] Check for valid utf8 strings + * src/Manager.vala, + * src/ChannelList.vala, + * Makefile.am, + * src/Constants.vala: Modified. -2008-10-13 Sebastian Pölsterl + Added D-Bus service for ChannelList class. Made ChannelList thread- + safe. Changes untested. - * src/Scanner.vala: [291] Fixed memory leak +2008-07-01 Sebastian Pölsterl - * src/Scanner.vala: [290] Wait 5 seconds for SDT, NIT and PAT to - arrive, otherwise continue with next frequency + * client/gui.py: Added. -2008-10-11 Sebastian Pölsterl + Added UI client where you can add and delete timers for each + Recorder - * src/Scanner.vala: [289] Clean up lost of channels, too, when - destroyed. Make sure only one channel is scanned at a time +2008-07-01 Sebastian Pölsterl - * src/Scanner.vala: [288] Fixed bug when iterating over channels + * client/gnomedvb.py: Added. - * src/Scanner.vala: [287] Removed debug call + * client/dvb-client.py: Removed. - * src/ChannelListWriter.vala: [286] Don't divide symbol rate by 1000 + Renamed dvb-client.py to gnomedvb.py. Wrapped signals of D-Bus + interfaces. Added missing methods -2008-10-09 Sebastian Pölsterl +2008-07-01 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/wizard/pages/ChannelScanPage.py: [285] Display - progress while scanning + * src/Recorder.vala, + * src/RecordingsStore.vala, + * src/Main.vala: Modified. - * src/Manager.vala: [284] Fixed crash when scanner was requested for - already registered device + Fixed bug that duplicate timer/recording IDs are generated. Fixed + bug that active recording is stopped in the next cycle - * src/Scanner.vala: [283] Emit frequency scanned signal +2008-07-01 Sebastian Pölsterl -2008-10-07 Sebastian Pölsterl + * src/ChangeType.vala: Added. - * data/org.gnome.DVB.service.in: [282] Use correct binary name in - D-Bus .servive file + * src/IDBusRecorder.vala, + * Makefile.am, + * src/Recorder.vala, + * src/IDBusRecordingsStore.vala: Modified. - * client/gnomedvb/widgets/Makefile.am: [281] Fixed wrong installation - directory of python widgets + Removed timer_added signal and added changed signal to Recorder. + Extraced ChangeType enum from IDBusRecordingsStore -2008-10-03 Sebastian Pölsterl +2008-07-01 Sebastian Pölsterl - * client/gnome-dvb-schedule.py: [280] Display all events + * src/IDBusRecorder.vala, + * src/Recorder.vala: Modified. - * client/gnomedvb/DBusWrapper.py, - * src/EPGStore.vala, - * src/IDBusSchedule.vala, - * src/Schedule.vala: [279] Added GetAllEvents method to Schedule D-Bus - interface + Added GetChannelName method -2008-09-30 Sebastian Pölsterl +2008-06-30 Sebastian Pölsterl - * src/Recorder.vala: [278] Delete timer also for active recording + * src/IDBusRecorder.vala, + * src/Recorder.vala: Modified. - * client/gnome-dvb-schedule.py: [277] Double clicking event will - schedule recording + Added TimerAdded signal to Recorder's D-Bus interface - * client/gnomedvb/DBusWrapper.py, - * src/EPGStore.vala, - * src/IDBusRecorder.vala, - * src/Recorder.vala, - * src/Schedule.vala: [276] Added AddTimerForEPGEvent to Recorder D-Bus - interface - - * src/RecordingsStore.vala: [275] Monitor recordings for deletion - - * src/Device.vala, - * src/EPGScanner.vala, - * src/Recorder.vala, - * src/Scanner.vala, - * src/Schedule.vala: [274] Adjusted to Vala changes. Now compiles with - vala trunk +2008-06-30 Sebastian Pölsterl -2008-09-11 Sebastian Pölsterl + * client/dvb-client.py: Modified. - * src/EPGScanner.vala: [273] Time next EPG scan when all channels have - been scanned + Connect to RecordingsStore's Changed signal -2008-09-10 Sebastian Pölsterl +2008-06-28 Sebastian Pölsterl - * src/Schedule.vala: [272] Don't add events that are already expired + * src/GConfStore.vala: Added. - * src/Channel.vala, - * src/Schedule.vala: [271] Restore events from SQLite db correctly + * src/Manager.vala, + * src/Main.vala, + * configure.ac, + * Makefile.am, + * src/Recorder.vala, + * client/dvb-client.py: Modified. -2008-09-10 Sebastian Pölsterl + Added GConfStore class. Store devices and timers in GConf and + restore them on startup. Extended dvb-client.py script - * client/gnome-dvb-schedule.py: Added. +2008-06-28 Sebastian Pölsterl - [270] Added gnome-dvb-schedule program that displays schdule for each - channel + * src/ChannelList.vala, + * src/Manager.vala, + * src/ChannelListReader.vala: Modified. -2008-09-10 Sebastian Pölsterl + Added restore_from_file method to ChannelList class - * vapi/cutils.vapi: Added. +2008-06-28 Sebastian Pölsterl - * Makefile.am, - * configure.ac, - * src/Event.vala, - * src/Schedule.vala: Modified. - - [269] Added is_running method to Event that compares start and end - time with current time instead of RUNNING_STATUS. Got - get_local_start_time right. Wrapped timegm function. + * src/RecordingsStore.vala: Modified. -2008-08-28 Sebastian Pölsterl + Fixed typo - * src/Recorder.vala: [268] Add queue element between dvbbasebin and - each filesink to get multiple recordings on same TS working. +2008-06-26 Sebastian Pölsterl -2008-08-27 Sebastian Pölsterl + * src/Schedule.vala: Modified. - * src/GConfStore.vala: [267] Made checking for correct values more - strict when restoring event. + Use get_iter_at_pos to iterate over events sequence - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala: [266] Added --disable-epg-scanner option which - will turn of that EPG is scanned. Adjusted Recorder and Manager that - they can deal with epgscanner being null. +2008-06-25 Sebastian Pölsterl -2008-08-24 Sebastian Pölsterl + * src/Recorder.vala, + * src/Timer.vala: Modified. - * src/Schedule.vala: [265] Fixed bug in Next and GetLocalStartTime. - However, the latter still returns wrong time. + Constructor of Timer expects channel's sid instead of Channel + instance - * client/gnomedvb/widgets/ChannelsView.py: [264] Work around pygtk bug - when model is None +2008-06-24 Sebastian Pölsterl - * client/gnomedvb/preferences/ui/Preferences.py: [263] Marked title as - translateable + * src/Schedule.vala: Modified. - * client/gnomedvb/preferences/ui/Preferences.py: [262] Show error - message when something went wrong when adding devices or creating - groups + Only insert event if we don't have one with the same id already - * client/gnomedvb/timers/ui/RecorderWindow.py: [261] Show error - message when something went wrong when adding or deleting timer +2008-06-24 Sebastian Pölsterl - * client/gnomedvb/wizard/SetupWizard.py: [260] Set window title of - assistant + * src/Schedule.vala: Added. -2008-08-24 Sebastian Pölsterl + * src/Channel.vala, + * Makefile.am, + * src/EPGScanner.vala: Modified. - * client/gnomedvb/widgets/ChannelsStore.py, - * client/gnomedvb/widgets/ChannelsView.py: Added. + Added Schedule class that store a list of Events for each channel - * client/gnomedvb/timers/ui/TimerDialog.py, - * client/gnomedvb/widgets/Makefile.am, - * po/POTFILES.in: Modified. +2008-06-24 Sebastian Pölsterl - [259] Moved widget to display a list of channels to widgets module + * src/Event.vala: Modified. -2008-08-24 Sebastian Pölsterl + Added equal method - * client/gnomedvb/widgets: Added. +2008-06-24 Sebastian Pölsterl - * client/gnomedvb/preferences/model: Removed. + * src/EPGScanner.vala: Modified. - * client/gnome-dvb-preferences.py, - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/Makefile.am, - * client/gnomedvb/preferences/Makefile.am, - * client/gnomedvb/preferences/ui/DeviceGroupsView.py, - * client/gnomedvb/preferences/ui/Preferences.py, - * client/gnomedvb/wizard/pages/AdaptersPage.py, - * configure.ac: Modified. - - * client/gnomedvb/preferences/model/DVBModel.py: Renamed to - client/gnomedvb/widgets/DVBModel.py. - * client/gnomedvb/preferences/model/Device.py: Renamed to - client/gnomedvb/widgets/Device.py. - * client/gnomedvb/preferences/model/Makefile.am: Renamed to - client/gnomedvb/widgets/Makefile.am. - * client/gnomedvb/preferences/model/__init__.py: Renamed to - client/gnomedvb/widgets/__init__.py. + Fixed typo - [258] Moved preferences.model to new widgets module +2008-06-23 Sebastian Pölsterl -2008-08-21 Sebastian Pölsterl + * src/IDBusRecordingsStore.vala, + * src/RecordingsStore.vala: Modified. - * src/Manager.vala: [257] Print debug message when trying to register - already registered device. Stop EPGScanner when device is removed from - group and start it again if the group has devices remaining, otherwise - drop EPGScanner. + Added GetStartTimestamp to RecordingsStore - * src/DeviceGroup.vala: [256] Print warning if device couldn't be - added. +2008-06-23 Sebastian Pölsterl - * src/Device.vala: [255] Only retrieve type AND name if requested. + * src/Main.vala, + * src/Constants.vala, + * client/dvb-client.py: Modified. - * src/Main.vala, - * src/Manager.vala: [254] Create EPG scanner in - Manager.add_device_group instead of Main. That way when a new group is - added while running the EPG scanner is started, too. + Start RecordingsStore service at startup. Added example to dvb- + client.py, too - * client/gnomedvb/wizard/pages/AdaptersPage.py: [253] Retrieve name - and type of all devices correctly. +2008-06-23 Sebastian Pölsterl - * client/gnomedvb/preferences/model/DVBModel.py: [252] Fixed crash - when retrieving unregistered devices + * src/Satellite/SatelliteScanner.vala, + * src/IDBusRecorder.vala, + * src/Main.vala, + * src/IDBusRecordingsStore.vala, + * src/Manager.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala, + * client/dvb-client.py: Modified. - * src/EPGStore.vala: [251] Fixed bug that running_status was - overridden by extended description. + Export all Scanners, Manager, Recorder and RecordingsStore + correctly over D-Bus - * src/Main.vala, - * src/Schedule.vala: [250] Add stored events in constructor of - Schedule to the Schedule. +2008-06-22 Sebastian Pölsterl - * src/Event.vala, - * src/Utils.vala: [249] When figuring out if an event has expired - compare the end time to the current UTC time. + * src/Scanner.vala: Modified. -2008-08-20 Sebastian Pölsterl + Don't export properties and signals with Objects over D-Bus - * src/EPGStore.vala: [248] Fixed bug that event weren't deleted. Check - for DONE return code in get_event, too. +2008-06-22 Sebastian Pölsterl - * src/EPGScanner.vala, - * src/EPGStore.vala, - * src/Event.vala, - * src/Recorder.vala, - * src/Schedule.vala: [247] Only store start time and id of event in - memory and retrieve rest from sqlite db. + * src/Scanner.vala, + * src/Manager.vala, + * src/Main.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * client/dvb-client.py: Modified. - * src/EPGStore.vala: [246] Store starttime in julian time format. Use - prepared statements for queries. + Start Scanner without the need of Manager. Extended sample client -2008-08-18 Sebastian Pölsterl +2008-06-22 Sebastian Pölsterl - * src/EPGStore.vala: Added. + * src/ChannelListWriter.vala: Modified. - * Makefile.am, - * configure.ac, - * src/Channel.vala, - * src/Main.vala, - * src/Schedule.vala: Modified. - - [245] Added EPGStore class that stores EPG data in a sqlite database. - However, events are still stored in memory, too. This has to change in - the future. Schedule class expects Channel paramater in the - constructor. + Open stream in write method and not in construct, to avoid + unchecked error -2008-08-14 Sebastian Pölsterl +2008-06-22 Sebastian Pölsterl - * src/Main.vala: [244] Removed obsolete code that previously was for - testing purposes + * src/Scanner.vala: Modified. - * src/EPGScanner.vala, - * src/Recorder.vala: [243] Fixed bug that prevented two simultanious - recordings on different TS. - - * client/gnomedvb/timers/ui/RecorderWindow.py: [242] Fixed bug that - only active timers could be deleted - - * client/gnomedvb/wizard/SetupWizard.py, - * client/gnomedvb/wizard/pages/AdaptersPage.py, - * client/gnomedvb/wizard/pages/BasePage.py, - * client/gnomedvb/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/wizard/pages/IntroPage.py, - * client/gnomedvb/wizard/pages/SaveChannelListPage.py, - * client/gnomedvb/wizard/pages/SummaryPage.py: [241] Refactored - wizard. Show error message when no devices where detected or when - unsupported device type has been chosen. - - * src/Manager.vala: [240] Stop epgscanner when channel scanner is - request. Start epgscanner again when channel scanner got disposed. - - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/preferences/model/DVBModel.py, - * client/gnomedvb/preferences/ui/Preferences.py: [239] Only use - get_adapter_info for unregistered devices. For registered devices use - GetNameOfRegisteredDevice and GetTypeOfDeviceGroup. - - * src/Device.vala, - * src/Manager.vala: [238] Added GetNameOfRegisteredDevice method to - Manager. Added Name property to Device. - - * src/EPGScanner.vala, - * src/Recorder.vala: [237] Stop EPGScanner before recording starts. - Start it again when recording ended. Collect EPG inside - RecordingThread when recording is active. - - * src/Schedule.vala: [236] Made Schedule thread-safe - - * src/Main.vala, - * src/Manager.vala: [235] Added get_epg_scanner method to Manager. - Made Manager a singleton. Use new get_instance method in Main. + Warn with critical if writing channels.conf failed -2008-08-10 Sebastian Pölsterl +2008-06-22 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py, - * src/Event.vala, - * src/Schedule.vala: [234] Added get_local_start_time method to Event. - Implemented GetLocalStartTime in Schedule. + * src/Scanner.vala: Modified. - * src/Event.vala: [233] Removed debug call + Added WriteChannelsToFile method -2008-08-09 Sebastian +2008-06-22 Sebastian Pölsterl - * client/gnomedvb/timers/ui/TimerDialog.py: [232] Put list of channels - in a treeview instead of combobox + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. - * client/gnomedvb/DBusWrapper.py: [231] Removed print statements + Convert values of structure correctly to scan and store parameters + in Channel class correctly - * client/gnomedvb/timers/ui/RecorderWindow.py: [230] Adjust view to - recording-(started|finished) and changed signals of Recorder. Ask for - confirmation when aborting active recording. Show record image in - front of item when the timer belongs to an active recording. +2008-06-22 Sebastian Pölsterl - * src/Recorder.vala: [229] Delete timer when recording is aborted from - the user calling DeleteTimer + * src/MpegTsEnums.vala, + * src/Terrestrial/TerrestrialScanner.vala: Modified. - * src/Recorder.vala: [228] Store active timers in this.timers. - this.active_timers is a now a set of ids for each active timer. + Moved get_*_val functions to MpegTsEnums file - * src/Recorder.vala: [227] Emit changed signal when timer of active - recording is deleted +2008-06-22 Sebastian Pölsterl - * client/gnomedvb/timers/ui/RecorderWindow.py: [226] Improved UI + * src/Channel.vala: Modified. - * client/gnomedvb/DBusWrapper.py: [225] Renamed DVBSchedule to - DVBScheduleClient to be consistent + Uncommented insert_sorted callm, because bug has been fixed in Vala - * src/EPGScanner.vala, - * src/Schedule.vala: [224] Replace old events with new one +2008-06-20 Sebastian Pölsterl - * client/gnomedvb/DBusWrapper.py, - * src/Constants.vala, - * src/Manager.vala: [223] Added GetSchedule method to Manager + * src/ScannedItem.vala, + * src/Recording.vala: Modified. -2008-08-09 Sebastian + Added some API doc - * Makefile.am, - * src/Schedule.vala: Modified. +2008-06-20 Sebastian Pölsterl - * src/EPGStore.vala: Renamed to src/IDBusSchedule.vala and modified. + * src/Event.vala, + * src/EPGScanner.vala: Modified. - [222] Schedule implements IDBusSchedule now. + Get epg data for each sequence. Retrieve and save components. + Events are associated with their channel and are stored stored + according to their starting time -2008-08-09 Sebastian +2008-06-20 Sebastian Pölsterl - * src/Main.vala, - * src/Manager.vala: [221] Create EPGScanner for each device group + * Makefile.am: Modified. - * src/EPGScanner.vala, - * src/Event.vala, - * src/Recorder.vala, - * src/Schedule.vala: [220] Store free-ca-mode and extended-text for - each event. Added method to Schedule that retuns currently running - event. + Removed subclasses of Recorder - * src/Recorder.vala: [219] Collect name and description of recording - from EIT. However, we might not see the currently running event. +2008-06-20 Sebastian Pölsterl -2008-08-08 Sebastian Pölsterl + * src/Scanner.vala: Modified. - * src/EPGScanner.vala, - * src/Event.vala, - * src/Schedule.vala: [218] Remove expired events + Did some cleanup - * src/Utils.vala: [217] Added create_utc_time method to create a - timestamp from UTC time instead of locale time how create_time does. +2008-06-20 Sebastian Pölsterl -2008-08-07 Sebastian Pölsterl + * src/Satellite/SatelliteRecorder.vala, + * src/Terrestrial/TerrestrialRecorder.vala, + * src/Cable/CableRecorder.vala: Removed. + + * src/Channel.vala, + * src/Main.vala, + * src/Manager.vala, + * src/Cable/CableChannel.vala, + * src/Recorder.vala, + * src/Satellite/SatelliteChannel.vala, + * src/Terrestrial/TerrestrialChannel.vala: Modified. - * client/gnomedvb/wizard/SetupWizard.py, - * client/gnomedvb/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/wizard/pages/SaveChannelListPage.py: [216] Added - option to do a brute force scan for DVB-T + Moved tuning of channels to Channel class. This makes the Recorder + subclasses obsolete. -2008-08-04 Sebastian Pölsterl +2008-06-20 Sebastian Pölsterl - * client/Makefile.am: Modified. + * src/Event.vala: Modified. - * client/dvb-preferences.py: Renamed to client/gnome-dvb- - preferences.py. + Added has_expired, compare and get_end_timestamp methods to Event - [215] Renamed dvb-preferences.py to gnome-dvb-preferences.py +2008-06-20 Sebastian Pölsterl -2008-08-04 Sebastian Pölsterl + * src/Utils.vala: Modified. - * client/dvb-preferences.py, - * client/gnome-dvb-setup.py, - * client/gnome-dvb-timers.py, - * client/gnomedvb/__init__.py: [214] Moved init of i18n to gnomedvb - module + create_time accepts optional second argument -2008-08-04 Sebastian Pölsterl +2008-06-20 Sebastian Pölsterl - * client/gnome-dvb-setup.py, - * client/gnomedvb/wizard, - * client/gnomedvb/wizard/Makefile.am, - * client/gnomedvb/wizard/SetupWizard.py, - * client/gnomedvb/wizard/__init__.py, - * client/gnomedvb/wizard/pages, - * client/gnomedvb/wizard/pages/AdaptersPage.py, - * client/gnomedvb/wizard/pages/BasePage.py, - * client/gnomedvb/wizard/pages/ChannelScanPage.py, - * client/gnomedvb/wizard/pages/InitialTuningDataPage.py, - * client/gnomedvb/wizard/pages/IntroPage.py, - * client/gnomedvb/wizard/pages/Makefile.am, - * client/gnomedvb/wizard/pages/SaveChannelListPage.py, - * client/gnomedvb/wizard/pages/SummaryPage.py, - * client/gnomedvb/wizard/pages/__init__.py: Added. - - * client/wizard.py: Removed. - - * client/Makefile.am, - * client/gnomedvb/Makefile.am, - * configure.ac, - * po/POTFILES.in: Modified. + * src/Timer.vala: Modified. - [213] Split wizard in separate files and marked string translateable + Added TODO -2008-08-04 Sebastian Pölsterl +2008-06-19 Sebastian Pölsterl - * client/gnomedvb/timers/ui/Makefile.am: [212] Fixed path in Makefile + * src/Scanner.vala, + * src/Event.vala, + * src/EPGScanner.vala, + * src/Main.vala: Modified. -2008-08-04 Sebastian Pölsterl + Added to_string to Event. Store EPG data in event class. Scan + frequency of each channel. - * client/gnome-dvb-timers.py, - * client/gnomedvb/timers, - * client/gnomedvb/timers/Makefile.am, - * client/gnomedvb/timers/__init__.py, - * client/gnomedvb/timers/ui, - * client/gnomedvb/timers/ui/CalendarDialog.py, - * client/gnomedvb/timers/ui/Makefile.am, - * client/gnomedvb/timers/ui/RecorderWindow.py, - * client/gnomedvb/timers/ui/TimerDialog.py, - * client/gnomedvb/timers/ui/__init__.py: Added. - - * client/gui.py: Removed. - - * client/Makefile.am, - * client/gnomedvb/Makefile.am, - * configure.ac, - * po/POTFILES.in: Modified. +2008-06-19 Sebastian Pölsterl - [211] Split UI to configure timers in separate files and marked - strings translateable. + * src/Terrestrial/TerrestrialScanner.vala: Modified. -2008-08-04 Sebastian Pölsterl + Set inversion to auto, because it isn't transferred in nit - * client/gnomedvb/defs.py.in: Added. +2008-06-19 Sebastian Pölsterl - * .bzrignore, - * client/dvb-preferences.py, - * client/gnomedvb/Makefile.am, - * client/gnomedvb/preferences/ui/DeviceGroupsView.py, - * client/gnomedvb/preferences/ui/Dialogs.py, - * client/gnomedvb/preferences/ui/Preferences.py, - * configure.ac, - * po/POTFILES.in: Modified. + * src/Recorder.vala, + * src/Satellite/SatelliteRecorder.vala, + * src/Cable/CableRecorder.vala, + * src/Terrestrial/TerrestrialRecorder.vala: Modified. + + get_dvbbasebin doesn't return Element anymore because that causes + reference problems. It sets Recorder's dvbbasebin attribute + instead. - [210] Marked strings as translateable +2008-06-18 Sebastian Pölsterl -2008-08-02 Sebastian Pölsterl + * src/Scanner.vala: Modified. - * m4, - * m4/python.m4: Added. + Save and set transport stream data for each new channel. Emit + channel_added signal when we received sdt,nit and pat. Cleanup + temporary data on Abort and when scan has finished - * .bzrignore, - * Makefile.am, - * autogen.sh, - * configure.ac: Modified. +2008-06-18 Sebastian Pölsterl - [209] Renamed binary and package to gnome-dvb-daemon + * src/Terrestrial/TerrestrialScanner.vala, + * src/Main.vala: Modified. -2008-08-02 Sebastian Pölsterl + Changed signature of AddScanningData - * configure.ac: [208] Check for gconf, Python 2.5 and required python - modules +2008-06-18 Sebastian Pölsterl -2008-08-01 Sebastian Pölsterl + * src/Terrestrial/TerrestrialRecorder.vala, + * src/Terrestrial/TerrestrialScanner.vala: Modified. - * client/dvb-preferences.py, - * client/gnomedvb, - * client/gnomedvb/DBusWrapper.py, - * client/gnomedvb/Makefile.am, - * client/gnomedvb/__init__.py, - * client/gnomedvb/preferences, - * client/gnomedvb/preferences/Makefile.am, - * client/gnomedvb/preferences/__init__.py, - * client/gnomedvb/preferences/model, - * client/gnomedvb/preferences/model/DVBModel.py, - * client/gnomedvb/preferences/model/Device.py, - * client/gnomedvb/preferences/model/Makefile.am, - * client/gnomedvb/preferences/model/__init__.py, - * client/gnomedvb/preferences/ui, - * client/gnomedvb/preferences/ui/DeviceGroupsView.py, - * client/gnomedvb/preferences/ui/Dialogs.py, - * client/gnomedvb/preferences/ui/Frame.py, - * client/gnomedvb/preferences/ui/Makefile.am, - * client/gnomedvb/preferences/ui/Preferences.py, - * client/gnomedvb/preferences/ui/__init__.py: Added. - - * client/gnomedvb.py, - * client/preferences.py: Removed. - - * .bzrignore, - * client/Makefile.am, - * configure.ac: Modified. - - [207] Refactored preferences. But everything in the gnomedvb model. - Splitted classes into seperate files. Install dvb-preferences.py into - bindir. + Set inversion property in recorder. Still need to find a way to + retrieve it in the scanner -2008-08-01 Sebastian Pölsterl +2008-06-18 Sebastian Pölsterl - * client/preferences.py: [206] Added buttons to toolbar. Ask for - confirmation when removing device from group + * src/Recorder.vala: Modified. - * client/preferences.py: [205] Mark button (in)sensitive correctly + Removed signals that are already in the interface -2008-07-31 Sebastian Pölsterl +2008-06-17 Sebastian Pölsterl - * client/wizard.py: [204] Added support for DVB-C + * src/IDBusRecorder.vala, + * src/IDBusRecordingsStore.vala: Added. -2008-07-28 Sebastian Pölsterl + * src/RecordingsStore.vala, + * Makefile.am, + * src/Recorder.vala: Modified. + + Added IDBusRecorder and IDBusRecordingsStore interfaces that + include the methods and signals what will be exported over D-Bus. + RecordingsStore has new signal changed that gets emitted when a + recording has been added or deleted - * client/preferences.py: [203] Improved the UI a little bit +2008-06-16 Sebastian Pölsterl - * client/preferences.py: [202] When adding device to existing group - only show those groups that are of the same type. + * src/Event.vala, + * src/EPGScanner.vala: Added. - * client/gnomedvb.py, - * src/Manager.vala: [201] Added GetTypeOfDeviceGroup method + * Makefile.am: Modified. - * client/gnomedvb.py, - * client/preferences.py, - * src/Manager.vala: [200] Removed DeleteDeviceGroup method from - Manager. A group will be deleted automatically when it contains no - devices anymore. + Added EPGScanner and Event class -2008-07-27 Sebastian Pölsterl +2008-06-16 Sebastian Pölsterl - * client/preferences.py: [199] Change UI when group has been added or - removed + * src/Scanner.vala: Modified. - * client/preferences.py: [198] Change UI when device has been added to - or removed from group. Delete group automatically when last device has - been removed. + Retrieve and store audio and video pid - * src/Manager.vala: [197] DeleteDeviceGroup returns true on success. +2008-06-16 Sebastian Pölsterl -2008-07-26 Sebastian + * src/Recorder.vala, + * src/Satellite/SatelliteRecorder.vala, + * src/Cable/CableRecorder.vala, + * src/Terrestrial/TerrestrialRecorder.vala, + * src/Scanner.vala: Modified. - * client/preferences.py: [196] Added: Assign unregistered device to - existing group. + Adjust to changes in vala API - * src/Manager.vala: [195] AddDeviceToExistingGroup returns false when - device has wrong type. +2008-06-15 Sebastian Pölsterl - * client/wizard.py: [194] Added UI for DVB-S scan. + * src/ScannedItem.vala, + * src/Scanner.vala: Modified. - * client/gnomedvb.py, - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [193] Added GetQueueSize - method. Removed queue_size property. + Implemented hash function for ScannedItem. Emit channel_added + signal after parsing sdt structure. Add frequency at the beginning + to scanned_frequencies. We still don't save the transport stream + structure and don't have video and audio pids - * src/Satellite/SatelliteScanner.vala: [192] Parse symbol rate andy - polarization correctly. +2008-06-15 Sebastian Pölsterl -2008-07-25 Sebastian Pölsterl + * src/Scanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Main.vala: Modified. - * client/preferences.py: [191] Added possibility to remove device from - group and to create a new group. However, the change is only visible - after restart. - - * src/GConfStore.vala, - * src/Manager.vala: [190] When device is removed from a group or a - group is deleted mage changes to GConf, too. - - * client/gnomedvb.py: [189] Forgot to make DVBManagerClient a GObject - - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [188] Implemented - AddScanningDataFromFile for Satellite and Cable scanner. - - * client/wizard.py: [187] Added page to select initial tuning data. - Currently only working for DVB-T. - - * client/gnomedvb.py, - * src/Terrestrial/TerrestrialScanner.vala: [186] Added - AddScanningDataFromFile method to TerrestrialScanner. Will be added - for other scanners, too. + Convert values as we get them on the message bus for dvbsrc -2008-07-24 Sebastian Pölsterl +2008-06-15 Sebastian - * client/gnomedvb.py, - * src/Manager.vala: [185] Added changed and group_changed signals to - Manager - - * client/preferences.py: [184] Registered and unregistered devices are - displayed. There's still no functionality. - - * client/gnomedvb.py, - * client/wizard.py: [183] Added get_dvb_devices method. It retrieces - name, type, adapter and frontend for all devices on the system through - HAL. + * src/Satellite/SatelliteScanner.vala: Modified. -2008-07-24 Sebastian Pölsterl + Tune to correct polarization - * client/preferences.py: Added. +2008-06-15 Sebastian - [182] Started work on a preferences dialog to manage devices and - groups + * src/ChannelListWriter.vala: Modified. -2008-07-24 Sebastian Pölsterl + Cast to correct values - * client/gnomedvb.py, - * src/Constants.vala, - * src/Manager.vala: [181] Added GetDeviceGroupMembers method. Fixed - small bug in python wrapper. - - * client/wizard.py: [180] Added treeview for tv channels and radio - channels. Destroy scanner on exit. - - * client/gnomedvb.py, - * src/Cable/CableScanner.vala, - * src/Manager.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [179] Renamed Scanner.Abort - to Destroy. Added destroyes signal. Destroy scanner in Manager when - destroyed singal is emitted. Fixed bug that caused segfault when - Destroy is called. +2008-06-15 Sebastian - * src/Manager.vala: [178] Fixed bug that caused daemon to crash when - an already running Scanner is created again + * src/ChannelListReader.vala: Modified. -2008-07-23 Sebastian Pölsterl + Cast to correct values - * client/wizard.py: [177] Do actual scanning on selected device. Added - page that asks the user for a location to store the channel list at. - Still have to provide proper initial data for scanning. - - * client/gnomedvb.py: [176] Wrapped channel_added and - frequency_scanned signals - - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [175] Changed signature of - channel_added signal. Export it over D-Bus. Added queue_size property. - - * client/gnomedvb.py, - * client/wizard.py: [174] Renamed get_adapter_type to - get_adapter_info. It returns a dictionary with keys 'type' and 'name' - now +2008-06-15 Sebastian -2008-07-21 Sebastian + * src/Satellite/SatelliteChannel.vala: Modified. - * client/wizard.py: [173] Added check if adapter type is supported + Made DiseqSource to int -2008-07-20 Sebastian +2008-06-14 Sebastian - * client/gui.py: [172] Adjusted to changes in gnomedvb. Order - channellist alphabetically + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Main.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. + + Added abstract method add_values_from_structure_to_channel to + Scanner and implemented it for satellite and terrestrial scanner. + Emit channel added signal when we received sdt, eit and nit. Added + Abort method. Check for errors on message bus and abort if + neccessary - * client/gnomedvb.py: [171] Fixed typo +2008-06-14 Sebastian -2008-07-20 Sebastian + * src/Terrestrial/TerrestrialRecorder.vala, + * src/Terrestrial/TerrestrialChannel.vala, + * src/ChannelListWriter.vala, + * src/ChannelListReader.vala: Modified. - * client/wizard.py: Added. + Fixed typo - [170] Added wizard.py. This is going to guide the user through the - setup process of her DVB cards +2008-06-14 Sebastian -2008-07-20 Sebastian + * src/ChannelListReader.vala: Modified. - * client/gnomedvb.py: [169] Added get_adapter_type method + Use correct value for symbol rate -2008-07-19 Sebastian +2008-06-14 Sebastian - * client/gnomedvb.py: [168] DVBChannelListClient and DVBRecorderClient - expect group_id in constructur instead of object path + * src/Timer.vala, + * src/Scanner.vala, + * src/RecordingsStore.vala, + * src/Terrestrial/TerrestrialChannel.vala, + * src/Main.vala, + * src/Manager.vala, + * src/Recording.vala, + * src/Cable/CableChannel.vala, + * src/Recorder.vala, + * src/Satellite/SatelliteChannel.vala, + * src/ChannelListWriter.vala: Modified. -2008-07-19 Sebastian + Adjusted printf statements - * client/Makefile.am: Added. +2008-06-12 Sebastian Pölsterl - * Makefile.am, - * acinclude.m4, - * configure.ac: Modified. + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. - [167] Install gnomedvb.py into Python's site-packages dir + Continued work on Scanner, nothing working, yet -2008-07-19 Sebastian +2008-06-12 Sebastian Pölsterl - * client/rhythmbox-plugin, - * client/rhythmbox-plugin/Makefile.am, - * client/rhythmbox-plugin/dvb-rhythm.py, - * client/rhythmbox-plugin/dvb-rhythm.rb-plugin.in: Added. + * Makefile.am, + * src/EPGStore.vala: Modified. - [166] Added Rhythmbox radio plugin + Added stubs to EPGStore -2008-07-19 Sebastian +2008-06-12 Sebastian Pölsterl - * client/gnomedvb.py, - * src/ChannelList.vala, - * src/IDBusChannelList.vala: [165] Added Get(Radio|TV)Channels and - IsRadioChannel methods to ChannelList interface + * src/Recorder.vala: Modified. -2008-07-17 Sebastian Pölsterl + Adjusted return types - * src/Recorder.vala: [164] Refactored RecordingThread and Recorder to - get recording of multiple channels in the same transport stream right. - Unfortunately, this doesn't work, yet. Problem is under investigation. +2008-06-12 Sebastian Pölsterl - * src/Manager.vala: [163] Better debug output + * src/ScannedItem.vala: Modified. -2008-07-16 Sebastian Pölsterl + equal expects ScannedItem* as parameter - * src/Manager.vala: [162] Check if device is already part of another - group when calling AddDeviceToExistingGroup or AddDeviceToNewGroup +2008-06-12 Sebastian Pölsterl - * client/gnomedvb.py, - * src/IDBusRecorder.vala, - * src/Recorder.vala: [161] RecordingThread class that does the actual - recording now. This makes simultaneously recordings possible (tested). - Changed GetActiveTimer method to GetActiveTimers, because each - recorder can have more than one active recording now. - - * src/GConfStore.vala, - * src/Manager.vala: [160] Added additional debug messages. Save device - to GConf when added to group - - * client/gnomedvb.py, - * src/Manager.vala: [159] Remove channels_conf and recordings_dir - parameter from AddDeviceToExistingGroup because they are overwritten - anyway + * src/RecordingsStore.vala: Modified. -2008-07-15 Sebastian Pölsterl + When directory to restore from doesn't exist just print debug + message - * src/Schedule.vala: [158] Use weak SequenceIter. That way it works - with patched glib vapi +2008-06-12 Sebastian Pölsterl - * src/EPGScanner.vala: [157] Use DeviceGroup instead of Device + * src/Recorder.vala, + * src/Main.vala: Modified. - * client/gnomedvb.py: [156] Added wrapper for RemoveDeviceFromGroup - and DeleteDeviceGroup methods + Restore timers when constructing Recorder class - * src/Manager.vala: [155] Added RemoveDeviceFromGroup and - DeleteDeviceGroup methods +2008-06-12 Sebastian Pölsterl - * src/Device.vala: [154] Added optional parameter get_type to - constructur of Device class. When get_type is true the adapter's type - is retrieved, otherwise it remains unknown. + * src/Recorder.vala, + * src/RecordingsStore.vala, + * src/Manager.vala: Modified. - * src/Manager.vala: [153] Updated API doc + Don't use nullable types in methods that will be exported over + D-Bus -2008-07-13 Sebastian Pölsterl +2008-06-09 Sebastian Pölsterl - * vapi, - * vapi/config.vapi: Added. + * src/RecordingsStore.vala: Modified. - * Makefile.am, - * src/Main.vala: Modified. + Made restore_from_dir thread-safe - [152] Addec config.vapi to access config.h. Print version and package - name when --version option is provided +2008-06-09 Sebastian Pölsterl -2008-07-12 Sebastian Pölsterl + * src/RecordingsStore.vala: Modified. - * src/Main.vala: [151] Added -d/--debug command line option though it - currently does nothing + Made RecordingsStore thread-safe except for get_instance - * Makefile.am: [150] Added --thread to valac call +2008-06-09 Sebastian Pölsterl - * src/Recorder.vala: [149] Checking for conflicting timers takes into - account how much devices belong to the DeviceGroup + * src/Recorder.vala, + * src/RecordingsStore.vala, + * src/Utils.vala, + * src/Recording.vala: Modified. - * src/DeviceGroup.vala: [148] Store Devices in a Set - - * client/gnomedvb.py, - * client/gui.py, - * src/Constants.vala, - * src/DeviceGroup.vala, - * src/GConfStore.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala: [147] Each Device must be part of a DeviceGroup - now. All devices in a DeviceGroup must be of same type and share one - channels.conf and recordings dir. The goal is that Timers are - automatically assigned to a Device for recording. However, this is not - implemented, yet. + Recordings.Location is of type File. Added Delete method to + RecordingsStore - * client/gui.py: [146] Make list of channels available in GUI +2008-06-09 Sebastian Pölsterl -2008-07-07 Sebastian Pölsterl + * src/Constants.vala: Modified. - * src/Device.vala, - * src/Recorder.vala: [145] Added is_busy method to Device class. Did - some cleanup in Recorder + Added D-Bus path for recorders - * src/Recorder.vala: [144] Removed obsolete DBus attribute +2008-06-08 Sebastian Pölsterl - * src/Main.vala: [143] Remove dead timers from GConf + * src/RecordingsStore.vala, + * src/Main.vala: Modified. -2008-07-07 Sebastian Pölsterl + Restore last used id correctly - * src/DeviceGroup.vala: Added. +2008-06-08 Sebastian Pölsterl - * Makefile.am: Modified. + * src/Recorder.vala: Modified. - [142] Added DeviceGroup class. Currently unused + Abort recording on dvb-read-failure -2008-07-07 Sebastian Pölsterl +2008-06-08 Sebastian Pölsterl - * src/Device.vala, - * src/Manager.vala: [141] Added hash and equal methods to Device - class. Replaced generate_device_id with Device.hash in Manager - - * src/Main.vala, - * src/Manager.vala: [140] Exit when D-Bus name is already owned. Skip - device when error appears during restoring. Cleanup Main + * src/Recording.vala: Modified. -2008-07-06 Sebastian Pölsterl + Restore start time correctly - * client/gnomedvb.py: [139] Wrap ChannelList D-Bus interface +2008-06-08 Sebastian Pölsterl - * src/ChannelListReader.vala: [138] Check if channel names are - properly utf-8 encoded and warn if they aren't + * src/Recorder.vala, + * src/RecordingsStore.vala, + * src/Recording.vala, + * src/Timer.vala, + * src/Main.vala: Modified. - * src/Recorder.vala: [137] Fixed possible dead lock + RecordingsStore generates IDs for recordings and timers of type + uint32 - * src/ChannelList.vala, - * src/IDBusChannelList.vala: [136] Removed GetChannelSid method, - because GetChannels already returns SIDs +2008-06-07 Sebastian Pölsterl - * src/Manager.vala: [135] Fixed bug that AdapterType was hard coded to - DVB-T + * src/Satellite/SatelliteRecorder.vala, + * src/Cable/CableRecorder.vala, + * src/Main.vala, + * src/Terrestrial/TerrestrialRecorder.vala, + * src/Manager.vala, + * src/Recorder.vala, + * src/Device.vala, + * src/ChannelListReader.vala: Modified. -2008-07-06 Sebastian Pölsterl + Directory where the recordings will be stored is stored in Device + class. Implemented registration of devices in Manager - * src/IDBusChannelList.vala: Added. +2008-06-06 Sebastian Pölsterl - * Makefile.am, - * src/ChannelList.vala, - * src/Constants.vala, - * src/Manager.vala: Modified. + * src/ChannelListReader.vala: Modified. - [134] Added D-Bus service for ChannelList class. Made ChannelList - thread-safe. Changes untested. + Make method static that don't access this -2008-07-01 Sebastian Pölsterl +2008-06-06 Sebastian Pölsterl - * client/gui.py: Added. + * src/Manager.vala: Modified. - [133] Added UI client where you can add and delete timers for each - Recorder + Added method stubs with API doc. The class can't be exported over + D-Bus anymore, because arrays are returned which aren't supported + by vala, yet -2008-07-01 Sebastian Pölsterl +2008-06-05 Sebastian Pölsterl - * client/dvb-client.py: Renamed to client/gnomedvb.py and modified. + * src/RecordingsStore.vala: Modified. - [132] Renamed dvb-client.py to gnomedvb.py. Wrapped signals of D-Bus - interfaces. Added missing methods + Added doc -2008-07-01 Sebastian Pölsterl +2008-06-05 Sebastian Pölsterl - * src/Main.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala: [131] Fixed bug that duplicate - timer/recording IDs are generated. Fixed bug that active recording is - stopped in the next cycle + * src/RecordingsStore.vala, + * src/Recording.vala: Modified. -2008-07-01 Sebastian Pölsterl + Completed restore_from_dir. - * src/ChangeType.vala: Added. +2008-06-05 Sebastian Pölsterl - * Makefile.am, - * src/IDBusRecorder.vala, - * src/IDBusRecordingsStore.vala, - * src/Recorder.vala: Modified. + * src/Utils.vala, + * src/ChannelListReader.vala: Modified. - [130] Removed timer_added signal and added changed signal to Recorder. - Extraced ChangeType enum from IDBusRecordingsStore + Added read_file_contents to Utils -2008-07-01 Sebastian Pölsterl +2008-06-05 Sebastian Pölsterl - * src/IDBusRecorder.vala, - * src/Recorder.vala: [129] Added GetChannelName method + * src/Recording.vala: Modified. -2008-06-30 Sebastian Pölsterl + Use get_child - * src/IDBusRecorder.vala, - * src/Recorder.vala: [128] Added TimerAdded signal to Recorder's D-Bus - interface +2008-06-05 Sebastian Pölsterl - * client/dvb-client.py: [127] Connect to RecordingsStore's Changed - signal + * src/Scanner.vala, + * src/Main.vala: Modified. -2008-06-28 Sebastian Pölsterl + Adjusted to API changes in vala - * src/GConfStore.vala: Added. +2008-06-05 Sebastian Pölsterl - * Makefile.am, - * client/dvb-client.py, - * configure.ac, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala: Modified. + * src/RecordingsStore.vala: Modified. - [126] Added GConfStore class. Store devices and timers in GConf and - restore them on startup. Extended dvb-client.py script + Started to implement restore_from_dir that checks for info.rec + files recursively in a directory and restores the Recordings -2008-06-28 Sebastian Pölsterl +2008-06-05 Sebastian Pölsterl - * src/ChannelList.vala, - * src/ChannelListReader.vala, - * src/Manager.vala: [125] Added restore_from_file method to - ChannelList class + * src/Recorder.vala, + * src/Recording.vala: Modified. - * src/RecordingsStore.vala: [124] Fixed typo + Save Recordings to disk and replaced error calls with critical -2008-06-26 Sebastian Pölsterl +2008-06-05 Sebastian Pölsterl - * src/Schedule.vala: [123] Use get_iter_at_pos to iterate over events - sequence + * src/Recorder.vala, + * src/Device.vala: Modified. -2008-06-25 Sebastian Pölsterl + Check for errors on the message bus - * src/Recorder.vala, - * src/Timer.vala: [122] Constructor of Timer expects channel's sid - instead of Channel instance +2008-06-04 Sebastian Pölsterl -2008-06-24 Sebastian Pölsterl + * src/Recording.vala, + * src/Timer.vala: Modified. - * src/Schedule.vala: [121] Only insert event if we don't have one with - the same id already + Implemented (de)serialize for Recording. Parse time with scanf. -2008-06-24 Sebastian Pölsterl +2008-06-04 Sebastian Pölsterl - * src/Schedule.vala: Added. + * src/RecordingsStore.vala: Modified. - * Makefile.am, - * src/Channel.vala, - * src/EPGScanner.vala: Modified. + Don't transfer membership for add method - [120] Added Schedule class that store a list of Events for each - channel +2008-06-04 Sebastian Pölsterl -2008-06-24 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * src/Event.vala: [119] Added equal method + Fixed concurrent modification issue in check_timer - * src/EPGScanner.vala: [118] Fixed typo +2008-06-04 Sebastian Pölsterl -2008-06-23 Sebastian Pölsterl + * src/Timer.vala: Modified. - * src/IDBusRecordingsStore.vala, - * src/RecordingsStore.vala: [117] Added GetStartTimestamp to - RecordingsStore - - * client/dvb-client.py, - * src/Constants.vala, - * src/Main.vala: [116] Start RecordingsStore service at startup. Added - example to dvb-client.py, too - - * client/dvb-client.py, - * src/Cable/CableScanner.vala, - * src/IDBusRecorder.vala, - * src/IDBusRecordingsStore.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [115] Export all Scanners, - Manager, Recorder and RecordingsStore correctly over D-Bus + Started implementing Timer.deserialize -2008-06-22 Sebastian Pölsterl +2008-06-04 Sebastian Pölsterl - * src/Scanner.vala: [114] Don't export properties and signals with - Objects over D-Bus + * src/RecordingsStore.vala: Modified. - * client/dvb-client.py, - * src/Main.vala, - * src/Manager.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [113] Start Scanner without - the need of Manager. Extended sample client - - * src/ChannelListWriter.vala: [112] Open stream in write method and - not in construct, to avoid unchecked error - - * src/Scanner.vala: [111] Warn with critical if writing channels.conf - failed - - * src/Scanner.vala: [110] Added WriteChannelsToFile method - - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [109] Convert values of - structure correctly to scan and store parameters in Channel class - correctly - - * src/MpegTsEnums.vala, - * src/Terrestrial/TerrestrialScanner.vala: [108] Moved get_*_val - functions to MpegTsEnums file + Implemented RecordingsStore - * src/Channel.vala: [107] Uncommented insert_sorted callm, because bug - has been fixed in Vala +2008-06-04 Sebastian Pölsterl -2008-06-20 Sebastian Pölsterl + * src/Recorder.vala, + * src/Recording.vala: Modified. - * src/Recording.vala, - * src/ScannedItem.vala: [106] Added some API doc + Recording is now a GLib.Object derived class - * src/EPGScanner.vala, - * src/Event.vala: [105] Get epg data for each sequence. Retrieve and - save components. Events are associated with their channel and are - stored stored according to their starting time +2008-06-01 Sebastian Pölsterl - * Makefile.am: [104] Removed subclasses of Recorder + * src/Utils.vala, + * src/Scanner.vala: Modified. - * src/Scanner.vala: [103] Did some cleanup + Removed reencode_string from Utils. Trying to get it into + mpegtsparse instead -2008-06-20 Sebastian Pölsterl +2008-05-31 Sebastian Pölsterl - * src/Cable/CableRecorder.vala, - * src/Satellite/SatelliteRecorder.vala, - * src/Terrestrial/TerrestrialRecorder.vala: Removed. - - * src/Cable/CableChannel.vala, - * src/Channel.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Satellite/SatelliteChannel.vala, - * src/Terrestrial/TerrestrialChannel.vala: Modified. + * src/Scanner.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableScanner.vala: Modified. - [102] Moved tuning of channels to Channel class. This makes the - Recorder subclasses obsolete. + Continued work on Scanner. Doesn't work, yet, but we're getting + there -2008-06-20 Sebastian Pölsterl +2008-05-31 Sebastian Pölsterl - * src/Event.vala: [101] Added has_expired, compare and - get_end_timestamp methods to Event + * src/Channel.vala, + * src/Satellite/SatelliteChannel.vala, + * src/Cable/CableChannel.vala, + * src/Terrestrial/TerrestrialChannel.vala: Modified. - * src/Utils.vala: [100] create_time accepts optional second argument + Made Channel abstract class with abstract method to_string - * src/Timer.vala: [99] Added TODO +2008-05-31 Sebastian Pölsterl -2008-06-19 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * src/EPGScanner.vala, - * src/Event.vala, - * src/Main.vala, - * src/Scanner.vala: [98] Added to_string to Event. Store EPG data in - event class. Scan frequency of each channel. - - * src/Terrestrial/TerrestrialScanner.vala: [97] Set inversion to auto, - because it isn't transferred in nit - - * src/Cable/CableRecorder.vala, - * src/Recorder.vala, - * src/Satellite/SatelliteRecorder.vala, - * src/Terrestrial/TerrestrialRecorder.vala: [96] get_dvbbasebin - doesn't return Element anymore because that causes reference problems. - It sets Recorder's dvbbasebin attribute instead. + Made Recorder thread-safe -2008-06-18 Sebastian Pölsterl +2008-05-31 Sebastian Pölsterl - * src/Scanner.vala: [95] Save and set transport stream data for each - new channel. Emit channel_added signal when we received sdt,nit and - pat. Cleanup temporary data on Abort and when scan has finished - - * src/Main.vala, - * src/Terrestrial/TerrestrialScanner.vala: [94] Changed signature of - AddScanningData - - * src/Terrestrial/TerrestrialRecorder.vala, - * src/Terrestrial/TerrestrialScanner.vala: [93] Set inversion property - in recorder. Still need to find a way to retrieve it in the scanner + * src/Recorder.vala, + * src/Utils.vala, + * src/Recording.vala, + * src/Timer.vala: Modified. - * src/Recorder.vala: [92] Removed signals that are already in the - interface + Calculate time of recording when stopping -2008-06-17 Sebastian Pölsterl +2008-05-31 Sebastian Pölsterl - * src/IDBusRecorder.vala, - * src/IDBusRecordingsStore.vala: Added. + * Makefile.am: Modified. - * Makefile.am, - * src/Recorder.vala, - * src/RecordingsStore.vala: Modified. - - [91] Added IDBusRecorder and IDBusRecordingsStore interfaces that - include the methods and signals what will be exported over D-Bus. - RecordingsStore has new signal changed that gets emitted when a - recording has been added or deleted + Added CableRecorder and SatteliteRecorder to Makefile -2008-06-16 Sebastian Pölsterl +2008-05-31 Sebastian Pölsterl - * src/EPGScanner.vala, - * src/Event.vala: Added. + * src/Recorder.vala, + * src/Satellite/SatelliteRecorder.vala, + * src/Device.vala, + * src/Cable/CableRecorder.vala, + * src/Terrestrial/TerrestrialRecorder.vala: Modified. - * Makefile.am: Modified. + Associate ChannelList with Device - [90] Added EPGScanner and Event class +2008-05-31 Sebastian Pölsterl -2008-06-16 Sebastian Pölsterl + * src/Recorder.vala, + * src/Utils.vala: Modified. - * src/Scanner.vala: [89] Retrieve and store audio and video pid + Remove non-alphanumeric characters from channel name when creating + directory - * src/Cable/CableRecorder.vala, - * src/Recorder.vala, - * src/Satellite/SatelliteRecorder.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialRecorder.vala: [88] Adjust to changes in - vala API +2008-05-31 Sebastian Pölsterl -2008-06-15 Sebastian Pölsterl + * src/Recorder.vala, + * src/Timer.vala: Modified. - * src/ScannedItem.vala, - * src/Scanner.vala: [87] Implemented hash function for ScannedItem. - Emit channel_added signal after parsing sdt structure. Add frequency - at the beginning to scanned_frequencies. We still don't save the - transport stream structure and don't have video and audio pids - - * src/Main.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [86] Convert values as we - get them on the message bus for dvbsrc + Removed Description property from Timer. Addded serialize method to + Timer. Emit recording_started in Recorder -2008-06-15 Sebastian +2008-05-31 Sebastian Pölsterl - * src/Satellite/SatelliteScanner.vala: [85] Tune to correct - polarization + * src/Scanner.vala: Modified. - * src/ChannelListWriter.vala: [84] Cast to correct values + One Vala bug fixed, came across the next one - * src/ChannelListReader.vala: [83] Cast to correct values +2008-05-31 Sebastian Pölsterl - * src/Satellite/SatelliteChannel.vala: [82] Made DiseqSource to int + * src/Scanner.vala: Modified. -2008-06-14 Sebastian + Started to continue working on the Scanner until I ran into another + unsupported feature in Vala - * src/Cable/CableScanner.vala, - * src/Main.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [81] Added abstract method - add_values_from_structure_to_channel to Scanner and implemented it for - satellite and terrestrial scanner. Emit channel added signal when we - received sdt, eit and nit. Added Abort method. Check for errors on - message bus and abort if neccessary - - * src/ChannelListReader.vala, - * src/ChannelListWriter.vala, - * src/Terrestrial/TerrestrialChannel.vala, - * src/Terrestrial/TerrestrialRecorder.vala: [80] Fixed typo - - * src/ChannelListReader.vala: [79] Use correct value for symbol rate - - * src/Cable/CableChannel.vala, - * src/ChannelListWriter.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Recording.vala, - * src/RecordingsStore.vala, - * src/Satellite/SatelliteChannel.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialChannel.vala, - * src/Timer.vala: [78] Adjusted printf statements +2008-05-30 Sebastian Pölsterl -2008-06-12 Sebastian Pölsterl + * src/Recorder.vala: Modified. - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [77] Continued work on - Scanner, nothing working, yet - - * Makefile.am, - * src/EPGStore.vala: [76] Added stubs to EPGStore - - * src/Recorder.vala: [75] Adjusted return types - - * src/ScannedItem.vala: [74] equal expects ScannedItem* as parameter - - * src/RecordingsStore.vala: [73] When directory to restore from - doesn't exist just print debug message - - * src/Main.vala, - * src/Recorder.vala: [72] Restore timers when constructing Recorder - class - - * src/Manager.vala, - * src/Recorder.vala, - * src/RecordingsStore.vala: [71] Don't use nullable types in methods - that will be exported over D-Bus + Check if timer conflicts when adding -2008-06-09 Sebastian Pölsterl +2008-05-30 Sebastian Pölsterl - * src/RecordingsStore.vala: [70] Made restore_from_dir thread-safe + * src/Recorder.vala, + * src/Timer.vala: Modified. - * src/RecordingsStore.vala: [69] Made RecordingsStore thread-safe - except for get_instance + Abort recording when deleting active timer. Implemented Timer's + conflicts_with method and Recorder's HasTimer method - * src/Recorder.vala, - * src/Recording.vala, - * src/RecordingsStore.vala, - * src/Utils.vala: [68] Recordings.Location is of type File. Added - Delete method to RecordingsStore +2008-05-30 Sebastian Pölsterl - * src/Constants.vala: [67] Added D-Bus path for recorders + * src/ChannelListWriter.vala, + * src/Constants.vala, + * src/ChannelListReader.vala: Modified. -2008-06-08 Sebastian Pölsterl + Adjusted code that it compiles with vala from svn - * src/Main.vala, - * src/RecordingsStore.vala: [66] Restore last used id correctly +2008-05-29 Sebastian Pölsterl - * src/Recorder.vala: [65] Abort recording on dvb-read-failure + * src/Recorder.vala, + * src/Satellite/SatelliteRecorder.vala, + * src/Utils.vala, + * src/Cable/CableRecorder.vala, + * src/Terrestrial/TerrestrialRecorder.vala: Modified. + + Create directory structure / for each + recording. Each recorder expects a base dir now where it stores the + recordings - * src/Recording.vala: [64] Restore start time correctly +2008-05-29 Sebastian Pölsterl - * src/Main.vala, - * src/Recorder.vala, - * src/Recording.vala, - * src/RecordingsStore.vala, - * src/Timer.vala: [63] RecordingsStore generates IDs for recordings - and timers of type uint32 + * src/Recorder.vala: Modified. -2008-06-07 Sebastian Pölsterl + Set adapter and frontend when recording - * src/Cable/CableRecorder.vala, - * src/ChannelListReader.vala, - * src/Device.vala, - * src/Main.vala, - * src/Manager.vala, - * src/Recorder.vala, - * src/Satellite/SatelliteRecorder.vala, - * src/Terrestrial/TerrestrialRecorder.vala: [62] Directory where the - recordings will be stored is stored in Device class. Implemented - registration of devices in Manager +2008-05-29 Sebastian Pölsterl -2008-06-06 Sebastian Pölsterl + * src/ChannelListWriter.vala: Modified. - * src/ChannelListReader.vala: [61] Make method static that don't - access this + Added throws IOError - * src/Manager.vala: [60] Added method stubs with API doc. The class - can't be exported over D-Bus anymore, because arrays are returned - which aren't supported by vala, yet +2008-05-29 Sebastian Pölsterl -2008-06-05 Sebastian Pölsterl + * src/Satellite/SatelliteRecorder.vala, + * src/Cable/CableRecorder.vala: Added. - * src/RecordingsStore.vala: [59] Added doc + Added recorder for cable and sattelite TV - * src/Recording.vala, - * src/RecordingsStore.vala: [58] Completed restore_from_dir. +2008-05-28 Sebastian Pölsterl - * src/ChannelListReader.vala, - * src/Utils.vala: [57] Added read_file_contents to Utils + * src/ChannelListReader.vala: Modified. - * src/Recording.vala: [56] Use get_child + Refactored ChannelListReader - * src/Main.vala, - * src/Scanner.vala: [55] Adjusted to API changes in vala +2008-05-28 Sebastian Pölsterl - * src/RecordingsStore.vala: [54] Started to implement restore_from_dir - that checks for info.rec files recursively in a directory and restores - the Recordings + * src/Utils.vala, + * src/ChannelListWriter.vala: Modified. - * src/Recorder.vala, - * src/Recording.vala: [53] Save Recordings to disk and replaced error - calls with critical + Implemented ChannelListWriter for all types - * src/Device.vala, - * src/Recorder.vala: [52] Check for errors on the message bus +2008-05-28 Sebastian Pölsterl -2008-06-04 Sebastian Pölsterl + * src/Recorder.vala, + * src/Timer.vala: Modified. - * src/Recording.vala, - * src/Timer.vala: [51] Implemented (de)serialize for Recording. Parse - time with scanf. + Recordings are now stopped when the duration is reached - * src/RecordingsStore.vala: [50] Don't transfer membership for add - method +2008-05-27 Sebastian Pölsterl - * src/Recorder.vala: [49] Fixed concurrent modification issue in - check_timer + * src/Recorder.vala, + * src/Timer.vala: Modified. - * src/Timer.vala: [48] Started implementing Timer.deserialize + Tried that recordings get stopped. Still having some problems + calculating times - * src/RecordingsStore.vala: [47] Implemented RecordingsStore +2008-05-27 Sebastian Pölsterl - * src/Recorder.vala, - * src/Recording.vala: [46] Recording is now a GLib.Object derived - class + * src/Cable/CableChannel.vala, + * src/ChannelListReader.vala: Modified. -2008-06-01 Sebastian Pölsterl + Implement reader for DVB-C channels.conf - * src/Scanner.vala, - * src/Utils.vala: [45] Removed reencode_string from Utils. Trying to - get it into mpegtsparse instead +2008-05-27 Sebastian Pölsterl -2008-05-31 Sebastian Pölsterl + * src/Satellite/SatelliteChannel.vala, + * src/ChannelListReader.vala: Modified. - * src/Cable/CableScanner.vala, - * src/Satellite/SatelliteScanner.vala, - * src/Scanner.vala, - * src/Terrestrial/TerrestrialScanner.vala: [44] Continued work on - Scanner. Doesn't work, yet, but we're getting there - - * src/Cable/CableChannel.vala, - * src/Channel.vala, - * src/Satellite/SatelliteChannel.vala, - * src/Terrestrial/TerrestrialChannel.vala: [43] Made Channel abstract - class with abstract method to_string - - * src/Recorder.vala: [42] Made Recorder thread-safe - - * src/Recorder.vala, - * src/Recording.vala, - * src/Timer.vala, - * src/Utils.vala: [41] Calculate time of recording when stopping - - * Makefile.am: [40] Added CableRecorder and SatteliteRecorder to - Makefile - - * src/Cable/CableRecorder.vala, - * src/Device.vala, - * src/Recorder.vala, - * src/Satellite/SatelliteRecorder.vala, - * src/Terrestrial/TerrestrialRecorder.vala: [39] Associate ChannelList - with Device - - * src/Recorder.vala, - * src/Utils.vala: [38] Remove non-alphanumeric characters from channel - name when creating directory - - * src/Recorder.vala, - * src/Timer.vala: [37] Removed Description property from Timer. Addded - serialize method to Timer. Emit recording_started in Recorder + Read DVB-S channels from channels.conf - * src/Scanner.vala: [36] One Vala bug fixed, came across the next one +2008-05-25 Sebastian Pölsterl - * src/Scanner.vala: [35] Started to continue working on the Scanner - until I ran into another unsupported feature in Vala + * src/Utils.vala: Modified. -2008-05-30 Sebastian Pölsterl + Use nested namespace instead of static class - * src/Recorder.vala: [34] Check if timer conflicts when adding +2008-05-25 Sebastian Pölsterl - * src/Recorder.vala, - * src/Timer.vala: [33] Abort recording when deleting active timer. - Implemented Timer's conflicts_with method and Recorder's HasTimer - method - - * src/ChannelListReader.vala, - * src/ChannelListWriter.vala, - * src/Constants.vala: [32] Adjusted code that it compiles with vala - from svn + * src/Recorder.vala: Modified. -2008-05-29 Sebastian Pölsterl + Recording is started when a timer is due now. Ending the recording + doesn't work, yet - * src/Cable/CableRecorder.vala, - * src/Recorder.vala, - * src/Satellite/SatelliteRecorder.vala, - * src/Terrestrial/TerrestrialRecorder.vala, - * src/Utils.vala: [31] Create directory structure / for each recording. Each recorder expects a base dir now where - it stores the recordings +2008-05-25 Sebastian Pölsterl - * src/Recorder.vala: [30] Set adapter and frontend when recording + * src/Scanner.vala: Modified. - * src/ChannelListWriter.vala: [29] Added throws IOError + Use correct paramters for message callback func -2008-05-29 Sebastian Pölsterl +2008-05-25 Sebastian Pölsterl - * src/Cable/CableRecorder.vala, - * src/Satellite/SatelliteRecorder.vala: Added. + * src/Terrestrial/TerrestrialChannel.vala, + * src/ChannelListReader.vala: Modified. - [28] Added recorder for cable and sattelite TV + Use DvbSrcModulation enum for Constellation property -2008-05-28 Sebastian Pölsterl +2008-05-25 Sebastian Pölsterl - * src/ChannelListReader.vala: [27] Refactored ChannelListReader + * src/Recorder.vala, + * src/Timer.vala: Modified. - * src/ChannelListWriter.vala, - * src/Utils.vala: [26] Implemented ChannelListWriter for all types + Working around vala bug that Time can't be property. - * src/Recorder.vala, - * src/Timer.vala: [25] Recordings are now stopped when the duration is - reached +2008-05-25 Sebastian Pölsterl -2008-05-27 Sebastian Pölsterl + * src/Recorder.vala, + * src/Main.vala, + * src/Recording.vala, + * src/Timer.vala, + * src/ChannelListReader.vala: Modified. - * src/Recorder.vala, - * src/Timer.vala: [24] Tried that recordings get stopped. Still having - some problems calculating times - - * src/Cable/CableChannel.vala, - * src/ChannelListReader.vala: [23] Implement reader for DVB-C - channels.conf - - * src/ChannelListReader.vala, - * src/Satellite/SatelliteChannel.vala: [22] Read DVB-S channels from - channels.conf + First steps towards recording. Timer.vala doesn't compile, because + of vala bug 2008-05-25 Sebastian Pölsterl - * src/Utils.vala: [21] Use nested namespace instead of static class + * src/Terrestrial/TerrestrialChannel.vala, + * src/Utils.vala, + * src/ChannelListReader.vala: Modified. - * src/Recorder.vala: [20] Recording is started when a timer is due - now. Ending the recording doesn't work, yet + Implemented TerrestrialChannels's to_string - * src/Scanner.vala: [19] Use correct paramters for message callback - func +2008-05-25 Sebastian Pölsterl + + * src/Recorder.vala, + * src/ChannelList.vala, + * src/Scanner.vala: Modified. - * src/ChannelListReader.vala, - * src/Terrestrial/TerrestrialChannel.vala: [18] Use DvbSrcModulation - enum for Constellation property - - * src/Recorder.vala, - * src/Timer.vala: [17] Working around vala bug that Time can't be - property. - - * src/ChannelListReader.vala, - * src/Main.vala, - * src/Recorder.vala, - * src/Recording.vala, - * src/Timer.vala: [16] First steps towards recording. Timer.vala - doesn't compile, because of vala bug - - * src/ChannelListReader.vala, - * src/Terrestrial/TerrestrialChannel.vala, - * src/Utils.vala: [15] Implemented TerrestrialChannels's to_string - - * src/ChannelList.vala, - * src/Recorder.vala, - * src/Scanner.vala: [14] Don't use int_(hash|equal) anymore, because - it only worls for pointers. + Don't use int_(hash|equal) anymore, because it only worls for + pointers. 2008-05-25 Sebastian Pölsterl - * src/ChannelListReader.vala: Added. + * src/ChannelListReader.vala: Added. - * Makefile.am, - * src/Channel.vala, - * src/Main.vala, - * src/Terrestrial/TerrestrialChannel.vala: Modified. + * src/Main.vala, + * src/Channel.vala, + * Makefile.am, + * src/Terrestrial/TerrestrialChannel.vala: Modified. - [13] Added ChannelListReader. Doesn't work, because we get a segfault - in g_int_hash for some reason + Added ChannelListReader. Doesn't work, because we get a segfault in + g_int_hash for some reason 2008-05-24 Sebastian Pölsterl - * src/RecordingsStore.vala: Added. + * src/RecordingsStore.vala: Added. - * Makefile.am, - * src/Recorder.vala, - * src/Timer.vala: Modified. + * src/Recorder.vala, + * Makefile.am, + * src/Timer.vala: Modified. - [12] Added RecordingsStore that manages recordings. Recorder only - manages Timers (one Recorder for each device). + Added RecordingsStore that manages recordings. Recorder only + manages Timers (one Recorder for each device). 2008-05-23 Sebastian Pölsterl - * src/Recording.vala, - * src/Terrestrial/TerrestrialRecorder.vala, - * src/Timer.vala: Added. + * src/Terrestrial/TerrestrialRecorder.vala, + * src/Recording.vala, + * src/Timer.vala: Added. - * Makefile.am, - * src/Recorder.vala: Modified. + * src/Recorder.vala, + * Makefile.am: Modified. - [11] Started to implement some of the methods of the Recorder and the - DVB-T recorder. Everythings is untested, yet. + Started to implement some of the methods of the Recorder and the + DVB-T recorder. Everythings is untested, yet. 2008-05-23 Sebastian Pölsterl - * src/ChannelList.vala: Added. + * src/ChannelList.vala: Added. + + * Makefile.am, + * src/Scanner.vala: Modified. + + Added ChannelList class - * Makefile.am, - * src/Scanner.vala: Modified. +2008-05-23 Sebastian Pölsterl + + * src/Terrestrial/TerrestrialChannel.vala: Modified. - [10] Added ChannelList class + Fixed typo 2008-05-23 Sebastian Pölsterl - * src/Terrestrial/TerrestrialChannel.vala: [9] Fixed typo + * src/Scanner.vala, + * src/ScannedItem.vala, + * src/ChannelListWriter.vala, + * src/Terrestrial/TerrestrialScanner.vala, + * src/Cable/CableChannel.vala, + * src/Cable/CableScanner.vala, + * src/Satellite/SatelliteChannel.vala, + * src/Satellite/SatelliteScanner.vala, + * src/Terrestrial/TerrestrialChannel.vala: Added. + + * src/Scanner/ChannelListWriter.vala, + * src/Scanner/CableScanner.vala, + * src/Scanner/SatelliteScanner.vala, + * src/Scanner/Scanner.vala, + * src/Scanner/TerrestrialScanner.vala, + * src/Scanner/ScannedItem.vala: Removed. + + * src/Channel.vala, + * Makefile.am: Modified. + + Reorganized files 2008-05-23 Sebastian Pölsterl - * src/Cable, - * src/Cable/CableChannel.vala, - * src/Satellite, - * src/Satellite/SatelliteChannel.vala, - * src/Terrestrial, - * src/Terrestrial/TerrestrialChannel.vala: Added. - - * src/Scanner: Removed. - - * Makefile.am, - * src/Channel.vala: Modified. - - * src/Scanner/CableScanner.vala: Renamed to - src/Cable/CableScanner.vala. - * src/Scanner/ChannelListWriter.vala: Renamed to - src/ChannelListWriter.vala. - * src/Scanner/SatelliteScanner.vala: Renamed to - src/Satellite/SatelliteScanner.vala. - * src/Scanner/ScannedItem.vala: Renamed to src/ScannedItem.vala. - * src/Scanner/Scanner.vala: Renamed to src/Scanner.vala. - * src/Scanner/TerrestrialScanner.vala: Renamed to - src/Terrestrial/TerrestrialScanner.vala. + * src/Recorder.vala, + * src/Scanner/Scanner.vala: Modified. - [8] Reorganized files + Added API doc to Scanner. Changed type of public property Channels + in Scanner. Fixed compiler errors. 2008-05-23 Sebastian Pölsterl - * src/Recorder.vala, - * src/Scanner/Scanner.vala: [7] Added API doc to Scanner. Changed type - of public property Channels in Scanner. Fixed compiler errors. + * src/Recorder.vala: Modified. - * src/Recorder.vala: [6] Added additional methods to Recorder and - documented each method + Added additional methods to Recorder and documented each method 2008-05-21 Sebastian Pölsterl - * src/Recorder.vala: Added. + * src/Recorder.vala: Added. - * Makefile.am, - * src/Utils.vala: Modified. + * src/Utils.vala, + * Makefile.am: Modified. - [5] Added Recorder class. It's just a skeleton for now. Fixed warning - in Utils + Added Recorder class. It's just a skeleton for now. Fixed warning + in Utils 2008-05-20 Sebastian Pölsterl - * src/Scanner, - * src/Scanner/CableScanner.vala, - * src/Scanner/ChannelListWriter.vala, - * src/Scanner/SatelliteScanner.vala, - * src/Scanner/ScannedItem.vala, - * src/Scanner/Scanner.vala, - * src/Scanner/TerrestrialScanner.vala: Added. - - * src/ChannelListWriter.vala, - * src/ScannedItem.vala, - * src/Scanner.vala: Removed. - - * Makefile.am, - * client/dvb-client.py, - * src/Channel.vala, - * src/Manager.vala: Modified. + * src/Scanner/ChannelListWriter.vala, + * src/Scanner/CableScanner.vala, + * src/Scanner/SatelliteScanner.vala, + * src/Scanner/Scanner.vala, + * src/Scanner/TerrestrialScanner.vala, + * src/Scanner/ScannedItem.vala: Added. + + * src/ScannedItem.vala, + * src/Scanner.vala, + * src/ChannelListWriter.vala: Removed. + + * src/Manager.vala, + * Makefile.am, + * src/Channel.vala, + * client/dvb-client.py: Modified. - [4] Created seperate scanners for dvb-t, dvb-s and dvb-s. Added - possibility to add scanning data using D-Bus for DVB-T + Created seperate scanners for dvb-t, dvb-s and dvb-s. Added + possibility to add scanning data using D-Bus for DVB-T 2008-05-20 Sebastian Pölsterl - * src/Utils.vala: Added. + * src/Utils.vala: Added. - [3] Added Utils class and reencode_string function which is untested, - yet + Added Utils class and reencode_string function which is untested, + yet 2008-05-19 Sebastian Pölsterl - * src/ChannelListWriter.vala: Added. + * src/ChannelListWriter.vala: Added. - * .bzrignore, - * Makefile.am, - * configure.ac: Modified. + * .bzrignore, + * configure.ac, + * Makefile.am: Modified. - [2] Adjusted dependencies. Added ChannlListWriter skeleton + Adjusted dependencies. Added ChannlListWriter skeleton 2008-05-18 Sebastian Pölsterl - * .bzrignore, - * AUTHORS, - * COPYING, - * ChangeLog, - * MAINTAINERS, - * Makefile.am, - * NEWS, - * README, - * acinclude.m4, - * autogen.sh, - * client, - * client/dvb-client.py, - * configure.ac, - * data, - * data/Makefile.am, - * data/org.gnome.DVB.service.in, - * po, - * po/ChangeLog, - * po/LINGUAS, - * po/Makefile.in.in, - * po/POTFILES.in, - * po/POTFILES.skip, - * src, - * src/Channel.vala, - * src/Constants.vala, - * src/Device.vala, - * src/EPGStore.vala, - * src/Main.vala, - * src/Manager.vala, - * src/MpegTsEnums.vala, - * src/ScannedItem.vala, - * src/Scanner.vala: Added. + * COPYING, + * src/Scanner.vala, + * acinclude.m4, + * configure.ac, + * po/ChangeLog, + * data/org.gnome.DVB.service.in, + * NEWS, + * src/MpegTsEnums.vala, + * client/dvb-client.py, + * data/Makefile.am, + * src/ScannedItem.vala, + * MAINTAINERS, + * Makefile.am, + * po/Makefile.in.in, + * po/POTFILES.skip, + * README, + * po/LINGUAS, + * src/Channel.vala, + * src/Main.vala, + * src/EPGStore.vala, + * src/Device.vala, + * .bzrignore, + * src/Constants.vala, + * ChangeLog, + * src/Manager.vala, + * po/POTFILES.in, + * AUTHORS, + * autogen.sh: Added. - [1] Initial import + Initial import diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/DBusWrapper.py gnome-dvb-daemon-0.2.7/client/gnomedvb/DBusWrapper.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/DBusWrapper.py 2010-06-13 11:07:24.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/DBusWrapper.py 2011-12-10 09:31:16.000000000 +0000 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008,2009 Sebastian Pölsterl # @@ -17,12 +16,10 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import dbus -import dbus.glib -import gobject -import gst +from gi.repository import GObject import re import sys +from gi.repository import Gio __all__ = [ "global_error_handler", @@ -47,35 +44,15 @@ CHANNEL_LIST_IFACE = "org.gnome.DVB.ChannelList" SCHEDULE_IFACE = "org.gnome.DVB.Schedule" -def _default_error_handler_func(e): - print >> sys.stderr, "Error: "+str(e) +def _default_error_handler_func(*args): + print >> sys.stderr, "Error: " + str(args) global_error_handler = _default_error_handler_func def get_adapter_info(adapter, frontend): - dvbelement = gst.element_factory_make ("dvbsrc", "test_dvbsrc") - dvbelement.set_property("adapter", int(adapter)) - dvbelement.set_property("frontend", int(frontend)) - pipeline = gst.Pipeline("") - pipeline.add(dvbelement) - pipeline.set_state(gst.STATE_READY) - pipeline.get_state() - bus = pipeline.get_bus() - info = {} - success = False - while bus.have_pending(): - msg = bus.pop() - if msg.type == gst.MESSAGE_ELEMENT and msg.src == dvbelement: - structure = msg.structure - if structure.get_name() == "dvb-adapter": - info["type"] = structure["type"] - info["name"] = structure["name"] - success = True - break - elif msg.type == gst.MESSAGE_ERROR: - info = msg.structure["debug"] - global_error_handler(info) - pipeline.set_state(gst.STATE_NULL) + manager = DVBManagerClient() + info_t, success = manager.get_adapter_info(adapter, frontend) + info = {"name": info_t[0], "type": info_t[1]} return (success, info) def get_dvb_devices(): @@ -93,59 +70,61 @@ deviceslist.append(info) return deviceslist + +def _get_proxy(object_path, iface_name): + return Gio.DBusProxy.new_for_bus_sync(Gio.BusType.SESSION, + Gio.DBusProxyFlags.NONE, None, + SERVICE, + object_path, + iface_name, None) -class DVBManagerClient(gobject.GObject): +class DVBManagerClient(GObject.GObject): __gsignals__ = { - "group-added": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int]), - "group-removed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int]), + "group-added": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]), + "group-removed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]), } def __init__(self): - gobject.GObject.__init__(self) - - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object(SERVICE, MANAGER_PATH) - # Apply the correct interace to the proxy object - self.manager = dbus.Interface(proxy, MANAGER_IFACE) - self.manager.connect_to_signal("GroupAdded", self.on_group_added) - self.manager.connect_to_signal("GroupRemoved", self.on_group_removed) + GObject.GObject.__init__(self) + + self.manager = _get_proxy(MANAGER_PATH, MANAGER_IFACE) + self.manager.connect("g-signal", self.on_g_signal) def get_scanner_for_device(self, adapter, frontend): - objpath, scanner_iface, success = self.manager.GetScannerForDevice (adapter, frontend) + objpath, scanner_iface, success = self.manager.GetScannerForDevice ('(uu)', adapter, frontend) if success: return DVBScannerClient(objpath, scanner_iface) else: return None def get_device_group(self, group_id): - path, success = self.manager.GetDeviceGroup(group_id) + path, success = self.manager.GetDeviceGroup('(u)', group_id) if success: return DVBDeviceGroupClient(path) else: return None def get_registered_device_groups(self, **kwargs): - if "reply_handler" in kwargs: - reply_handler = kwargs["reply_handler"] + if "result_handler" in kwargs: + result_handler = kwargs["result_handler"] else: - reply_handler = None + result_handler = None - def groups_handler(paths): - reply_handler([DVBDeviceGroupClient(path) for path in paths]) + def groups_handler(proxy, paths, user_data): + result_handler([DVBDeviceGroupClient(path) for path in paths]) - if reply_handler != None: - self.manager.GetRegisteredDeviceGroups(reply_handler=groups_handler, + if result_handler != None: + self.manager.GetRegisteredDeviceGroups(result_handler=groups_handler, error_handler=kwargs["error_handler"]) else: return [DVBDeviceGroupClient(path) for path in self.manager.GetRegisteredDeviceGroups()] def add_device_to_new_group (self, adapter, frontend, channels_file, recordings_dir, name, **kwargs): - return self.manager.AddDeviceToNewGroup(adapter, frontend, channels_file, recordings_dir, name, **kwargs) + return self.manager.AddDeviceToNewGroup('(uusss)', adapter, frontend, channels_file, recordings_dir, name, **kwargs) def get_name_of_registered_device(self, adapter, frontend, **kwargs): - return self.manager.GetNameOfRegisteredDevice(adapter, frontend, **kwargs) + return self.manager.GetNameOfRegisteredDevice('(uu)', adapter, frontend, **kwargs) def get_device_group_size(self, **kwargs): return self.manager.GetDeviceGroupSize(**kwargs) @@ -154,41 +133,40 @@ return self.manager.GetChannelGroups(**kwargs) def add_channel_group(self, name, **kwargs): - return self.manager.AddChannelGroup(name, **kwargs) + return self.manager.AddChannelGroup('(s)', name, **kwargs) def remove_channel_group(self, group_id, **kwargs): - return self.manager.RemoveChannelGroup(group_id, **kwargs) + return self.manager.RemoveChannelGroup('(i)', group_id, **kwargs) def get_devices(self, **kwargs): return self.manager.GetDevices() - - def on_group_added(self, group_id): - self.emit("group-added", group_id) - - def on_group_removed(self, group_id): - self.emit("group-removed", group_id) -class DVBDeviceGroupClient(gobject.GObject): + def get_adapter_info(self, adapter, frontend, **kwargs): + return self.manager.GetAdapterInfo('(uu)', adapter, frontend, **kwargs) + + def on_g_signal(self, proxy, sender_name, signal_name, params): + params = params.unpack() + if signal_name == "GroupAdded": + self.emit("group-added", params[0]) + elif signal_name == "GroupRemoved": + self.emit("group-removed", params[0]) + +class DVBDeviceGroupClient(GObject.GObject): __gsignals__ = { - "device-added": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int]), - "device-removed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int]), + "device-added": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int]), + "device-removed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int]), } def __init__(self, objpath): - gobject.GObject.__init__(self) + GObject.GObject.__init__(self) elements = objpath.split("/") self._id = int(elements[5]) - - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object(SERVICE, objpath) - # Apply the correct interace to the proxy object - self.devgroup = dbus.Interface(proxy, DEVICE_GROUP_IFACE) - self.devgroup.connect_to_signal("DeviceAdded", self.on_device_added) - self.devgroup.connect_to_signal("DeviceRemoved", self.on_device_removed) + + self.devgroup = _get_proxy(objpath, DEVICE_GROUP_IFACE) + self.devgroup.connect("g-signal", self.on_g_signal) def get_id(self): return self._id @@ -198,10 +176,10 @@ return DVBRecorderClient(path) def add_device (self, adapter, frontend, **kwargs): - return self.devgroup.AddDevice(adapter, frontend, **kwargs) + return self.devgroup.AddDevice('(uu)', adapter, frontend, **kwargs) def remove_device(self, adapter, frontend, **kwargs): - return self.devgroup.RemoveDevice(adapter, frontend, **kwargs) + return self.devgroup.RemoveDevice('(uu)', adapter, frontend, **kwargs) def get_channel_list(self): path = self.devgroup.GetChannelList() @@ -214,13 +192,13 @@ return self.devgroup.GetName(**kwargs) def set_name(self, name, **kwargs): - return self.devgroup.SetName(name, **kwargs) + return self.devgroup.SetName('(s)', name, **kwargs) def get_type(self, **kwargs): return self.devgroup.GetType(**kwargs) def get_schedule(self, channel_sid): - path, success = self.devgroup.GetSchedule(channel_sid) + path, success = self.devgroup.GetSchedule('(u)', channel_sid) if success: return DVBScheduleClient(path) else: @@ -230,41 +208,36 @@ return self.devgroup.GetRecordingsDirectory(**kwargs) def set_recordings_directory (self, location, **kwargs): - return self.devgroup.SetRecordingsDirectory(location, **kwargs) - - def on_device_added(self, adapter, frontend): - self.emit("device-added", adapter, frontend) - - def on_device_removed(self, adapter, frontend): - self.emit("device-removed", adapter, frontend) + return self.devgroup.SetRecordingsDirectory('(s)', location, **kwargs) + + def on_g_signal(self, proxy, sender_name, signal_name, params): + params = params.unpack() + if signal_name == "DeviceAdded": + self.emit("device-added", *params) + elif signal_name == "DeviceRemoved": + self.emit("device-removed", *params) -class DVBScannerClient(gobject.GObject): +class DVBScannerClient(GObject.GObject): __gsignals__ = { - "finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), - "frequency-scanned": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int]), - "channel-added": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int, str, str, str, bool]), - "destroyed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), - "frontend-stats": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [float, float]), + "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), + "frequency-scanned": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int]), + "channel-added": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int, str, str, str, bool]), + "destroyed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), + "frontend-stats": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [float, float]), } def __init__(self, objpath, scanner_iface): - gobject.GObject.__init__(self) - - bus = dbus.SessionBus() - proxy = bus.get_object(SERVICE, objpath) - self.scanner = dbus.Interface(proxy, scanner_iface) - self.scanner.connect_to_signal ("Finished", self.on_finished) - self.scanner.connect_to_signal ("FrequencyScanned", self.on_frequency_scanned) - self.scanner.connect_to_signal ("ChannelAdded", self.on_channel_added) - self.scanner.connect_to_signal ("Destroyed", self.on_destroyed) - self.scanner.connect_to_signal ("FrontendStats", self.on_frontend_stats) + GObject.GObject.__init__(self) + + self.scanner = _get_proxy(objpath, scanner_iface) + self.scanner.connect("g-signal", self.on_g_signal) def add_scanning_data(self, data, **kwargs): - self.scanner.AddScanningData (*data, **kwargs) + return self.scanner.AddScanningData ('(a{sv})', data, **kwargs) def add_scanning_data_from_file(self, path, **kwargs): - return self.scanner.AddScanningDataFromFile(path, **kwargs) + return self.scanner.AddScanningDataFromFile('(s)', path, **kwargs) def run(self, **kwargs): self.scanner.Run(**kwargs) @@ -273,167 +246,153 @@ self.scanner.Destroy(**kwargs) def write_channels_to_file(self, channel_sids, channelfile, **kwargs): - self.scanner.WriteChannelsToFile(channel_sids, channelfile, **kwargs) + self.scanner.WriteChannelsToFile('(aus)', channel_sids, channelfile, **kwargs) def write_all_channels_to_file(self, channelfile, **kwargs): - self.scanner.WriteAllChannelsToFile(channelfile, **kwargs) - - def on_finished(self): - self.emit("finished") - - def on_frequency_scanned(self, freq, freq_left): - self.emit("frequency-scanned", freq, freq_left) - - def on_channel_added(self, freq, sid, name, network, channeltype, scrambled): - self.emit("channel-added", freq, sid, name, network, channeltype, scrambled) - - def on_destroyed(self): - self.emit("destroyed") + self.scanner.WriteAllChannelsToFile('(s)', channelfile, **kwargs) - def on_frontend_stats(self, signal, snr): - self.emit("frontend-stats", signal, snr) - -class DVBRecordingsStoreClient(gobject.GObject): + def on_g_signal(self, proxy, sender_name, signal_name, params): + params = params.unpack() + if signal_name == "Finished": + self.emit("finished") + elif signal_name == "FrequencyScanned": + self.emit("frequency-scanned", *params) + elif signal_name == "ChannelAdded": + self.emit("channel-added", *params) + elif signal_name == "Destroyed": + self.emit("destroyed") + elif signal_name == "FrontendStats": + self.emit("frontend-stats", *params) + +class DVBRecordingsStoreClient(GObject.GObject): __gsignals__ = { - "changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int]), + "changed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int]), } def __init__(self): - gobject.GObject.__init__(self) - - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object(SERVICE, RECSTORE_PATH) - # Apply the correct interace to the proxy object - self.recstore = dbus.Interface(proxy, RECSTORE_IFACE) - self.recstore.connect_to_signal ("Changed", self.on_changed) + GObject.GObject.__init__(self) + + self.recstore = _get_proxy(RECSTORE_PATH, RECSTORE_IFACE) + self.recstore.connect("g-signal", self.on_g_signal) def get_recordings(self, **kwargs): return self.recstore.GetRecordings(**kwargs) def get_location(self, rid, **kwargs): - return self.recstore.GetLocation(rid, **kwargs) + return self.recstore.GetLocation('(u)', rid, **kwargs) def get_name(self, rid, **kwargs): - return self.recstore.GetName(rid, **kwargs) + return self.recstore.GetName('(u)', rid, **kwargs) def get_description(self, rid, **kwargs): - return self.recstore.GetDescription(rid, **kwargs) + return self.recstore.GetDescription('(u)', rid, **kwargs) def get_length(self, rid, **kwargs): - return self.recstore.GetLength(rid, **kwargs) + return self.recstore.GetLength('(u)', rid, **kwargs) def get_start_time(self, rid, **kwargs): - return self.recstore.GetStartTime(rid, **kwargs) + return self.recstore.GetStartTime('(u)', rid, **kwargs) def get_start_timestamp(self, rid, **kwargs): - return self.recstore.GetStartTimestamp(rid, **kwargs) + return self.recstore.GetStartTimestamp('(u)', rid, **kwargs) def delete(self, rid, **kwargs): - return self.recstore.Delete(rid, **kwargs) + return self.recstore.Delete('(u)', rid, **kwargs) def get_channel_name(self, rid, **kwargs): - return self.recstore.GetChannelName(rid, **kwargs) + return self.recstore.GetChannelName('(u)', rid, **kwargs) def get_all_informations(self, rid, **kwargs): - return self.recstore.GetAllInformations(rid, **kwargs) - - def on_changed(self, rid, typeid): - self.emit("changed", rid, typeid) - -class DVBRecorderClient(gobject.GObject): + return self.recstore.GetAllInformations('(u)', rid, **kwargs) + + def on_g_signal(self, proxy, sender_name, signal_name, params): + params = params.unpack() + if signal_name == "Changed": + self.emit("changed", *params) + +class DVBRecorderClient(GObject.GObject): __gsignals__ = { - "recording-started": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int]), - "recording-finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int]), - "changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int]), + "recording-started": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]), + "recording-finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]), + "changed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int]), } def __init__(self, object_path): - gobject.GObject.__init__(self) - - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object(SERVICE, object_path) - # Apply the correct interace to the proxy object - self.recorder = dbus.Interface(proxy, RECORDER_IFACE) - self.recorder.connect_to_signal("RecordingStarted", self.on_recording_started) - self.recorder.connect_to_signal("RecordingFinished", self.on_recording_finished) - self.recorder.connect_to_signal("Changed", self.on_changed) + GObject.GObject.__init__(self) + + self.recorder = _get_proxy(object_path, RECORDER_IFACE) + self.recorder.connect("g-signal", self.on_g_signal) self.object_path = object_path def get_path(self): return self.object_path def add_timer (self, channel, year, month, day, hour, minute, duration, **kwargs): - return self.recorder.AddTimer(channel, year, month, day, hour, minute, duration, **kwargs) + return self.recorder.AddTimer('(uiiiiiu)', channel, year, month, day, hour, minute, duration, **kwargs) def add_timer_with_margin (self, channel, year, month, day, hour, minute, duration, **kwargs): - return self.recorder.AddTimerWithMargin(channel, year, month, day, hour, minute, duration, **kwargs) + return self.recorder.AddTimerWithMargin('(uiiiiiu)', channel, year, month, day, hour, minute, duration, **kwargs) def add_timer_for_epg_event(self, event_id, channel_sid, **kwargs): - return self.recorder.AddTimerForEPGEvent(event_id, channel_sid, **kwargs) + return self.recorder.AddTimerForEPGEvent('(uu)', event_id, channel_sid, **kwargs) def delete_timer(self, tid, **kwargs): - return self.recorder.DeleteTimer(tid, **kwargs) + return self.recorder.DeleteTimer('(u)', tid, **kwargs) def get_timers(self, **kwargs): return self.recorder.GetTimers(**kwargs) def get_start_time(self, tid, **kwargs): - return self.recorder.GetStartTime(tid, **kwargs) + return self.recorder.GetStartTime('(u)', tid, **kwargs) def set_start_time(self, tid, year, month, day, hour, minute, **kwargs): - return self.recorder.SetStartTime (tid, year, month, day, hour, minute) + return self.recorder.SetStartTime ('(uiiiii)', tid, year, month, day, hour, minute) def get_end_time(self, tid, **kwargs): - return self.recorder.GetEndTime(tid, **kwargs) + return self.recorder.GetEndTime('(u)', tid, **kwargs) def get_duration(self, tid, **kwargs): - return self.recorder.GetDuration(tid, **kwargs) + return self.recorder.GetDuration('(u)', tid, **kwargs) def set_duration(self, tid, duration, **kwargs): - return self.recorder.SetDuration(tid, duration, **kwargs) + return self.recorder.SetDuration('(uu)', tid, duration, **kwargs) def get_channel_name(self, tid, **kwargs): - return self.recorder.GetChannelName(tid, **kwargs) + return self.recorder.GetChannelName('(u)', tid, **kwargs) def get_title(self, tid, **kwargs): - return self.recorder.GetTitle(tid, **kwargs) + return self.recorder.GetTitle('(u)', tid, **kwargs) def get_all_informations(self, tid, **kwargs): - return self.recorder.GetAllInformations(tid, **kwargs) + return self.recorder.GetAllInformations('(u)', tid, **kwargs) def get_active_timers(self, **kwargs): return self.recorder.GetActiveTimers(**kwargs) def is_timer_active(self, tid, **kwargs): - return self.recorder.IsTimerActive(tid, **kwargs) + return self.recorder.IsTimerActive('(u)', tid, **kwargs) def has_timer(self, year, month, day, hour, minute, duration, **kwargs): - return self.recorder.HasTimer(year, month, day, hour, minute, duration, **kwargs) + return self.recorder.HasTimer('(uuuuuu)', year, month, day, hour, minute, duration, **kwargs) def has_timer_for_event(self, event_id, channel_sid, **kwargs): - return self.recorder.HasTimerForEvent(event_id, channel_sid, **kwargs) - - def on_recording_started(self, timer_id): - self.emit("recording-started", timer_id) - - def on_recording_finished(self, timer_id): - self.emit("recording-finished", timer_id) - - def on_changed(self, rid, typeid): - self.emit("changed", rid, typeid) + return self.recorder.HasTimerForEvent('(uu)', event_id, channel_sid, **kwargs) + + def on_g_signal(self, proxy, sender_name, signal_name, params): + params = params.unpack() + if signal_name == "Changed": + self.emit("changed", *params) + elif signal_name == "RecordingStarted": + self.emit("recording-started", params[0]) + elif signal_name == "RecordingFinished": + self.emit("recording-finished", params[0]) class DVBChannelListClient: def __init__(self, object_path): - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object(SERVICE, object_path) - # Apply the correct interace to the proxy object - self.channels = dbus.Interface(proxy, CHANNEL_LIST_IFACE) + self.channels = _get_proxy(object_path, CHANNEL_LIST_IFACE) self.object_path = object_path def get_path(self): @@ -449,45 +408,41 @@ return self.channels.GetTVChannels(**kwargs) def get_channel_name(self, cid, **kwargs): - return self.channels.GetChannelName(cid, **kwargs) + return self.channels.GetChannelName('(u)', cid, **kwargs) def get_channel_network(self, cid, **kwargs): - return self.channels.GetChannelNetwork(cid, **kwargs) + return self.channels.GetChannelNetwork('(u)', cid, **kwargs) def is_radio_channel(self, cid, **kwargs): - return self.channels.IsRadioChannel(cid, **kwargs) + return self.channels.IsRadioChannel('(u)', cid, **kwargs) def get_channel_url(self, cid, **kwargs): - return self.channels.GetChannelURL(cid, **kwargs) + return self.channels.GetChannelURL('(u)', cid, **kwargs) def get_channel_infos(self, **kwargs): return self.channels.GetChannelInfos(**kwargs) def get_channels_of_group(self, group_id, **kwargs): - return self.channels.GetChannelsOfGroup(group_id, **kwargs) + return self.channels.GetChannelsOfGroup('(i)', group_id, **kwargs) def add_channel_to_group(self, cid, group_id, **kwargs): - return self.channels.AddChannelToGroup(cid, group_id, **kwargs) + return self.channels.AddChannelToGroup('(ui)', cid, group_id, **kwargs) def remove_channel_from_group(self, cid, group_id, **kwargs): - return self.channels.RemoveChannelFromGroup(cid, group_id, **kwargs) + return self.channels.RemoveChannelFromGroup('(ui)', cid, group_id, **kwargs) -class DVBScheduleClient(gobject.GObject): +class DVBScheduleClient(GObject.GObject): def __init__(self, object_path): - gobject.GObject.__init__(self) + GObject.GObject.__init__(self) # "/org/gnome/DVB/DeviceGroup/%u/Schedule/%u"; elements = object_path.split("/") self._group = int(elements[5]) self._sid = int(elements[7]) - - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object(SERVICE, object_path) - # Apply the correct interace to the proxy object - self.schedule = dbus.Interface(proxy, SCHEDULE_IFACE) + + self.schedule = _get_proxy(object_path, SCHEDULE_IFACE) def get_group_id(self): return self._group @@ -502,35 +457,35 @@ return self.schedule.GetAllEventInfos(**kwargs) def get_informations(self, eid, **kwargs): - return self.schedule.GetInformations(eid, **kwargs) + return self.schedule.GetInformations('(u)', eid, **kwargs) def now_playing(self, **kwargs): return self.schedule.NowPlaying(**kwargs) def next(self, eid, **kwargs): - return self.schedule.Next(eid, **kwargs) + return self.schedule.Next('(u)', eid, **kwargs) def get_name(self, eid, **kwargs): - return self.schedule.GetName(eid, **kwargs) + return self.schedule.GetName('(u)', eid, **kwargs) def get_short_description(self, eid, **kwargs): - return self.schedule.GetShortDescription(eid, **kwargs) + return self.schedule.GetShortDescription('(u)', eid, **kwargs) def get_extended_description(self, eid, **kwargs): - return self.schedule.GetExtendedDescription(eid, **kwargs) + return self.schedule.GetExtendedDescription('(u)', eid, **kwargs) def get_duration(self, eid, **kwargs): - return self.schedule.GetDuration(eid, **kwargs) + return self.schedule.GetDuration('(u)', eid, **kwargs) - def get_local_start_time(self, eid): - return self.schedule.GetLocalStartTime(eid) + def get_local_start_time(self, eid, **kwargs): + return self.schedule.GetLocalStartTime('(u)', eid, **kwargs) def get_local_start_timestamp(self, eid, **kwargs): - return self.schedule.GetLocalStartTimestamp(eid, **kwargs) + return self.schedule.GetLocalStartTimestamp('(u)', eid, **kwargs) def is_running(self, eid, **kwargs): - return self.schedule.IsRunning(eid, **kwargs) + return self.schedule.IsRunning('(u)', eid, **kwargs) def is_scrambled(self, eid, **kwargs): - return self.schedule.IsScrambled(eid, **kwargs) + return self.schedule.IsScrambled('(u)', eid, **kwargs) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/defs.py gnome-dvb-daemon-0.2.7/client/gnomedvb/defs.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/defs.py 2011-01-15 17:01:15.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/defs.py 2011-12-10 09:27:31.000000000 +0000 @@ -16,8 +16,5 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -DATA_DIR = "/usr/share" -LIB_DIR = "/usr/lib" -VERSION = "0.1.23" +VERSION = "0.2.7" PACKAGE = "gnome-dvb-daemon" -PYTHONDIR = "/usr/lib/python2.6/dist-packages" diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/defs.py.in gnome-dvb-daemon-0.2.7/client/gnomedvb/defs.py.in --- gnome-dvb-daemon-0.1.23/client/gnomedvb/defs.py.in 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/defs.py.in 2011-05-10 19:05:25.000000000 +0000 @@ -16,8 +16,5 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -DATA_DIR = "@DATADIR@" -LIB_DIR = "@LIBDIR@" VERSION = "@VERSION@" PACKAGE = "@PACKAGE@" -PYTHONDIR = "@PYTHONDIR@" diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/DVBModel.py gnome-dvb-daemon-0.2.7/client/gnomedvb/DVBModel.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/DVBModel.py 2010-04-12 21:53:44.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/DVBModel.py 2011-08-19 17:06:25.000000000 +0000 @@ -26,24 +26,24 @@ gnomedvb.DVBManagerClient.__init__(self) def get_device_group(self, group_id): - path, success = self.manager.GetDeviceGroup(group_id) + path, success = self.manager.GetDeviceGroup('(u)', group_id) if success: return DeviceGroup(path) else: return None - def get_registered_device_groups(self, reply_handler, + def get_registered_device_groups(self, result_handler, error_handler=gnomedvb.global_error_handler): - def groups_handler(paths): - reply_handler([DeviceGroup(path) for path in paths]) + def groups_handler(proxy, paths, user_data): + result_handler([DeviceGroup(path) for path in paths]) - if reply_handler: - self.manager.GetRegisteredDeviceGroups(reply_handler=groups_handler, + if result_handler: + self.manager.GetRegisteredDeviceGroups(result_handler=groups_handler, error_handler=error_handler) else: return [DeviceGroup(path) for path in self.manager.GetRegisteredDeviceGroups()] - def get_all_devices(self, reply_handler, + def get_all_devices(self, result_handler, error_handler=gnomedvb.global_error_handler): """ @returns: list of Device @@ -53,9 +53,9 @@ dev = Device (0, "Unknown", info["adapter"], info["frontend"], "Unknown") devs.append(dev) - reply_handler(devs) + result_handler(devs) - def get_unregistered_devices(self, reply_handler, + def get_unregistered_devices(self, result_handler, error_handler=gnomedvb.global_error_handler): """ @returns: set of Device @@ -70,17 +70,17 @@ dev.name = info["name"] dev.type = info["type"] unregistered.add(dev) - reply_handler(unregistered) + result_handler(unregistered) def registered_handler(devgroups): for group in devgroups: for dev in group["devices"]: registered.add(dev) - self.get_all_devices(reply_handler=devices_handler, + self.get_all_devices(result_handler=devices_handler, error_handler=error_handler) registered = set() - self.get_registered_device_groups(reply_handler=registered_handler, + self.get_registered_device_groups(result_handler=registered_handler, error_handler=error_handler) class DeviceGroup(gnomedvb.DVBDeviceGroupClient): diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/__init__.py gnome-dvb-daemon-0.2.7/client/gnomedvb/__init__.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/__init__.py 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/__init__.py 2011-12-09 10:10:49.000000000 +0000 @@ -19,18 +19,19 @@ from gnomedvb.DBusWrapper import * import gnomedvb.defs -import gnomedvb.userdirs import gettext -import gio -import gtk -import locale +from gi.repository import GLib +from gi.repository import Gtk import os -from gettext import gettext as _ from os.path import abspath, join, expanduser +# Setup i18n +t = gettext.translation(gnomedvb.defs.PACKAGE, fallback=True) +_ = t.ugettext + INFOS = { "authors": ["Sebastian Pölsterl "], - "copyright" : "Copyright © 2008-2009\nSebastian Pölsterl.", + "copyright" : "Copyright © 2008-2011\nSebastian Pölsterl.", "name" : _("GNOME DVB Daemon"), "version" : gnomedvb.defs.VERSION, "website" : "http://live.gnome.org/DVBDaemon", @@ -41,52 +42,25 @@ _home = os.environ.get('HOME', '/') XDG_CONFIG_HOME = os.environ.get('XDG_CONFIG_HOME', join(_home, '.config')) -def setup_i18n(): - # Setup i18n - gettext.bindtextdomain(gnomedvb.defs.PACKAGE, - abspath(join(gnomedvb.defs.DATA_DIR, 'locale'))) - if hasattr(gettext, 'bind_textdomain_codeset'): - gettext.bind_textdomain_codeset(gnomedvb.defs.PACKAGE, 'UTF-8') - gettext.textdomain(gnomedvb.defs.PACKAGE) - - locale.bindtextdomain(gnomedvb.defs.PACKAGE, - abspath(join(gnomedvb.defs.DATA_DIR, 'locale'))) - if hasattr(locale, 'bind_textdomain_codeset'): - locale.bind_textdomain_codeset(gnomedvb.defs.PACKAGE, 'UTF-8') - locale.textdomain(gnomedvb.defs.PACKAGE) - -def launch_default_for_uri(uri_string): - """ - Open uri_string with the default application - - @type uri_string: str - """ - gfile = gio.File(uri=uri_string) - appinfo = gfile.query_default_handler() - - if appinfo != None: - appinfo.launch_uris([uri_string], None) - def get_config_dir(): return join(XDG_CONFIG_HOME, gnomedvb.defs.PACKAGE) def get_default_recordings_dir(): - videos = gnomedvb.userdirs.get_xdg_user_dir( - gnomedvb.userdirs.DIRECTORY_VIDEOS) + videos = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_VIDEOS) if videos == None: videos = join(expanduser('~'), 'Videos') return join(videos, 'Recordings') - + def seconds_to_time_duration_string(duration): hours = duration / 3600 minutes = (duration / 60) % 60 seconds = duration % 60 text = [] if hours != 0: - text.append(gettext.ngettext("%d hour", "%d hours", hours) % hours) + text.append(t.ngettext("%d hour", "%d hours", hours) % hours) if minutes != 0: - text.append(gettext.ngettext("%d minute", "%d minutes", minutes) % minutes) + text.append(t.ngettext("%d minute", "%d minutes", minutes) % minutes) if seconds != 0: - text.append(gettext.ngettext("%d second", "%d seconds", seconds) % seconds) + text.append(t.ngettext("%d second", "%d seconds", seconds) % seconds) return " ".join(text) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/Makefile.am gnome-dvb-daemon-0.2.7/client/gnomedvb/Makefile.am --- gnome-dvb-daemon-0.1.23/client/gnomedvb/Makefile.am 2010-05-12 13:50:43.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/Makefile.am 2011-12-09 10:07:10.000000000 +0000 @@ -8,18 +8,6 @@ DVBModel.py \ defs.py -## user dirs ## -__userdirsdir = $(pythondir)/gnomedvb/userdirs -__userdirs_LTLIBRARIES = __userdirs.la -__userdirs_la_LDFLAGS = -module -avoid-version -export-symbols-regex init__userdirs -__userdirs_la_LIBADD = $(GLIB_LIBS) -__userdirs_la_CPPFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -__userdirs_la_SOURCES = \ - userdirs/__userdirsmodule.c - -__userdirs_PYTHON = \ - userdirs/__init__.py - ## ui ## gnomedvbuidir = $(pythondir)/gnomedvb/ui gnomedvbui_PYTHON = \ diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/Makefile.in gnome-dvb-daemon-0.2.7/client/gnomedvb/Makefile.in --- gnome-dvb-daemon-0.1.23/client/gnomedvb/Makefile.in 2011-01-14 13:59:44.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/Makefile.in 2011-12-10 09:27:25.000000000 +0000 @@ -14,7 +14,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -35,8 +34,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = client/gnomedvb -DIST_COMMON = $(__userdirs_PYTHON) $(gnomedvb_PYTHON) \ - $(gnomedvbchannellisteditor_PYTHON) \ +DIST_COMMON = $(gnomedvb_PYTHON) $(gnomedvbchannellisteditor_PYTHON) \ $(gnomedvbcontrolcenter_PYTHON) $(gnomedvbprefsmodel_PYTHON) \ $(gnomedvbprefsui_PYTHON) $(gnomedvbrecordingsui_PYTHON) \ $(gnomedvbtimersui_PYTHON) $(gnomedvbui_PYTHON) \ @@ -53,13 +51,21 @@ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = defs.py CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -81,8 +87,7 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(__userdirsdir)" \ - "$(DESTDIR)$(__userdirsdir)" "$(DESTDIR)$(gnomedvbdir)" \ +am__installdirs = "$(DESTDIR)$(gnomedvbdir)" \ "$(DESTDIR)$(gnomedvbchannellisteditordir)" \ "$(DESTDIR)$(gnomedvbcontrolcenterdir)" \ "$(DESTDIR)$(gnomedvbprefsmodeldir)" \ @@ -91,49 +96,7 @@ "$(DESTDIR)$(gnomedvbtimersuidir)" \ "$(DESTDIR)$(gnomedvbuidir)" "$(DESTDIR)$(gnomedvbwizarddir)" \ "$(DESTDIR)$(gnomedvbwizardpagesdir)" -LTLIBRARIES = $(__userdirs_LTLIBRARIES) -am__DEPENDENCIES_1 = -__userdirs_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__dirstamp = $(am__leading_dot)dirstamp -am___userdirs_la_OBJECTS = userdirs/__userdirs_la-__userdirsmodule.lo -__userdirs_la_OBJECTS = $(am___userdirs_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -__userdirs_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(__userdirs_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(__userdirs_la_SOURCES) -DIST_SOURCES = $(__userdirs_la_SOURCES) py_compile = $(top_srcdir)/py-compile -ETAGS = etags -CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -151,13 +114,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -193,7 +153,6 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -206,6 +165,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -228,6 +188,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@ +PYGOBJECT_LIBS = @PYGOBJECT_LIBS@ PYTHON = @PYTHON@ PYTHONDIR = @PYTHONDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -251,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -270,8 +233,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -expanded_datadir = @expanded_datadir@ -expanded_libdir = @expanded_libdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -285,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -314,17 +274,6 @@ DVBModel.py \ defs.py -__userdirsdir = $(pythondir)/gnomedvb/userdirs -__userdirs_LTLIBRARIES = __userdirs.la -__userdirs_la_LDFLAGS = -module -avoid-version -export-symbols-regex init__userdirs -__userdirs_la_LIBADD = $(GLIB_LIBS) -__userdirs_la_CPPFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -__userdirs_la_SOURCES = \ - userdirs/__userdirsmodule.c - -__userdirs_PYTHON = \ - userdirs/__init__.py - gnomedvbuidir = $(pythondir)/gnomedvb/ui gnomedvbui_PYTHON = \ ui/__init__.py @@ -418,7 +367,6 @@ all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -451,137 +399,12 @@ $(am__aclocal_m4_deps): defs.py: $(top_builddir)/config.status $(srcdir)/defs.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-__userdirsLTLIBRARIES: $(__userdirs_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(__userdirsdir)" || $(MKDIR_P) "$(DESTDIR)$(__userdirsdir)" - @list='$(__userdirs_LTLIBRARIES)'; test -n "$(__userdirsdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(__userdirsdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(__userdirsdir)"; \ - } - -uninstall-__userdirsLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(__userdirs_LTLIBRARIES)'; test -n "$(__userdirsdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(__userdirsdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(__userdirsdir)/$$f"; \ - done - -clean-__userdirsLTLIBRARIES: - -test -z "$(__userdirs_LTLIBRARIES)" || rm -f $(__userdirs_LTLIBRARIES) - @list='$(__userdirs_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -userdirs/$(am__dirstamp): - @$(MKDIR_P) userdirs - @: > userdirs/$(am__dirstamp) -userdirs/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) userdirs/$(DEPDIR) - @: > userdirs/$(DEPDIR)/$(am__dirstamp) -userdirs/__userdirs_la-__userdirsmodule.lo: userdirs/$(am__dirstamp) \ - userdirs/$(DEPDIR)/$(am__dirstamp) -__userdirs.la: $(__userdirs_la_OBJECTS) $(__userdirs_la_DEPENDENCIES) - $(AM_V_CCLD)$(__userdirs_la_LINK) -rpath $(__userdirsdir) $(__userdirs_la_OBJECTS) $(__userdirs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f userdirs/__userdirs_la-__userdirsmodule.$(OBJEXT) - -rm -f userdirs/__userdirs_la-__userdirsmodule.lo - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@userdirs/$(DEPDIR)/__userdirs_la-__userdirsmodule.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -userdirs/__userdirs_la-__userdirsmodule.lo: userdirs/__userdirsmodule.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(__userdirs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT userdirs/__userdirs_la-__userdirsmodule.lo -MD -MP -MF userdirs/$(DEPDIR)/__userdirs_la-__userdirsmodule.Tpo -c -o userdirs/__userdirs_la-__userdirsmodule.lo `test -f 'userdirs/__userdirsmodule.c' || echo '$(srcdir)/'`userdirs/__userdirsmodule.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) userdirs/$(DEPDIR)/__userdirs_la-__userdirsmodule.Tpo userdirs/$(DEPDIR)/__userdirs_la-__userdirsmodule.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='userdirs/__userdirsmodule.c' object='userdirs/__userdirs_la-__userdirsmodule.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(__userdirs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o userdirs/__userdirs_la-__userdirsmodule.lo `test -f 'userdirs/__userdirsmodule.c' || echo '$(srcdir)/'`userdirs/__userdirsmodule.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs - -rm -rf userdirs/.libs userdirs/_libs -install-__userdirsPYTHON: $(__userdirs_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(__userdirsdir)" || $(MKDIR_P) "$(DESTDIR)$(__userdirsdir)" - @list='$(__userdirs_PYTHON)'; dlist=; list2=; test -n "$(__userdirsdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - $(am__strip_dir) \ - dlist="$$dlist $$f"; \ - list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ - for file in $$list2; do echo $$file; done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(__userdirsdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(__userdirsdir)" || exit $$?; \ - done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(__userdirsdir)" $$dlist; \ - else \ - PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(__userdirsdir)" $$dlist; \ - fi; \ - else :; fi - -uninstall-__userdirsPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(__userdirs_PYTHON)'; test -n "$(__userdirsdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - filesc=`echo "$$files" | sed 's|$$|c|'`; \ - fileso=`echo "$$files" | sed 's|$$|o|'`; \ - echo " ( cd '$(DESTDIR)$(__userdirsdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(__userdirsdir)" && rm -f $$files || exit $$?; \ - echo " ( cd '$(DESTDIR)$(__userdirsdir)' && rm -f" $$filesc ")"; \ - cd "$(DESTDIR)$(__userdirsdir)" && rm -f $$filesc || exit $$?; \ - echo " ( cd '$(DESTDIR)$(__userdirsdir)' && rm -f" $$fileso ")"; \ - cd "$(DESTDIR)$(__userdirsdir)" && rm -f $$fileso install-gnomedvbPYTHON: $(gnomedvb_PYTHON) @$(NORMAL_INSTALL) test -z "$(gnomedvbdir)" || $(MKDIR_P) "$(DESTDIR)$(gnomedvbdir)" @@ -962,58 +785,12 @@ cd "$(DESTDIR)$(gnomedvbwizardpagesdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(gnomedvbwizardpagesdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(gnomedvbwizardpagesdir)" && rm -f $$fileso - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique tags: TAGS +TAGS: -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" +CTAGS: -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1047,9 +824,9 @@ done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) +all-am: Makefile installdirs: - for dir in "$(DESTDIR)$(__userdirsdir)" "$(DESTDIR)$(__userdirsdir)" "$(DESTDIR)$(gnomedvbdir)" "$(DESTDIR)$(gnomedvbchannellisteditordir)" "$(DESTDIR)$(gnomedvbcontrolcenterdir)" "$(DESTDIR)$(gnomedvbprefsmodeldir)" "$(DESTDIR)$(gnomedvbprefsuidir)" "$(DESTDIR)$(gnomedvbrecordingsuidir)" "$(DESTDIR)$(gnomedvbtimersuidir)" "$(DESTDIR)$(gnomedvbuidir)" "$(DESTDIR)$(gnomedvbwizarddir)" "$(DESTDIR)$(gnomedvbwizardpagesdir)"; do \ + for dir in "$(DESTDIR)$(gnomedvbdir)" "$(DESTDIR)$(gnomedvbchannellisteditordir)" "$(DESTDIR)$(gnomedvbcontrolcenterdir)" "$(DESTDIR)$(gnomedvbprefsmodeldir)" "$(DESTDIR)$(gnomedvbprefsuidir)" "$(DESTDIR)$(gnomedvbrecordingsuidir)" "$(DESTDIR)$(gnomedvbtimersuidir)" "$(DESTDIR)$(gnomedvbuidir)" "$(DESTDIR)$(gnomedvbwizarddir)" "$(DESTDIR)$(gnomedvbwizardpagesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1073,8 +850,6 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f userdirs/$(DEPDIR)/$(am__dirstamp) - -rm -f userdirs/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -1082,14 +857,11 @@ @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-__userdirsLTLIBRARIES clean-generic clean-libtool \ - mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf userdirs/$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags +distclean-am: clean-am distclean-generic dvi: dvi-am @@ -1103,8 +875,7 @@ info-am: -install-data-am: install-__userdirsLTLIBRARIES \ - install-__userdirsPYTHON install-gnomedvbPYTHON \ +install-data-am: install-gnomedvbPYTHON \ install-gnomedvbchannellisteditorPYTHON \ install-gnomedvbcontrolcenterPYTHON \ install-gnomedvbprefsmodelPYTHON install-gnomedvbprefsuiPYTHON \ @@ -1139,14 +910,12 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf userdirs/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am @@ -1156,8 +925,7 @@ ps-am: -uninstall-am: uninstall-__userdirsLTLIBRARIES \ - uninstall-__userdirsPYTHON uninstall-gnomedvbPYTHON \ +uninstall-am: uninstall-gnomedvbPYTHON \ uninstall-gnomedvbchannellisteditorPYTHON \ uninstall-gnomedvbcontrolcenterPYTHON \ uninstall-gnomedvbprefsmodelPYTHON \ @@ -1169,14 +937,11 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean \ - clean-__userdirsLTLIBRARIES clean-generic clean-libtool ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-__userdirsLTLIBRARIES \ - install-__userdirsPYTHON install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-gnomedvbPYTHON \ +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-gnomedvbPYTHON \ install-gnomedvbchannellisteditorPYTHON \ install-gnomedvbcontrolcenterPYTHON \ install-gnomedvbprefsmodelPYTHON install-gnomedvbprefsuiPYTHON \ @@ -1187,10 +952,8 @@ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-__userdirsLTLIBRARIES uninstall-__userdirsPYTHON \ - uninstall-am uninstall-gnomedvbPYTHON \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-gnomedvbPYTHON \ uninstall-gnomedvbchannellisteditorPYTHON \ uninstall-gnomedvbcontrolcenterPYTHON \ uninstall-gnomedvbprefsmodelPYTHON \ diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py 2011-10-30 11:33:35.000000000 +0000 @@ -17,9 +17,9 @@ # along with GNOME DVB Daemon. If not, see . import gnomedvb -import gobject -import gtk -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.ui.widgets.ChannelsStore import ChannelsStore from gnomedvb.ui.widgets.ChannelsView import ChannelsView from gnomedvb.ui.widgets.ChannelGroupsStore import ChannelGroupsStore @@ -27,35 +27,33 @@ from gnomedvb.ui.widgets.Frame import Frame, BaseFrame from gnomedvb.ui.widgets.HelpBox import HelpBox -class ChannelListEditorDialog(gtk.Dialog): +class ChannelListEditorDialog(Gtk.Dialog): def __init__(self, model, parent=None): - gtk.Dialog.__init__(self, title=_("Edit Channel Lists"), - parent=parent, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) + Gtk.Dialog.__init__(self, title=_("Edit Channel Lists"), + parent=parent) + self.set_modal(True) + self.set_destroy_with_parent(True) self.model = model self.devgroup = None self.channel_list = None self.set_default_size(600, 500) - self.set_has_separator(False) self.set_border_width(5) - self.connect("destroy-event", gtk.main_quit) - self.connect("delete-event", gtk.main_quit) - close_button = self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) + close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE) close_button.grab_default() - self.vbox_main = gtk.VBox(spacing=12) + self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) self.vbox_main.set_border_width(5) - self.vbox.pack_start(self.vbox_main) + self.get_content_area().pack_start(self.vbox_main, True, True, 0) # channel groups - groups_box = gtk.HBox(spacing=6) + groups_box = Gtk.Box(spacing=6) groups_frame = BaseFrame("%s" % _("Channel groups"), groups_box) - self.vbox_main.pack_start(groups_frame, False) + self.vbox_main.pack_start(groups_frame, False, True, 0) self.channel_groups = ChannelGroupsStore() self.channel_groups_view = ChannelGroupsView(self.channel_groups) @@ -65,52 +63,52 @@ self.channel_groups_view.get_renderer().connect("edited", self.on_channel_group_edited) - scrolledgroups = gtk.ScrolledWindow() + scrolledgroups = Gtk.ScrolledWindow() scrolledgroups.add(self.channel_groups_view) - scrolledgroups.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - scrolledgroups.set_shadow_type(gtk.SHADOW_ETCHED_IN) - groups_box.pack_start(scrolledgroups) + scrolledgroups.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) + scrolledgroups.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + groups_box.pack_start(scrolledgroups, True, True, 0) - groups_buttonbox = gtk.VButtonBox() + groups_buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL) groups_buttonbox.set_spacing(6) - groups_buttonbox.set_layout(gtk.BUTTONBOX_START) + groups_buttonbox.set_layout(Gtk.ButtonBoxStyle.START) groups_box.pack_end(groups_buttonbox, False, False, 0) - new_group_button = gtk.Button(stock=gtk.STOCK_ADD) + new_group_button = Gtk.Button(stock=Gtk.STOCK_ADD) new_group_button.connect("clicked", self.on_new_group_clicked) - groups_buttonbox.pack_start(new_group_button) + groups_buttonbox.pack_start(new_group_button, True, True, 0) - self.del_group_button = gtk.Button(stock=gtk.STOCK_REMOVE) + self.del_group_button = Gtk.Button(stock=Gtk.STOCK_REMOVE) self.del_group_button.connect("clicked", self.on_delete_group_clicked) - groups_buttonbox.pack_start(self.del_group_button) + groups_buttonbox.pack_start(self.del_group_button, True, True, 0) # device groups - self.devgroupslist = gtk.ListStore(str, int, gobject.TYPE_PYOBJECT) + self.devgroupslist = Gtk.ListStore(str, int, GObject.GObject) - self.devgroupscombo = gtk.ComboBox(self.devgroupslist) + self.devgroupscombo = Gtk.ComboBox.new_with_model_and_entry(self.devgroupslist) self.devgroupscombo.connect("changed", self.on_devgroupscombo_changed) - cell_adapter = gtk.CellRendererText() - self.devgroupscombo.pack_start(cell_adapter) - self.devgroupscombo.add_attribute(cell_adapter, "markup", 0) + cell_adapter = Gtk.CellRendererText() + self.devgroupscombo.pack_start(cell_adapter, True) + self.devgroupscombo.set_entry_text_column(0) - groups_label = gtk.Label() + groups_label = Gtk.Label() groups_label.set_markup_with_mnemonic(_("_Group:")) groups_label.set_mnemonic_widget(self.devgroupscombo) - groups_box = gtk.HBox(spacing=6) - groups_box.pack_start(groups_label, False) - groups_box.pack_start(self.devgroupscombo) + groups_box = Gtk.Box(spacing=6) + groups_box.pack_start(groups_label, False, True, 0) + groups_box.pack_start(self.devgroupscombo, True, True, 0) self.devgroups_frame = BaseFrame("%s" % _("Device groups"), groups_box, False, False) - self.vbox_main.pack_start(self.devgroups_frame, False) + self.vbox_main.pack_start(self.devgroups_frame, False, True, 0) # channels - channels_box = gtk.VBox(spacing=6) - self.vbox_main.pack_start(channels_box) + channels_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) + self.vbox_main.pack_start(channels_box, True, True, 0) - cbox = gtk.HBox(spacing=6) - channels_box.pack_start(cbox) + cbox = Gtk.Box(spacing=6) + channels_box.pack_start(cbox, True, True, 0) # all channels self.channels_store = None @@ -119,16 +117,16 @@ self.channels_view.connect("row-activated", self.on_channels_view_activated) treesel = self.channels_view.get_selection() - treesel.set_mode(gtk.SELECTION_MULTIPLE) + treesel.set_mode(Gtk.SelectionMode.MULTIPLE) treesel.connect("changed", self.on_channel_store_selected) left_frame = Frame("%s" % _("All channels"), self.channels_view) - cbox.pack_start(left_frame) + cbox.pack_start(left_frame, True, True, 0) # selected channels - self.selected_channels_store = gtk.ListStore(str, int) # Name, sid - self.selected_channels_view = gtk.TreeView(self.selected_channels_store) + self.selected_channels_store = Gtk.ListStore(str, long) # Name, sid + self.selected_channels_view = Gtk.TreeView.new_with_model(self.selected_channels_store) self.selected_channels_view.set_reorderable(True) self.selected_channels_view.set_headers_visible(False) self.selected_channels_view.connect("row-activated", @@ -136,35 +134,35 @@ treesel = self.selected_channels_view.get_selection() treesel.connect("changed", self.on_selected_channels_changed) - treesel.set_mode(gtk.SELECTION_MULTIPLE) - col_name = gtk.TreeViewColumn(_("Channel")) - cell_name = gtk.CellRendererText() - col_name.pack_start(cell_name) + treesel.set_mode(Gtk.SelectionMode.MULTIPLE) + col_name = Gtk.TreeViewColumn(_("Channel")) + cell_name = Gtk.CellRendererText() + col_name.pack_start(cell_name, True) col_name.add_attribute(cell_name, "markup", 0) self.selected_channels_view.append_column(col_name) self.selected_channels_view.show() - self.scrolled_selected_channels = gtk.ScrolledWindow() - self.scrolled_selected_channels.set_shadow_type(gtk.SHADOW_ETCHED_IN) - self.scrolled_selected_channels.set_policy(gtk.POLICY_AUTOMATIC, - gtk.POLICY_AUTOMATIC) + self.scrolled_selected_channels = Gtk.ScrolledWindow() + self.scrolled_selected_channels.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + self.scrolled_selected_channels.set_policy(Gtk.PolicyType.AUTOMATIC, + Gtk.PolicyType.AUTOMATIC) self.scrolled_selected_channels.add(self.selected_channels_view) self.select_group_helpbox = HelpBox() self.select_group_helpbox.set_markup(_("Choose a channel group")) self.right_frame = BaseFrame("%s" % _("Channels of group"), self.select_group_helpbox) - cbox.pack_start(self.right_frame) + cbox.pack_start(self.right_frame, True, True, 0) - buttonbox = gtk.HButtonBox() + buttonbox = Gtk.ButtonBox() buttonbox.set_spacing(6) - buttonbox.set_layout(gtk.BUTTONBOX_SPREAD) - self.add_channel_button = gtk.Button(stock=gtk.STOCK_ADD) + buttonbox.set_layout(Gtk.ButtonBoxStyle.SPREAD) + self.add_channel_button = Gtk.Button(stock=Gtk.STOCK_ADD) self.add_channel_button.connect("clicked", self.on_add_channel_clicked) - buttonbox.pack_start(self.add_channel_button) - self.remove_channel_button = gtk.Button(stock=gtk.STOCK_REMOVE) + buttonbox.pack_start(self.add_channel_button, True, True, 0) + self.remove_channel_button = Gtk.Button(stock=Gtk.STOCK_REMOVE) self.remove_channel_button.connect("clicked", self.on_remove_channel_clicked) - buttonbox.pack_start(self.remove_channel_button) + buttonbox.pack_start(self.remove_channel_button, True, True, 0) channels_box.pack_start(buttonbox, False, False, 0) self.del_group_button.set_sensitive(False) @@ -177,11 +175,11 @@ self.show_all() def fill_channel_groups(self): - def add_groups(groups): + def add_groups(proxy, groups, user_data): for gid, name in groups: self.channel_groups.append([gid, name, False]) # not editable - self.model.get_channel_groups(reply_handler=add_groups, + self.model.get_channel_groups(result_handler=add_groups, error_handler=gnomedvb.global_error_handler) def fill_device_groups(self): @@ -195,7 +193,7 @@ self.devgroups_frame.show() self.devgroupscombo.set_active(0) - self.model.get_registered_device_groups(reply_handler=append_groups, + self.model.get_registered_device_groups(result_handler=append_groups, error_handler=gnomedvb.global_error_handler) def refill_channel_groups(self): @@ -203,7 +201,8 @@ self.fill_channel_groups() def fill_group_members(self): - def add_channels(channels, success): + def add_channels(proxy, data, user_data): + channels, success = data if success: for channel_id in channels: name, success = self.channel_list.get_channel_name(channel_id) @@ -215,7 +214,7 @@ if data: group_id, group_name = data self.channel_list.get_channels_of_group(group_id, - reply_handler=add_channels, + result_handler=add_channels, error_handler=gnomedvb.global_error_handler) def get_selected_channels_all(self): @@ -245,40 +244,41 @@ self.channel_groups_view.get_column(0), True) self.channel_groups_view.scroll_to_cell(path) - def on_add_channel_group_finished(self, group_id, success): + def on_add_channel_group_finished(self, proxy, data, user_data): + group_id, success = data if success: self.refill_channel_groups() else: - error_dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + error_dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK) error_dialog.set_markup( "%s" % _("An error occured while adding the group")) error_dialog.run() error_dialog.destroy() def on_delete_group_clicked(self, button): - dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO) + dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO) group_id, group_name = self.get_selected_channel_group() msg = _("Are you sure you want to delete the group '%s'?") % group_name dialog.set_markup ( "%s\n\n%s" % (msg, _("All assignments to this group will be lost."))) - if dialog.run() == gtk.RESPONSE_YES: + if dialog.run() == Gtk.ResponseType.YES: self.model.remove_channel_group(group_id, - reply_handler=self.on_remove_channel_group_finished, + result_handler=self.on_remove_channel_group_finished, error_handler=gnomedvb.global_error_handler) dialog.destroy() - def on_remove_channel_group_finished(self, success): + def on_remove_channel_group_finished(self, proxy, success, user_data): if success: self.refill_channel_groups() else: - error_dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + error_dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK) error_dialog.set_markup( "%s" % _("An error occured while removing the group")) error_dialog.run() @@ -327,7 +327,7 @@ self.channel_groups.remove(aiter) else: self.model.add_channel_group(new_text, - reply_handler=self.on_add_channel_group_finished, + result_handler=self.on_add_channel_group_finished, error_handler=gnomedvb.global_error_handler) def get_selected_group(self): diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py 2010-04-06 18:48:17.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py 2011-10-30 12:57:47.000000000 +0000 @@ -16,9 +16,10 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import gobject -from gettext import gettext as _ +from gi.repository import Gdk +from gi.repository import Gtk +from gi.repository import GObject +from gnomedvb import _ import gnomedvb from gnomedvb.ui.widgets.ChannelsStore import ChannelsStore from gnomedvb.ui.widgets.ChannelsView import ChannelsView @@ -33,10 +34,10 @@ from gnomedvb.ui.preferences.Preferences import Preferences from gnomedvb.ui.recordings.RecordingsDialog import RecordingsDialog -class ControlCenterWindow(gtk.Window): +class ControlCenterWindow(Gtk.Window): def __init__(self, model): - gtk.Window.__init__(self) + GObject.GObject.__init__(self) self.runningnextstore = None self.scrolledrunningnext = None @@ -48,12 +49,12 @@ self.manager.connect('group-added', self._on_manager_group_added) self.manager.connect('group-removed', self._on_manager_group_removed) - self.connect('delete-event', gtk.main_quit) - self.connect('destroy-event', gtk.main_quit) + self.connect('delete-event', Gtk.main_quit) + self.connect('destroy-event', Gtk.main_quit) self.set_title(_("DVB Control Center")) self.set_default_size(800, 500) - self.vbox_outer = gtk.VBox() + self.vbox_outer = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.vbox_outer.show() self.add(self.vbox_outer) @@ -62,27 +63,27 @@ self.__create_menu() self.__create_toolbar() - self.hbox = gtk.HBox(spacing=6) - self.vbox_outer.pack_start(self.hbox) + self.hbox = Gtk.Box(spacing=6) + self.vbox_outer.pack_start(self.hbox, True, True, 0) - self.hpaned = gtk.HPaned() + self.hpaned = Gtk.Paned() self.hpaned.set_border_width(3) self.hpaned.set_position(175) - self.hbox.pack_start(self.hpaned) + self.hbox.pack_start(self.hpaned, True, True, 0) - self.vbox_left = gtk.VBox(spacing=6) + self.vbox_left = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) self.hpaned.pack1(self.vbox_left) - self.devgroupslist = gtk.ListStore(str, int, gobject.TYPE_PYOBJECT) + self.devgroupslist = Gtk.ListStore(str, int, GObject.GObject) self.devgroupslist.connect("row-inserted", self._on_devgroupslist_inserted) - self.devgroupscombo = gtk.ComboBox(self.devgroupslist) - self.devgroupscombo.connect("changed", self._on_devgroupscombo_changed) + self.devgroupscombo = Gtk.ComboBox.new_with_model_and_entry(self.devgroupslist) - cell_adapter = gtk.CellRendererText() - self.devgroupscombo.pack_start(cell_adapter) - self.devgroupscombo.add_attribute(cell_adapter, "markup", 0) - self.vbox_left.pack_start(self.devgroupscombo, False) + cell_adapter = Gtk.CellRendererText() + self.devgroupscombo.pack_start(cell_adapter, True) + self.devgroupscombo.set_entry_text_column(0) + self.devgroupscombo.connect("changed", self._on_devgroupscombo_changed) + self.vbox_left.pack_start(self.devgroupscombo, False, True, 0) self.channelsstore = None @@ -90,11 +91,11 @@ self.channelsview.set_headers_visible(False) self.channelsview.get_selection().connect("changed", self._on_channel_selected) - scrolledchannels = gtk.ScrolledWindow() + scrolledchannels = Gtk.ScrolledWindow() scrolledchannels.add(self.channelsview) - scrolledchannels.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - scrolledchannels.set_shadow_type(gtk.SHADOW_IN) - self.vbox_left.pack_start(scrolledchannels) + scrolledchannels.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + scrolledchannels.set_shadow_type(Gtk.ShadowType.IN) + self.vbox_left.pack_start(scrolledchannels, True, True, 0) self.schedulestore = None @@ -115,7 +116,7 @@ else: self._select_first_group() - gtk.window_set_default_icon_name("gnome-dvb-daemon") + Gtk.Window.set_default_icon_name("gnome-dvb-daemon") def __create_menu(self): ui = ''' @@ -145,14 +146,14 @@ ''' - uimanager = gtk.UIManager() + uimanager = Gtk.UIManager() # Add the accelerator group to the toplevel window accelgroup = uimanager.get_accel_group() self.add_accel_group(accelgroup) # Create actions - actiongroup = gtk.ActionGroup('Root') + actiongroup = Gtk.ActionGroup('Root') actiongroup.add_actions([ ('Timers', None, _('_Recording schedule')), ('Edit', None, _('_Edit')), @@ -162,30 +163,30 @@ # Add the actiongroup to the uimanager uimanager.insert_action_group(actiongroup, 0) - actiongroup = gtk.ActionGroup('Timers') + actiongroup = Gtk.ActionGroup('Timers') actiongroup.add_actions([ ('EditTimers', None, _('_Manage'), 'T', _('Manage recording schedule'), self._on_button_display_timers_clicked), ('Recordings', None, _('_Recordings'), 'W', _('Manage recordings'), self._on_button_recordings_clicked), - ('Quit', gtk.STOCK_QUIT, _('_Quit'), None, - _('Quit the Program'), gtk.main_quit)]) + ('Quit', Gtk.STOCK_QUIT, _('_Quit'), None, + _('Quit the Program'), Gtk.main_quit)]) uimanager.insert_action_group(actiongroup, 1) - actiongroup = gtk.ActionGroup('Edit') + actiongroup = Gtk.ActionGroup('Edit') actiongroup.add_actions([ ('EditChannelLists', None, _('_Channel Lists'), None, _('Edit channel lists'), self._on_edit_channellists_clicked), - ('Preferences', gtk.STOCK_PREFERENCES, _('_Preferences'), None, + ('Preferences', Gtk.STOCK_PREFERENCES, _('_Preferences'), None, _('Display preferences'), self._on_button_prefs_clicked), ]) uimanager.insert_action_group(actiongroup, 2) - actiongroup = gtk.ActionGroup('View') + actiongroup = Gtk.ActionGroup('View') actiongroup.add_actions([ ('WhatsOnNow', None, _("_What's on now"), None, _("See what's currently on and is coming next"), self._on_whats_on_now_clicked), - ('Refresh', gtk.STOCK_REFRESH, _('_Refresh'), 'R', + ('Refresh', Gtk.STOCK_REFRESH, _('_Refresh'), 'R', _('Refresh program guide'), self._on_refresh_clicked), ('PrevDay', None, _('_Previous Day'), 'Left', _('Go to previous day'), self._on_button_prev_day_clicked), @@ -204,9 +205,9 @@ action.set_active(True) uimanager.insert_action_group(actiongroup, 3) - actiongroup = gtk.ActionGroup('Help') + actiongroup = Gtk.ActionGroup('Help') actiongroup.add_actions([ - ('About', gtk.STOCK_ABOUT, _('_About'), None, + ('About', Gtk.STOCK_ABOUT, _('_About'), None, _('Display informations about the program'), self._on_about_clicked), ]) @@ -215,36 +216,37 @@ # Add a UI description uimanager.add_ui_from_string(ui) - timers_image = gtk.image_new_from_icon_name("stock_timer", gtk.ICON_SIZE_MENU) + timers_image = Gtk.Image.new_from_icon_name("appointment-soon", Gtk.IconSize.MENU) timers_image.show() self.timersitem = uimanager.get_widget('/MenuBar/Timers/EditTimers') self.timersitem.set_image(timers_image) self.timersitem.set_sensitive(False) - recordings_image = gtk.image_new_from_icon_name("video", gtk.ICON_SIZE_MENU) + recordings_image = Gtk.Image.new_from_icon_name("video", Gtk.IconSize.MENU) recordings_image.show() recordings = uimanager.get_widget('/MenuBar/Timers/Recordings') recordings.set_image(recordings_image) - whatson_image = gtk.image_new_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_MENU) + whatson_image = Gtk.Image.new_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.MENU) whatson_image.show() - whatons_item = uimanager.get_widget('/MenuBar/View/WhatsOnNow') - whatons_item.set_image(whatson_image) + self.whatons_item = uimanager.get_widget('/MenuBar/View/WhatsOnNow') + self.whatons_item.set_image(whatson_image) + self.whatons_item.set_sensitive(False) self.refresh_menuitem = uimanager.get_widget('/MenuBar/View/Refresh') self.refresh_menuitem.set_sensitive(False) self.prev_day_menuitem = uimanager.get_widget('/MenuBar/View/PrevDay') - prev_image = gtk.image_new_from_stock(gtk.STOCK_GO_BACK, gtk.ICON_SIZE_MENU) + prev_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_BACK, Gtk.IconSize.MENU) prev_image.show() self.prev_day_menuitem.set_image(prev_image) self.prev_day_menuitem.set_sensitive(False) self.next_day_menuitem = uimanager.get_widget('/MenuBar/View/NextDay') - next_image = gtk.image_new_from_stock(gtk.STOCK_GO_FORWARD, gtk.ICON_SIZE_MENU) + next_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_FORWARD, Gtk.IconSize.MENU) next_image.show() self.next_day_menuitem.set_image(next_image) self.next_day_menuitem.set_sensitive(False) @@ -252,17 +254,17 @@ # Create a MenuBar menubar = uimanager.get_widget('/MenuBar') menubar.show() - self.vbox_outer.pack_start(menubar, False) + self.vbox_outer.pack_start(menubar, False, True, 0) def __create_toolbar(self): - self.toolbar = gtk.Toolbar() + self.toolbar = Gtk.Toolbar() self.toolbar.show() - self.vbox_outer.pack_start(self.toolbar, False) + self.vbox_outer.pack_start(self.toolbar, False, True, 0) - timers_image = gtk.image_new_from_icon_name("stock_timer", gtk.ICON_SIZE_MENU) + timers_image = Gtk.Image.new_from_icon_name("appointment-soon", Gtk.IconSize.MENU) timers_image.show() - self.button_display_timers = gtk.ToolButton(icon_widget=timers_image, label=_("Recording schedule")) + self.button_display_timers = Gtk.ToolButton(icon_widget=timers_image, label=_("Recording schedule")) self.button_display_timers.set_is_important(True) self.button_display_timers.set_sensitive(False) self.button_display_timers.connect("clicked", self._on_button_display_timers_clicked) @@ -270,46 +272,47 @@ self.button_display_timers.show() self.toolbar.insert(self.button_display_timers, 0) - recordings_image = gtk.image_new_from_icon_name("video", gtk.ICON_SIZE_MENU) + recordings_image = Gtk.Image.new_from_icon_name("video", Gtk.IconSize.MENU) recordings_image.show() - button_recordings = gtk.ToolButton(icon_widget=recordings_image, label=_("Recordings")) + button_recordings = Gtk.ToolButton(icon_widget=recordings_image, label=_("Recordings")) button_recordings.set_is_important(True) button_recordings.connect("clicked", self._on_button_recordings_clicked) button_recordings.show() self.toolbar.insert(button_recordings, 1) - whatson_image = gtk.image_new_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_LARGE_TOOLBAR) + whatson_image = Gtk.Image.new_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.LARGE_TOOLBAR) whatson_image.show() - button_whatson = gtk.ToolButton(icon_widget=whatson_image, label=_("What's on now")) - button_whatson.set_is_important(True) - button_whatson.connect("clicked", self._on_whats_on_now_clicked) - button_whatson.show() - self.toolbar.insert(button_whatson, 2) + self.button_whatson = Gtk.ToolButton(icon_widget=whatson_image, label=_("What's on now")) + self.button_whatson.set_is_important(True) + self.button_whatson.set_sensitive(False) + self.button_whatson.connect("clicked", self._on_whats_on_now_clicked) + self.button_whatson.show() + self.toolbar.insert(self.button_whatson, 2) - sep = gtk.SeparatorToolItem() + sep = Gtk.SeparatorToolItem() sep.show() self.toolbar.insert(sep, 3) - self.refresh_button = gtk.ToolButton(gtk.STOCK_REFRESH) + self.refresh_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_REFRESH) self.refresh_button.connect("clicked", self._on_refresh_clicked) self.refresh_button.set_tooltip_markup(_("Refresh program guide")) self.refresh_button.show() self.toolbar.insert(self.refresh_button, 4) - prev_image = gtk.image_new_from_stock(gtk.STOCK_GO_BACK, gtk.ICON_SIZE_LARGE_TOOLBAR) + prev_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_BACK, Gtk.IconSize.LARGE_TOOLBAR) prev_image.show() - self.button_prev_day = gtk.ToolButton(icon_widget=prev_image, label=_("Previous Day")) + self.button_prev_day = Gtk.ToolButton(icon_widget=prev_image, label=_("Previous Day")) self.button_prev_day.connect("clicked", self._on_button_prev_day_clicked) self.button_prev_day.set_tooltip_markup(_("Go to previous day")) self.button_prev_day.set_sensitive(False) self.button_prev_day.show() self.toolbar.insert(self.button_prev_day, 5) - next_image = gtk.image_new_from_stock(gtk.STOCK_GO_FORWARD, gtk.ICON_SIZE_LARGE_TOOLBAR) + next_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_FORWARD, Gtk.IconSize.LARGE_TOOLBAR) next_image.show() - self.button_next_day = gtk.ToolButton(icon_widget=next_image, label=_("Next Day")) + self.button_next_day = Gtk.ToolButton(icon_widget=next_image, label=_("Next Day")) self.button_next_day.connect("clicked", self._on_button_next_day_clicked) self.button_next_day.set_tooltip_markup(_("Go to next day")) self.button_next_day.set_sensitive(False) @@ -321,7 +324,7 @@ for group in groups: self._append_group(group) self.check_single_group_mode() - self.manager.get_registered_device_groups(reply_handler=append_groups) + self.manager.get_registered_device_groups(result_handler=append_groups) def check_single_group_mode(self): val = len(self.devgroupslist) == 1 @@ -372,7 +375,7 @@ def _on_manager_group_added(self, manager, group_id): group = self.manager.get_device_group(group_id) - if group: + if group != None: self._append_group(group) self.check_single_group_mode() @@ -402,6 +405,7 @@ group = self._get_selected_group() if group != None: self._set_timers_sensitive(True) + self._set_whatson_sensitive(True) self.channelsstore = ChannelsStore(group) self.channelsview.set_model(self.channelsstore) @@ -413,7 +417,7 @@ def _on_devgroupslist_inserted(self, model, path, aiter): if len(model) == 1: # Delay the call otherwise we get DBus errors - gobject.timeout_add(100, self._select_first_group) + GObject.timeout_add(100, self._select_first_group) def _on_channel_selected(self, treeselection): model, aiter = treeselection.get_selected() @@ -457,9 +461,9 @@ self.runningnextstore = RunningNextStore(group) - self.scrolledrunningnext = gtk.ScrolledWindow() - self.scrolledrunningnext.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrolledrunningnext.set_shadow_type(gtk.SHADOW_IN) + self.scrolledrunningnext = Gtk.ScrolledWindow() + self.scrolledrunningnext.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + self.scrolledrunningnext.set_shadow_type(Gtk.ShadowType.IN) self.scrolledrunningnext.show() self.runningnextview = RunningNextView(self.runningnextstore) @@ -488,19 +492,23 @@ def _set_refresh_sensitive(self, val): self.refresh_button.set_sensitive(val) self.refresh_menuitem.set_sensitive(val) - + + def _set_whatson_sensitive(self, val): + self.whatons_item.set_sensitive(val) + self.button_whatson.set_sensitive(val) + def _on_event_selected(self, treeview, event): - if event.type == gtk.gdk._2BUTTON_PRESS: + if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS"): model, aiter = treeview.get_selection().get_selected() if aiter != None: - dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO) + dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO) dialog.set_markup ( "%s" % _("Schedule recording for the selected event?")) - rec_id = -1 + success = True - if dialog.run() == gtk.RESPONSE_YES: + if dialog.run() == Gtk.ResponseType.YES: event_id = model[aiter][model.COL_EVENT_ID] group = self._get_selected_group() channel_sid = self._get_selected_channel_sid() @@ -513,20 +521,20 @@ dialog.run() dialog.destroy() - def _on_button_display_timers_clicked(self, button): + def _on_button_display_timers_clicked(self, button, user_data=None): group = self._get_selected_group() if group != None: edit = EditTimersDialog(group, self) edit.run() edit.destroy() - def _on_whats_on_now_clicked(self, button): + def _on_whats_on_now_clicked(self, button, user_data=None): self._reset_schedule_view() - def _on_refresh_clicked(self, button): + def _on_refresh_clicked(self, button, user_data=None): self.schedulestore.reload_all() - def _on_button_prev_day_clicked(self, button): + def _on_button_prev_day_clicked(self, button, user_data=None): if self.schedulestore != None: model, aiter = self.scheduleview.get_selection().get_selected() if aiter == None: @@ -540,9 +548,9 @@ self._set_next_day_sensitive(True) day_path = model.get_path(day_iter) self.scheduleview.scroll_to_cell(day_path, use_align=True) - self.scheduleview.set_cursor(day_path) + self.scheduleview.set_cursor(day_path, None, False) - def _on_button_next_day_clicked(self, button): + def _on_button_next_day_clicked(self, button, user_data=None): if self.schedulestore != None: model, aiter = self.scheduleview.get_selection().get_selected() if aiter == None: @@ -556,33 +564,33 @@ self._set_previous_day_sensitive(True) day_path = model.get_path(day_iter) self.scheduleview.scroll_to_cell(day_path, use_align=True) - self.scheduleview.set_cursor(day_path) + self.scheduleview.set_cursor(day_path, None, False) - def _on_button_prefs_clicked(self, button): + def _on_button_prefs_clicked(self, button, user_data=None): prefs = Preferences(self.manager, self) prefs.show() - def _on_button_recordings_clicked(self, button): + def _on_button_recordings_clicked(self, button, user_data=None): dialog = RecordingsDialog(self) dialog.run() dialog.destroy() - def _on_view_channels_clicked(self, action): + def _on_view_channels_clicked(self, action, user_data=None): if self.vbox_left: if action.get_active(): self.vbox_left.show() else: self.vbox_left.hide() - def _on_view_toolbar_clicked(self, action): + def _on_view_toolbar_clicked(self, action, user_data=None): if self.toolbar: if action.get_active(): self.toolbar.show() else: self.toolbar.hide() - def _on_about_clicked(self, action): - about = gtk.AboutDialog() + def _on_about_clicked(self, action, user_data=None): + about = Gtk.AboutDialog() about.set_transient_for(self) #translators: These appear in the About dialog, usual format applies. about.set_translator_credits( _("translator-credits") ) @@ -594,7 +602,7 @@ about.run() about.destroy() - def _on_edit_channellists_clicked(self, action): + def _on_edit_channellists_clicked(self, action, user_data=None): dialog = ChannelListEditorDialog(self.manager, parent=self) dialog.run() dialog.destroy() diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/preferences/DeviceGroupsView.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/preferences/DeviceGroupsView.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/preferences/DeviceGroupsView.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/preferences/DeviceGroupsView.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,27 +16,27 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import gobject -from gettext import gettext as _ +from gi.repository import Gtk +from gi.repository import GObject +from gnomedvb import _ from gnomedvb.Device import Device __all__ = ["UnassignedDevicesStore", "DeviceGroupsStore", "DeviceGroupsView"] -class UnassignedDevicesStore (gtk.ListStore): +class UnassignedDevicesStore (Gtk.ListStore): (COL_DEVICE,) = range(1) def __init__(self): - gtk.ListStore.__init__(self, gobject.TYPE_PYOBJECT) + Gtk.ListStore.__init__(self, GObject.TYPE_PYOBJECT) -class DeviceGroupsStore (gtk.TreeStore): +class DeviceGroupsStore (Gtk.TreeStore): (COL_GROUP, COL_DEVICE,) = range(2) def __init__(self): - gtk.TreeStore.__init__(self, gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT) + Gtk.TreeStore.__init__(self, GObject.GObject, GObject.TYPE_PYOBJECT) def get_groups(self): groups = [] @@ -46,19 +46,20 @@ return groups -class DeviceGroupsView (gtk.TreeView): +class DeviceGroupsView (Gtk.TreeView): def __init__(self, model): - gtk.TreeView.__init__(self, model) + GObject.GObject.__init__(self) + self.set_model(model) self.set_headers_visible(False) #self.set_reorderable(True) - cell_description = gtk.CellRendererText () - column_description = gtk.TreeViewColumn (_("Devices"), cell_description) - column_description.set_cell_data_func(cell_description, self.get_description_data) + cell_description = Gtk.CellRendererText () + column_description = Gtk.TreeViewColumn (_("Devices"), cell_description) + column_description.set_cell_data_func(cell_description, self.get_description_data, None) self.append_column(column_description) - def get_description_data(self, column, cell, model, aiter): + def get_description_data(self, column, cell, model, aiter, user_data=None): device = model[aiter][model.COL_DEVICE] if isinstance(device, Device): @@ -71,7 +72,7 @@ group = model[aiter][model.COL_GROUP] text = _("Group %d") % group["id"] else: - text = device + text = device[0] cell.set_property("markup", text) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/preferences/Dialogs.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/preferences/Dialogs.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/preferences/Dialogs.py 2010-04-08 13:14:08.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/preferences/Dialogs.py 2011-10-30 11:51:06.000000000 +0000 @@ -16,54 +16,51 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import gobject -from gettext import gettext as _ +from gi.repository import Gtk +from gi.repository import GObject +from gnomedvb import _ from gnomedvb.ui.widgets.Frame import BaseFrame, TextFieldLabel __all__ = ["AddToGroupDialog", "NewGroupDialog", "EditGroupDialog"] -class AddToGroupDialog (gtk.Dialog): +class AddToGroupDialog (Gtk.Dialog): def __init__(self, parent, model, device_type): - gtk.Dialog.__init__(self, title=_("Add to Group"), - parent=parent, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, - gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) - + Gtk.Dialog.__init__(self, title=_("Add to Group"), parent=parent, + buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, + Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) + self.set_modal(True) + self.set_destroy_with_parent(True) self.__selected_group = None - self.set_has_separator(False) self.set_border_width(5) - self.vbox_main = gtk.VBox(spacing=12) + self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) self.vbox_main.set_border_width(5) self.vbox_main.show() - self.vbox.pack_start(self.vbox_main) + self.get_content_area().pack_start(self.vbox_main, True, True, 0) - groupbox = gtk.HBox(spacing=18) + groupbox = Gtk.Box(spacing=18) groupbox.show() group_frame = BaseFrame("%s" % _("Add Device to Group"), groupbox) group_frame.show() - self.vbox_main.pack_start(group_frame) + self.vbox_main.pack_start(group_frame, True, True, 0) group_label = TextFieldLabel() group_label.show() - label = group_label.get_label() - label.set_markup_with_mnemonic(_("_Group:")) + group_label.set_markup_with_mnemonic(_("_Group:")) groupbox.pack_start(group_label, False, False, 0) - self.groups = gtk.ListStore(str, gobject.TYPE_PYOBJECT) + self.groups = Gtk.ListStore(str, GObject.TYPE_PYOBJECT) - combo = gtk.ComboBox(self.groups) + combo = Gtk.ComboBox.new_with_model(self.groups) combo.connect("changed", self.on_combo_changed) - cell = gtk.CellRendererText() - combo.pack_start(cell) + cell = Gtk.CellRendererText() + combo.pack_start(cell, True) combo.add_attribute(cell, "text", 0) combo.show() - label.set_mnemonic_widget(combo) - groupbox.pack_start(combo) + group_label.set_mnemonic_widget(combo) + groupbox.pack_start(combo, True, True, 0) def append_groups(groups): for group in groups: @@ -72,7 +69,7 @@ if name == "": name = "Group %d" % group["id"] self.groups.append([name, group]) - model.get_registered_device_groups(reply_handler=append_groups) + model.get_registered_device_groups(result_handler=append_groups) def on_combo_changed(self, combo): aiter = combo.get_active_iter() @@ -86,91 +83,88 @@ return self.__selected_group -class NewGroupDialog (gtk.Dialog): +class NewGroupDialog (Gtk.Dialog): def __init__(self, parent): - gtk.Dialog.__init__(self, title=_("Create new Group"), + Gtk.Dialog.__init__(self, title=_("Create new Group"), parent=parent, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, - gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) - + flags=Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, + buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, + Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) + self.set_modal(True) + self.set_destroy_with_parent(True) self.set_default_size(400, 150) - self.set_has_separator(False) self.set_border_width(5) - self.vbox_main = gtk.VBox(spacing=12) + self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) self.vbox_main.set_border_width(5) self.vbox_main.show() - self.vbox.pack_start(self.vbox_main) + self.get_content_area().pack_start(self.vbox_main, True, True, 0) - self.table = gtk.Table(3, 2) - self.table.set_col_spacings(18) - self.table.set_row_spacings(6) + self.table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) + self.table.set_column_spacing(18) + self.table.set_row_spacing(6) self.table.show() general_frame = BaseFrame("%s" % _("General"), self.table) general_frame.show() - self.vbox_main.pack_start(general_frame) + self.vbox_main.pack_start(general_frame, True, True, 0) name = TextFieldLabel() - label = name.get_label() - label.set_markup_with_mnemonic(_("_Name:")) + name.set_markup_with_mnemonic(_("_Name:")) name.show() - self.name_entry = gtk.Entry() + self.name_entry = Gtk.Entry(hexpand=True) self.name_entry.show() - label.set_mnemonic_widget(self.name_entry) + name.set_mnemonic_widget(self.name_entry) - self.table.attach(name, 0, 1, 0, 1, gtk.FILL, gtk.FILL) - self.table.attach(self.name_entry, 1, 2, 0, 1, yoptions=gtk.FILL) + self.table.add(name) + self.table.attach_next_to(self.name_entry, name, Gtk.PositionType.RIGHT, 1, 1) self.channels = TextFieldLabel() - label = self.channels.get_label() - label.set_markup_with_mnemonic(_("Channels _file:")) + self.channels.set_markup_with_mnemonic(_("Channels _file:")) self.channels.show() - self.channelsbox = gtk.HBox(spacing=6) + self.channelsbox = Gtk.Box(spacing=6, hexpand=True) self.channelsbox.show() - self.channels_entry = gtk.Entry() + self.channels_entry = Gtk.Entry() self.channels_entry.set_editable(False) self.channels_entry.show() - self.channelsbox.pack_start(self.channels_entry) - label.set_mnemonic_widget(self.channels_entry) + self.channelsbox.pack_start(self.channels_entry, True, True, 0) + self.channels.set_mnemonic_widget(self.channels_entry) - channels_open = gtk.Button(stock=gtk.STOCK_OPEN) + channels_open = Gtk.Button(stock=Gtk.STOCK_OPEN) channels_open.connect("clicked", self._on_channels_open_clicked) channels_open.show() self.channelsbox.pack_start(channels_open, False, False, 0) - self.table.attach(self.channels, 0, 1, 1, 2, gtk.FILL, gtk.FILL) - self.table.attach(self.channelsbox, 1, 2, 1, 2, yoptions=gtk.FILL) + self.table.add(self.channels) + self.table.attach_next_to(self.channelsbox, self.channels, Gtk.PositionType.RIGHT, 1, 1) - recbox = gtk.HBox(spacing=18) + recbox = Gtk.Box(spacing=18) recbox.show() recordings_frame = BaseFrame("%s" % _("Recordings"), recbox) recordings_frame.show() - self.vbox_main.pack_start(recordings_frame) + self.vbox_main.pack_start(recordings_frame, True, True, 0) recordings = TextFieldLabel() - label = recordings.get_label() - label.set_markup_with_mnemonic(_("_Directory:")) + recordings.set_markup_with_mnemonic(_("_Directory:")) recordings.show() - recbox.pack_start(recordings, False) + recbox.pack_start(recordings, False, True, 0) - recentrybox = gtk.HBox(spacing=6) + recentrybox = Gtk.Box(spacing=6) recentrybox.show() - recbox.pack_start(recentrybox) + recbox.pack_start(recentrybox, True, True, 0) - self.recordings_entry = gtk.Entry() + self.recordings_entry = Gtk.Entry() self.recordings_entry.set_editable(False) self.recordings_entry.show() - recentrybox.pack_start(self.recordings_entry) - label.set_mnemonic_widget(self.recordings_entry) + recentrybox.pack_start(self.recordings_entry, True, True, 0) + recordings.set_mnemonic_widget(self.recordings_entry) - recordings_open = gtk.Button(stock=gtk.STOCK_OPEN) + recordings_open = Gtk.Button(stock=Gtk.STOCK_OPEN) recordings_open.connect("clicked", self._on_recordings_open_clicked) recordings_open.show() recentrybox.pack_start(recordings_open, False, False, 0) @@ -184,20 +178,20 @@ self.channelsbox.hide() def _on_channels_open_clicked(self, button): - dialog = gtk.FileChooserDialog (title = _("Select File"), - parent=self, action=gtk.FILE_CHOOSER_ACTION_OPEN, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, - gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) - if dialog.run() == gtk.RESPONSE_ACCEPT: + dialog = Gtk.FileChooserDialog (title = _("Select File"), + parent=self, action=Gtk.FileChooserAction.OPEN, + buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, + Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) + if dialog.run() == Gtk.ResponseType.ACCEPT: self.channels_entry.set_text(dialog.get_filename()) dialog.destroy() def _on_recordings_open_clicked(self, button): - dialog = gtk.FileChooserDialog (title = _("Select Directory"), - parent=self, action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, - gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) - if dialog.run() == gtk.RESPONSE_ACCEPT: + dialog = Gtk.FileChooserDialog (title = _("Select Directory"), + parent=self, action=Gtk.FileChooserAction.SELECT_FOLDER, + buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, + Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) + if dialog.run() == Gtk.ResponseType.ACCEPT: self.recordings_entry.set_text(dialog.get_filename()) dialog.destroy() diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/preferences/Preferences.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/preferences/Preferences.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/preferences/Preferences.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/preferences/Preferences.py 2011-10-30 11:35:28.000000000 +0000 @@ -16,16 +16,17 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk +from gi.repository import GObject +from gi.repository import Gtk import subprocess from gnomedvb import global_error_handler from gnomedvb.ui.preferences.Dialogs import * from gnomedvb.ui.preferences.DeviceGroupsView import * from gnomedvb.ui.widgets.Frame import Frame -from gettext import gettext as _ +from gnomedvb import _ from gnomedvb.Device import Device -class Preferences(gtk.Window): +class Preferences(Gtk.Window): (BUTTON_EDIT, BUTTON_REMOVE, @@ -33,7 +34,7 @@ BUTTON_PREFERENCES,) = range(4) def __init__(self, model, parent=None): - gtk.Window.__init__(self) + GObject.GObject.__init__(self) self.set_title(_('Digital TV Preferences')) if parent: @@ -42,20 +43,21 @@ self.set_modal(True) self.set_destroy_with_parent(True) self.set_default_size(600, 450) + self.set_position(Gtk.WindowPosition.CENTER_ON_PARENT) - self.vbox = gtk.VBox() + self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.add(self.vbox) self.vbox.show() self.__create_toolbar() - self.vbox_main = gtk.VBox(spacing=12) + self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) self.vbox_main.set_border_width(12) self.vbox_main.show() - self.vbox.pack_start(self.vbox_main) + self.vbox.pack_start(self.vbox_main, True, True, 0) - self.action_area = gtk.HButtonBox() - self.action_area.set_layout(gtk.BUTTONBOX_END) + self.action_area = Gtk.ButtonBox() + self.action_area.set_layout(Gtk.ButtonBoxStyle.END) self.vbox_main.pack_end(self.action_area, False, True, 0) self.action_area.show() @@ -63,9 +65,9 @@ self._model.connect("group-added", self._on_manager_group_added) self._model.connect("group-removed", self._on_manager_group_removed) - close_button = gtk.Button(stock=gtk.STOCK_CLOSE) + close_button = Gtk.Button(stock=Gtk.STOCK_CLOSE) close_button.connect("clicked", lambda w: self.destroy()) - close_button.set_flags(gtk.CAN_DEFAULT) + close_button.set_can_default(True) close_button.show() self.action_area.pack_end(close_button, False, True, 0) close_button.grab_default() @@ -78,39 +80,39 @@ self.devicegroupsview.grab_focus() def __create_toolbar(self): - toolbar = gtk.Toolbar() + toolbar = Gtk.Toolbar() toolbar.show() - self.vbox.pack_start(toolbar, False) + self.vbox.pack_start(toolbar, False, True, 0) - self.button_prefs = gtk.ToolButton(gtk.STOCK_EDIT) + self.button_prefs = Gtk.ToolButton.new_from_stock(Gtk.STOCK_EDIT) self.button_prefs.connect("clicked", self._on_button_prefs_clicked) self.button_prefs.set_sensitive(False) self.button_prefs.set_tooltip_markup(_("Edit selected group")) self.button_prefs.show() toolbar.insert(self.button_prefs, self.BUTTON_EDIT) - self.button_remove = gtk.ToolButton(gtk.STOCK_REMOVE) + self.button_remove = Gtk.ToolButton.new_from_stock(Gtk.STOCK_REMOVE) self.button_remove.connect("clicked", self._on_button_remove_clicked) self.button_remove.set_sensitive(False) self.button_remove.set_tooltip_markup(_("Remove selected device")) self.button_remove.show() toolbar.insert(self.button_remove, self.BUTTON_REMOVE) - sep = gtk.SeparatorToolItem() + sep = Gtk.SeparatorToolItem() sep.show() toolbar.insert(sep, self.SEP1) - prefs_image = gtk.image_new_from_stock(gtk.STOCK_PREFERENCES, gtk.ICON_SIZE_SMALL_TOOLBAR) - button_setup = gtk.MenuToolButton(icon_widget=prefs_image, label=_("Setup")) + prefs_image = Gtk.Image.new_from_stock(Gtk.STOCK_PREFERENCES, Gtk.IconSize.SMALL_TOOLBAR) + button_setup = Gtk.MenuToolButton(icon_widget=prefs_image, label=_("Setup")) button_setup.connect("clicked", self._on_button_setup_clicked) button_setup.set_tooltip_markup(_("Setup devices")) button_setup.show() toolbar.insert(button_setup, self.BUTTON_PREFERENCES) - setup_menu = gtk.Menu() - new_image = gtk.image_new_from_stock(gtk.STOCK_NEW, gtk.ICON_SIZE_MENU) + setup_menu = Gtk.Menu() + new_image = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU) new_image.show() - self.button_new = gtk.ImageMenuItem(_("Create new group")) + self.button_new = Gtk.ImageMenuItem.new_with_label(_("Create new group")) self.button_new.connect("activate", self._on_button_new_clicked) self.button_new.set_image(new_image) self.button_new.set_sensitive(False) @@ -118,9 +120,9 @@ self.button_new.show() setup_menu.append(self.button_new) - add_image = gtk.image_new_from_stock(gtk.STOCK_ADD, gtk.ICON_SIZE_MENU) + add_image = Gtk.Image.new_from_stock(Gtk.STOCK_ADD, Gtk.IconSize.MENU) add_image.show() - self.button_add = gtk.ImageMenuItem(_("Add to group")) + self.button_add = Gtk.ImageMenuItem.new_with_label(_("Add to group")) self.button_add.connect("activate", self._on_button_add_clicked) self.button_add.set_image(add_image) self.button_add.set_sensitive(False) @@ -131,9 +133,9 @@ button_setup.set_menu(setup_menu) def __create_registered_groups(self): - self.groups_box = gtk.HBox(spacing=6) + self.groups_box = Gtk.Box(spacing=6) self.groups_box.show() - self.vbox_main.pack_start(self.groups_box) + self.vbox_main.pack_start(self.groups_box, True, True, 0) self.devicegroups = DeviceGroupsStore() self.devicegroupsview = DeviceGroupsView(self.devicegroups) @@ -142,7 +144,7 @@ groups_frame = Frame("%s" % _("Configured devices"), self.devicegroupsview) groups_frame.show() - self.groups_box.pack_start(groups_frame) + self.groups_box.pack_start(groups_frame, True, True, 0) def __create_unassigned_devices(self): self.unassigned_devices = UnassignedDevicesStore() @@ -153,7 +155,7 @@ unassigned_frame = Frame("%s" % _("Unconfigured devices"), self.unassigned_view) unassigned_frame.show() - self.vbox_main.pack_start(unassigned_frame) + self.vbox_main.pack_start(unassigned_frame, True, True, 0) def _fill(self): def append_unassigned(devices): @@ -164,21 +166,21 @@ for group in groups: self._append_group(group) - self._model.get_unregistered_devices(reply_handler=append_unassigned) - self._model.get_registered_device_groups(reply_handler=append_registered) + self._model.get_unregistered_devices(result_handler=append_unassigned) + self._model.get_registered_device_groups(result_handler=append_registered) def _append_group(self, group, remove_unassigned=False): group.connect("device-added", self._on_group_device_added) group.connect("device-removed", self._on_group_device_removed) group_iter = self.devicegroups.append(None) - self.devicegroups.set(group_iter, self.devicegroups.COL_GROUP, group) - self.devicegroups.set(group_iter, self.devicegroups.COL_DEVICE, group["name"]) + self.devicegroups[group_iter][self.devicegroups.COL_GROUP] = group + self.devicegroups[group_iter][self.devicegroups.COL_DEVICE] = (group["name"],) for device in group["devices"]: dev_iter = self.devicegroups.append(group_iter) - self.devicegroups.set(dev_iter, self.devicegroups.COL_GROUP, group) - self.devicegroups.set(dev_iter, self.devicegroups.COL_DEVICE, device) + self.devicegroups[dev_iter][self.devicegroups.COL_GROUP] = group + self.devicegroups[dev_iter][self.devicegroups.COL_DEVICE] = device if remove_unassigned: self._remove_unassigned_device(device.adapter, device.frontend) @@ -205,16 +207,16 @@ self.button_add.set_sensitive(val) def _on_button_remove_clicked(self, button): - def remove_device_callback(success): + def remove_device_callback(proxy, success, user_data): if success: # "Success: remove device" # Add device to unassigned devices self.unassigned_devices.append([device]) else: # "Error: remove device" - error_dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + error_dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK) error_dialog.set_markup( "%s" % _("Device could not be removed from group")) error_dialog.run() @@ -223,34 +225,35 @@ model, aiter = self.devicegroupsview.get_selection().get_selected() if aiter != None: - group = device = model[aiter][model.COL_GROUP] + group = model[aiter][model.COL_GROUP] device = model[aiter][model.COL_DEVICE] - dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO) + dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO) dialog.set_markup( _("Are you sure you want to remove device %s from %s") % (device.name, device.group_name)) response = dialog.run() dialog.destroy() - if response == gtk.RESPONSE_YES: + if response == Gtk.ResponseType.YES: if isinstance(device, Device): group.remove_device(device, - reply_handler=remove_device_callback, + result_handler=remove_device_callback, error_handler=global_error_handler) def _on_button_setup_clicked(self, button): - subprocess.Popen(["gnome-dvb-setup", - "--transient-for=%d" % self.window.xid]) + subprocess.Popen(["gnome-dvb-setup"]) + # XXX XID + # "--transient-for=%d" % self.get_window().xid]) def _on_button_new_clicked(self, button): - def add_device_to_new_group_callback(success): + def add_device_to_new_group_callback(proxy, success, user_data): if not success: # "Error: create group" - error_dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + error_dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK) error_dialog.set_markup( "%s" % _("Group could not be created")) error_dialog.format_secondary_text( @@ -264,24 +267,24 @@ if aiter != None: device = model[aiter][model.COL_DEVICE] dialog = NewGroupDialog(self) - if dialog.run() == gtk.RESPONSE_ACCEPT: + if dialog.run() == Gtk.ResponseType.ACCEPT: channels = dialog.channels_entry.get_text() recdir = dialog.recordings_entry.get_text() name = dialog.name_entry.get_text() self._model.add_device_to_new_group(device.adapter, device.frontend, channels, recdir, name, - reply_handler=add_device_to_new_group_callback, + result_handler=add_device_to_new_group_callback, error_handler=global_error_handler) dialog.destroy() def _on_button_add_clicked(self, button): - def add_device_callback(success): + def add_device_callback(proxy, success, user_data): if not success: # "Error: add to group" - error_dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + error_dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK) error_dialog.set_markup( "%s" % _("Device could not be added to group")) error_dialog.format_secondary_text( @@ -295,10 +298,10 @@ if aiter != None: device = self.unassigned_devices[aiter][0] dialog = AddToGroupDialog(self, self._model, device.type) - if dialog.run() == gtk.RESPONSE_ACCEPT: + if dialog.run() == Gtk.ResponseType.ACCEPT: group = dialog.get_selected_group() group.add_device(device.adapter, device.frontend, - reply_handler=add_device_callback, + result_handler=add_device_callback, error_handler=global_error_handler) dialog.destroy() @@ -312,7 +315,7 @@ recdir = group.get_recordings_directory() dialog = EditGroupDialog(group_name, recdir, self) - if dialog.run() == gtk.RESPONSE_ACCEPT: + if dialog.run() == Gtk.ResponseType.ACCEPT: name = dialog.name_entry.get_text() group.set_name(name) recdir = dialog.recordings_entry.get_text() @@ -321,7 +324,7 @@ def _on_manager_group_added(self, manager, group_id): group = manager.get_device_group(group_id) - if group: + if group != None: self._append_group(group, remove_unassigned=True) def _on_manager_group_removed(self, manager, group_id): @@ -345,7 +348,8 @@ device = Device (group["id"], devname, adapter, frontend, devtype) device.group_name = group["name"] dev_iter = self.devicegroups.append(aiter) - self.devicegroups.set(dev_iter, self.devicegroups.COL_DEVICE, device) + self.devicegroups[dev_iter][self.devicegroups.COL_GROUP] = group + self.devicegroups[dev_iter][self.devicegroups.COL_DEVICE] = device break def _on_group_device_removed(self, group, adapter, frontend): diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/recordings/DetailsDialog.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/recordings/DetailsDialog.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/recordings/DetailsDialog.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/recordings/DetailsDialog.py 2011-08-19 17:06:25.000000000 +0000 @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk +from gi.repository import Gtk import gnomedvb import gnomedvb.ui.widgets.DetailsDialog @@ -26,12 +26,13 @@ gnomedvb.ui.widgets.DetailsDialog.DetailsDialog.__init__(self, parent=parent) self.rec_button.hide() - self.action_area.set_layout(gtk.BUTTONBOX_END) + self.get_action_area().set_layout(Gtk.ButtonBoxStyle.END) self._fill(rec_id) def _fill(self, rec_id): - def get_all_informations_callback(infos, success): + def get_all_informations_callback(proxy, data, user_data): + infos, success = data if success: self.set_title(infos[1]) self.set_description(infos[2]) @@ -41,6 +42,6 @@ recstore = gnomedvb.DVBRecordingsStoreClient() recstore.get_all_informations(rec_id, - reply_handler=get_all_informations_callback, + result_handler=get_all_informations_callback, error_handler=gnomedvb.global_error_handler) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/recordings/RecordingsDialog.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/recordings/RecordingsDialog.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/recordings/RecordingsDialog.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/recordings/RecordingsDialog.py 2011-10-30 11:35:51.000000000 +0000 @@ -16,32 +16,33 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import Gdk +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb import global_error_handler from gnomedvb.ui.widgets.RecordingsStore import RecordingsStore from gnomedvb.ui.widgets.RecordingsView import RecordingsView from gnomedvb.ui.recordings.DetailsDialog import DetailsDialog -class RecordingsDialog(gtk.Dialog): +class RecordingsDialog(Gtk.Dialog): def __init__(self, parent=None): - gtk.Dialog.__init__(self, title=_("Recordings"), - parent=parent, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) - + Gtk.Dialog.__init__(self, title=_("Recordings"), + parent=parent) + + self.set_modal(True) + self.set_destroy_with_parent(True) self.set_default_size(600, 400) - self.set_has_separator(False) self.set_border_width(5) - close_button = self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) + close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE) close_button.grab_default() - hbox_main = gtk.HBox(spacing=12) + hbox_main = Gtk.Box(spacing=12) hbox_main.set_border_width(5) hbox_main.show() - self.vbox.pack_start(hbox_main) + self.get_content_area().pack_start(hbox_main, True, True, 0) self._model = RecordingsStore() self._model.set_sort_func(RecordingsStore.COL_START, @@ -54,30 +55,30 @@ treeselection = self._view.get_selection() treeselection.connect("changed", self._on_selection_changed) - scrolledwindow = gtk.ScrolledWindow() - scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - scrolledwindow.set_shadow_type(gtk.SHADOW_IN) + scrolledwindow = Gtk.ScrolledWindow() + scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + scrolledwindow.set_shadow_type(Gtk.ShadowType.IN) scrolledwindow.add(self._view) scrolledwindow.show() - hbox_main.pack_start(scrolledwindow) + hbox_main.pack_start(scrolledwindow, True, True, 0) - buttonbox = gtk.VButtonBox() + buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL) buttonbox.set_spacing(6) - buttonbox.set_layout(gtk.BUTTONBOX_START) + buttonbox.set_layout(Gtk.ButtonBoxStyle.START) buttonbox.show() - hbox_main.pack_start(buttonbox, False) + hbox_main.pack_start(buttonbox, False, True, 0) - self.details_button = gtk.Button(stock=gtk.STOCK_INFO) + self.details_button = Gtk.Button(stock=Gtk.STOCK_INFO) self.details_button.connect("clicked", self._on_details_clicked) self.details_button.set_sensitive(False) self.details_button.show() - buttonbox.pack_start(self.details_button) + buttonbox.pack_start(self.details_button, True, True, 0) - self.delete_button = gtk.Button(stock=gtk.STOCK_DELETE) + self.delete_button = Gtk.Button(stock=Gtk.STOCK_DELETE) self.delete_button.connect("clicked", self._on_delete_clicked) self.delete_button.set_sensitive(False) self.delete_button.show() - buttonbox.pack_start(self.delete_button) + buttonbox.pack_start(self.delete_button, True, True, 0) def _on_selection_changed(self, treeselection): model, rows = treeselection.get_selected_rows() @@ -89,16 +90,16 @@ model, aiter = self._view.get_selection().get_selected() if aiter != None: - dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO) + dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO) dialog.set_markup("%s" % _("Delete selected recordings?")) response = dialog.run() dialog.destroy() - if response == gtk.RESPONSE_YES: + if response == Gtk.ResponseType.YES: client = self._model.get_recordings_store_client() client.delete(model[aiter][RecordingsStore.COL_ID], - reply_handler=self._delete_callback, + result_handler=self._delete_callback, error_handler=global_error_handler) def _on_details_clicked(self, button): @@ -110,10 +111,10 @@ dialog.destroy () def _on_recording_selected(self, treeview, event): - if event.type == gtk.gdk._2BUTTON_PRESS: + if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS"): self._on_details_clicked(treeview) - def _delete_callback(self, success): + def _delete_callback(self, proxy, success, user_data): if not success: global_error_handler("Could not delete recording") diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/CalendarDialog.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/CalendarDialog.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/CalendarDialog.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/CalendarDialog.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,23 +16,25 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import Gtk +from gnomedvb import _ -class CalendarDialog(gtk.Dialog): +class CalendarDialog(Gtk.Dialog): def __init__(self, parent): - gtk.Dialog.__init__(self, title=_("Pick a date"), parent=parent, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) + Gtk.Dialog.__init__(self, title=_("Pick a date"), parent=parent) + + self.set_modal(True) + self.set_destroy_with_parent(True) - self.set_position(gtk.WIN_POS_MOUSE) - self.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT) - ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT) + self.set_position(Gtk.WindowPosition.MOUSE) + self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT) + ok_button = self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT) ok_button.grab_default() - self.calendar = gtk.Calendar() + self.calendar = Gtk.Calendar() self.calendar.show() - self.vbox.add(self.calendar) + self.get_content_area().add(self.calendar) def get_date(self): return self.calendar.get_date() diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/EditTimersDialog.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/EditTimersDialog.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/EditTimersDialog.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/EditTimersDialog.py 2011-10-30 11:36:10.000000000 +0000 @@ -16,9 +16,9 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gobject -import gtk -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gtk +from gnomedvb import _ import datetime import gnomedvb from gnomedvb import global_error_handler @@ -26,7 +26,7 @@ from gnomedvb.ui.timers.TimerDialog import TimerDialog from gnomedvb.ui.widgets.CellRendererDatetime import CellRendererDatetime -class EditTimersDialog(gtk.Dialog): +class EditTimersDialog(Gtk.Dialog): (COL_ID, COL_CHANNEL, @@ -40,89 +40,91 @@ @param device_group: ID of device group @type device_group: int @param parent: Parent window - @type parent: gtk.Window + @type parent: Gtk.Window """ - gtk.Dialog.__init__(self, title=_("Recording schedule"), - parent=parent, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) - + Gtk.Dialog.__init__(self, title=_("Recording schedule"), + parent=parent) + + self.recorder = None + + self.set_modal(True) + self.set_destroy_with_parent(True) self.device_group = device_group self.set_recorder(device_group) - close_button = self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) + close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE) close_button.grab_default() self.set_default_size(550, 400) - self.set_has_separator(False) self.set_border_width(5) - self.main_box = gtk.HBox(spacing=12) + self.main_box = Gtk.Box(spacing=12) self.main_box.set_border_width(5) self.main_box.show() - self.vbox.pack_start(self.main_box) + self.get_content_area().pack_start(self.main_box, True, True, 0) - self.timerslist = gtk.ListStore(int, str, str, gobject.TYPE_PYOBJECT, int, bool) + self.timerslist = Gtk.ListStore(long, str, str, GObject.TYPE_PYOBJECT, long, bool) self.timerslist.set_sort_func(self.COL_START, self._datetime_sort_func) - self.timersview = gtk.TreeView(self.timerslist) + self.timersview = Gtk.TreeView.new_with_model(self.timerslist) self.timersview.get_selection().connect("changed", self._on_timers_selection_changed) - col_channel = gtk.TreeViewColumn(_("Channel")) - cell_rec = gtk.CellRendererPixbuf() - col_channel.pack_start(cell_rec) - col_channel.set_cell_data_func(cell_rec, self._get_recording_icon_for_cell) + col_channel = Gtk.TreeViewColumn(_("Channel")) + cell_rec = Gtk.CellRendererPixbuf() + col_channel.pack_start(cell_rec, True) + col_channel.set_cell_data_func(cell_rec, self._get_recording_icon_for_cell, None) col_channel.add_attribute(cell_rec, "stock-id", self.COL_ACTIVE) - cell_channel = gtk.CellRendererText() - col_channel.pack_start(cell_channel) + cell_channel = Gtk.CellRendererText() + col_channel.pack_start(cell_channel, True) col_channel.add_attribute(cell_channel, "text", self.COL_CHANNEL) self.timersview.append_column(col_channel) - col_title = gtk.TreeViewColumn(_("Title")) - cell_title = gtk.CellRendererText() - col_title.pack_start(cell_title) + col_title = Gtk.TreeViewColumn(_("Title")) + cell_title = Gtk.CellRendererText() + col_title.pack_start(cell_title, True) col_title.add_attribute(cell_title, "text", self.COL_TITLE) self.timersview.append_column(col_title) cell_starttime = CellRendererDatetime() - col_starttime = gtk.TreeViewColumn(_("Start time")) - col_starttime.pack_start(cell_starttime) + col_starttime = Gtk.TreeViewColumn(_("Start time")) + col_starttime.pack_start(cell_starttime, True) col_starttime.add_attribute(cell_starttime, "datetime", self.COL_START) self.timersview.append_column(col_starttime) - cell_duration = gtk.CellRendererText() - col_duration = gtk.TreeViewColumn(_("Duration")) - col_duration.pack_start(cell_duration, expand=False) - col_duration.set_cell_data_func(cell_duration, self._get_duration_data) + cell_duration = Gtk.CellRendererText() + col_duration = Gtk.TreeViewColumn(_("Duration")) + col_duration.pack_start(cell_duration, False) + col_duration.set_cell_data_func(cell_duration, self._get_duration_data, None) self.timersview.append_column(col_duration) - self.scrolledwindow = gtk.ScrolledWindow() - self.scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrolledwindow.set_shadow_type(gtk.SHADOW_ETCHED_IN) + self.scrolledwindow = Gtk.ScrolledWindow() + self.scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + self.scrolledwindow.set_shadow_type(Gtk.ShadowType.ETCHED_IN) self.scrolledwindow.add(self.timersview) - self.main_box.pack_start(self.scrolledwindow) + self.main_box.pack_start(self.scrolledwindow, True, True, 0) - self.buttonbox = gtk.VButtonBox() + self.buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL) self.buttonbox.set_spacing(6) - self.buttonbox.set_layout(gtk.BUTTONBOX_START) - self.button_add = gtk.Button(stock=gtk.STOCK_ADD) + self.buttonbox.set_layout(Gtk.ButtonBoxStyle.START) + self.button_add = Gtk.Button(stock=Gtk.STOCK_ADD) self.button_add.connect("clicked", self._on_button_add_clicked) - self.buttonbox.pack_start(self.button_add) + self.buttonbox.pack_start(self.button_add, True, True, 0) - self.button_delete = gtk.Button(stock=gtk.STOCK_DELETE) + self.button_delete = Gtk.Button(stock=Gtk.STOCK_DELETE) self.button_delete.connect("clicked", self._on_button_delete_clicked) self.button_delete.set_sensitive(False) - self.buttonbox.pack_start(self.button_delete) + self.buttonbox.pack_start(self.button_delete, True, True, 0) - self.button_edit = gtk.Button(stock=gtk.STOCK_EDIT) + self.button_edit = Gtk.Button(stock=Gtk.STOCK_EDIT) self.button_edit.connect("clicked", self._on_button_edit_clicked) self.button_edit.set_sensitive(False) - self.buttonbox.pack_start(self.button_edit) + self.buttonbox.pack_start(self.button_edit, True, True, 0) self.main_box.pack_start(self.buttonbox, False, False, 0) @@ -137,18 +139,18 @@ self.recorder.connect("recording-finished", self._set_recording_state, False) def get_timers(self): - def add_timer(timers): + def add_timer(proxy, timers, user_data): for timer_id in timers: self._add_timer(timer_id) - self.recorder.get_timers(reply_handler=add_timer, error_handler=global_error_handler) + self.recorder.get_timers(result_handler=add_timer, error_handler=global_error_handler) def _add_timer(self, timer_id): start_list, success = self.recorder.get_start_time(timer_id) if success: starttime = datetime.datetime(*start_list) (duration, active, channel, title) = self.recorder.get_all_informations(timer_id)[0][1:] - - self.timerslist.append([timer_id, channel, title, starttime, duration, active]) + + self.timerslist.append([long(timer_id), channel, title, starttime, duration, bool(active)]) def _remove_timer(self, timer_id): for row in self.timerslist: @@ -156,11 +158,11 @@ self.timerslist.remove(row.iter) def _on_button_delete_clicked(self, button): - def delete_timer_callback(success): + def delete_timer_callback(proxy, success, user_data): if not success: - error_dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + error_dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK) error_dialog.set_markup( "%s" % _("Timer could not be deleted")) error_dialog.run() @@ -170,9 +172,9 @@ if aiter != None: timer_id = model[aiter][self.COL_ID] if self.recorder.is_timer_active(timer_id): - dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO) + dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO) dialog.set_markup( "%s" % _("Abort active recording?")) dialog.format_secondary_text( @@ -180,17 +182,18 @@ _("Deleting this timer will abort the recording.")) response = dialog.run() dialog.destroy() - if response == gtk.RESPONSE_YES: + if response == Gtk.ResponseType.YES: self.recorder.delete_timer(timer_id, - reply_handler=delete_timer_callback, + result_handler=delete_timer_callback, error_handler=global_error_handler) else: self.recorder.delete_timer(timer_id, - reply_handler=delete_timer_callback, + result_handler=delete_timer_callback, error_handler=global_error_handler) def _on_button_add_clicked(self, button): - def add_timer_callback(rec_id, success): + def add_timer_callback(proxy, data, user_data): + rec_id, success = data if not success: err_dialog = TimerFailureDialog(self) err_dialog.run() @@ -198,14 +201,14 @@ dialog = TimerDialog(self, self.device_group) response_id = dialog.run() - if response_id == gtk.RESPONSE_ACCEPT: + if response_id == Gtk.ResponseType.ACCEPT: duration = dialog.get_duration() start = dialog.get_start_time() channel = dialog.get_channel() self.recorder.add_timer (channel, start[0], start[1], start[2], start[3], start[4], duration, - reply_handler=add_timer_callback, + result_handler=add_timer_callback, error_handler=global_error_handler) dialog.destroy() @@ -222,7 +225,7 @@ dialog.set_time_and_date_editable( not model[aiter][self.COL_ACTIVE]) response_id = dialog.run() - if response_id == gtk.RESPONSE_ACCEPT: + if response_id == Gtk.ResponseType.ACCEPT: timer_id = model[aiter][self.COL_ID] new_duration = dialog.get_duration() new_start = dialog.get_start_time() @@ -256,19 +259,19 @@ def _set_recording_state(self, recorder, timer_id, state): for row in self.timerslist: if row[self.COL_ID] == timer_id: - self.timerslist.set (row.iter, self.COL_ACTIVE, state) + self.timerslist[row.iter][self.COL_ACTIVE] = bool(state) - def _get_recording_icon_for_cell(self, column, cell, model, aiter): + def _get_recording_icon_for_cell(self, column, cell, model, aiter, user_data): if model[aiter][self.COL_ACTIVE]: - cell.set_property("stock-id", gtk.STOCK_MEDIA_RECORD) + cell.set_property("stock-id", Gtk.STOCK_MEDIA_RECORD) - def _get_duration_data(self, column, cell, model, aiter): + def _get_duration_data(self, column, cell, model, aiter, user_data): # We have minutes but need seconds duration = model[aiter][self.COL_DURATION] * 60 duration_str = gnomedvb.seconds_to_time_duration_string(duration) cell.set_property("text", duration_str) - def _datetime_sort_func(treemodel, iter1, iter2): + def _datetime_sort_func(self, treemodel, iter1, iter2): d1 = treemodel[iter1][self.COL_START] d2 = treemodel[iter2][self.COL_START] return cmp(d1, d2) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/MessageDialogs.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/MessageDialogs.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/MessageDialogs.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/MessageDialogs.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,26 +16,26 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import Gtk +from gnomedvb import _ -class TimerFailureDialog(gtk.MessageDialog): +class TimerFailureDialog(Gtk.MessageDialog): def __init__(self, parent_window): - gtk.MessageDialog.__init__(self, parent=parent_window, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + Gtk.MessageDialog.__init__(self, parent=parent_window, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK) self.set_markup ("%s" % _("Timer could not be created")) self.format_secondary_text( _("Make sure that the timer doesn't conflict with another one and doesn't start in the past.") ) -class TimerSuccessDialog(gtk.MessageDialog): +class TimerSuccessDialog(Gtk.MessageDialog): def __init__(self, parent_window): - gtk.MessageDialog.__init__(self, parent=parent_window, - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK) + Gtk.MessageDialog.__init__(self, parent=parent_window, + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.INFO, buttons=Gtk.ButtonsType.OK) self.set_markup("%s" % ( _("Recording has been scheduled successfully")) ) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/TimerDialog.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/TimerDialog.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/timers/TimerDialog.py 2010-06-05 10:42:50.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/timers/TimerDialog.py 2011-10-30 12:03:38.000000000 +0000 @@ -17,113 +17,112 @@ # along with GNOME DVB Daemon. If not, see . import datetime -import gtk -from gettext import gettext as _ -from gnomedvb.ui.timers.CalendarDialog import CalendarDialog +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.ui.widgets.ChannelsStore import ChannelsStore from gnomedvb.ui.widgets.ChannelsView import ChannelsView from gnomedvb.ui.widgets.Frame import TextFieldLabel from gnomedvb.ui.widgets.DateTime import DateTimeBox -class TimerDialog(gtk.Dialog): +class TimerDialog(Gtk.Dialog): def __init__(self, parent, device_group, channel=None, starttime=None, duration=60): """ @param parent: Parent window - @type parent: gtk.Window + @type parent: Gtk.Window @param device_group: DeviceGroup instance """ - gtk.Dialog.__init__(self, parent=parent, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) + Gtk.Dialog.__init__(self, parent=parent) + self.set_modal(True) + self.set_destroy_with_parent(True) self.set_default_size(320, -1) self.device_group = device_group self.date_valid = False self.allowed_delta = datetime.timedelta(hours=1) - self.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT) - self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT) - - self.set_has_separator(False) + self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT) + self.ok_button = self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT) + self.set_border_width(5) - table = gtk.Table(rows=4, columns=2) - table.set_col_spacings(18) - table.set_row_spacings(6) + table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) + table.set_column_spacing(18) + table.set_row_spacing(6) table.set_border_width(5) - self.vbox.pack_start(table) + self.get_content_area().pack_start(table, True, True, 0) label_channel = TextFieldLabel() - label = label_channel.get_label() - table.attach(label_channel, 0, 1, 0, 1, gtk.FILL, gtk.FILL) + table.add(label_channel) if channel == None: self.channel_selected = False self.set_title(_("Add Timer")) self.ok_button.set_sensitive(False) - label.set_markup_with_mnemonic(_("_Channel:")) + label_channel.set_markup_with_mnemonic(_("_Channel:")) self.channels = ChannelsStore(device_group) - scrolledchannels = gtk.ScrolledWindow() - scrolledchannels.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - scrolledchannels.set_shadow_type(gtk.SHADOW_ETCHED_IN) - table.attach(scrolledchannels, 0, 2, 1, 2) + scrolledchannels = Gtk.ScrolledWindow(expand=True) + scrolledchannels.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + scrolledchannels.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + table.attach_next_to(scrolledchannels, label_channel, + Gtk.PositionType.BOTTOM, 2, 1) self.channelsview = ChannelsView(self.channels) self.channelsview.set_headers_visible(False) self.channelsview.get_selection().connect("changed", self._on_channel_changed) scrolledchannels.add(self.channelsview) - label.set_mnemonic_widget(self.channelsview) + label_channel.set_mnemonic_widget(self.channelsview) self.channelsview.grab_focus() else: self.channel_selected = True self.set_title(_("Edit Timer")) self.ok_button.set_sensitive(True) - label.set_text(_("Channel:")) + label_channel.set_text(_("Channel:")) self.channels = None self.channelsview = None channel_label = TextFieldLabel(channel) - table.attach(channel_label, 1, 2, 0, 1, yoptions=gtk.FILL) + table.attach_next_to(channel_label, label_channel, + Gtk.PositionType.RIGHT, 1, 1) label_start = TextFieldLabel() - label = label_start.get_label() - label.set_markup_with_mnemonic(_("_Start time:")) - table.attach(label_start, 0, 1, 2, 3) + label_start.set_markup_with_mnemonic(_("_Start time:")) + table.add(label_start) - hbox = gtk.HBox(spacing=6) - table.attach(hbox, 1, 2, 2, 3, yoptions=0) + hbox = Gtk.Box(spacing=6, hexpand=True) + table.attach_next_to(hbox, label_start, Gtk.PositionType.RIGHT, 1, 1) if starttime == None: starttime = datetime.datetime.now() self.datetime_box = DateTimeBox(starttime) self.datetime_box.connect("changed", self._on_datetime_changed) - hbox.pack_start(self.datetime_box) - label.set_mnemonic_widget(self.datetime_box) + hbox.pack_start(self.datetime_box, True, True, 0) + label_start.set_mnemonic_widget(self.datetime_box) label_duration = TextFieldLabel() - label = label_duration.get_label() - label.set_markup_with_mnemonic(_("_Duration:")) - table.attach(label_duration, 0, 1, 3, 4, gtk.FILL, gtk.FILL) + label_duration.set_markup_with_mnemonic(_("_Duration:")) + table.add(label_duration) - duration_hbox = gtk.HBox(spacing=6) - table.attach(duration_hbox, 1, 2, 3, 4) + duration_hbox = Gtk.Box(spacing=6, hexpand=True) + table.attach_next_to(duration_hbox, label_duration, + Gtk.PositionType.RIGHT, 1, 1) - self.duration = gtk.SpinButton() + self.duration = Gtk.SpinButton() self.duration.set_range(1, 65535) self.duration.set_increments(1, 10) self.duration.set_width_chars(3) self.duration.set_value(60) - duration_hbox.pack_start(self.duration, False) - label.set_mnemonic_widget(self.duration) + duration_hbox.pack_start(self.duration, False, True, 0) + label_duration.set_mnemonic_widget(self.duration) minutes_label = TextFieldLabel(_("minutes")) - duration_hbox.pack_start(minutes_label) + duration_hbox.pack_start(minutes_label, True, True, 0) self.set_start_time(starttime) self.set_duration(duration) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/CellRendererDatetime.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/CellRendererDatetime.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/CellRendererDatetime.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/CellRendererDatetime.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,44 +16,44 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gobject -import gtk +from gi.repository import GObject +from gi.repository import Gtk -class CellRendererDatetime(gtk.CellRendererText): +class CellRendererDatetime(Gtk.CellRendererText): __gproperties__ = { - 'datetime' : (gobject.TYPE_PYOBJECT, 'datetime to display', + 'datetime' : (GObject.TYPE_PYOBJECT, 'datetime to display', 'Must be a Python datetime.datetime object', - gobject.PARAM_READWRITE), - 'format' : (gobject.TYPE_STRING, + GObject.PARAM_READWRITE), + 'format' : (GObject.TYPE_STRING, 'Specifies in which format the datetime should be displayed.', 'Accepts any strftime format string.', - "%c", gobject.PARAM_READWRITE), + "%c", GObject.PARAM_READWRITE), } def __init__(self): - gtk.CellRendererText.__init__(self) + GObject.GObject.__init__(self) self._datetime = None self._format = "%c" self.set_property("text", "") - def do_get_property(self, property): - if property.name == 'datetime': + def do_get_property(self, prop): + if prop.name == 'datetime': return self._datetime - elif property.name == 'format': + elif prop.name == 'format': return self._format else: - raise AttributeError, 'unknown property %s' % property.name + raise AttributeError, 'unknown property %s' % prop.name - def do_set_property(self, property, value): - if property.name == 'datetime': + def do_set_property(self, prop, value): + if prop.name == 'datetime': self._datetime = value self._set_text() - elif property.name == 'format': + elif prop.name == 'format': self._format = value self._set_text() else: - raise AttributeError, 'unknown property %s' % property.name + raise AttributeError, 'unknown property %s' % prop.name def _set_text(self): if self._datetime == None: diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelGroupsStore.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelGroupsStore.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelGroupsStore.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelGroupsStore.py 2011-08-19 17:06:25.000000000 +0000 @@ -16,14 +16,14 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk +from gi.repository import Gtk -class ChannelGroupsStore(gtk.ListStore): +class ChannelGroupsStore(Gtk.ListStore): (COL_ID, COL_NAME, COL_EDITABLE,) = range(3) def __init__(self): - gtk.ListStore.__init__(self, int, str, bool) + Gtk.ListStore.__init__(self, int, str, bool) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelGroupsView.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelGroupsView.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelGroupsView.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelGroupsView.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,21 +16,21 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.ui.widgets.ChannelGroupsStore import ChannelGroupsStore -class ChannelGroupsView(gtk.TreeView): +class ChannelGroupsView(Gtk.TreeView): def __init__(self, model=None): - if model == None: - gtk.TreeView.__init__(self) - else: - gtk.TreeView.__init__(self, model) - - col_name = gtk.TreeViewColumn(_("Channel group")) - self.cell_name = gtk.CellRendererText() - col_name.pack_start(self.cell_name) + GObject.GObject.__init__(self) + if model != None: + self.set_model(model) + + col_name = Gtk.TreeViewColumn(_("Channel group")) + self.cell_name = Gtk.CellRendererText() + col_name.pack_start(self.cell_name, True) col_name.add_attribute(self.cell_name, "markup", ChannelGroupsStore.COL_NAME) col_name.add_attribute(self.cell_name, "editable", ChannelGroupsStore.COL_EDITABLE) self.append_column(col_name) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelsStore.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelsStore.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelsStore.py 2010-10-02 16:06:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelsStore.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,20 +16,21 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import gobject +from gi.repository import Gtk +from gi.repository import GObject import gnomedvb from gnomedvb import global_error_handler from gnomedvb.Callback import Callback from cgi import escape +from gnomedvb import _ -class ChannelsStore(gtk.ListStore): +class ChannelsStore(Gtk.ListStore): (COL_NAME, COL_SID,) = range(2) __gsignals__ = { - "loading-finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), + "loading-finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), } def __init__(self, device_group): @@ -38,26 +39,26 @@ list of channels should be retrieved """ - gtk.ListStore.__init__(self, str, int) + Gtk.ListStore.__init__(self, str, long) self.set_sort_column_id(self.COL_NAME, - gtk.SORT_ASCENDING) + Gtk.SortType.ASCENDING) self._add_channels(device_group) def _add_channels(self, device_group): channellist = device_group.get_channel_list() - def append_channel(channels): + def append_channel(proxy, channels, user_data): for channel_id, name, is_radio in channels: self.append([name, channel_id]) self.emit("loading-finished") - channellist.get_channel_infos(reply_handler=append_channel, + channellist.get_channel_infos(result_handler=append_channel, error_handler=global_error_handler) -class ChannelsTreeStore(gtk.TreeStore): +class ChannelsTreeStore(Gtk.TreeStore): (COL_GROUP_ID, COL_NAME, @@ -65,32 +66,33 @@ COL_GROUP,) = range(4) __gsignals__ = { - "loading-finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int]), + "loading-finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]), } def __init__(self, use_channel_groups=False): - gtk.TreeStore.__init__(self, int, str, int, gobject.TYPE_PYOBJECT) + Gtk.TreeStore.__init__(self, int, str, long, GObject.GObject) - self.set_sort_order(gtk.SORT_ASCENDING) + self.set_sort_order(Gtk.SortType.ASCENDING) self._use_channel_groups = use_channel_groups self._manager = gnomedvb.DVBManagerClient () self._manager.connect('group-added', self._on_manager_group_added) self._manager.connect('group-removed', self._on_manager_group_removed) self._add_channels() - + def _add_channels(self): def append_groups(dev_groups): for dev_group in dev_groups: self._append_group(dev_group) - self._manager.get_registered_device_groups(reply_handler=append_groups, + self._manager.get_registered_device_groups(result_handler=append_groups, error_handler=global_error_handler) def _append_group(self, dev_group): group_id = dev_group.get_id() group_name = dev_group.get_name() - group_iter = self.append(None, [group_id, group_name, 0, dev_group]) + + group_iter = self.append(None, [group_id, group_name, 0L, dev_group]) channellist = dev_group.get_channel_list() d = Callback() @@ -98,13 +100,13 @@ d.add_callback(self._append_channel_groups, channellist, group_id, group_iter, dev_group) self._manager.get_channel_groups( - reply_handler=lambda x: d.callback(x), + result_handler=lambda p,x,u: d.callback(x), error_handler=global_error_handler) # Put all available channels either in TV or radio group tv_group_iter = self.append(group_iter, - [group_id, _("TV Channels"), 0, dev_group]) + [group_id, _("TV Channels"), 0L, dev_group]) radio_group_iter = self.append(group_iter, - [group_id, _("Radio Channels"), 0, dev_group]) + [group_id, _("Radio Channels"), 0L, dev_group]) else: # Do not distinguish between radio and TV tv_group_iter = group_iter @@ -114,7 +116,7 @@ d_all.add_callback(self._append_channels, group_id, dev_group, tv_group_iter, radio_group_iter) channellist.get_channel_infos( - reply_handler=lambda x: d_all.callback(x), + result_handler=lambda p,x,u: d_all.callback(x), error_handler=global_error_handler) def _append_channels(self, channels, group_id, dev_group, tv_group_iter, radio_group_iter): @@ -123,6 +125,7 @@ group_iter = radio_group_iter else: group_iter = tv_group_iter + self.append(group_iter, [group_id, escape(name), @@ -147,7 +150,7 @@ d = Callback() d.add_callback(append_channel, chan_group_iter) channellist.get_channels_of_group(chan_group_id, - reply_handler=lambda x, success: d.callback(x), + result_handler=lambda p,data,u: d.callback(data[1]), error_handler=global_error_handler) self.emit("loading-finished", group_id) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelsView.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelsView.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ChannelsView.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ChannelsView.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,25 +16,25 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.ui.widgets.ChannelsStore import ChannelsStore, ChannelsTreeStore -class ChannelsView(gtk.TreeView): +class ChannelsView(Gtk.TreeView): def __init__(self, model=None, name_col=ChannelsStore.COL_NAME): """ @type model: ChannelsStore """ + GObject.GObject.__init__(self) if model != None: - gtk.TreeView.__init__(self, model) - else: - gtk.TreeView.__init__(self) + self.set_model(model) - col_name = gtk.TreeViewColumn(_("Channel")) - cell_name = gtk.CellRendererText() - col_name.pack_start(cell_name) + col_name = Gtk.TreeViewColumn(_("Channel")) + cell_name = Gtk.CellRendererText() + col_name.pack_start(cell_name, True) col_name.add_attribute(cell_name, "markup", name_col) self.append_column(col_name) @@ -42,5 +42,5 @@ if model != None and not (isinstance(model, ChannelsStore) \ or isinstance(model, ChannelsTreeStore)): raise TypeError("model must be a ChannelsStore or ChannelsTreeStore instance") - gtk.TreeView.set_model(self, model) + Gtk.TreeView.set_model(self, model) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/DateTime.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/DateTime.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/DateTime.py 2010-06-05 10:44:31.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/DateTime.py 2011-10-30 11:36:56.000000000 +0000 @@ -16,62 +16,59 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -from gettext import gettext as _ -import gobject -import gtk -import gtk.gdk +from gnomedvb import _ +from gi.repository import GObject +from gi.repository import Gdk +from gi.repository import Gtk import datetime -class CalendarPopup(gtk.Window): +class CalendarPopup(Gtk.Window): __gsignals__ = { - "closed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), - "changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int, int, int, int]), + "closed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), + "changed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int, int, int, int]), } def __init__(self, dt=None): - gtk.Window.__init__(self, type=gtk.WINDOW_POPUP) + GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP) self.set_border_width(5) - self.vbox = gtk.VBox(spacing=12) + self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) self.add(self.vbox) - + self.connect("key-press-event", self._on_key_press_event) self.connect("button-press-event", self._on_button_press_event) - self.cal = gtk.Calendar() + self.cal = Gtk.Calendar() self.cal.connect("day-selected", self._emit_changed) self.cal.connect("day-selected-double-click", lambda w: self.popdown()) - self.vbox.pack_start(self.cal) - - self.time_box = gtk.HBox(spacing=12) - self.vbox.pack_start(self.time_box, False) + self.vbox.pack_start(self.cal, True, True, 0) + + self.time_box = Gtk.Box(spacing=12) + self.vbox.pack_start(self.time_box, False, True, 0) - time_label = gtk.Label() + time_label = Gtk.Label() time_label.set_markup_with_mnemonic(_("_Time:")) - self.time_box.pack_start(time_label, False) - - ali = gtk.Alignment() - self.time_box.pack_start(ali) + self.time_box.pack_start(time_label, False, True, 0) - spinners_box = gtk.HBox(spacing=6) - ali.add(spinners_box) + spinners_box = Gtk.Box(spacing=6) + self.time_box.pack_start(spinners_box, True, True, 0) - self.hour = gtk.SpinButton() + self.hour = Gtk.SpinButton() self.hour.connect("changed", self._emit_changed) self.hour.set_range(0, 23) self.hour.set_increments(1, 3) self.hour.set_wrap(True) self.hour.set_width_chars(2) - spinners_box.pack_start(self.hour) + spinners_box.pack_start(self.hour, True, True, 0) time_label.set_mnemonic_widget(self.hour) - self.minute = gtk.SpinButton() + self.minute = Gtk.SpinButton() self.minute.connect("changed", self._emit_changed) self.minute.set_range(0, 59) self.minute.set_increments(1, 15) self.minute.set_wrap(True) self.minute.set_width_chars(2) - spinners_box.pack_start(self.minute) + spinners_box.pack_start(self.minute, True, True, 0) if dt == None: dt = datetime.datetime.now() @@ -82,14 +79,14 @@ return self.cal def popup(self, widget): - if (self.flags() & gtk.MAPPED): + if (self.get_mapped()): return - if not (widget.flags() & gtk.MAPPED): + if not (widget.get_mapped()): return - if not (widget.flags() & gtk.REALIZED): + if not (widget.get_realized()): return - x, y = widget.window.get_position() + x, y = widget.get_window().get_position() rec = widget.get_allocation() x += rec.x y += rec.y + rec.height @@ -99,7 +96,7 @@ self.show_all() # For grabbing to work we need the view realized - if not (self.flags() & gtk.REALIZED): + if not (self.get_realized()): self.realize () self._add_grab() @@ -122,76 +119,96 @@ return year, mon+1, day, hour, minute def _on_key_press_event(self, widget, event): - if event.keyval == gtk.keysyms.Escape: + if event.keyval == Gdk.KEY_Escape: self.popdown() def _on_button_press_event(self, widget, event): - x, y = self.window.get_position() + x, y = self.get_window().get_position() + alloc = widget.get_allocation() # Check if pointer is within the popup - if not (event.x_root >= x and event.x_root < x + widget.allocation.width \ - and event.y_root >= y and event.y_root < y + widget.allocation.height): + if not (event.x_root >= x and event.x_root < x + alloc.width \ + and event.y_root >= y and event.y_root < y + alloc.height): self.popdown() def _add_grab(self): - grab_val = gtk.gdk.pointer_grab(self.window, True, - gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK, - None, None, gtk.get_current_event_time()) - if grab_val == gtk.gdk.GRAB_SUCCESS: - if gtk.gdk.keyboard_grab(self.window, True) != gtk.gdk.GRAB_SUCCESS: - gtk.gdk.pointer_ungrab(gtk.get_current_event_time()) - else: - self.grab_add() + window = self.get_window() + + dev = Gtk.get_current_event_device() + grab_val = dev.grab(window, Gdk.GrabOwnership.WINDOW, True, + Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK, + None, Gtk.get_current_event_time()) + if grab_val == Gdk.GrabStatus.SUCCESS: + self.grab_add() def _remove_grab(self): self.grab_remove() - gtk.gdk.keyboard_ungrab(gtk.get_current_event_time()) - gtk.gdk.pointer_ungrab(gtk.get_current_event_time()) + dev = Gtk.get_current_event_device() + dev.ungrab(Gtk.get_current_event_time()) def _emit_changed(self, *args): year, mon, day, hour, minute = self.get_date_and_time() self.emit("changed", year, mon, day, hour, minute) -class DateTimeBox(gtk.Bin): +class DateTimeBox(Gtk.Bin): __gsignals__ = { - "changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int, int, int, int]), + "changed": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int, int, int, int]), } def __init__(self, dt=None): - gtk.Bin.__init__(self) + GObject.GObject.__init__(self) - self.hbox = gtk.HBox() + self.valid_color = None + self.invalid_color = None - self.entry = gtk.Entry() + self.hbox = Gtk.Box() + + self.entry = Gtk.Entry() self.entry.set_editable(False) - self.button = gtk.ToggleButton() + self.button = Gtk.ToggleButton() self.button.connect("toggled", self._on_button_toggled) - arrow = gtk.Arrow(gtk.ARROW_DOWN, gtk.SHADOW_NONE) + arrow = Gtk.Arrow.new(Gtk.ArrowType.DOWN, Gtk.ShadowType.NONE) self.button.add(arrow) if dt == None: dt = datetime.datetime.now() - self.popup_win = CalendarPopup(dt) + self.popup_win = CalendarPopup(dt) self.popup_win.connect("changed", self._on_datetime_changed) self.popup_win.connect("closed", lambda w: self.button.set_active(False)) - self.hbox.pack_start(self.entry) - self.hbox.pack_start(self.button, False) + self.hbox.pack_start(self.entry, True, True, 0) + self.hbox.pack_start(self.button, False, True, 0) self.add(self.hbox) - self.child.show_all() + self.get_child().show_all() + + self._set_colors() - def do_size_request(self, req): - w, h = self.child.size_request() - req.width = w - req.height = h + def _set_colors(self): + style = self.entry.get_style_context() + self.valid_color = style.get_background_color(Gtk.StateFlags.NORMAL) + self.invalid_color = style.get_background_color(Gtk.StateFlags.INSENSITIVE) def do_size_allocate(self, alloc): - self.allocation = alloc - self.child.size_allocate(alloc) + self.set_allocation(alloc) + self.get_child().size_allocate(alloc) + + def do_get_preferred_height(self): + val = self.get_child().get_preferred_height() + return val + + def do_get_preferred_width(self): + val = self.get_child().get_preferred_width() + return val + + def do_get_preferred_height_for_width(self, width): + return self.get_child().get_preferred_height_for_width(width) + + def do_get_preferred_width_for_height(self, height): + return self.get_child().get_preferred_width_for_height(height) def do_mnemonic_activate(self, group_cycling): self.button.grab_focus() @@ -199,10 +216,11 @@ def mark_valid(self, val): if val: - color = self.style.text[gtk.STATE_NORMAL] + color = self.valid_color else: - color = self.style.text[gtk.STATE_INSENSITIVE] - self.entry.modify_text(gtk.STATE_NORMAL, color) + color = self.invalid_color + + self.entry.override_background_color(Gtk.StateFlags.NORMAL, color) def get_date_and_time(self): return self.popup_win.get_date_and_time() diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/DetailsDialog.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/DetailsDialog.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/DetailsDialog.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/DetailsDialog.py 2011-10-30 12:14:14.000000000 +0000 @@ -17,78 +17,76 @@ # along with GNOME DVB Daemon. If not, see . import datetime -import gtk +from gi.repository import Gtk import gnomedvb -from gettext import gettext as _ +from gnomedvb import _ from gnomedvb.ui.widgets.Frame import TextFieldLabel -class DetailsDialog(gtk.Dialog): +class DetailsDialog(Gtk.Dialog): def __init__(self, parent=None): - gtk.Dialog.__init__(self, title=_("Details"), - parent=parent, - flags=gtk.DIALOG_DESTROY_WITH_PARENT) - + Gtk.Dialog.__init__(self, parent=parent) + + self.set_destroy_with_parent(True) self.set_default_size(440, 350) self.set_border_width(5) - self.set_has_separator(False) - self.action_area.set_layout(gtk.BUTTONBOX_EDGE) + self.get_action_area().set_layout(Gtk.ButtonBoxStyle.EDGE) - self.rec_button = gtk.Button(stock=gtk.STOCK_MEDIA_RECORD) + self.rec_button = Gtk.Button(stock=Gtk.STOCK_MEDIA_RECORD) self.rec_button.show() - self.action_area.pack_start(self.rec_button) + self.get_action_area().pack_start(self.rec_button, True, True, 0) - close_button = self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) + close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE) close_button.grab_default() - self.table = gtk.Table(6, 2) - self.table.set_col_spacings(18) - self.table.set_row_spacings(6) + self.table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) + self.table.set_column_spacing(18) + self.table.set_row_spacing(6) self.table.set_border_width(5) - self.vbox.pack_start(self.table) + self.get_content_area().pack_start(self.table, True, True, 0) - self._title = TextFieldLabel() - self._channel = TextFieldLabel() - self._date = TextFieldLabel() - self._duration = TextFieldLabel() + self._title = TextFieldLabel(hexpand=True) + self._channel = TextFieldLabel(hexpand=True) + self._date = TextFieldLabel(hexpand=True) + self._duration = TextFieldLabel(hexpand=True) title_label = TextFieldLabel("%s" % _("Title:")) - self.table.attach(title_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL) - self.table.attach(self._title, 1, 2, 0, 1, yoptions=gtk.FILL) + self.table.add(title_label) + self.table.attach_next_to(self._title, title_label, + Gtk.PositionType.RIGHT, 1, 1) channel_label = TextFieldLabel("%s" % _("Channel:")) - self.table.attach(channel_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL) - self.table.attach(self._channel, 1, 2, 1, 2, yoptions=gtk.FILL) + self.table.add(channel_label) + self.table.attach_next_to(self._channel, channel_label, + Gtk.PositionType.RIGHT, 1, 1) date_label = TextFieldLabel("%s" % _("Date:")) - self.table.attach(date_label, 0, 1, 2, 3, gtk.FILL, gtk.FILL) - self.table.attach(self._date, 1, 2, 2, 3, yoptions=gtk.FILL) + self.table.add(date_label) + self.table.attach_next_to(self._date, date_label, + Gtk.PositionType.RIGHT, 1, 1) duration_label = TextFieldLabel("%s" % _("Duration:")) - self.table.attach(duration_label, 0, 1, 3, 4, gtk.FILL, gtk.FILL) - self.table.attach(self._duration, 1, 2, 3, 4, yoptions=gtk.FILL) + self.table.add(duration_label) + self.table.attach_next_to(self._duration, duration_label, + Gtk.PositionType.RIGHT, 1, 1) description_label = TextFieldLabel("%s" % _("Description:")) - self.table.attach(description_label, 0, 1, 4, 5, gtk.FILL, - yoptions=gtk.FILL) + self.table.add(description_label) - self.textview = gtk.TextView() + self.textview = Gtk.TextView() self.textview.set_editable(False) - self.textview.set_wrap_mode(gtk.WRAP_WORD) + self.textview.set_wrap_mode(Gtk.WrapMode.WORD) self.textview.show() - - desc_text_ali = gtk.Alignment(xscale=1.0, yscale=1.0) - desc_text_ali.set_padding(0, 0, 12, 0) - desc_text_ali.show() - self.table.attach(desc_text_ali, 0, 2, 5, 6) - - scrolledwin = gtk.ScrolledWindow() - scrolledwin.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - scrolledwin.set_shadow_type(gtk.SHADOW_IN) + + scrolledwin = Gtk.ScrolledWindow(expand=True) + scrolledwin.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) + scrolledwin.set_shadow_type(Gtk.ShadowType.IN) + scrolledwin.set_margin_left(12) scrolledwin.add(self.textview) scrolledwin.show() - desc_text_ali.add(scrolledwin) + self.table.attach_next_to(scrolledwin, description_label, + Gtk.PositionType.BOTTOM, 2, 1) self.table.show_all() @@ -96,19 +94,19 @@ self.textview.get_buffer().set_text(text) def set_title(self, title): - gtk.Dialog.set_title(self, title) - self._title.label.set_text(title) + Gtk.Dialog.set_title(self, title) + self._title.set_text(title) def set_channel(self, channel): - self._channel.label.set_text(channel) + self._channel.set_text(channel) def set_duration(self, duration): duration_str = gnomedvb.seconds_to_time_duration_string(duration) - self._duration.label.set_text(duration_str) + self._duration.set_text(duration_str) def set_date(self, timestamp): date = datetime.datetime.fromtimestamp(timestamp) - self._date.label.set_text(date.strftime("%c")) + self._date.set_text(date.strftime("%c")) def get_record_button(self): return self.rec_button diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/Frame.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/Frame.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/Frame.py 2010-06-19 16:56:06.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/Frame.py 2011-10-30 11:37:30.000000000 +0000 @@ -16,64 +16,51 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk +from gi.repository import GObject +from gi.repository import Gtk -__all__ = ["AlignedLabel", "Frame", "BaseFrame", "TextFieldLabel"] +__all__ = ["Frame", "BaseFrame", "TextFieldLabel"] -class AlignedChild(gtk.Alignment): - - def __init__(self, child): - gtk.Alignment.__init__(self, xscale=1.0, yscale=1.0) - - self.set_padding(0, 0, 12, 0) - self.add(child) - child.show() - -class BaseFrame(gtk.VBox): +class BaseFrame(Gtk.Box): def __init__(self, markup, child, expand=True, fill=True, padding=0): - gtk.VBox.__init__(self, spacing=6) + GObject.GObject.__init__(self, orientation=Gtk.Orientation.VERTICAL, + spacing=6) - label = AlignedLabel(markup) + label = Gtk.Label() + label.set_halign(Gtk.Align.START) + label.set_markup(markup) label.show() self.pack_start(label, False, False, 0) - self.child_widget = AlignedChild(child) + self.child_widget = child + self.child_widget.set_margin_left(12) self.child_widget.show() self.pack_start(self.child_widget, expand, fill, padding) def set_aligned_child(self, child, expand=True, fill=True, padding=0): - self.child_widget.remove(self.child_widget.get_children()[0]) - self.child_widget.add(child) - child.show() + self.remove(self.child_widget) + self.child_widget = child + self.child_widget.set_margin_left(12) + self.child_widget.show() + self.pack_start(self.child_widget, expand, fill, padding) -class AlignedLabel (gtk.Alignment): +class TextFieldLabel(Gtk.Label): - def __init__(self, markup=None): - gtk.Alignment.__init__(self) + def __init__(self, markup=None, **kwargs): + GObject.GObject.__init__(self, **kwargs) - self.label = gtk.Label() if markup: - self.label.set_markup(markup) - self.label.show() - self.add(self.label) - - def get_label(self): - return self.label - -class TextFieldLabel (AlignedLabel): - - def __init__(self, markup=None): - AlignedLabel.__init__(self, markup) - - self.set_property("yalign", 0.5) + self.set_markup(markup) + self.set_halign(Gtk.Align.START) + self.set_valign(Gtk.Align.CENTER) class Frame (BaseFrame): def __init__(self, markup, treeview): - scrolled = gtk.ScrolledWindow() - scrolled.set_shadow_type(gtk.SHADOW_ETCHED_IN) - scrolled.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + scrolled = Gtk.ScrolledWindow() + scrolled.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + scrolled.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) scrolled.add(treeview) BaseFrame.__init__(self, markup, scrolled) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/HelpBox.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/HelpBox.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/HelpBox.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/HelpBox.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,24 +16,30 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import pango +from gi.repository import GObject +from gi.repository import Gtk +from gi.repository import Pango -class HelpBox(gtk.EventBox): +class HelpBox(Gtk.EventBox): def __init__(self): - gtk.EventBox.__init__(self) - self.modify_bg(gtk.STATE_NORMAL, self.style.base[gtk.STATE_NORMAL]) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) + GObject.GObject.__init__(self) + + frame = Gtk.Frame() + frame.set_shadow_type(Gtk.ShadowType.IN) self.add(frame) - - self._helpview = gtk.Label() - self._helpview.set_ellipsize(pango.ELLIPSIZE_END) + + self._helpview = Gtk.Label() + self._helpview.set_ellipsize(Pango.EllipsizeMode.END) self._helpview.set_alignment(0.50, 0.50) frame.add(self._helpview) - + + style = self._helpview.get_style_context() + style.add_class(Gtk.STYLE_CLASS_ENTRY) + + color = style.get_background_color(Gtk.StateFlags.NORMAL) + self.override_background_color(Gtk.StateFlags.NORMAL, color) + def set_markup(self, helptext): self._helpview.set_markup("%s" % helptext) - + diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RecordingsStore.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RecordingsStore.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RecordingsStore.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RecordingsStore.py 2011-09-22 20:08:40.000000000 +0000 @@ -17,12 +17,12 @@ # along with GNOME DVB Daemon. If not, see . import datetime -import gobject -import gtk +from gi.repository import GObject +from gi.repository import Gtk from gnomedvb import DVBRecordingsStoreClient, global_error_handler from cgi import escape -class RecordingsStore(gtk.ListStore): +class RecordingsStore(Gtk.ListStore): (COL_START, COL_CHANNEL, @@ -32,7 +32,7 @@ COL_ID,) = range(6) def __init__(self): - gtk.ListStore.__init__(self, gobject.TYPE_PYOBJECT, str, str, int, str, int) + Gtk.ListStore.__init__(self, GObject.TYPE_PYOBJECT, str, str, long, str, long) self._recstore = DVBRecordingsStoreClient() self._recstore.connect("changed", self._on_changed) @@ -51,16 +51,15 @@ start = datetime.datetime.fromtimestamp(info[4]) duration = info[3] location = info[6] - #print "Desc", recstore.get_description(rec_id) self.append([start, channame, name, duration, location, rec_id]) def _fill(self): - def append_rec(rids): + def append_rec(proxy, rids, user_data): for rid in rids: self._append_recording(rid) - self._recstore.get_recordings(reply_handler=append_rec, error_handler=global_error_handler) + self._recstore.get_recordings(result_handler=append_rec, error_handler=global_error_handler) def _on_changed(self, recstore, rec_id, change_type): if change_type == 0: diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RecordingsView.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RecordingsView.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RecordingsView.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RecordingsView.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,40 +16,41 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb import seconds_to_time_duration_string from gnomedvb.ui.widgets.RecordingsStore import RecordingsStore from gnomedvb.ui.widgets.CellRendererDatetime import CellRendererDatetime -class RecordingsView(gtk.TreeView): +class RecordingsView(Gtk.TreeView): def __init__(self, model=None): + GObject.GObject.__init__(self) if model != None: - gtk.TreeView.__init__(self, model) - else: - gtk.TreeView.__init__(self) - - cell = CellRendererDatetime() - col = gtk.TreeViewColumn(_("Start"), cell, - datetime=RecordingsStore.COL_START) - self.append_column(col) - self._append_text_column(_("Channel"), RecordingsStore.COL_CHANNEL) + self.set_model(model) + self._append_text_column(_("Title"), RecordingsStore.COL_NAME) + self._append_text_column(_("Channel"), RecordingsStore.COL_CHANNEL) col_length, cell_length = self._append_text_column(_("Length"), RecordingsStore.COL_DURATION) - col_length.set_cell_data_func(cell_length, self._get_length_data) + col_length.set_cell_data_func(cell_length, self._get_length_data, None) + + cell = CellRendererDatetime() + col = Gtk.TreeViewColumn(_("Start"), cell, + datetime=RecordingsStore.COL_START) + self.append_column(col) def _append_text_column(self, title, col_index): - cell = gtk.CellRendererText() - col = gtk.TreeViewColumn(title, cell, markup=col_index) + cell = Gtk.CellRendererText() + col = Gtk.TreeViewColumn(title, cell, markup=col_index) self.append_column(col) return (col, cell) - def _get_length_data(self, column, cell, model, aiter): + def _get_length_data(self, column, cell, model, aiter, user_data=None): duration = model[aiter][RecordingsStore.COL_DURATION] duration_str = seconds_to_time_duration_string(duration) cell.set_property("text", duration_str) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RunningNextStore.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RunningNextStore.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RunningNextStore.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RunningNextStore.py 2011-08-19 17:06:25.000000000 +0000 @@ -16,11 +16,11 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk +from gi.repository import Gtk from gnomedvb import global_error_handler from cgi import escape -class RunningNextStore(gtk.ListStore): +class RunningNextStore(Gtk.ListStore): (COL_CHANNEL, COL_RUNNING_START, @@ -32,10 +32,10 @@ COL_NEXT_EVENT) = range(8) def __init__(self, group): - gtk.ListStore.__init__(self, str, int, str, int, str, int, int, int) + Gtk.ListStore.__init__(self, str, long, str, long, str, long, long, long) self.set_sort_column_id(self.COL_CHANNEL, - gtk.SORT_ASCENDING) + Gtk.SortType.ASCENDING) self._group = group self._fill() @@ -46,25 +46,26 @@ def _fill(self): channellist = self._group.get_channel_list() - def add_channels(channels): + def add_channels(proxy, channels, user_data): for sid, name, is_radio in channels: aiter = self.append() - self.set(aiter, self.COL_CHANNEL, name) - self.set(aiter, self.COL_SID, sid) + self.set_value(aiter, self.COL_CHANNEL, name) + self.set_value(aiter, self.COL_SID, sid) sched = self._group.get_schedule(sid) now = sched.now_playing() if now != 0: - next, name, duration, short_desc = sched.get_informations(now)[0][1:] - self.set(aiter, self.COL_RUNNING_START, sched.get_local_start_timestamp(now)[0]) - self.set(aiter, self.COL_RUNNING, escape(name)) - self.set(aiter, self.COL_RUNNING_EVENT, now) - if next != 0: - name, duration, short_desc = sched.get_informations(next)[0][2:] - self.set(aiter, self.COL_NEXT_START, sched.get_local_start_timestamp(next)[0]) - self.set(aiter, self.COL_NEXT, escape(name)) - self.set(aiter, self.COL_NEXT_EVENT, next) + next_id, name, duration, short_desc = sched.get_informations(now)[0][1:] + + self.set_value(aiter, self.COL_RUNNING_START, sched.get_local_start_timestamp(now)[0]) + self.set_value(aiter, self.COL_RUNNING, escape(name)) + self.set_value(aiter, self.COL_RUNNING_EVENT, now) + if next_id != 0: + name, duration, short_desc = sched.get_informations(next_id)[0][2:] + self.set_value(aiter, self.COL_NEXT_START, sched.get_local_start_timestamp(next_id)[0]) + self.set_value(aiter, self.COL_NEXT, escape(name)) + self.set_value(aiter, self.COL_NEXT_EVENT, next_id) - channellist.get_channel_infos(reply_handler=add_channels, + channellist.get_channel_infos(result_handler=add_channels, error_handler=global_error_handler) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RunningNextView.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RunningNextView.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/RunningNextView.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/RunningNextView.py 2011-09-22 20:08:40.000000000 +0000 @@ -17,30 +17,33 @@ # along with GNOME DVB Daemon. If not, see . import datetime -import gtk -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gdk +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb import global_error_handler from gnomedvb.ui.widgets.RunningNextStore import RunningNextStore from gnomedvb.ui.widgets.DetailsDialog import DetailsDialog from gnomedvb.ui.timers.MessageDialogs import TimerFailureDialog, TimerSuccessDialog -class RunningNextView(gtk.TreeView): +class RunningNextView(Gtk.TreeView): def __init__(self, model): - gtk.TreeView.__init__(self, model) + GObject.GObject.__init__(self) + self.set_model(model) - cell_channel = gtk.CellRendererText() - col_channel = gtk.TreeViewColumn(_("Channel"), cell_channel) + cell_channel = Gtk.CellRendererText() + col_channel = Gtk.TreeViewColumn(_("Channel"), cell_channel) col_channel.add_attribute(cell_channel, "markup", RunningNextStore.COL_CHANNEL) self.append_column(col_channel) col_channel.index = RunningNextStore.COL_CHANNEL - cell_now_start = gtk.CellRendererText() - cell_now = gtk.CellRendererText() - col_now = gtk.TreeViewColumn(_("Now")) - col_now.pack_start(cell_now_start, expand=False) - col_now.pack_start(cell_now) + cell_now_start = Gtk.CellRendererText() + cell_now = Gtk.CellRendererText() + col_now = Gtk.TreeViewColumn(_("Now")) + col_now.pack_start(cell_now_start, False) + col_now.pack_start(cell_now, True) col_now.set_cell_data_func(cell_now_start, self._format_time, RunningNextStore.COL_RUNNING_START) col_now.add_attribute(cell_now, "markup", RunningNextStore.COL_RUNNING) @@ -48,11 +51,11 @@ self.append_column(col_now) col_now.index = RunningNextStore.COL_RUNNING - cell_next_start = gtk.CellRendererText() - cell_next = gtk.CellRendererText() - col_next = gtk.TreeViewColumn(_("Next")) - col_next.pack_start(cell_next_start, expand=False) - col_next.pack_start(cell_next) + cell_next_start = Gtk.CellRendererText() + cell_next = Gtk.CellRendererText() + col_next = Gtk.TreeViewColumn(_("Next")) + col_next.pack_start(cell_next_start, False) + col_next.pack_start(cell_next, True) col_next.set_property("resizable", True) col_next.set_cell_data_func(cell_next_start, self._format_time, RunningNextStore.COL_NEXT_START) @@ -74,10 +77,11 @@ def _on_button_press_event(self, treeview, event): - def show_details(data, success): + def show_details(proxy, result, user_data): + data, success = result if not success: return - event_id, next, name, duration, desc = data + event_id, next_id, name, duration, desc = data ext_desc, success = schedule.get_extended_description(event_id) if success: @@ -99,8 +103,8 @@ (devgroup.get_recorder(), event_id, sid,)) dialog.show() dialog.connect("response", lambda d, resp: d.destroy()) - - if event.type == gtk.gdk._2BUTTON_PRESS: + + if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS"): model, aiter = treeview.get_selection().get_selected() if aiter != None: pos = treeview.get_path_at_pos(int(event.x), int(event.y)) @@ -116,12 +120,14 @@ devgroup = model.get_device_group() sid = model[aiter][RunningNextStore.COL_SID] schedule = devgroup.get_schedule(sid) - schedule.get_informations(event_id, - reply_handler=show_details, - error_handler=global_error_handler) + if schedule != None: + schedule.get_informations(event_id, + result_handler=show_details, + error_handler=global_error_handler) def _on_record_clicked(self, button, data): - def on_reply(timer_id, success): + def on_reply(proxy, data, user_data): + timer_id, success = data if success: dialog = TimerSuccessDialog(self.get_toplevel()) else: @@ -131,6 +137,6 @@ recorder, event_id, channel_sid = data recorder.add_timer_for_epg_event(event_id, channel_sid, - reply_handler=on_reply, + result_handler=on_reply, error_handler=global_error_handler) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/SchedulePaned.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/SchedulePaned.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/SchedulePaned.py 2010-11-15 13:34:16.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/SchedulePaned.py 2011-10-30 12:58:26.000000000 +0000 @@ -16,37 +16,38 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk +from gi.repository import GObject +from gi.repository import Gtk from gnomedvb.ui.widgets.ScheduleStore import ScheduleStore from gnomedvb.ui.widgets.ScheduleView import ScheduleView -class SchedulePaned (gtk.VPaned): +class SchedulePaned (Gtk.Paned): def __init__(self): - gtk.VPaned.__init__(self) + GObject.GObject.__init__(self, orientation=Gtk.Orientation.VERTICAL) self.scheduleview = ScheduleView() self.scheduleview.show() self.scheduleview.get_selection().connect("changed", self._on_selection_changed) - self.scrolledschedule = gtk.ScrolledWindow() + self.scrolledschedule = Gtk.ScrolledWindow() self.scrolledschedule.add(self.scheduleview) - self.scrolledschedule.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrolledschedule.set_shadow_type(gtk.SHADOW_IN) + self.scrolledschedule.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + self.scrolledschedule.set_shadow_type(Gtk.ShadowType.IN) self.scrolledschedule.show() self.pack1(self.scrolledschedule, True) - self.textview = gtk.TextView() - self.textview.set_wrap_mode(gtk.WRAP_WORD) + self.textview = Gtk.TextView() + self.textview.set_wrap_mode(Gtk.WrapMode.WORD) self.textview.set_editable(False) self.textview.show() - self.scrolledtextview = gtk.ScrolledWindow() + self.scrolledtextview = Gtk.ScrolledWindow() self.scrolledtextview.add(self.textview) - self.scrolledtextview.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - self.scrolledtextview.set_shadow_type(gtk.SHADOW_IN) + self.scrolledtextview.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) + self.scrolledtextview.set_shadow_type(Gtk.ShadowType.IN) self.scrolledtextview.show() self.pack2(self.scrolledtextview, False) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ScheduleStore.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ScheduleStore.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ScheduleStore.py 2010-05-23 09:32:10.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ScheduleStore.py 2011-11-08 11:42:50.000000000 +0000 @@ -16,13 +16,13 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import gobject +from gi.repository import Gtk +from gi.repository import GObject import datetime from cgi import escape from gnomedvb import global_error_handler -class ScheduleStore(gtk.ListStore): +class ScheduleStore(Gtk.ListStore): (COL_DATETIME, COL_FORMAT, @@ -33,17 +33,18 @@ COL_RECORDED, COL_EVENT_ID,) = range(8) - NEW_DAY = -1 + NEW_DAY = -1L __gsignals__ = { - "loading-finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), + "loading-finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), } def __init__(self, dev_group, sid): - gtk.ListStore.__init__(self, gobject.TYPE_PYOBJECT, str, int, str, str, str, int, int) + Gtk.ListStore.__init__(self, GObject.TYPE_PYOBJECT, str, long, str, str, str, int, long) self._client = dev_group.get_schedule(sid) - self._recorder = dev_group.get_recorder() - self._fill_all() + if self._client != None: + self._recorder = dev_group.get_recorder() + self._fill_all() def reload_all(self): self.clear() @@ -57,7 +58,7 @@ current = self._client.next(current) def _fill_all(self): - def append_event(events): + def append_event(proxy, events, user_data): prev_date = (0,0,0,) for event in events: new_iter = self._append_event(event) @@ -65,14 +66,14 @@ # Insert bogus entry to mark that a new day starts if prev_date < new_date: date_iter = self.insert_before(new_iter, None) - self.set(date_iter, self.COL_DATETIME, datetime.datetime(*new_date)) + self.set_value(date_iter, self.COL_DATETIME, datetime.datetime(*new_date)) # We don't want to display any datetime - self.set(date_iter, self.COL_FORMAT, "") - self.set(date_iter, self.COL_EVENT_ID, self.NEW_DAY) + self.set_value(date_iter, self.COL_FORMAT, "") + self.set_value(date_iter, self.COL_EVENT_ID, self.NEW_DAY) prev_date = new_date self.emit("loading-finished") - self._client.get_all_event_infos(reply_handler=append_event, error_handler=global_error_handler) + self._client.get_all_event_infos(result_handler=append_event, error_handler=global_error_handler) def get_date(self, aiter): dt = self[aiter][self.COL_DATETIME] @@ -83,7 +84,7 @@ return (dt.hour, dt.minute,) def _append_event(self, event): - event_id, next, name, duration, short_desc = event + event_id, next_id, name, duration, short_desc = event name = escape(name) short_desc = escape(short_desc) @@ -93,7 +94,7 @@ self._client.get_channel_sid()) # %X -> display locale's time representation - return self.append([datetime.datetime(*start_arr), "%X", + return self.append([datetime.datetime(*start_arr), "%X", duration, name, short_desc, None, rec, event_id]) @@ -137,24 +138,22 @@ if aiter == None: return None - path0 = self.get_path(aiter)[0] - - if path0 == 0: - return None - + path0 = self.get_path(aiter) + # If the selected row marks a new day # we still want the previous day # therefore we have to come across 2 new days day_seen = 0 - while path0 >= 0: - aiter = self.get_iter((path0,)) + root = Gtk.TreePath("0") + while path0 != root: + aiter = self.get_iter(path0) row = self[aiter] if row[self.COL_EVENT_ID] == self.NEW_DAY: day_seen += 1 if day_seen == 2: return row.iter - path0 -= 1 + path0.prev() return None diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ScheduleView.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ScheduleView.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/widgets/ScheduleView.py 2010-11-15 13:24:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/widgets/ScheduleView.py 2011-11-08 11:42:50.000000000 +0000 @@ -16,70 +16,78 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import pango -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gtk +from gi.repository import Pango +from gnomedvb import _ from gnomedvb import seconds_to_time_duration_string from gnomedvb.ui.widgets.ScheduleStore import ScheduleStore from gnomedvb.ui.widgets.CellRendererDatetime import CellRendererDatetime -class ScheduleView(gtk.TreeView): +class ScheduleView(Gtk.TreeView): def __init__(self, model=None): + GObject.GObject.__init__(self) if model != None: - gtk.TreeView.__init__(self, model) - else: - gtk.TreeView.__init__(self) + self.set_model(model) self.prev_selection = None self.set_property("headers-visible", False) + self.date_color = None + self.entry_color = None - col_time = gtk.TreeViewColumn("Time") + col_time = Gtk.TreeViewColumn("Time") - cell_rec = gtk.CellRendererPixbuf() - col_time.pack_start(cell_rec, expand=False) - col_time.set_cell_data_func(cell_rec, self._get_rec_data) + cell_rec = Gtk.CellRendererPixbuf() + col_time.pack_start(cell_rec, True) + col_time.set_cell_data_func(cell_rec, self._get_rec_data, None) cell_time = CellRendererDatetime() - col_time.pack_start(cell_time) - col_time.set_cell_data_func(cell_time, self._get_time_data) - col_time.set_attributes(cell_time, datetime=ScheduleStore.COL_DATETIME, - format=ScheduleStore.COL_FORMAT) + col_time.pack_start(cell_time, True) + col_time.set_cell_data_func(cell_time, self._get_time_data, None) + col_time.add_attribute(cell_time, "datetime", ScheduleStore.COL_DATETIME) + col_time.add_attribute(cell_time, "format", ScheduleStore.COL_FORMAT) self.append_column(col_time) - cell_description = gtk.CellRendererText() + cell_description = Gtk.CellRendererText() cell_description.set_property("wrap-width", 500) - cell_description.set_property("wrap-mode", pango.WRAP_WORD) - col = gtk.TreeViewColumn("Description", cell_description) - col.set_cell_data_func(cell_description, self._get_description_data) + cell_description.set_property("wrap-mode", Pango.WrapMode.WORD) + col = Gtk.TreeViewColumn("Description", cell_description) + col.set_cell_data_func(cell_description, self._get_description_data, None) self.append_column(col) + def _set_colors(self): + style = self.get_style_context() + self.entry_color = style.get_background_color(Gtk.StateFlags.NORMAL) + self.date_color = style.get_background_color(Gtk.StateFlags.INSENSITIVE) + def set_model(self, model): - gtk.TreeView.set_model(self, model) + Gtk.TreeView.set_model(self, model) if model: self.set_enable_search(True) self.set_search_column(ScheduleStore.COL_TITLE) - self.set_search_equal_func(self._search_func) + self.set_search_equal_func(self._search_func, None) - def _search_func(self, model, col, key, aiter): + def _search_func(self, model, col, key, aiter, user_data=None): data = model.get_value(aiter, col) if data and data.lower().startswith(key.lower()): return False return True - def _get_description_data(self, column, cell, model, aiter): + def _get_description_data(self, column, cell, model, aiter, user_data=None): + self._set_colors() event_id = model[aiter][ScheduleStore.COL_EVENT_ID] if event_id == ScheduleStore.NEW_DAY: date = model[aiter][ScheduleStore.COL_DATETIME] description = "%s" % date.strftime("%A %x") cell.set_property("xalign", 0.5) - cell.set_property ("cell-background-gdk", self.style.bg[gtk.STATE_NORMAL]) + cell.set_property ("cell-background-rgba", self.date_color) else: cell.set_property("xalign", 0) - cell.set_property ("cell-background-gdk", self.style.base[gtk.STATE_NORMAL]) + cell.set_property ("cell-background-rgba", self.entry_color) duration = seconds_to_time_duration_string(model[aiter][ScheduleStore.COL_DURATION]) title = model[aiter][ScheduleStore.COL_TITLE] @@ -92,24 +100,24 @@ cell.set_property("markup", description) - def _get_time_data(self, column, cell, model, aiter): + def _get_time_data(self, column, cell, model, aiter, user_data=None): event_id = model[aiter][ScheduleStore.COL_EVENT_ID] - + if event_id == ScheduleStore.NEW_DAY: - cell.set_property ("cell-background-gdk", self.style.bg[gtk.STATE_NORMAL]) + cell.set_property ("cell-background-rgba", self.date_color) else: - cell.set_property ("cell-background-gdk", self.style.base[gtk.STATE_NORMAL]) - - def _get_rec_data(self, column, cell, model, aiter): + cell.set_property ("cell-background-rgba", self.entry_color) + + def _get_rec_data(self, column, cell, model, aiter, user_data=None): event_id = model[aiter][ScheduleStore.COL_EVENT_ID] - + if event_id == ScheduleStore.NEW_DAY: - cell.set_property ("cell-background-gdk", self.style.bg[gtk.STATE_NORMAL]) + cell.set_property ("cell-background-rgba", self.date_color) else: - cell.set_property ("cell-background-gdk", self.style.base[gtk.STATE_NORMAL]) - + cell.set_property ("cell-background-rgba", self.entry_color) + if model[aiter][ScheduleStore.COL_RECORDED] > 1: - cell.set_property("icon-name", "stock_timer") + cell.set_property("icon-name", "appointment-soon") else: cell.set_property("icon-name", None) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/__init__.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/__init__.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/__init__.py 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/__init__.py 2011-09-22 20:08:40.000000000 +0000 @@ -1,4 +1,4 @@ -from gettext import gettext as _ +from gnomedvb import _ DVB_TYPE_TO_DESC = { "DVB-C": _("digital cable"), diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/AdaptersPage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/AdaptersPage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/AdaptersPage.py 2010-12-05 14:00:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/AdaptersPage.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,11 +16,10 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gobject -import glib +from gi.repository import GObject import gnomedvb -import gtk -from gettext import gettext as _ +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.ui.wizard import DVB_TYPE_TO_DESC from gnomedvb.ui.wizard.pages.BasePage import BasePage from gnomedvb.ui.widgets.Frame import BaseFrame @@ -28,8 +27,8 @@ class AdaptersPage(BasePage): __gsignals__ = { - "finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [bool]), - "next-page": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []), + "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]), + "next-page": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []), } def __init__(self, model): @@ -39,11 +38,12 @@ self.__use_configured = True self.__model = model self._progressbar = None + self._progressbar_timer = None self.devicesview = None self.frame = None # Name, Type Name, Type, adapter, frontend, registered - self.deviceslist = gtk.ListStore(str, str, str, int, int, bool) + self.deviceslist = Gtk.ListStore(str, str, str, int, int, bool) def show_no_devices(self): if self.frame: @@ -59,32 +59,32 @@ self._label.hide() if self.devicesview == None: - self.devicesview = gtk.TreeView(self.deviceslist) + self.devicesview = Gtk.TreeView.new_with_model(self.deviceslist) self.devicesview.get_selection().connect("changed", self.on_device_selection_changed) - cell_name = gtk.CellRendererText() - col_name = gtk.TreeViewColumn(_("Name")) - col_name.pack_start(cell_name) - col_name.set_cell_data_func(cell_name, self.name_data_func) + cell_name = Gtk.CellRendererText() + col_name = Gtk.TreeViewColumn(_("Name")) + col_name.pack_start(cell_name, True) + col_name.set_cell_data_func(cell_name, self.name_data_func, None) self.devicesview.append_column(col_name) - cell_type = gtk.CellRendererText() - col_type = gtk.TreeViewColumn(_("Type")) - col_type.pack_start(cell_type) + cell_type = Gtk.CellRendererText() + col_type = Gtk.TreeViewColumn(_("Type")) + col_type.pack_start(cell_type, True) col_type.add_attribute(cell_type, "text", 1) self.devicesview.append_column(col_type) - scrolledview = gtk.ScrolledWindow() - scrolledview.set_shadow_type(gtk.SHADOW_ETCHED_IN) - scrolledview.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + scrolledview = Gtk.ScrolledWindow() + scrolledview.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + scrolledview.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) scrolledview.add(self.devicesview) scrolledview.show_all() text = "%s" % _("Select the device you want to configure.") self.frame = BaseFrame(text, scrolledview) self.frame.show() - self.pack_start(self.frame) + self.pack_start(self.frame, True, True, 0) self.devicesview.grab_focus() @@ -117,19 +117,19 @@ def show_progressbar(self): self._label.hide() - self._progressbar = gtk.ProgressBar() + self._progressbar = Gtk.ProgressBar() self._progressbar.set_text(_("Searching for devices")) self._progressbar.set_fraction(0.1) self._progressbar.show() - self.pack_start(self._progressbar, False) - self._progressbar_timer = glib.timeout_add(100, self.progressbar_pulse) + self.pack_start(self._progressbar, False, True, 0) + self._progressbar_timer = GObject.timeout_add(100, self.progressbar_pulse, None) def destroy_progressbar(self): - glib.source_remove(self._progressbar_timer) + GObject.source_remove(self._progressbar_timer) self._progressbar_timer = None self._progressbar.destroy() - def progressbar_pulse(self): + def progressbar_pulse(self, user_data): self._progressbar.pulse() return True @@ -167,7 +167,7 @@ dev.type_name = DVB_TYPE_TO_DESC[dev.type] dev.registered = True registered.add(dev) - self.__model.get_all_devices(reply_handler=devices_handler) + self.__model.get_all_devices(result_handler=devices_handler) def devices_handler(devices): error = None @@ -216,7 +216,7 @@ self.__adapter_info = None self.show_progressbar() - self.__model.get_registered_device_groups(reply_handler=registered_handler) + self.__model.get_registered_device_groups(result_handler=registered_handler) def on_device_selection_changed(self, treeselection): model, aiter = treeselection.get_selected() @@ -230,7 +230,7 @@ else: self.emit("finished", False) - def name_data_func(self, column, cell, model, aiter): + def name_data_func(self, column, cell, model, aiter, user_data): name = model[aiter][0] adapter = model[aiter][3] frontend = model[aiter][4] diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/BasePage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/BasePage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/BasePage.py 2010-06-19 17:08:57.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/BasePage.py 2011-10-30 11:37:49.000000000 +0000 @@ -16,25 +16,25 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gnomedvb.ui.widgets.Frame import AlignedLabel +from gi.repository import GObject +from gi.repository import Gtk -class BasePage(gtk.VBox): +class BasePage(Gtk.Box): def __init__(self): - gtk.VBox.__init__(self, spacing=6) + GObject.GObject.__init__(self, orientation=Gtk.Orientation.VERTICAL, + spacing=6) self.set_border_width(24) - ali = AlignedLabel() - ali.show() - self.pack_start(ali, False, False) - - self._label = ali.get_label() + self._label = Gtk.Label() + self._label.set_halign(Gtk.Align.START) self._label.set_line_wrap(True) + + self.pack_start(self._label, False, False, 0) def get_page_title(self): raise NotImplementedError def get_page_type(self): - return gtk.ASSISTANT_PAGE_CONTENT + return Gtk.AssistantPageType.CONTENT diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py 2010-06-19 17:13:05.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py 2011-10-30 12:52:33.000000000 +0000 @@ -16,11 +16,10 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gnomedvb -import gtk -import gobject -import glib -from gettext import gettext as _ +from gi.repository import GdkPixbuf +from gi.repository import Gtk +from gi.repository import GObject +from gnomedvb import _ from gnomedvb.ui.wizard.pages.BasePage import BasePage from gnomedvb.ui.widgets.Frame import TextFieldLabel from gnomedvb import global_error_handler @@ -28,7 +27,7 @@ class ChannelScanPage(BasePage): __gsignals__ = { - "finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [bool]), + "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]), } (COL_LOGO, @@ -54,7 +53,7 @@ self._progressbar_timer = 0 self.set_spacing(12) - self._theme = gtk.icon_theme_get_default() + self._theme = Gtk.IconTheme.get_default() text = "%s\n%s" % ( _("This process can take some time."), @@ -62,7 +61,7 @@ ) self._label.set_markup (text) - actiongroup = gtk.ActionGroup('channels') + actiongroup = Gtk.ActionGroup('channels') actiongroup.add_actions([ ('channels-select-all', None, _('Select all'), None, None, lambda x: self.__set_all_checked(True)), @@ -70,87 +69,88 @@ lambda x: self.__set_all_checked(False)), ]) - uimanager = gtk.UIManager() + uimanager = Gtk.UIManager() uimanager.add_ui_from_string(self.MENU) uimanager.insert_action_group(actiongroup) self.popup_menu = uimanager.get_widget("/channels-popup") - topbox = gtk.VBox(spacing=6) - self.pack_start(topbox) + topbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) + self.pack_start(topbox, True, True, 0) - ali = TextFieldLabel() - label = ali.get_label() + label = TextFieldLabel() label.set_markup_with_mnemonic(_("_Channels:")) - topbox.pack_start(ali, False) + topbox.pack_start(label, False, True, 0) # Logo, Name, active, SID, scrambled - self.tvchannels = gtk.ListStore(gtk.gdk.Pixbuf, str, bool, int, bool) - self.tvchannelsview = gtk.TreeView(self.tvchannels) + self.tvchannels = Gtk.ListStore(GdkPixbuf.Pixbuf, str, bool, int, bool) + self.tvchannelsview = Gtk.TreeView.new_with_model(self.tvchannels) self.tvchannelsview.connect("button-press-event", self.__on_treeview_button_press_event) self.tvchannelsview.set_reorderable(True) self.tvchannelsview.set_headers_visible(False) label.set_mnemonic_widget(self.tvchannelsview) - col_name = gtk.TreeViewColumn(_("Channel")) + col_name = Gtk.TreeViewColumn(_("Channel")) - cell_active = gtk.CellRendererToggle() + cell_active = Gtk.CellRendererToggle() cell_active.connect("toggled", self.__on_active_toggled) col_name.pack_start(cell_active, False) col_name.add_attribute(cell_active, "active", self.COL_ACTIVE) - cell_icon = gtk.CellRendererPixbuf() + cell_icon = Gtk.CellRendererPixbuf() col_name.pack_start(cell_icon, False) col_name.add_attribute(cell_icon, "pixbuf", self.COL_LOGO) - cell_name = gtk.CellRendererText() - col_name.pack_start(cell_name) + cell_name = Gtk.CellRendererText() + col_name.pack_start(cell_name, True) col_name.add_attribute(cell_name, "markup", self.COL_NAME) self.tvchannelsview.append_column (col_name) - scrolledtvview = gtk.ScrolledWindow() + scrolledtvview = Gtk.ScrolledWindow() scrolledtvview.add(self.tvchannelsview) - scrolledtvview.set_shadow_type(gtk.SHADOW_ETCHED_IN) - scrolledtvview.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) + scrolledtvview.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + scrolledtvview.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) - topbox.pack_start(scrolledtvview) + topbox.pack_start(scrolledtvview, True, True, 0) - self.scrambledbutton = gtk.CheckButton(_("Select _scrambled channels")) + self.scrambledbutton = Gtk.CheckButton.new_with_mnemonic(_("Select _scrambled channels")) self.scrambledbutton.set_active(True) self.scrambledbutton.connect("toggled", self.__on_select_encrypted_toggled) - topbox.pack_start(self.scrambledbutton, False) + topbox.pack_start(self.scrambledbutton, False, True, 0) self.create_signal_box() - self.progressbar = gtk.ProgressBar() - self.pack_start(self.progressbar, False) + self.progressbar = Gtk.ProgressBar() + self.pack_start(self.progressbar, False, True, 0) def create_signal_box(self): - self.progress_table = gtk.Table(rows=3, columns=2) - self.progress_table.set_row_spacings(6) - self.progress_table.set_col_spacings(12) - self.pack_start(self.progress_table, False) + self.progress_table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) + self.progress_table.set_row_spacing(6) + self.progress_table.set_column_spacing(12) + self.pack_start(self.progress_table, False, True, 0) label = TextFieldLabel(_("Signal quality:")) - self.progress_table.attach(label, 0, 1, 0, 1, xoptions=gtk.FILL) + self.progress_table.add(label) - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_NONE) - self.progress_table.attach(frame, 1, 2, 0, 1) + frame = Gtk.Frame(hexpand=True) + frame.set_shadow_type(Gtk.ShadowType.NONE) + self.progress_table.attach_next_to(frame, label, Gtk.PositionType.RIGHT, + 1, 1) - self.signal_quality_bar = gtk.ProgressBar() + self.signal_quality_bar = Gtk.ProgressBar() self.signal_quality_bar.set_size_request(-1, 10) frame.add(self.signal_quality_bar) label = TextFieldLabel(_("Signal strength:")) - self.progress_table.attach(label, 0, 1, 1, 2, xoptions=gtk.FILL) + self.progress_table.add(label) - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_NONE) - self.progress_table.attach(frame, 1, 2, 1, 2) + frame = Gtk.Frame(hexpand=True) + frame.set_shadow_type(Gtk.ShadowType.NONE) + self.progress_table.attach_next_to(frame, label, Gtk.PositionType.RIGHT, + 1, 1) - self.signal_strength_bar = gtk.ProgressBar() + self.signal_strength_bar = Gtk.ProgressBar() self.signal_strength_bar.set_size_request(-1, 10) frame.add(self.signal_strength_bar) @@ -164,13 +164,15 @@ return [row[self.COL_SID] for row in self.tvchannels if row[self.COL_ACTIVE]] def start_scanning(self, adapter, frontend, tuning_data): - def data_loaded(success): + def data_loaded(proxy, success, user_data): if success: self._scanner.run() else: self._scanner.destroy() self._scanner = self._model.get_scanner_for_device(adapter, frontend) + if self._scanner == None: + return self._scanner.connect ("frequency-scanned", self.__on_freq_scanned) self._scanner.connect ("channel-added", self.__on_channel_added) @@ -178,12 +180,12 @@ self._scanner.connect ("frontend-stats", self.__on_frontend_stats) self.progressbar.set_pulse_step(0.1) - self._progressbar_timer = glib.timeout_add(100, self._progressbar_pulse) + self._progressbar_timer = GObject.timeout_add(100, self._progressbar_pulse) self.progressbar.show() if isinstance(tuning_data, str): self._scanner.add_scanning_data_from_file (tuning_data, - reply_handler=data_loaded, error_handler=global_error_handler) + result_handler=data_loaded, error_handler=global_error_handler) elif isinstance(tuning_data, list): for data in tuning_data: self._scanner.add_scanning_data(data) @@ -191,7 +193,7 @@ else: self._scanner.destroy() - def _progressbar_pulse(self): + def _progressbar_pulse(self, user_data=None): self.progressbar.pulse() return True @@ -199,15 +201,15 @@ try: if scrambled: icon = self._theme.load_icon("emblem-readonly", 16, - gtk.ICON_LOOKUP_USE_BUILTIN) + Gtk.IconLookupFlags.USE_BUILTIN) else: if channeltype == "TV": icon = self._theme.load_icon("video-x-generic", 16, - gtk.ICON_LOOKUP_USE_BUILTIN) + Gtk.IconLookupFlags.USE_BUILTIN) elif channeltype == "Radio": icon = self._theme.load_icon("audio-x-generic", 16, - gtk.ICON_LOOKUP_USE_BUILTIN) - except glib.GError: + Gtk.IconLookupFlags.USE_BUILTIN) + except GObject.GError: icon = None name = name.replace("&", "&") @@ -230,7 +232,7 @@ fraction = float(self._scanned_freqs) / self._max_freqs # Stop progressbar from pulsing if self._progressbar_timer > 0: - glib.source_remove(self._progressbar_timer) + GObject.source_remove(self._progressbar_timer) self._progressbar_timer = 0 self.progressbar.set_fraction(fraction) diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py 2010-04-13 09:50:17.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py 2011-10-30 12:49:35.000000000 +0000 @@ -18,14 +18,14 @@ import os import os.path -import gtk -import gobject -import glib +from gi.repository import Gdk +from gi.repository import Gtk +from gi.repository import GLib +from gi.repository import GObject import gettext import locale -from gettext import gettext as _ +from gnomedvb import _ from gnomedvb.ui.wizard.pages.BasePage import BasePage -from gnomedvb.ui.widgets.Frame import TextFieldLabel DVB_APPS_DIRS = ("/usr/share/dvb", "/usr/share/dvb-apps", @@ -33,7 +33,9 @@ "/usr/share/doc/dvb-utils/examples/scan") COUNTRIES = { + "ad": "Andorra", "at": "Austria", + "az": "Azerbaijan", "au": "Australia", "be": "Belgium", "ch": "Switzerland", @@ -45,24 +47,86 @@ "fr": "France", "gr": "Greece", "hk": "Hong Kong", - "hr": "Hungary", + "hr": "Croatia", + "hu": "Hungary", + "il": "Israel", + "ir": "Iran, Islamic Republic of", "is": "Iceland", "it": "Italy", + "lt": "Lithuania", "lu": "Luxemburg", + "lv": "Latvia", "nl": "Netherlands", "no": "Norway", "nz": "New Zealand", "pl": "Poland", + "ro": "Romania", "se": "Sweden", + "si": "Slovenia", "sk": "Slovakia", "tw": "Taiwan", "uk": "United Kingdom", + "vn": "Viet Nam", } +COUNTRIES_DVB_T = ( + "ad", + "at", + "az", + "au", + "be", + "ch", + "cz", + "de", + "dk", + "es", + "fi", + "fr", + "gr", + "hk", + "hr", + "hu", + "il", + "ir", + "is", + "it", + "lt", + "lu", + "lv", + "nl", + "no", + "nz", + "pl", + "ro", + "se", + "si", + "sk", + "tw", + "uk", + "vn", +) + +COUNTRIES_DVB_C = ( + "at", + "be", + "ch", + "cz", + "de", + "dk", + "es", + "fi", + "fr", + "hu", + "lu", + "nl", + "no", + "se", +) + class InitialTuningDataPage(BasePage): __gsignals__ = { - "finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [bool]), + "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]), } NOT_LISTED = "00" @@ -107,11 +171,11 @@ return self.__tuning_data def _create_table(self): - self.table = gtk.Table(rows=4, columns=2) - self.table.set_row_spacings(6) - self.table.set_col_spacings(18) + self.table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL) + self.table.set_row_spacing(6) + self.table.set_column_spacing(18) self.table.show() - self.pack_start(self.table) + self.pack_start(self.table, True, True, 0) def is_dvb_apps_installed(self): val = False @@ -140,144 +204,143 @@ self.providers_view = None countries = {self.NOT_LISTED: _("Not listed")} - country_codes = ("at", "au", "be", "ch", "cz", "de", "dk", "es", "fi", "fr", - "gr", "hr", "hk", "is", "it", "lu", "nl", "nz", "pl", "se", "sk", - "tw", "uk",) t = gettext.translation("iso_3166", fallback=True) - for lang in country_codes: + for lang in COUNTRIES_DVB_T: countries[lang] = t.ugettext(COUNTRIES[lang]) self._create_table() - - country = TextFieldLabel() - label = country.get_label() - label.set_markup_with_mnemonic(_("_Country:")) + + country = Gtk.Label(halign=Gtk.Align.START) + country.set_markup_with_mnemonic(_("_Country:")) country.show() - self.table.attach(country, 0, 1, 0, 1, yoptions=0, xoptions=gtk.FILL) + self.table.add(country) # name, code - self.countries = gtk.ListStore(str, str) - self.countries.set_sort_column_id(0, gtk.SORT_ASCENDING) + self.countries = Gtk.ListStore(str, str) + self.countries.set_sort_column_id(0, Gtk.SortType.ASCENDING) self.countries.set_sort_func(0, self.combobox_sort_func) for code, name in countries.items(): self.countries.append([name, code]) - self.country_combo = gtk.ComboBox(self.countries) + self.country_combo = Gtk.ComboBox.new_with_model_and_entry(self.countries) + self.country_combo.set_hexpand(True) self.country_combo.connect('changed', self.on_country_changed) self.__data_dir = "dvb-t" - cell = gtk.CellRendererText() - self.country_combo.pack_start(cell) - self.country_combo.add_attribute(cell, "text", 0) + cell = Gtk.CellRendererText() + self.country_combo.pack_start(cell, True) + self.country_combo.set_entry_text_column(0) self.country_combo.show() - self.table.attach(self.country_combo, 1, 2, 0, 1, yoptions=0) + self.table.attach_next_to(self.country_combo, country, + Gtk.PositionType.RIGHT, 1, 1) self.country_combo.set_active(0) - label.set_mnemonic_widget(self.country_combo) + country.set_mnemonic_widget(self.country_combo) - providers = TextFieldLabel() - label = providers.get_label() - label.set_markup_with_mnemonic(_("_Antenna:")) + providers = Gtk.Label() + providers.set_markup_with_mnemonic(_("_Antenna:")) providers.show() - self.table.attach(providers, 0, 1, 1, 2, yoptions=0, xoptions=gtk.FILL) + self.table.add(providers) - self.providers = gtk.ListStore(str, str) - self.providers.set_sort_column_id(0, gtk.SORT_ASCENDING) - self.providers.set_sort_func(0, self.combobox_sort_func) + self.providers = Gtk.ListStore(str, str) + self.providers.set_sort_column_id(0, Gtk.SortType.ASCENDING) + self.providers.set_sort_func(0, self.combobox_sort_func, None) self.providers_view, scrolledview = self._create_providers_treeview( self.providers, _("Antenna")) self.providers_view.get_selection().connect('changed', self.on_providers_changed) - label.set_mnemonic_widget(self.providers_view) + providers.set_mnemonic_widget(self.providers_view) - self.table.attach(scrolledview, 0, 2, 2, 3) + scrolledview.set_property("expand", True) + self.table.attach_next_to(scrolledview, providers, + Gtk.PositionType.BOTTOM, 2, 1) self.providers_view.set_sensitive(False) def setup_dvb_s(self): - satellite = TextFieldLabel() - label = satellite.get_label() - label.set_markup_with_mnemonic(_("_Satellite:")) + satellite = Gtk.Label() + satellite.set_markup_with_mnemonic(_("_Satellite:")) satellite.show() self.pack_start(satellite, False, False, 0) - self.satellites = gtk.ListStore(str, str) - self.satellites.set_sort_column_id(0, gtk.SORT_ASCENDING) + self.satellites = Gtk.ListStore(str, str) + self.satellites.set_sort_column_id(0, Gtk.SortType.ASCENDING) self.satellite_view, scrolledview = self._create_providers_treeview( self.satellites, _("Satellite")) self.satellite_view.get_selection().connect("changed", self.on_satellite_changed) - label.set_mnemonic_widget(self.satellite_view) - self.pack_start(scrolledview) + satellite.set_mnemonic_widget(self.satellite_view) + self.pack_start(scrolledview, True, True, 0) self.read_satellites() def setup_dvb_c(self): countries = {} - country_codes = ("at", "be", "ch", "de", "fi", "lu", "nl", "se", "no",) t = gettext.translation("iso_3166", fallback=True) - for lang in country_codes: + for lang in COUNTRIES_DVB_C: countries[lang] = t.ugettext(COUNTRIES[lang]) - + self._create_table() - - country = TextFieldLabel() - label = country.get_label() - label.set_markup_with_mnemonic(_("_Country:")) + + country = Gtk.Label(halign=Gtk.Align.START) + country.set_markup_with_mnemonic(_("_Country:")) country.show() - self.table.attach(country, 0, 1, 0, 1, yoptions=0, xoptions=gtk.FILL) - - self.countries = gtk.ListStore(str, str) - self.countries.set_sort_column_id(0, gtk.SORT_ASCENDING) - self.countries.set_sort_func(0, self.combobox_sort_func) + self.table.add(country) + + self.countries = Gtk.ListStore(str, str) + self.countries.set_sort_column_id(0, Gtk.SortType.ASCENDING) + self.countries.set_sort_func(0, self.combobox_sort_func, None) for code, name in countries.items(): self.countries.append([name, code]) - self.country_combo = gtk.ComboBox(self.countries) + self.country_combo = Gtk.ComboBox.new_with_model_and_entry(self.countries) + self.country_combo.set_hexpand(True) self.country_combo.connect('changed', self.on_country_changed) self.__data_dir = "dvb-c" - cell = gtk.CellRendererText() - self.country_combo.pack_start(cell) - self.country_combo.add_attribute(cell, "text", 0) + cell = Gtk.CellRendererText() + self.country_combo.pack_start(cell, True) + self.country_combo.set_entry_text_column(0) self.country_combo.show() - self.table.attach(self.country_combo, 1, 2, 0, 1, yoptions=0) - label.set_mnemonic_widget(self.country_combo) + self.table.attach_next_to(self.country_combo, country, + Gtk.PositionType.RIGHT, 1, 1) + country.set_mnemonic_widget(self.country_combo) - providers = TextFieldLabel() - label = providers.get_label() - label.set_markup_with_mnemonic(_("_Providers:")) + providers = Gtk.Label() + providers.set_markup_with_mnemonic(_("_Providers:")) providers.show() - self.table.attach(providers, 0, 1, 1, 2, yoptions=0, xoptions=gtk.FILL) + self.table.add(providers) - self.providers = gtk.ListStore(str, str) - self.providers.set_sort_column_id(0, gtk.SORT_ASCENDING) + self.providers = Gtk.ListStore(str, str) + self.providers.set_sort_column_id(0, Gtk.SortType.ASCENDING) self.providers_view, scrolledview = self._create_providers_treeview( self.providers, _("Provider")) self.providers_view.get_selection().connect('changed', self.on_providers_changed) - label.set_mnemonic_widget(self.providers_view) + providers.set_mnemonic_widget(self.providers_view) - self.table.attach(scrolledview, 0, 2, 2, 3) + scrolledview.set_property("expand", True) + self.table.attach_next_to(scrolledview, providers, + Gtk.PositionType.BOTTOM, 2, 1) self.providers_view.set_sensitive(False) def _create_providers_treeview(self, providers, col_name): - providers_view = gtk.TreeView(providers) + providers_view = Gtk.TreeView.new_with_model(providers) providers_view.set_headers_visible(False) - col = gtk.TreeViewColumn(col_name) - cell = gtk.CellRendererText() - col.pack_start(cell) + col = Gtk.TreeViewColumn(col_name) + cell = Gtk.CellRendererText() + col.pack_start(cell, True) col.add_attribute(cell, "markup", 0) providers_view.append_column(col) providers_view.show() - scrolledview= gtk.ScrolledWindow() + scrolledview= Gtk.ScrolledWindow() scrolledview.add(providers_view) - scrolledview.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - scrolledview.set_shadow_type(gtk.SHADOW_ETCHED_IN) + scrolledview.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) + scrolledview.set_shadow_type(Gtk.ShadowType.ETCHED_IN) scrolledview.show() return providers_view, scrolledview @@ -296,11 +359,11 @@ self.emit("finished", False) self.providers.clear() - toplevel_window = self.get_toplevel().window - toplevel_window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) + toplevel_window = self.get_toplevel().get_window() + toplevel_window.set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH)) # Fill list async - glib.idle_add(self._fill_providers, selected_country) + GObject.idle_add(self._fill_providers, selected_country) def _fill_providers(self, selected_country): # Only DVB-T has bruteforce scan @@ -323,7 +386,7 @@ first_iter = self.providers.get_iter_first() self.providers_view.get_selection().select_iter(first_iter) - self.get_toplevel().window.set_cursor(None) + self.get_toplevel().get_window().set_cursor(None) self.emit("finished", True) return False @@ -362,32 +425,26 @@ for transmode in ["2k", "8k"]: for guard in [0, 32, 16, 8, 4]: self.__tuning_data.append( - [freq, - 4, # hierarchy: AUTO - 7, # bandwidth - transmode, - "NONE", # code-rate-hp - "AUTO", # code-rate-lp - "QAM64", # constellation - guard, # guard interval - ]) + self.create_parameters_dict(freq, 7, transmode, guard)) for chan in range(21, 70): freq = 306000000 + chan* 8000000 for transmode in ["2k", "8k"]: for guard in [32, 16, 8, 4]: self.__tuning_data.append( - [freq, - 4, # hierarchy: AUTO - 8, # bandwidth - transmode, - "NONE", # code-rate-hp - "AUTO", # code-rate-lp - "QAM64", # constellation - guard, # guard interval - ]) + self.create_parameters_dict(freq, 8, transmode, guard)) + + def create_parameters_dict(self, freq, bandwidth, transmode, guard): + return {"frequency": GLib.Variant('u', freq), + "hierarchy": GLib.Variant('u', 4), # AUTO + "bandwidth": GLib.Variant('u', bandwidth), + "transmission-mode": GLib.Variant('s', transmode), + "code-rate-hp": GLib.Variant('s', "NONE"), + "code-rate-lp": GLib.Variant('s', "AUTO"), + "constellation": GLib.Variant('s', "QAM64"), + "guard-interval": GLib.Variant('u', guard)} - def combobox_sort_func(self, model, iter1, iter2): + def combobox_sort_func(self, model, iter1, iter2, user_data): name1, code1 = model[iter1] name2, code2 = model[iter2] diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/IntroPage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/IntroPage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/IntroPage.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/IntroPage.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,10 +16,9 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.ui.wizard.pages.BasePage import BasePage -from gnomedvb.ui.widgets.Frame import AlignedLabel class IntroPage(BasePage): @@ -30,23 +29,22 @@ self._label.set_markup(text) self._label.set_line_wrap(False) - text = _('It will automatically configure your devices and search for channels, if necessary.') - label2 = AlignedLabel(text) - label2.get_label().set_line_wrap(True) - self.pack_start(label2, False) + text1 = _('It will automatically configure your devices and search for channels, if necessary.') + text2 = _("Click \"Forward\" to begin.") + label2 = Gtk.Label(text1 + "\n\n" + text2) + label2.set_line_wrap(True) + label2.set_halign(Gtk.Align.START) + label2.set_valign(Gtk.Align.START) + self.pack_start(label2, True, True, 0) - text = _("Click \"Forward\" to begin.") - label3 = AlignedLabel(text) - self.pack_start(label3) - - self.expert_mode = gtk.CheckButton(label=_('_Expert mode')) + self.expert_mode = Gtk.CheckButton.new_with_mnemonic(_('_Expert mode')) self.pack_start(self.expert_mode, False, False, 0) def get_page_title(self): return _("Digital TV configuration") def get_page_type(self): - return gtk.ASSISTANT_PAGE_INTRO + return Gtk.AssistantPageType.INTRO def has_expert_mode(self): return self.expert_mode.get_active() diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py 2011-10-30 11:38:22.000000000 +0000 @@ -16,15 +16,15 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -import gobject -from gettext import gettext as _ +from gi.repository import Gtk +from gi.repository import GObject +from gnomedvb import _ from gnomedvb.ui.wizard.pages.BasePage import BasePage class SaveChannelListPage(BasePage): __gsignals__ = { - "finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [bool]), + "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]), } def __init__(self): @@ -35,12 +35,12 @@ text = _("Choose a location where you want to save the list of channels.") self._label.set_text(text) - button_box = gtk.HButtonBox() - self.pack_start(button_box) + button_box = Gtk.ButtonBox() + self.pack_start(button_box, True, True, 0) - save_button = gtk.Button(stock=gtk.STOCK_SAVE) + save_button = Gtk.Button(stock=Gtk.STOCK_SAVE) save_button.connect("clicked", self.__on_save_button_clicked) - button_box.pack_start(save_button) + button_box.pack_start(save_button, True, True, 0) def get_page_title(self): return _("Save channels") @@ -52,11 +52,11 @@ self.__channels = channels def __on_save_button_clicked(self, button): - filechooser = gtk.FileChooserDialog(action=gtk.FILE_CHOOSER_ACTION_SAVE, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_SAVE, gtk.RESPONSE_OK)) + filechooser = Gtk.FileChooserDialog(action=Gtk.FileChooserAction.SAVE, + buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, + Gtk.STOCK_SAVE, Gtk.ResponseType.OK)) filechooser.set_do_overwrite_confirmation(True) - if (filechooser.run() == gtk.RESPONSE_OK): + if (filechooser.run() == Gtk.ResponseType.OK): self.__scanner.write_channels_to_file(self.__channels, filechooser.get_filename()) self.emit("finished", True) filechooser.destroy() diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,19 +16,18 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gobject -import glib +from gi.repository import GObject import gnomedvb -import gtk +from gi.repository import Gtk import os.path -from gettext import gettext as _ +from gnomedvb import _ from gnomedvb.ui.wizard import DVB_TYPE_TO_DESC from gnomedvb.ui.wizard.pages.BasePage import BasePage class SetupDevicePage(BasePage): __gsignals__ = { - "finished": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [bool]), + "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]), } def __init__(self, model): @@ -46,7 +45,7 @@ return _("Configuring device") def get_page_type(self): - return gtk.ASSISTANT_PAGE_PROGRESS + return Gtk.AssistantPageType.PROGRESS def set_scanner(self, scanner): self.__scanner = scanner @@ -69,32 +68,32 @@ def run(self, create_group): self.show_progressbar() - def reply_handler(success): + def reply_handler(proxy, success, user_data): self.destroy_progressbar() self.__success = True self.emit("finished", True) existing_group = self.get_existing_group_of_same_type() if existing_group == None: - self.create_group_automatically(reply_handler=reply_handler, + self.create_group_automatically(result_handler=reply_handler, error_handler=gnomedvb.global_error_handler) else: - self.add_to_group(existing_group, reply_handler=reply_handler, + self.add_to_group(existing_group, result_handler=reply_handler, error_handler=gnomedvb.global_error_handler) def show_progressbar(self): # From parent self._label.hide() - self._progressbar = gtk.ProgressBar() + self._progressbar = Gtk.ProgressBar() self._progressbar.set_text(_("Configuring device")) self._progressbar.set_fraction(0.1) self._progressbar.show() - self.pack_start(self._progressbar, False) - self._progressbar_timer = glib.timeout_add(100, self.progressbar_pulse) + self.pack_start(self._progressbar, False, True, 0) + self._progressbar_timer = GObject.timeout_add(100, self.progressbar_pulse) def destroy_progressbar(self): - glib.source_remove(self._progressbar_timer) + GObject.source_remove(self._progressbar_timer) self._progressbar_timer = None self._progressbar.destroy() @@ -112,15 +111,15 @@ break return existing_group - def create_group_automatically(self, reply_handler, error_handler): - def write_channels_handler(success): + def create_group_automatically(self, result_handler, error_handler): + def write_channels_handler(proxy, success, user_data): if success: recordings_dir = gnomedvb.get_default_recordings_dir() name = "%s %s" % (DVB_TYPE_TO_DESC[self.__adapter_info["type"]], _("TV")) self.__model.add_device_to_new_group(self.__adapter_info['adapter'], self.__adapter_info['frontend'], channels_file, recordings_dir, name, - reply_handler=reply_handler, error_handler=error_handler) + result_handler=result_handler, error_handler=error_handler) else: self.show_error() @@ -134,12 +133,12 @@ "channels_%s.conf" % self.__adapter_info["type"]) self.__scanner.write_channels_to_file(self.__channels, channels_file, - reply_handler=write_channels_handler, error_handler=error_handler) + result_handler=write_channels_handler, error_handler=error_handler) - def add_to_group(self, group, reply_handler, error_handler): + def add_to_group(self, group, result_handler, error_handler): self.__summary = _('The device has been added to the group %s.') % group['name'] group.add_device(self.__adapter_info['adapter'], - self.__adapter_info['frontend'], reply_handler=reply_handler, + self.__adapter_info['frontend'], result_handler=result_handler, error_handler=error_handler) def show_error(self): diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/SummaryPage.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/SummaryPage.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/pages/SummaryPage.py 2010-04-01 09:50:28.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/pages/SummaryPage.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,32 +16,28 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk -from gettext import gettext as _ +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.ui.wizard.pages.BasePage import BasePage -from gnomedvb.ui.widgets.Frame import AlignedLabel class SummaryPage(BasePage): def __init__(self): BasePage.__init__(self) - details_ali = AlignedLabel() - self.pack_start(details_ali) - self._details_label = details_ali.get_label() + self._details_label = Gtk.Label() self._details_label.set_line_wrap(True) + self.pack_start(self._details_label, True, True, 0) - button_alignment = gtk.Alignment(xalign=0.5) - self.pack_start(button_alignment, False) - - self.configure_button = gtk.Button(label=_('Configure Another Device')) - button_alignment.add(self.configure_button) + self.configure_button = Gtk.Button(label=_('Configure Another Device')) + self.configure_button.set_halign(Gtk.Align.CENTER) + self.pack_start(self.configure_button, False, True, 0) def get_page_title(self): return _("Configuration finished") def get_page_type(self): - return gtk.ASSISTANT_PAGE_SUMMARY + return Gtk.AssistantPageType.SUMMARY def set_device_name_and_details(self, name, details, success): if success: diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/SetupWizard.py gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/SetupWizard.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/ui/wizard/SetupWizard.py 2010-05-27 14:20:40.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/ui/wizard/SetupWizard.py 2011-09-22 20:08:40.000000000 +0000 @@ -16,12 +16,11 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import glib import gnomedvb -import gtk -from gettext import gettext as _ +from gi.repository import GObject +from gi.repository import Gtk +from gnomedvb import _ from gnomedvb.DVBModel import DVBModel -from gnomedvb.ui.wizard import DVB_TYPE_TO_DESC from gnomedvb.ui.wizard.pages.IntroPage import IntroPage from gnomedvb.ui.wizard.pages.AdaptersPage import AdaptersPage from gnomedvb.ui.wizard.pages.InitialTuningDataPage import InitialTuningDataPage @@ -30,32 +29,33 @@ from gnomedvb.ui.wizard.pages.SummaryPage import SummaryPage from gnomedvb.ui.wizard.pages.SetupDevicePage import SetupDevicePage -class CloseDialog(gtk.Dialog): +class CloseDialog(Gtk.Dialog): def __init__(self, parent=None): - gtk.Dialog.__init__(self, title="", - parent=parent, - flags=gtk.DIALOG_DESTROY_WITH_PARENT) + Gtk.Dialog.__init__(self, title="", + parent=parent) + self.set_destroy_with_parent(True) self.set_border_width(5) - self.set_has_separator(False) - self.vbox.set_spacing(6) + self.get_content_area().set_spacing(6) - label = gtk.Label(_("Cleaning up. This may take a while.")) + vbox = self.get_content_area() + + label = Gtk.Label(label=_("Cleaning up. This may take a while.")) label.show() - self.vbox.pack_start(label, False) + vbox.pack_start(label, False, True, 0) - self.progressbar = gtk.ProgressBar() + self.progressbar = Gtk.ProgressBar() self.progressbar.set_pulse_step(0.1) - self._progressbar_timer = glib.timeout_add(100, self._progressbar_pulse) + self._progressbar_timer = GObject.timeout_add(100, self._progressbar_pulse) self.progressbar.show() - self.vbox.pack_start(self.progressbar, False) + vbox.pack_start(self.progressbar, False, True, 0) - def _progressbar_pulse(self): + def _progressbar_pulse(self, user_data=None): self.progressbar.pulse() return True -class SetupWizard(gtk.Assistant): +class SetupWizard(Gtk.Assistant): (INTRO_PAGE, ADAPTERS_PAGE, @@ -66,7 +66,7 @@ SUMMARY_PAGE) = range(7) def __init__(self): - gtk.Assistant.__init__(self) + GObject.GObject.__init__(self) self.__ask_on_exit = False self.__adapter_info = None self.__model = DVBModel() @@ -77,7 +77,7 @@ self.connect ('cancel', self.confirm_quit) self.connect ('close', self.confirm_quit) self.connect ('prepare', self.on_prepare) - self.set_forward_page_func(self.page_func) + self.set_forward_page_func(self.page_func, None) self.set_default_size(500, 400) self.set_title(_("Setup digital TV")) @@ -85,11 +85,11 @@ self.append_page(self.intro_page) self.set_page_complete(self.intro_page, True) - self.adapters_page = AdaptersPage(self.__model) + self.adapters_page = AdaptersPage(self.__model) self.adapters_page.connect("finished", self.on_adapter_page_finished) self.adapters_page.connect("next-page", self.on_next_page) self.append_page(self.adapters_page) - + self.tuning_data_page = InitialTuningDataPage() self.tuning_data_page.connect("finished", self.on_page_finished) self.append_page(self.tuning_data_page) @@ -111,20 +111,31 @@ lambda button: self.set_current_page(self.INTRO_PAGE)) self.append_page(self.summary_page) - icon_theme = gtk.icon_theme_get_default() - width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_DIALOG) - try: - pixbuf = icon_theme.load_icon("gnome-dvb-setup", height, 0) - for i in range(self.get_n_pages()): - page = self.get_nth_page(i) - self.set_page_header_image(page, pixbuf) - except glib.GError: - pass + pixbuf = self.get_icon_pixbuf() + for i in range(self.get_n_pages()): + page = self.get_nth_page(i) + self.set_page_header_image(page, pixbuf) + + Gtk.Window.set_default_icon_name("gnome-dvb-setup") + + def get_icon_pixbuf(self): + screen = self.get_screen() + icon_theme = Gtk.IconTheme.get_for_screen(screen) + settings = Gtk.Settings.get_for_screen(screen) + success, width, height = Gtk.icon_size_lookup_for_settings(settings, Gtk.IconSize.DIALOG) + if not success: + width = 48 + height = 48 + + flags = Gtk.IconLookupFlags.USE_BUILTIN | Gtk.IconLookupFlags.GENERIC_FALLBACK + info = icon_theme.lookup_icon("gnome-dvb-setup", min(width, height), flags) + if info != None: + context = self.get_style_context() + pixbuf, symbolic = info.load_symbolic_for_context(context) + return pixbuf - gtk.window_set_default_icon_name("gnome-dvb-setup") - def append_page(self, page): - gtk.Assistant.append_page(self, page) + Gtk.Assistant.append_page(self, page) self.set_page_type(page, page.get_page_type()) def on_prepare(self, assistant, page): @@ -159,7 +170,7 @@ success, summary = self.setup_page.get_summary() page.set_device_name_and_details(self.__adapter_info["name"], summary, success) - self.__apdater_info = None + self.__adapter_info = None self.set_page_title(page, page.get_page_title()) @@ -196,14 +207,14 @@ def confirm_quit(self, *args): scanner = self.scan_page.get_scanner() if self.__ask_on_exit: - dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, - buttons=gtk.BUTTONS_YES_NO, + dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, + buttons=Gtk.ButtonsType.YES_NO, message_format=_("Are you sure you want to abort?\nAll process will be lost.")) response = dialog.run() - if response == gtk.RESPONSE_YES: + if response == Gtk.ResponseType.YES: dialog.destroy() self.destroy_scanner(scanner) else: @@ -215,12 +226,12 @@ def destroy_scanner(self, scanner): if scanner != None: - scanner.destroy(reply_handler=gtk.main_quit, + scanner.destroy(result_handler=Gtk.main_quit, error_handler=gnomedvb.global_error_handler) close_dialog = CloseDialog(self) close_dialog.show() else: - gtk.main_quit() + Gtk.main_quit() def on_next_page(self, adapters_page): if not self.__expert_mode and self.__adapter_info == None: diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/userdirs/__init__.py gnome-dvb-daemon-0.2.7/client/gnomedvb/userdirs/__init__.py --- gnome-dvb-daemon-0.1.23/client/gnomedvb/userdirs/__init__.py 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/userdirs/__init__.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -from __userdirs import * - diff -Nru gnome-dvb-daemon-0.1.23/client/gnomedvb/userdirs/__userdirsmodule.c gnome-dvb-daemon-0.2.7/client/gnomedvb/userdirs/__userdirsmodule.c --- gnome-dvb-daemon-0.1.23/client/gnomedvb/userdirs/__userdirsmodule.c 2010-04-09 12:37:14.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnomedvb/userdirs/__userdirsmodule.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -/* Function Prototypes */ -static PyObject * userdirs_get_xdg_user_dir (PyObject *self, PyObject *directory); -static void userdirs_register_constants (PyObject *self); - -/* Function Mapping Table */ -static PyMethodDef py__userdirs_functions[] = -{ - { "get_xdg_user_dir", userdirs_get_xdg_user_dir, 0, "" }, - { NULL, NULL, 0, NULL } -}; - -PyMODINIT_FUNC -init__userdirs (void) -{ - PyObject* m; - - m = Py_InitModule ("__userdirs", py__userdirs_functions); - userdirs_register_constants (m); -} - -static PyObject * -userdirs_get_xdg_user_dir (PyObject *self, PyObject *directory) -{ - const gchar *dir; - gchar *locale_dir; - PyObject *locale_dir_obj; - GError *error = NULL; - - if (!PyInt_Check (directory)) { - PyErr_SetString (PyExc_TypeError, "The first argument must be an integer"); - return NULL; - } - - dir = g_get_user_special_dir ((GUserDirectory) PyInt_AsLong (directory)); - if (!dir) { - Py_INCREF (Py_None); - return Py_None; - } - - locale_dir = g_filename_to_utf8 (dir, -1, NULL, NULL, &error); - if (error != NULL) { - PyErr_SetString (PyExc_RuntimeError, error->message); - g_error_free (error); - return NULL; - } - - locale_dir_obj = PyString_FromString (locale_dir); - g_free (locale_dir); - - return locale_dir_obj; -} - -static void -userdirs_register_constants (PyObject *m) { - PyModule_AddIntConstant (m, "DIRECTORY_DESKTOP", G_USER_DIRECTORY_DESKTOP); - PyModule_AddIntConstant (m, "DIRECTORY_DOCUMENTS", G_USER_DIRECTORY_DOCUMENTS); - PyModule_AddIntConstant (m, "DIRECTORY_DOWNLOAD", G_USER_DIRECTORY_DOWNLOAD); - PyModule_AddIntConstant (m, "DIRECTORY_MUSIC", G_USER_DIRECTORY_MUSIC); - PyModule_AddIntConstant (m, "DIRECTORY_PICTURES", G_USER_DIRECTORY_PICTURES); - PyModule_AddIntConstant (m, "DIRECTORY_PUBLIC_SHARE", G_USER_DIRECTORY_PUBLIC_SHARE); - PyModule_AddIntConstant (m, "DIRECTORY_TEMPLATES", G_USER_DIRECTORY_TEMPLATES); - PyModule_AddIntConstant (m, "DIRECTORY_VIDEOS", G_USER_DIRECTORY_VIDEOS); -} diff -Nru gnome-dvb-daemon-0.1.23/client/gnome-dvb-control gnome-dvb-daemon-0.2.7/client/gnome-dvb-control --- gnome-dvb-daemon-0.1.23/client/gnome-dvb-control 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnome-dvb-control 2011-09-22 20:08:40.000000000 +0000 @@ -17,19 +17,14 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import gtk +from gi.repository import Gtk import gnomedvb from gnomedvb.ui.controlcenter.ControlCenterWindow import ControlCenterWindow from gnomedvb.DVBModel import DVBModel -gnomedvb.setup_i18n() - -gtk.about_dialog_set_email_hook(lambda about, mail: gnomedvb.launch_default_for_uri("mailto:%s" % mail)) -gtk.about_dialog_set_url_hook(lambda about, url: gnomedvb.launch_default_for_uri(url)) - model = DVBModel() w = ControlCenterWindow(model) w.show_all() -gtk.main() +Gtk.main() diff -Nru gnome-dvb-daemon-0.1.23/client/gnome-dvb-setup gnome-dvb-daemon-0.2.7/client/gnome-dvb-setup --- gnome-dvb-daemon-0.1.23/client/gnome-dvb-setup 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/gnome-dvb-setup 2011-09-22 20:08:40.000000000 +0000 @@ -18,13 +18,10 @@ # along with GNOME DVB Daemon. If not, see . import gnomedvb -import gtk -import gtk.gdk +from gi.repository import Gtk, Gdk from gnomedvb.ui.wizard.SetupWizard import SetupWizard from optparse import OptionParser -gnomedvb.setup_i18n() - parser = OptionParser() parser.add_option("--transient-for", dest="transient_for", type="long", help="XID of parent window") @@ -36,14 +33,14 @@ if options.transient_for: print "Parent window:", options.transient_for - w.set_position(gtk.WIN_POS_CENTER_ON_PARENT) + w.set_position(Gtk.WindowPosition.CENTER_ON_PARENT) w.set_modal(True) - foreign_win = gtk.gdk.window_foreign_new(options.transient_for) - if foreign_win: - w.window.set_transient_for(foreign_win) - else: - print "Could not find parent window" + #XXX foreign_win = Gdk.window_foreign_new(options.transient_for) + #if foreign_win: + # w.window.set_transient_for(foreign_win) + #else: + # print "Could not find parent window" w.show_all() -gtk.main () +Gtk.main () diff -Nru gnome-dvb-daemon-0.1.23/client/Makefile.in gnome-dvb-daemon-0.2.7/client/Makefile.in --- gnome-dvb-daemon-0.1.23/client/Makefile.in 2011-01-14 13:59:44.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/Makefile.in 2011-12-10 09:27:25.000000000 +0000 @@ -47,10 +47,10 @@ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -142,13 +142,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -184,7 +181,6 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -197,6 +193,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -219,6 +216,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@ +PYGOBJECT_LIBS = @PYGOBJECT_LIBS@ PYTHON = @PYTHON@ PYTHONDIR = @PYTHONDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -242,6 +241,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -261,8 +261,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -expanded_datadir = @expanded_datadir@ -expanded_libdir = @expanded_libdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -276,7 +274,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru gnome-dvb-daemon-0.1.23/client/totem-plugin/dvb-daemon.plugin.in gnome-dvb-daemon-0.2.7/client/totem-plugin/dvb-daemon.plugin.in --- gnome-dvb-daemon-0.1.23/client/totem-plugin/dvb-daemon.plugin.in 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/totem-plugin/dvb-daemon.plugin.in 2011-04-17 10:51:56.000000000 +0000 @@ -0,0 +1,9 @@ +[Plugin] +Loader=python +Module=dvb-daemon +IAge=1 +_Name=GNOME DVB Daemon +_Description=Watch live TV and recorded shows +Authors=Sebastian Pölsterl +Copyright=Copyright © 2008 Sebastian Pölsterl +Website=http://www.k-d-w.org/ diff -Nru gnome-dvb-daemon-0.1.23/client/totem-plugin/dvb-daemon.py gnome-dvb-daemon-0.2.7/client/totem-plugin/dvb-daemon.py --- gnome-dvb-daemon-0.1.23/client/totem-plugin/dvb-daemon.py 2010-11-24 10:53:01.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/totem-plugin/dvb-daemon.py 2011-12-09 11:31:42.000000000 +0000 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2008-2010 Sebastian Pölsterl +# Copyright (C) 2008-2011 Sebastian Pölsterl # # This file is part of GNOME DVB Daemon. # @@ -16,22 +16,19 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -import dbus -import dbus.glib -import pygtk -pygtk.require("2.0") -from glib import GError -import glib -import gtk +import gnomedvb +from gi.repository import GObject import os import os.path -import pygst -pygst.require("0.10") -import totem -import gnomedvb import sys + +from gi.repository import Gdk +from gi.repository import Gio +from gi.repository import GLib +from gi.repository import Gtk +from gi.repository import Peas +from gi.repository import Totem from cgi import escape -import gettext from gnomedvb import global_error_handler from gnomedvb.DVBModel import DVBModel @@ -49,17 +46,25 @@ DBUS_DVB_SERVICE = "org.gnome.DVB" def _(message): - return gettext.dgettext('gnome-dvb-daemon', message) + return gnomedvb._(message) def spawn_on_screen(argv, screen, flags=0): def set_environment (display): os.environ["DISPLAY"] = display - return glib.spawn_async(argv, - flags=flags, - child_setup=set_environment, - user_data=screen.make_display_name()) + return GLib.spawn_async(None, + argv, None, + flags, + set_environment, + screen.make_display_name()) + +def _get_dbus_proxy(): + return Gio.DBusProxy.new_for_bus_sync(Gio.BusType.SESSION, + Gio.DBusProxyFlags.NONE, None, + "org.freedesktop.DBus", + "/org/freedesktop/DBus", + "org.freedesktop.DBus", None) class DvbSetup: @@ -87,16 +92,19 @@ return self.MISSING screen = parent_window.get_screen() - xid = parent_window.window.xid - argv = [setup_cmd, "--transient-for=%d" % xid] +# xid = parent_window.window.xid +# argv = [setup_cmd, "--transient-for=%d" % xid] + argv = [setup_cmd, ] - pid = spawn_on_screen (argv, screen, - flags=glib.SPAWN_FILE_AND_ARGV_ZERO | glib.SPAWN_DO_NOT_REAP_CHILD)[0] + success, pid = spawn_on_screen (argv, screen, + flags=GLib.SpawnFlags.FILE_AND_ARGV_ZERO | GLib.SpawnFlags.DO_NOT_REAP_CHILD) + if not success: + return self.FAILURE self._in_progress = True - glib.child_watch_add (pid, self._child_watch_func, - (callback, user_data)) + GLib.child_watch_add (GLib.PRIORITY_DEFAULT, pid, + self._child_watch_func, (callback, user_data)) return self.STARTED_OK @@ -110,29 +118,25 @@ if func: if user_data: - func (ret, user_data) + func (ret, user_data) else: func (ret) self._in_progress = False + GLib.spawn_close_pid(pid) - def _find_program_in_path(self, file): + def _find_program_in_path(self, afile): path = os.environ.get("PATH", os.defpath) mode=os.F_OK | os.X_OK - for dir in path.split(os.pathsep): - full_path = os.path.join(dir, file) + for adir in path.split(os.pathsep): + full_path = os.path.join(adir, afile) if os.path.exists(full_path) and os.access(full_path, mode): return full_path return None def _dbus_service_available(self, name): - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object("org.freedesktop.DBus", - "/org/freedesktop/DBus") - # Apply the correct interace to the proxy object - dbusobj = dbus.Interface(proxy, "org.freedesktop.DBus") + dbusobj = _get_dbus_proxy() for iname in dbusobj.ListNames(): if iname == name: @@ -145,23 +149,24 @@ return False -class ScheduleDialog(gtk.Dialog): +class ScheduleDialog(Gtk.Dialog): def __init__(self, group, sid, parent=None): - gtk.Dialog.__init__(self, title=_("Program Guide"), + Gtk.Dialog.__init__(self, title=_("Program Guide"), parent=parent, - flags=gtk.DIALOG_DESTROY_WITH_PARENT, - buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) + flags=Gtk.DialogFlags.DESTROY_WITH_PARENT, + buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)) self._group = group self._sid = sid self.set_default_size(640, 380) - self.vbox.set_spacing(6) + content_area = self.get_content_area() + content_area.set_spacing(6) self.schedulepaned = SchedulePaned() self.schedulepaned.show() - self.vbox.pack_start(self.schedulepaned) + content_area.pack_start(self.schedulepaned, True, True, 0) self.scheduleview = self.schedulepaned.get_treeview() self.scheduleview.connect("button-press-event", self._on_event_selected) @@ -170,51 +175,56 @@ self.scheduleview.set_model(self.schedulestore) def _on_event_selected(self, treeview, event): - if event.type == gtk.gdk._2BUTTON_PRESS: + if event.type == Gdk.EventType._2BUTTON_PRESS: model, aiter = treeview.get_selection().get_selected() if aiter != None: - dialog = gtk.MessageDialog(parent=self, - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO) + dialog = Gtk.MessageDialog(parent=self, + flags=Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO) dialog.set_markup ("%s" % _("Schedule recording for the selected event?")) response = dialog.run() - if response == gtk.RESPONSE_YES: + if response == Gtk.ResponseType.YES: event_id = model[aiter][model.COL_EVENT_ID] recorder = self._group.get_recorder() rec_id, success = recorder.add_timer_for_epg_event(event_id, self._sid) dialog.destroy() - if response == gtk.RESPONSE_YES and not success: + if response == Gtk.ResponseType.YES and not success: dialog = TimerFailureDialog(self) dialog.run() dialog.destroy() -class RunningNextDialog(gtk.Dialog): +class RunningNextDialog(Gtk.Dialog): def __init__(self, group, parent=None): - gtk.Dialog.__init__(self, title=_("Program Guide"), + Gtk.Dialog.__init__(self, title=_("Program Guide"), parent=parent, - flags=gtk.DIALOG_DESTROY_WITH_PARENT, - buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) + flags=Gtk.DialogFlags.DESTROY_WITH_PARENT, + buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)) self._group = group self.set_default_size(640, 380) - self.vbox.set_spacing(6) + content_area = self.get_content_area() + content_area.set_spacing(6) self.schedule = RunningNextStore(self._group) self.scheduleview = RunningNextView(self.schedule) self.scheduleview.show() - self.scrolledschedule = gtk.ScrolledWindow() + self.scrolledschedule = Gtk.ScrolledWindow() self.scrolledschedule.add(self.scheduleview) - self.scrolledschedule.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrolledschedule.set_shadow_type(gtk.SHADOW_IN) - self.vbox.pack_start(self.scrolledschedule) + self.scrolledschedule.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + self.scrolledschedule.set_shadow_type(Gtk.ShadowType.IN) + content_area.pack_start(self.scrolledschedule, True, True, 0) self.scrolledschedule.show() -class DVBDaemonPlugin(totem.Plugin): +class DVBDaemonPlugin(GObject.GObject, Peas.Activatable): + + __gtype_name__ = 'DVBDaemonPlugin' + + object = GObject.property(type = GObject.GObject) REC_GROUP_ID = -1 @@ -233,8 +243,6 @@ ORDER_BY_GROUP_ID,) = range(2) def __init__ (self): - totem.Plugin.__init__(self) - self.totem_object = None self.channels = None self.channels_view = None @@ -252,44 +260,59 @@ self.sidebar = None self._size = 0 self._loaded_groups = 0 + self.title_handler_id = 0 + self.active_title = None + self.active_url = None - def activate (self, totem_object): - self.totem_object = totem_object - - gettext.bindtextdomain('gnome-dvb-daemon') - + def do_activate (self): self.monitor_bus() try: self.construct() - except dbus.DBusException: - print >> sys.stderr, "Failed activating DVB DBus service" + except Exception, e: + print >> sys.stderr, "Failed activating DVB DBus service", str(e) return def monitor_bus(self): - bus = dbus.SessionBus() - # Get proxy object - proxy = bus.get_object("org.freedesktop.DBus", - "/org/freedesktop/DBus") - # Apply the correct interace to the proxy object - dbusobj = dbus.Interface(proxy, "org.freedesktop.DBus") - - dbusobj.connect_to_signal("NameOwnerChanged", self.on_dbus_owner_changed) - - def on_dbus_owner_changed(self, name, old_owner, new_owner): - if name == DBUS_DVB_SERVICE: - if old_owner == "": - self.construct() - elif new_owner == "": - self.deactivate(self.totem_object) + dbusobj = _get_dbus_proxy() + dbusobj.connect("g-signal", self.on_dbus_signal) + + def on_dbus_signal(self, proxy, sender_name, signal_name, params): + if signal_name == "NameOwnerChanged": + name, old_owner, new_owner = params.unpack() + if name == DBUS_DVB_SERVICE: + if old_owner == "": + self.construct() + elif new_owner == "": + self.deactivate() def construct(self): + self.totem_object = self.object + # THIS IS A HACK: + # We connect to metadata-updated signal to anticipate when the title + # of the main window might change to immediately set the desired title. + # Connecting to file-opened signal is needed to disable this hack when + # opening files not related to gnome-dvb-daemon. + self.totem_object.connect("metadata-updated", self.on_metadata_updated) + self.totem_object.connect("file-opened", self.on_file_opened) + self.manager = DVBModel() self.setup = DvbSetup() self.manager.get_all_devices(lambda devs: self.enable_dvb_support(len(devs) > 0)) + def on_file_opened(self, obj, mrl): + # If the new MRL does not come from this plugin stop updating the title + if mrl != self.active_url: + self.active_title = None + self.active_url = None + if self.title_handler_id != 0: + # stop being notified on title changes + window = self.totem_object.get_main_window() + window.disconnect(self.title_handler_id) + self.title_handler_id = 0 + def enable_dvb_support(self, val): if val: self._size = self.manager.get_device_group_size() @@ -297,18 +320,23 @@ self._setup_sidebar() self._setup_menu() - # Add recordings - self.rec_iter = self.channels.append(None, [self.REC_GROUP_ID, _("Recordings"), 0, None]) - self.recstore = gnomedvb.DVBRecordingsStoreClient() - self.recstore.connect("changed", self._on_recstore_changed) - add_rec = lambda recs: [self._add_recording(rid) for rid in recs] - self.recstore.get_recordings(reply_handler=add_rec, error_handler=global_error_handler) + self._get_and_add_recordings() self.totem_object.add_sidebar_page ("dvb-daemon", _("Digital TV"), self.sidebar) self.sidebar.show_all() - + + def _get_and_add_recordings(self): + # Add recordings + self.rec_iter = self.channels.append(None, [self.REC_GROUP_ID, + _("Recordings"), 0L, None]) + + self.recstore = gnomedvb.DVBRecordingsStoreClient() + self.recstore.connect("changed", self._on_recstore_changed) + add_rec = lambda p,recs,u: [self._add_recording(rid) for rid in recs] + self.recstore.get_recordings(result_handler=add_rec, error_handler=global_error_handler) + def _setup_sidebar(self): - self.sidebar = gtk.VBox(spacing=6) + self.sidebar = Gtk.VBox(spacing=6) self.channels = ChannelsTreeStore() self.channels.connect("loading-finished", self._on_group_loaded) @@ -317,39 +345,39 @@ self.channels_view.connect("button-press-event", self._on_channel_selected) self.channels_view.get_selection().connect("changed", self._on_selection_changed) - self.scrolledchannels = gtk.ScrolledWindow() - self.scrolledchannels.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrolledchannels.set_shadow_type(gtk.SHADOW_ETCHED_IN) + self.scrolledchannels = Gtk.ScrolledWindow() + self.scrolledchannels.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + self.scrolledchannels.set_shadow_type(Gtk.ShadowType.ETCHED_IN) self.scrolledchannels.add(self.channels_view) - self.sidebar.pack_start(self.scrolledchannels) + self.sidebar.pack_start(self.scrolledchannels, True, True, 0) - buttonbox = gtk.HButtonBox() + buttonbox = Gtk.HButtonBox() buttonbox.set_spacing(6) - self.sidebar.pack_start(buttonbox, False) + self.sidebar.pack_start(buttonbox, False, True, 0) - self.whatson_button = gtk.Button(label=_("What's on now")) - self.whatson_button.set_image(gtk.image_new_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_BUTTON)) + self.whatson_button = Gtk.Button(label=_("What's on now")) + self.whatson_button.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.BUTTON)) self.whatson_button.connect('clicked', self._on_action_whats_on_now) - buttonbox.pack_start(self.whatson_button) + buttonbox.pack_start(self.whatson_button, True, True, 0) self.whatson_button.set_sensitive(False) - self.epg_button = gtk.Button(label=_('Program Guide')) + self.epg_button = Gtk.Button(label=_('Program Guide')) self.epg_button.connect('clicked', self._on_action_epg) self.epg_button.set_sensitive(False) - buttonbox.pack_start(self.epg_button) + buttonbox.pack_start(self.epg_button, True, True, 0) def _setup_menu(self): uimanager = self.totem_object.get_ui_manager() # Create actions - actiongroup = gtk.ActionGroup('dvb') + actiongroup = Gtk.ActionGroup('dvb') actiongroup.add_actions([ ('dvbdevice', None, _('Watch TV'), None, None, self._on_play_dvb_activated), ('dvb-menu', None, _('Digital _TV')), ('dvb-timers', None, _('_Recording schedule'), None, None, self._on_action_timers), ('dvb-epg', None, _('_Program Guide'), None, None, self._on_action_epg), - ('dvb-whatson', gtk.STOCK_INDEX, _("What's on now"), None, None, self._on_action_whats_on_now), - ('dvb-preferences', gtk.STOCK_PREFERENCES, _('Digital TV Preferences'), None, None, self._on_action_preferences), + ('dvb-whatson', Gtk.STOCK_INDEX, _("What's on now"), None, None, self._on_action_whats_on_now), + ('dvb-preferences', Gtk.STOCK_PREFERENCES, _('Digital TV Preferences'), None, None, self._on_action_preferences), ('dvb-delete-recording', None, _('_Delete'), None, None, self._on_action_delete), ('dvb-detail-recording', None, _('D_etails'), None, None, self._on_action_details), ('dvb-order-channels', None, _('_Order channels')), @@ -370,69 +398,69 @@ # Movie menu merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/movie/devices-placeholder', - 'dvbdevice', 'dvbdevice', gtk.UI_MANAGER_MENUITEM, False) + 'dvbdevice', 'dvbdevice', Gtk.UIManagerItemType.MENUITEM, False) # Edit menu merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/edit/plugins', 'dvb-timers', 'dvb-timers', - gtk.UI_MANAGER_AUTO, True) + Gtk.UIManagerItemType.AUTO, True) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/edit/plugins', 'dvb-preferences', 'dvb-preferences', - gtk.UI_MANAGER_AUTO, True) + Gtk.UIManagerItemType.AUTO, True) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/edit/plugins', 'dvb-sep-1', None, - gtk.UI_MANAGER_AUTO, True) + Gtk.UIManagerItemType.AUTO, True) # View menu merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/sidebar', 'dvb-whatson', 'dvb-whatson', - gtk.UI_MANAGER_AUTO, True) + Gtk.UIManagerItemType.AUTO, True) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/sidebar', 'dvb-epg', 'dvb-epg', - gtk.UI_MANAGER_AUTO, True) + Gtk.UIManagerItemType.AUTO, True) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/sidebar', 'dvb-sep-2', None, - gtk.UI_MANAGER_AUTO, True) + Gtk.UIManagerItemType.AUTO, True) # Order by menu merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/show-controls', 'dvb-order-channels', - 'dvb-order-channels', gtk.UI_MANAGER_MENU, False) + 'dvb-order-channels', Gtk.UIManagerItemType.MENU, False) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels', - 'dvb-order-by-name', 'dvb-order-by-name', gtk.UI_MANAGER_AUTO, False) + 'dvb-order-by-name', 'dvb-order-by-name', Gtk.UIManagerItemType.AUTO, False) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels', - 'dvb-order-by-group', 'dvb-order-by-group', gtk.UI_MANAGER_AUTO, False) + 'dvb-order-by-group', 'dvb-order-by-group', Gtk.UIManagerItemType.AUTO, False) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels', 'dvb-sep-3', None, - gtk.UI_MANAGER_AUTO, False) + Gtk.UIManagerItemType.AUTO, False) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels', - 'dvb-order-reverse', 'dvb-order-reverse', gtk.UI_MANAGER_AUTO, False) + 'dvb-order-reverse', 'dvb-order-reverse', Gtk.UIManagerItemType.AUTO, False) merge_id = uimanager.new_merge_id() uimanager.add_ui(merge_id, '/tmw-menubar/view/show-controls', 'dvb-sep-4', None, - gtk.UI_MANAGER_AUTO, False) + Gtk.UIManagerItemType.AUTO, False) self.popup_menu = uimanager.get_widget('/dvb-popup') self.popup_recordings = uimanager.get_widget('/dvb-recording-popup') - totemtv_image = gtk.image_new_from_icon_name("totem-tv", gtk.ICON_SIZE_MENU) + totemtv_image = Gtk.Image.new_from_icon_name("totem-tv", Gtk.IconSize.MENU) totemtv_image.show() watch_item = uimanager.get_widget('/tmw-menubar/movie/devices-placeholder/dvbdevice') watch_item.set_image(totemtv_image) - timers_image = gtk.image_new_from_icon_name("stock_timer", gtk.ICON_SIZE_MENU) + timers_image = Gtk.Image.new_from_icon_name("stock_timer", Gtk.IconSize.MENU) timers_image.show() self.timers_item = uimanager.get_widget('/tmw-menubar/edit/dvb-timers') @@ -448,7 +476,7 @@ def _configure_mode(self): if self._size == 1: # Activate single group mode - root_iter = self.channels.get_iter_root() + root_iter = self.channels.get_iter_first() group_iter = self.channels.iter_next(root_iter) self.single_group = self.channels[group_iter][self.channels.COL_GROUP] self._enable_single_group_mode(True) @@ -471,7 +499,7 @@ else: return (model[aiter][model.COL_GROUP], model[aiter][model.COL_SID],) - def _on_action_timers(self, action): + def _on_action_timers(self, action, user_date=None): group = self._get_selected_group_and_channel()[0] if group == None: group = self.single_group @@ -480,7 +508,7 @@ edit.run() edit.destroy() - def _on_action_epg(self, action): + def _on_action_epg(self, action, user_date=None): group, sid = self._get_selected_group_and_channel() if group == None: group = self.single_group @@ -492,7 +520,7 @@ dialog.connect("response", lambda d, resp: d.destroy()) dialog.show() - def _on_action_whats_on_now(self, action): + def _on_action_whats_on_now(self, action, user_date=None): group, sid = self._get_selected_group_and_channel() if group == None: group = self.single_group @@ -501,25 +529,25 @@ dialog.connect("response", lambda d, resp: d.destroy()) dialog.show() - def _on_action_preferences(self, action): + def _on_action_preferences(self, action, user_date=None): prefs = Preferences(self.manager, self.totem_object.get_main_window()) prefs.show() - def _on_action_delete(self, action): + def _on_action_delete(self, action, user_date=None): model, aiter = self.channels_view.get_selection().get_selected() if aiter != None: - dialog = gtk.MessageDialog(parent=self.totem_object.get_main_window(), - flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, - type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO) + dialog = Gtk.MessageDialog(parent=self.totem_object.get_main_window(), + flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, + type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO) dialog.set_markup("%s" % _("Delete selected recording?")) response = dialog.run() dialog.destroy() - if response == gtk.RESPONSE_YES: + if response == Gtk.ResponseType.YES: self.recstore.delete(model[aiter][model.COL_SID], - reply_handler=self._delete_callback, + result_handler=self._delete_callback, error_handler=global_error_handler) - def _on_action_details(self, action): + def _on_action_details(self, action, user_date=None): model, aiter = self.channels_view.get_selection().get_selected() if aiter != None: rec_id = model[aiter][model.COL_SID] @@ -527,25 +555,36 @@ dialog.run() dialog.destroy() - def deactivate (self, totem_object): - totem_object.remove_sidebar_page ("dvb-daemon") - self.totem_object = None + def do_deactivate (self): + if self.totem_object != None: + self.totem_object.remove_sidebar_page ("dvb-daemon") def _on_channel_selected(self, treeview, event): - if event.type == gtk.gdk._2BUTTON_PRESS: + if event.type == Gdk.EventType._2BUTTON_PRESS: # double click model, aiter = treeview.get_selection().get_selected() if aiter != None: group_id = model[aiter][model.COL_GROUP_ID] sid = model[aiter][model.COL_SID] + # Skip section headers + if sid == 0L: + return + if group_id == self.REC_GROUP_ID: url, success = self.recstore.get_location(sid) else: group = gnomedvb.DVBManagerClient().get_device_group(group_id) + if group == None: + return channellist = group.get_channel_list() + url, success = channellist.get_channel_url(sid) - self.totem_object.action_remote(totem.REMOTE_COMMAND_REPLACE, url) - self.totem_object.action_remote(totem.REMOTE_COMMAND_PLAY, url) + + self.set_current_title(channellist, sid) + self.active_url = url + + self.totem_object.action_remote(Totem.RemoteCommand.REPLACE, url) + self.totem_object.action_remote(Totem.RemoteCommand.PLAY, url) elif event.button == 3: # right click button x = int(event.x) @@ -562,10 +601,34 @@ # We are in the recordings section if model.iter_parent(aiter) != None: # A child is selected - self.popup_recordings.popup(None, None, None, event.button, time) + self.popup_recordings.popup(None, None, None, None, event.button, time) else: - self.popup_menu.popup(None, None, None, event.button, time) - + self.popup_menu.popup(None, None, None, None, event.button, time) + + def set_current_title(self, channellist, sid): + name, success = channellist.get_channel_name(sid) + + if success: + self.active_title = name + else: + self.active_title = None + + def on_metadata_updated(self, source, artist, title, album, track): + main_window = self.totem_object.get_main_window() + if self.title_handler_id == 0 and self.active_title != None: + # start getting notified for title changes + self.title_handler_id = main_window.connect("notify::title", + self.on_title_changed) + + def on_title_changed(self, window, param): + # update the window's title with the titel retrieved from the daemon + # as stored in self.active_title, then stop listening to changes of title + window.freeze_notify() + window.set_title(self.active_title) + window.disconnect(self.title_handler_id) + self.title_handler_id = 0 + window.thaw_notify() + def _on_selection_changed(self, treeselection): model, aiter = treeselection.get_selected() if aiter == None or model[aiter][model.COL_GROUP] == None: @@ -588,8 +651,9 @@ name = _("Recording %d") % rid else: name = escape(name) - self.channels.append(self.rec_iter, [self.REC_GROUP_ID, name, rid, None]) - + self.channels.append(self.rec_iter, [self.REC_GROUP_ID, + name, rid, None]) + def _on_recstore_changed(self, recstore, rec_id, change_type): if change_type == 0: # Added @@ -605,7 +669,7 @@ child_iter = self.channels.iter_next(child_iter) def _on_channels_row_inserted_deleted(self, treestore, path, aiter=None): - if len(path) == 1: + if path.get_depth() == 1: # One entry is for recordings val = len(treestore) == 2 self._enable_single_group_mode(val) @@ -615,11 +679,11 @@ if self._loaded_groups == self._size: self._configure_mode() - def _delete_callback(self, success): + def _delete_callback(self, proxy, success, user_data): if not success: global_error_handler("Could not delete recording") - def _on_order_by_changed(self, action, current): + def _on_order_by_changed(self, action, current, user_date=None): val = current.get_current_value() sort_order = self.channels.get_sort_column_id()[1] if val == self.ORDER_BY_NAME_ID: @@ -627,28 +691,26 @@ elif val == self.ORDER_BY_GROUP_ID: self.channels = ChannelsTreeStore(True) self.channels.set_sort_order(sort_order) + self._get_and_add_recordings() self.channels_view.set_model(self.channels) - def _on_order_reverse_toggled(self, action): + def _on_order_reverse_toggled(self, action, user_date=None): if action.get_active(): - self.channels.set_sort_order(gtk.SORT_DESCENDING) + self.channels.set_sort_order(Gtk.SortType.DESCENDING) else: - self.channels.set_sort_order(gtk.SORT_ASCENDING) + self.channels.set_sort_order(Gtk.SortType.ASCENDING) - def _on_play_dvb_activated(self, action): + def _on_play_dvb_activated(self, action, user_date=None): main_window = self.totem_object.get_main_window() # Only run setup if no devices are configured, yet if self._size == 0: status = self.setup.run (main_window, self._on_setup_dvb_finished) if status == DvbSetup.MISSING: - dialog = gtk.MessageDialog(main_window, - gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, + self.totem_object.action_error(_("Setup Failed"), _("GNOME DVB Daemon is not installed")) - dialog.set_resizable(False) - dialog.run() - dialog.destroy() + elif status == DvbSetup.FAILURE: + self.totem_object.action_error(_("Setup Failed"), + _("Could not start GNOME DVB Daemon setup")) print "DVB SETUP STARTED", status diff -Nru gnome-dvb-daemon-0.1.23/client/totem-plugin/dvb-daemon.totem-plugin.in gnome-dvb-daemon-0.2.7/client/totem-plugin/dvb-daemon.totem-plugin.in --- gnome-dvb-daemon-0.1.23/client/totem-plugin/dvb-daemon.totem-plugin.in 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/totem-plugin/dvb-daemon.totem-plugin.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -[Totem Plugin] -Loader=python -Module=dvb-daemon -IAge=1 -Builtin=true -_Name=GNOME DVB Daemon -_Description=Watch live TV and recorded shows -Authors=Sebastian Pölsterl -Copyright=Copyright © 2008 Sebastian Pölsterl -Website=http://www.k-d-w.org/ diff -Nru gnome-dvb-daemon-0.1.23/client/totem-plugin/Makefile.am gnome-dvb-daemon-0.2.7/client/totem-plugin/Makefile.am --- gnome-dvb-daemon-0.1.23/client/totem-plugin/Makefile.am 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/totem-plugin/Makefile.am 2011-04-17 10:51:56.000000000 +0000 @@ -1,11 +1,11 @@ plugindir = $(TOTEM_PLUGIN_DIR)/dvb-daemon plugin_PYTHON = dvb-daemon.py -plugin_in_files = dvb-daemon.totem-plugin.in +plugin_in_files = dvb-daemon.plugin.in -%.totem-plugin: %.totem-plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache +%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache -plugin_DATA = $(plugin_in_files:.totem-plugin.in=.totem-plugin) +plugin_DATA = $(plugin_in_files:.plugin.in=.plugin) EXTRA_DIST = $(plugin_in_files) dvb-daemon.py diff -Nru gnome-dvb-daemon-0.1.23/client/totem-plugin/Makefile.in gnome-dvb-daemon-0.2.7/client/totem-plugin/Makefile.in --- gnome-dvb-daemon-0.1.23/client/totem-plugin/Makefile.in 2011-01-14 13:59:45.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/client/totem-plugin/Makefile.in 2011-12-10 09:27:25.000000000 +0000 @@ -47,10 +47,10 @@ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -103,13 +103,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -145,7 +142,6 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -158,6 +154,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -180,6 +177,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@ +PYGOBJECT_LIBS = @PYGOBJECT_LIBS@ PYTHON = @PYTHON@ PYTHONDIR = @PYTHONDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -203,6 +202,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -222,8 +222,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -expanded_datadir = @expanded_datadir@ -expanded_libdir = @expanded_libdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -237,7 +235,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -259,8 +256,8 @@ top_srcdir = @top_srcdir@ plugindir = $(TOTEM_PLUGIN_DIR)/dvb-daemon plugin_PYTHON = dvb-daemon.py -plugin_in_files = dvb-daemon.totem-plugin.in -plugin_DATA = $(plugin_in_files:.totem-plugin.in=.totem-plugin) +plugin_in_files = dvb-daemon.plugin.in +plugin_DATA = $(plugin_in_files:.plugin.in=.plugin) EXTRA_DIST = $(plugin_in_files) dvb-daemon.py CLEANFILES = $(plugin_DATA) DISTCLEANFILES = $(plugin_DATA) @@ -514,7 +511,7 @@ uninstall-pluginDATA uninstall-pluginPYTHON -%.totem-plugin: %.totem-plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache +%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnome-dvb-daemon-0.1.23/config.guess gnome-dvb-daemon-0.2.7/config.guess --- gnome-dvb-daemon-0.1.23/config.guess 2011-01-14 13:59:44.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/config.guess 2011-12-10 09:27:25.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -56,9 +56,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." diff -Nru gnome-dvb-daemon-0.1.23/config.h.in gnome-dvb-daemon-0.2.7/config.h.in --- gnome-dvb-daemon-0.1.23/config.h.in 2011-01-14 13:59:44.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/config.h.in 2011-12-10 09:27:24.000000000 +0000 @@ -1,8 +1,5 @@ /* config.h.in. Generated from configure.ac by autoheader. */ -/* DBus services directory */ -#undef DBUS_SERVICES_DIR - /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS diff -Nru gnome-dvb-daemon-0.1.23/config.sub gnome-dvb-daemon-0.2.7/config.sub --- gnome-dvb-daemon-0.1.23/config.sub 2011-01-14 13:59:44.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/config.sub 2011-12-10 09:27:25.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2010-01-22' +timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -75,9 +75,8 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -381,8 +380,7 @@ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ @@ -1087,11 +1085,6 @@ basic_machine=tic6x-unknown os=-coff ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) basic_machine=tile-unknown os=-linux-gnu @@ -1442,8 +1435,6 @@ -dicos*) os=-dicos ;; - -nacl*) - ;; -none) ;; *) diff -Nru gnome-dvb-daemon-0.1.23/configure gnome-dvb-daemon-0.2.7/configure --- gnome-dvb-daemon-0.1.23/configure 2011-01-14 13:59:43.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/configure 2011-12-10 09:27:24.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for gnome-dvb-daemon 0.1.23. +# Generated by GNU Autoconf 2.68 for gnome-dvb-daemon 0.2.7. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -91,6 +91,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -173,6 +174,14 @@ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes @@ -216,11 +225,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -231,10 +247,11 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://bugs.launchpad.net/gnome-dvb-daemon about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." +$0: https://bugzilla.gnome.org/browse.cgi?product=dvb-daemon +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." fi exit 1 fi @@ -528,155 +545,8 @@ # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - as_awk_strverscmp=' # Use only awk features that work with 7th edition Unix awk (1978). # My, what an old awk you have, Mr. Solaris! @@ -761,9 +631,9 @@ # Identity of this package. PACKAGE_NAME='gnome-dvb-daemon' PACKAGE_TARNAME='gnome-dvb-daemon' -PACKAGE_VERSION='0.1.23' -PACKAGE_STRING='gnome-dvb-daemon 0.1.23' -PACKAGE_BUGREPORT='https://bugs.launchpad.net/gnome-dvb-daemon' +PACKAGE_VERSION='0.2.7' +PACKAGE_STRING='gnome-dvb-daemon 0.2.7' +PACKAGE_BUGREPORT='https://bugzilla.gnome.org/browse.cgi?product=dvb-daemon' PACKAGE_URL='http://live.gnome.org/DVBDaemon' ac_unique_file="Makefile.am" @@ -808,9 +678,9 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +PYGOBJECT_LIBS +PYGOBJECT_CFLAGS PYTHONDIR -LIBDIR -DATADIR PYTHON_INCLUDES pkgpyexecdir pyexecdir @@ -821,11 +691,6 @@ PYTHON_PREFIX PYTHON_VERSION PYTHON -DBUS_SERVICES_DIR -DBUS_LIBS -DBUS_CFLAGS -expanded_libdir -expanded_datadir TOTEM_PLUGIN_DIR ENABLE_TOTEM_FALSE ENABLE_TOTEM_TRUE @@ -892,9 +757,11 @@ LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -1007,6 +874,7 @@ with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock enable_nls enable_rpath @@ -1035,8 +903,8 @@ GLIB_LIBS GUDEV_CFLAGS GUDEV_LIBS -DBUS_CFLAGS -DBUS_LIBS' +PYGOBJECT_CFLAGS +PYGOBJECT_LIBS' # Initialize some variables set by options. @@ -1441,7 +1309,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1579,7 +1447,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gnome-dvb-daemon 0.1.23 to adapt to many kinds of systems. +\`configure' configures gnome-dvb-daemon 0.2.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1650,7 +1518,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gnome-dvb-daemon 0.1.23:";; + short | recursive ) echo "Configuration of gnome-dvb-daemon 0.2.7:";; esac cat <<\_ACEOF @@ -1658,7 +1526,7 @@ --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful + --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') @@ -1671,7 +1539,7 @@ --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths - --enable-totem-plugin Install the Totem plugin + --enable-totem-plugin Install the Totem plugin (default: no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1679,6 +1547,8 @@ --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir @@ -1712,13 +1582,15 @@ GUDEV_CFLAGS C compiler flags for GUDEV, overriding pkg-config GUDEV_LIBS linker flags for GUDEV, overriding pkg-config - DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config - DBUS_LIBS linker flags for DBUS, overriding pkg-config + PYGOBJECT_CFLAGS + C compiler flags for PYGOBJECT, overriding pkg-config + PYGOBJECT_LIBS + linker flags for PYGOBJECT, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . gnome-dvb-daemon home page: . _ACEOF ac_status=$? @@ -1782,8 +1654,8 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gnome-dvb-daemon configure 0.1.23 -generated by GNU Autoconf 2.67 +gnome-dvb-daemon configure 0.2.7 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1829,7 +1701,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1875,7 +1747,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1889,7 +1761,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1907,7 +1779,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1943,7 +1815,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1985,7 +1857,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1998,7 +1870,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2053,7 +1925,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2065,10 +1937,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2127,15 +1999,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------------------------------------- ## -## Report this to https://bugs.launchpad.net/gnome-dvb-daemon ## -## ---------------------------------------------------------- ##" +( $as_echo "## ----------------------------------------------------------------------- ## +## Report this to https://bugzilla.gnome.org/browse.cgi?product=dvb-daemon ## +## ----------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2144,15 +2016,15 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gnome-dvb-daemon $as_me 0.1.23, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by gnome-dvb-daemon $as_me 0.2.7, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2410,7 +2282,7 @@ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2552,7 +2424,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2639,11 +2511,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2729,7 +2601,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2769,7 +2641,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2822,7 +2694,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2873,7 +2745,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2913,7 +2785,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2971,7 +2843,7 @@ # Define the identity of the package. PACKAGE='gnome-dvb-daemon' - VERSION='0.1.23' + VERSION='0.2.7' cat >>confdefs.h <<_ACEOF @@ -3012,13 +2884,13 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to disable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else - USE_MAINTAINER_MODE=no + USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 @@ -3057,7 +2929,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3097,7 +2969,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3150,7 +3022,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3190,7 +3062,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3249,7 +3121,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3293,7 +3165,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3348,7 +3220,7 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3463,7 +3335,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3506,7 +3378,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3565,7 +3437,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3576,7 +3448,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3617,7 +3489,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3627,7 +3499,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3664,7 +3536,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3742,7 +3614,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3903,7 +3775,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4035,7 +3907,7 @@ fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4162,8 +4034,8 @@ -macro_version='2.2.6b' -macro_revision='1.3017' +macro_version='2.4' +macro_revision='1.3293' @@ -4185,7 +4057,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -4201,7 +4073,7 @@ $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4219,7 +4091,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -4234,7 +4106,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4250,9 +4122,78 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -4334,7 +4275,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4397,7 +4338,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4464,7 +4405,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -4595,7 +4536,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -4635,7 +4576,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -4662,7 +4603,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -4715,14 +4656,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -4760,13 +4704,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -4815,6 +4759,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -4829,18 +4782,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4837: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4840: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4843: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -4864,7 +4817,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -4897,6 +4850,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -4961,8 +4919,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -5004,8 +4962,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -5054,9 +5012,83 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -5070,6 +5102,11 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5092,7 +5129,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -5132,7 +5169,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -5191,7 +5228,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -5233,16 +5270,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -5272,6 +5311,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -5280,11 +5323,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -5310,7 +5353,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -5387,6 +5430,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -5402,16 +5460,26 @@ + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5420,7 +5488,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5430,10 +5498,10 @@ fi fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -5441,17 +5509,17 @@ fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5460,7 +5528,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5470,17 +5538,17 @@ fi fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_AR" = x; then - AR="false" + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -5488,19 +5556,56 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - AR=$ac_ct_AR + DLLTOOL=$ac_ct_DLLTOOL fi else - AR="$ac_cv_prog_AR" + DLLTOOL="$ac_cv_prog_DLLTOOL" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + @@ -5508,15 +5613,17 @@ if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5525,7 +5632,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5535,28 +5642,32 @@ fi fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5565,7 +5676,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5575,17 +5686,182 @@ fi fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -5611,7 +5887,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5651,7 +5927,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5722,6 +5998,18 @@ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + @@ -5768,7 +6056,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5829,8 +6117,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5866,6 +6154,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5891,8 +6180,8 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -5907,6 +6196,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5918,7 +6219,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5944,8 +6245,8 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5955,8 +6256,8 @@ test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5993,6 +6294,15 @@ $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + @@ -6015,6 +6325,45 @@ + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -6046,7 +6395,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6049 "configure"' > conftest.$ac_ext + echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6140,7 +6489,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -6208,6 +6557,123 @@ need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -6216,7 +6682,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -6256,7 +6722,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -6308,7 +6774,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -6348,7 +6814,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -6400,7 +6866,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -6440,7 +6906,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -6492,7 +6958,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -6532,7 +6998,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -6584,7 +7050,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -6624,7 +7090,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -6699,7 +7165,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -6728,7 +7194,7 @@ $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -6758,6 +7224,38 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -6785,7 +7283,7 @@ else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -6805,7 +7303,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -6921,7 +7419,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6933,7 +7431,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7064,7 +7562,7 @@ do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -7075,6 +7573,8 @@ + + # Set options # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : @@ -7226,6 +7726,7 @@ + test -z "$LN_S" && LN_S="ln -s" @@ -7247,7 +7748,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -7275,19 +7776,6 @@ - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -7300,23 +7788,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -7345,7 +7816,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -7355,7 +7826,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7421,7 +7892,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7554,11 +8025,16 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -7574,15 +8050,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7577: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7581: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -7611,8 +8087,6 @@ lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7660,6 +8134,12 @@ lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -7702,6 +8182,13 @@ lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -7764,7 +8251,13 @@ lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -7776,25 +8269,25 @@ # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_wl='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' + lt_prog_compiler_wl='-Wl,' ;; esac ;; @@ -7826,7 +8319,7 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -7883,13 +8376,17 @@ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7897,7 +8394,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -7913,15 +8410,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7916: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7920: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -7950,13 +8447,18 @@ + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -7969,7 +8471,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -7999,7 +8501,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8018,16 +8520,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8021: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8025: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -8054,7 +8556,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8073,16 +8575,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8076: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8080: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -8192,13 +8694,36 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) - link_all_deplibs=no - ;; esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -8232,11 +8757,12 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -8272,10 +8798,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8293,6 +8821,11 @@ fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -8318,15 +8851,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -8337,13 +8871,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -8359,17 +8897,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -8378,13 +8916,13 @@ fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8402,8 +8940,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8449,8 +8987,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8490,8 +9028,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -8553,7 +9093,6 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi - link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then @@ -8579,7 +9118,13 @@ allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8592,25 +9137,32 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' @@ -8619,7 +9171,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8632,30 +9190,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -8687,20 +9257,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8710,7 +9323,11 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -8718,7 +9335,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -8761,7 +9378,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8769,7 +9386,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8784,8 +9401,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8803,16 +9420,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8824,7 +9441,46 @@ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + ;; esac fi @@ -8852,26 +9508,39 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -8880,7 +9549,7 @@ link_all_deplibs=yes ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -8933,17 +9602,17 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -8953,13 +9622,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -8972,9 +9641,9 @@ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9162,44 +9831,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -9370,16 +10045,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -9392,7 +10074,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -9412,7 +10094,13 @@ if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -9500,7 +10188,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -9531,8 +10219,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9551,38 +10240,85 @@ case $host_os in cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + *) + sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. + # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -9669,6 +10405,19 @@ hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -9711,8 +10460,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -9779,12 +10530,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9797,23 +10553,31 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9825,18 +10589,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -10127,6 +10879,11 @@ + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= @@ -10199,7 +10956,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10233,7 +10990,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -10247,12 +11004,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10286,16 +11043,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10329,12 +11086,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10368,12 +11125,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10407,7 +11164,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -10448,7 +11205,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -10457,7 +11214,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10460 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10498,7 +11255,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10507,7 +11270,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -10544,7 +11311,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -10553,7 +11320,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10556 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10594,7 +11361,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10603,7 +11376,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -10785,7 +11562,7 @@ set dummy valac; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_VALAC+set}" = set; then : +if ${ac_cv_path_VALAC+:} false; then : $as_echo_n "(cached) " >&6 else case $VALAC in @@ -10825,11 +11602,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No Vala compiler found. You will not be able to compile .vala source files." >&5 $as_echo "$as_me: WARNING: No Vala compiler found. You will not be able to compile .vala source files." >&2;} else - if test -n "0.11.2"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking $VALAC is at least version 0.11.2" >&5 -$as_echo_n "checking $VALAC is at least version 0.11.2... " >&6; } + if test -n "0.14.0"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $VALAC is at least version 0.14.0" >&5 +$as_echo_n "checking $VALAC is at least version 0.14.0... " >&6; } am__vala_version=`$VALAC --version | sed 's/Vala *//'` - as_arg_v1=0.11.2 + as_arg_v1=0.14.0 as_arg_v2="$am__vala_version" awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null case $? in #( @@ -10842,7 +11619,7 @@ 2) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "Vala 0.11.2 not found." "$LINENO" 5 ;; #( + as_fn_error $? "Vala 0.14.0 not found." "$LINENO" 5 ;; #( *) : ;; esac @@ -10896,7 +11673,7 @@ set dummy intltool-update; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then : +if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_UPDATE in @@ -10936,7 +11713,7 @@ set dummy intltool-merge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then : +if ${ac_cv_path_INTLTOOL_MERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_MERGE in @@ -10976,7 +11753,7 @@ set dummy intltool-extract; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then : +if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_EXTRACT in @@ -11137,7 +11914,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $XGETTEXT in @@ -11177,7 +11954,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGMERGE in @@ -11217,7 +11994,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in @@ -11257,7 +12034,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -11308,7 +12085,7 @@ set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then : +if ${ac_cv_path_INTLTOOL_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_PERL in @@ -11392,7 +12169,7 @@ case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" -if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : +if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : DATADIRNAME=share else DATADIRNAME=lib @@ -11453,7 +12230,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -11494,7 +12271,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -11576,7 +12353,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -11654,7 +12431,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -11776,7 +12553,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${acl_cv_path_LD+set}" = set; then : +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -11813,7 +12590,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -11833,7 +12610,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -11871,7 +12648,7 @@ solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } -if test "${gl_cv_solaris_64bit+set}" = set; then : +if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12418,7 +13195,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -12452,7 +13229,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -12528,7 +13305,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then : +if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12591,7 +13368,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -12648,7 +13425,7 @@ if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } -if test "${am_cv_func_iconv_works+set}" = set; then : +if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else @@ -13244,7 +14021,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then : +if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -13432,7 +14209,7 @@ for ac_header in time.h do : ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" -if test "x$ac_cv_header_time_h" = x""yes; then : +if test "x$ac_cv_header_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TIME_H 1 _ACEOF @@ -13448,7 +14225,7 @@ fi ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm" -if test "x$ac_cv_func_timegm" = x""yes; then : +if test "x$ac_cv_func_timegm" = xyes; then : have_timegm=yes else have_timegm=no @@ -13461,7 +14238,7 @@ for ac_header in signal.h do : ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" -if test "x$ac_cv_header_signal_h" = x""yes; then : +if test "x$ac_cv_header_signal_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIGNAL_H 1 _ACEOF @@ -13476,10 +14253,8 @@ as_fn_error $? "Could not find signal.h" "$LINENO" 5 fi -GLIB_REQUIRED=2.16.0 -GIO_REQUIRED=2.16.0 +GLIB_REQUIRED=2.28.5 GST_REQUIRED=0.10.29 -DBUS_REQUIRED=0.74 GEE_REQUIRED=0.5.0 SQLITE_REQUIRED=3.4 GST_RTSP_SERVER_REQUIRED=0.10.7 @@ -13496,7 +14271,7 @@ set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -13539,7 +14314,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in @@ -13679,6 +14454,7 @@ Alternatively, you may set the environment variables GST_CFLAGS and GST_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -13693,7 +14469,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else GST_CFLAGS=$pkg_cv_GST_CFLAGS GST_LIBS=$pkg_cv_GST_LIBS @@ -13714,16 +14491,14 @@ elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED - gio-2.0 >= \$GIO_REQUIRED + gio-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED - dbus-glib-1 >= \$DBUS_REQUIRED gee-1.0 >= \$GEE_REQUIRED sqlite3 >= \$SQLITE_REQUIRED gst-rtsp-server-0.10 >= \$GST_RTSP_SERVER_REQUIRED\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED") 2>&5 @@ -13731,9 +14506,8 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GNOME_DVB_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED" 2>/dev/null` @@ -13748,16 +14522,14 @@ elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED - gio-2.0 >= \$GIO_REQUIRED + gio-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED - dbus-glib-1 >= \$DBUS_REQUIRED gee-1.0 >= \$GEE_REQUIRED sqlite3 >= \$SQLITE_REQUIRED gst-rtsp-server-0.10 >= \$GST_RTSP_SERVER_REQUIRED\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED") 2>&5 @@ -13765,9 +14537,8 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GNOME_DVB_DAEMON_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED" 2>/dev/null` @@ -13791,17 +14562,15 @@ fi if test $_pkg_short_errors_supported = yes; then GNOME_DVB_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED" 2>&1` else GNOME_DVB_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED" 2>&1` @@ -13810,9 +14579,8 @@ echo "$GNOME_DVB_DAEMON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED) were not met: @@ -13825,6 +14593,7 @@ Alternatively, you may set the environment variables GNOME_DVB_DAEMON_CFLAGS and GNOME_DVB_DAEMON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -13839,7 +14608,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else GNOME_DVB_DAEMON_CFLAGS=$pkg_cv_GNOME_DVB_DAEMON_CFLAGS GNOME_DVB_DAEMON_LIBS=$pkg_cv_GNOME_DVB_DAEMON_LIBS @@ -13917,6 +14687,7 @@ Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -13931,7 +14702,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS @@ -14009,6 +14781,7 @@ Alternatively, you may set the environment variables GUDEV_CFLAGS and GUDEV_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -14023,7 +14796,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else GUDEV_CFLAGS=$pkg_cv_GUDEV_CFLAGS GUDEV_LIBS=$pkg_cv_GUDEV_LIBS @@ -14124,9 +14898,9 @@ # Check whether --enable-totem-plugin was given. if test "${enable_totem_plugin+set}" = set; then : - enableval=$enable_totem_plugin; enable_totem="yes" + enableval=$enable_totem_plugin; enable_totem=$enableval else - enable_totem="no" + enable_totem=no fi @@ -14148,142 +14922,22 @@ if test "x$enable_totem" = "xyes"; then if test "x$with_totem_plugin_dir" = "x"; then - TOTEM_PLUGIN_DIR="$libdir/totem/plugins" + TOTEM_PLUGIN_DIR=`$PKG_CONFIG --variable=pluginsdir totem` + if test "x$TOTEM_PLUGIN_DIR" = "x"; then + as_fn_error $? " + + *** Could not determinate totem plugin directory. + + Please make sure totem is installed or set the directory + manually using --with-totem-plugin-dir + " "$LINENO" 5 + fi else TOTEM_PLUGIN_DIR="$with_totem_plugin_dir" fi fi - - case $prefix in - NONE) prefix=$ac_default_prefix ;; - *) ;; - esac - - case $exec_prefix in - NONE) exec_prefix=$prefix ;; - *) ;; - esac - - expanded_datadir=`(eval echo $datadir)` - expanded_datadir=`(eval echo $expanded_datadir)` - - - - - expanded_libdir=`( - case $prefix in - NONE) prefix=$ac_default_prefix ;; - *) ;; - esac - case $exec_prefix in - NONE) exec_prefix=$prefix ;; - *) ;; - esac - eval echo $libdir - )` - - - -DBUS_REQUIRED_VERSION=1.1 - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5 -$as_echo_n "checking for DBUS... " >&6; } - -if test -n "$DBUS_CFLAGS"; then - pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= $DBUS_REQUIRED_VERSION" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$DBUS_LIBS"; then - pkg_cv_DBUS_LIBS="$DBUS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= $DBUS_REQUIRED_VERSION" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION" 2>&1` - else - DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$DBUS_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (dbus-1 >= $DBUS_REQUIRED_VERSION) were not met: - -$DBUS_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables DBUS_CFLAGS -and DBUS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables DBUS_CFLAGS -and DBUS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } -else - DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS - DBUS_LIBS=$pkg_cv_DBUS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi -DBUS_SERVICES_DIR="$expanded_datadir/dbus-1/services" - - -cat >>confdefs.h <<_ACEOF -#define DBUS_SERVICES_DIR "$DBUS_SERVICES_DIR" -_ACEOF - - PYTHON_REQUIRED=2.5 @@ -14318,7 +14972,7 @@ # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= $PYTHON_REQUIRED" >&5 $as_echo_n "checking for a Python interpreter with version >= $PYTHON_REQUIRED... " >&6; } -if test "${am_cv_pathless_PYTHON+set}" = set; then : +if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else @@ -14352,7 +15006,7 @@ set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then : +if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -14400,7 +15054,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } -if test "${am_cv_python_version+set}" = set; then : +if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` @@ -14419,7 +15073,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } -if test "${am_cv_python_platform+set}" = set; then : +if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` @@ -14433,7 +15087,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } -if test "${am_cv_python_pythondir+set}" = set; then : +if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE @@ -14471,7 +15125,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } -if test "${am_cv_python_pyexecdir+set}" = set; then : +if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE @@ -14541,297 +15195,111 @@ - EXP_VAR=DATADIR - FROM_VAR=$datarootdir - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix=$ac_default_prefix - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var"="x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - DATADIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - - - EXP_VAR=LIBDIR - FROM_VAR=$libdir - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix=$ac_default_prefix - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var"="x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - LIBDIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - - - EXP_VAR=PYTHONDIR - FROM_VAR=$pythondir - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix=$ac_default_prefix - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var"="x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - PYTHONDIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - - -py_mod_var=`echo glib'_' | sed 'y%./+-%__p_%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module glib" >&5 -$as_echo_n "checking for python module glib... " >&6; } -if eval "test \"\${py_cv_mod_$py_mod_var+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - -prog=" -import sys -try: - import glib -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)" -if $PYTHON -c "$prog" 1>&5 2>&5 - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi - -fi - -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? " - Cannot find Python module glib - " "$LINENO" 5 -fi - - -py_mod_var=`echo gobject'_' | sed 'y%./+-%__p_%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module gobject" >&5 -$as_echo_n "checking for python module gobject... " >&6; } -if eval "test \"\${py_cv_mod_$py_mod_var+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - -prog=" -import sys -try: - import gobject -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)" -if $PYTHON -c "$prog" 1>&5 2>&5 - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi - -fi - -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? " - Cannot find Python module gobject - " "$LINENO" 5 -fi +PYGOBJECT_REQUIRED=2.90.1 +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYGOBJECT" >&5 +$as_echo_n "checking for PYGOBJECT... " >&6; } -py_mod_var=`echo gtk'_' | sed 'y%./+-%__p_%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module gtk" >&5 -$as_echo_n "checking for python module gtk... " >&6; } -if eval "test \"\${py_cv_mod_$py_mod_var+set}\"" = set; then : - $as_echo_n "(cached) " >&6 +if test -n "$PYGOBJECT_CFLAGS"; then + pkg_cv_PYGOBJECT_CFLAGS="$PYGOBJECT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygobject-3.0 >= \$PYGOBJECT_REQUIRED\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pygobject-3.0 >= $PYGOBJECT_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYGOBJECT_CFLAGS=`$PKG_CONFIG --cflags "pygobject-3.0 >= $PYGOBJECT_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PYGOBJECT_LIBS"; then + pkg_cv_PYGOBJECT_LIBS="$PYGOBJECT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygobject-3.0 >= \$PYGOBJECT_REQUIRED\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pygobject-3.0 >= $PYGOBJECT_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYGOBJECT_LIBS=`$PKG_CONFIG --libs "pygobject-3.0 >= $PYGOBJECT_REQUIRED" 2>/dev/null` else + pkg_failed=yes +fi + else + pkg_failed=untried +fi -prog=" -import sys -try: - import gtk -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)" -if $PYTHON -c "$prog" 1>&5 2>&5 - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi -fi -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? " - Cannot find Python module gtk - " "$LINENO" 5 -fi - -py_mod_var=`echo dbus'_' | sed 'y%./+-%__p_%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module dbus" >&5 -$as_echo_n "checking for python module dbus... " >&6; } -if eval "test \"\${py_cv_mod_$py_mod_var+set}\"" = set; then : - $as_echo_n "(cached) " >&6 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pygobject-3.0 >= $PYGOBJECT_REQUIRED" 2>&1` + else + PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors "pygobject-3.0 >= $PYGOBJECT_REQUIRED" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PYGOBJECT_PKG_ERRORS" >&5 -prog=" -import sys -try: - import dbus -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)" -if $PYTHON -c "$prog" 1>&5 2>&5 - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi + as_fn_error $? "Package requirements (pygobject-3.0 >= $PYGOBJECT_REQUIRED) were not met: -fi +$PYGOBJECT_PKG_ERRORS -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? " - Cannot find Python module dbus - " "$LINENO" 5 -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables PYGOBJECT_CFLAGS +and PYGOBJECT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 -py_mod_var=`echo gio'_' | sed 'y%./+-%__p_%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module gio" >&5 -$as_echo_n "checking for python module gio... " >&6; } -if eval "test \"\${py_cv_mod_$py_mod_var+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -prog=" -import sys -try: - import gio -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)" -if $PYTHON -c "$prog" 1>&5 2>&5 - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi +Alternatively, you may set the environment variables PYGOBJECT_CFLAGS +and PYGOBJECT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -fi +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +else + PYGOBJECT_CFLAGS=$pkg_cv_PYGOBJECT_CFLAGS + PYGOBJECT_LIBS=$pkg_cv_PYGOBJECT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? " - Cannot find Python module gio - " "$LINENO" 5 + fi -py_mod_var=`echo gst'_' | sed 'y%./+-%__p_%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module gst" >&5 -$as_echo_n "checking for python module gst... " >&6; } -if eval "test \"\${py_cv_mod_$py_mod_var+set}\"" = set; then : +py_mod_var=`echo gi.repository'_' | sed 'y%./+-%__p_%'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module gi.repository" >&5 +$as_echo_n "checking for python module gi.repository... " >&6; } +if eval \${py_cv_mod_$py_mod_var+:} false; then : $as_echo_n "(cached) " >&6 else prog=" import sys try: - import gst + import gi.repository except ImportError: sys.exit(1) except: @@ -14854,7 +15322,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? " - Cannot find Python module gst + Cannot find Python module gi.repository " "$LINENO" 5 fi @@ -14926,10 +15394,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -14989,7 +15468,7 @@ Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -15090,6 +15569,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -15396,8 +15876,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gnome-dvb-daemon $as_me 0.1.23, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by gnome-dvb-daemon $as_me 0.2.7, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15456,15 +15936,15 @@ Configuration commands: $config_commands -Report bugs to . +Report bugs to . gnome-dvb-daemon home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gnome-dvb-daemon config.status 0.1.23 -configured by $0, generated by GNU Autoconf 2.67, +gnome-dvb-daemon config.status 0.2.7 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. @@ -15592,131 +16072,153 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. -for var in SED \ +for var in SHELL \ +ECHO \ +SED \ GREP \ EGREP \ FGREP \ @@ -15729,8 +16231,13 @@ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -15740,14 +16247,14 @@ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -15763,7 +16270,6 @@ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -15771,12 +16277,13 @@ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -15798,14 +16305,15 @@ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -15813,12 +16321,6 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -15870,7 +16372,7 @@ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15893,9 +16395,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -15903,12 +16406,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15930,7 +16434,7 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -15958,7 +16462,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -16006,7 +16510,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -16038,7 +16542,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -16072,7 +16576,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -16084,8 +16588,8 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -16186,7 +16690,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -16205,7 +16709,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -16214,7 +16718,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -16240,8 +16744,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -16377,21 +16881,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -16402,20 +16907,20 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. @@ -16577,7 +17082,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -16625,6 +17131,12 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -16674,9 +17186,11 @@ # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -16684,13 +17198,30 @@ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -16699,6 +17230,9 @@ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -16717,14 +17251,14 @@ # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -16732,6 +17266,9 @@ # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -16788,6 +17325,9 @@ # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -16827,6 +17367,10 @@ # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -16839,12 +17383,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -16931,9 +17475,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -16949,6 +17490,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -16981,212 +17525,169 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -17367,8 +17868,6 @@ $PACKAGE_NAME $PACKAGE_VERSION Install Prefix: ${prefix} - Datadir: ${expanded_datadir} - Libdir: ${expanded_libdir} - D-Bus dir: ${DBUS_SERVICES_DIR} Python dir: ${pythondir} + Build Totem plugin ${enable_totem} " diff -Nru gnome-dvb-daemon-0.1.23/configure.ac gnome-dvb-daemon-0.2.7/configure.ac --- gnome-dvb-daemon-0.1.23/configure.ac 2011-01-14 13:59:23.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/configure.ac 2011-12-09 11:49:07.000000000 +0000 @@ -1,13 +1,13 @@ AC_PREREQ(2.63.2) -AC_INIT([gnome-dvb-daemon], [0.1.23], - [https://bugs.launchpad.net/gnome-dvb-daemon], +AC_INIT([gnome-dvb-daemon], [0.2.7], + [https://bugzilla.gnome.org/browse.cgi?product=dvb-daemon], [gnome-dvb-daemon], [http://live.gnome.org/DVBDaemon]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([1.11 subdir-objects dist-bzip2]) -AM_MAINTAINER_MODE +AM_INIT_AUTOMAKE([1.11 subdir-objects dist-bzip2 no-dist-gzip]) +AM_MAINTAINER_MODE([enable]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_PROG_CC @@ -16,7 +16,7 @@ LT_PREREQ([2.2.6]) LT_INIT([disable-static]) -AM_PROG_VALAC([0.11.2]) +AM_PROG_VALAC([0.14.0]) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) @@ -59,10 +59,8 @@ dnl ****************** dnl * Check for libs dnl ****************** -GLIB_REQUIRED=2.16.0 -GIO_REQUIRED=2.16.0 +GLIB_REQUIRED=2.28.5 GST_REQUIRED=0.10.29 -DBUS_REQUIRED=0.74 GEE_REQUIRED=0.5.0 SQLITE_REQUIRED=3.4 GST_RTSP_SERVER_REQUIRED=0.10.7 @@ -73,9 +71,8 @@ AC_SUBST(GST_LIBS) PKG_CHECK_MODULES(GNOME_DVB_DAEMON, glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GIO_REQUIRED + gio-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED - dbus-glib-1 >= $DBUS_REQUIRED gee-1.0 >= $GEE_REQUIRED sqlite3 >= $SQLITE_REQUIRED gst-rtsp-server-0.10 >= $GST_RTSP_SERVER_REQUIRED) @@ -100,9 +97,9 @@ dnl * Totem plugin dnl **************** AC_ARG_ENABLE([totem-plugin], - AS_HELP_STRING([--enable-totem-plugin], [Install the Totem plugin]), - enable_totem="yes", - enable_totem="no") + AS_HELP_STRING([--enable-totem-plugin], [Install the Totem plugin (default: no)]), + [enable_totem=$enableval], + [enable_totem=no]) AM_CONDITIONAL(ENABLE_TOTEM, test "x$enable_totem" = "xyes") @@ -110,55 +107,40 @@ AS_HELP_STRING([--with-totem-plugin-dir], [Directory where Totem plugins are installed (default: LIBDIR/totem/plugins)])) -if test "x$enable_totem" = "xyes"; then +if test "x$enable_totem" = "xyes"; then if test "x$with_totem_plugin_dir" = "x"; then - TOTEM_PLUGIN_DIR="$libdir/totem/plugins" + TOTEM_PLUGIN_DIR=`$PKG_CONFIG --variable=pluginsdir totem` + if test "x$TOTEM_PLUGIN_DIR" = "x"; then + AC_MSG_ERROR( + [ + + *** Could not determinate totem plugin directory. + + Please make sure totem is installed or set the directory + manually using --with-totem-plugin-dir + ]) + fi else TOTEM_PLUGIN_DIR="$with_totem_plugin_dir" fi fi AC_SUBST(TOTEM_PLUGIN_DIR) -dnl ************** -dnl * Expansions -dnl ************** -SHAMROCK_EXPAND_DATADIR -SHAMROCK_EXPAND_LIBDIR - -dnl ************************************* -dnl * Check for DBUS Services directory -dnl ************************************* -DBUS_REQUIRED_VERSION=1.1 -PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED_VERSION) -DBUS_SERVICES_DIR="$expanded_datadir/dbus-1/services" -AC_SUBST(DBUS_SERVICES_DIR) -AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [DBus services directory]) - dnl ********** dnl * Python dnl ********** PYTHON_REQUIRED=2.5 AM_PATH_PYTHON($PYTHON_REQUIRED) AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) - -AS_AC_EXPAND(DATADIR, $datarootdir) -AC_SUBST(DATADIR) - -AS_AC_EXPAND(LIBDIR, $libdir) -AC_SUBST(LIBDIR) - -AS_AC_EXPAND(PYTHONDIR, $pythondir) AC_SUBST(PYTHONDIR) +PYGOBJECT_REQUIRED=2.90.1 +PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0 >= $PYGOBJECT_REQUIRED) + dnl ****************** dnl * Python modules dnl ***************** -AM_CHECK_PYMOD(glib) -AM_CHECK_PYMOD(gobject) -AM_CHECK_PYMOD(gtk) -AM_CHECK_PYMOD(dbus) -AM_CHECK_PYMOD(gio) -AM_CHECK_PYMOD(gst) +AM_CHECK_PYMOD(gi.repository) AC_CONFIG_FILES([ Makefile @@ -178,8 +160,6 @@ $PACKAGE_NAME $PACKAGE_VERSION Install Prefix: ${prefix} - Datadir: ${expanded_datadir} - Libdir: ${expanded_libdir} - D-Bus dir: ${DBUS_SERVICES_DIR} Python dir: ${pythondir} + Build Totem plugin ${enable_totem} " diff -Nru gnome-dvb-daemon-0.1.23/data/icons/Makefile.in gnome-dvb-daemon-0.2.7/data/icons/Makefile.in --- gnome-dvb-daemon-0.1.23/data/icons/Makefile.in 2011-01-14 13:59:45.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/data/icons/Makefile.in 2011-12-10 09:27:25.000000000 +0000 @@ -45,10 +45,10 @@ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -77,13 +77,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -119,7 +116,6 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -132,6 +128,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -154,6 +151,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@ +PYGOBJECT_LIBS = @PYGOBJECT_LIBS@ PYTHON = @PYTHON@ PYTHONDIR = @PYTHONDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -177,6 +176,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -196,8 +196,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -expanded_datadir = @expanded_datadir@ -expanded_libdir = @expanded_libdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -211,7 +209,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru gnome-dvb-daemon-0.1.23/data/Makefile.am gnome-dvb-daemon-0.2.7/data/Makefile.am --- gnome-dvb-daemon-0.1.23/data/Makefile.am 2011-01-14 13:59:23.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/data/Makefile.am 2011-06-05 17:17:39.000000000 +0000 @@ -9,10 +9,9 @@ @INTLTOOL_DESKTOP_RULE@ # Dbus service file -dbusservicedir = $(DBUS_SERVICES_DIR) +dbusservicedir = $(datadir)/dbus-1/services dbusservice_in_files = \ org.gnome.DVB.service.in \ - org.gnome.UPnP.MediaServer1.DVBDaemon.service.in \ org.gnome.UPnP.MediaServer2.DVBDaemon.service.in dbusservice_DATA = $(dbusservice_in_files:.service.in=.service) diff -Nru gnome-dvb-daemon-0.1.23/data/Makefile.in gnome-dvb-daemon-0.2.7/data/Makefile.in --- gnome-dvb-daemon-0.1.23/data/Makefile.in 2011-01-14 13:59:45.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/data/Makefile.in 2011-12-10 09:27:25.000000000 +0000 @@ -48,10 +48,10 @@ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gnome-dvb-control.desktop.in \ gnome-dvb-setup.desktop.in @@ -145,13 +145,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -187,7 +184,6 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -200,6 +196,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -222,6 +219,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@ +PYGOBJECT_LIBS = @PYGOBJECT_LIBS@ PYTHON = @PYTHON@ PYTHONDIR = @PYTHONDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -245,6 +244,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -264,8 +264,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -expanded_datadir = @expanded_datadir@ -expanded_libdir = @expanded_libdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -279,7 +277,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -309,10 +306,9 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) # Dbus service file -dbusservicedir = $(DBUS_SERVICES_DIR) +dbusservicedir = $(datadir)/dbus-1/services dbusservice_in_files = \ org.gnome.DVB.service.in \ - org.gnome.UPnP.MediaServer1.DVBDaemon.service.in \ org.gnome.UPnP.MediaServer2.DVBDaemon.service.in dbusservice_DATA = $(dbusservice_in_files:.service.in=.service) diff -Nru gnome-dvb-daemon-0.1.23/data/org.gnome.UPnP.MediaServer1.DVBDaemon.service.in gnome-dvb-daemon-0.2.7/data/org.gnome.UPnP.MediaServer1.DVBDaemon.service.in --- gnome-dvb-daemon-0.1.23/data/org.gnome.UPnP.MediaServer1.DVBDaemon.service.in 2010-04-01 09:50:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/data/org.gnome.UPnP.MediaServer1.DVBDaemon.service.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.gnome.UPnP.MediaServer1.DVBDaemon -Exec=@bindir@/gnome-dvb-daemon diff -Nru gnome-dvb-daemon-0.1.23/debian/changelog gnome-dvb-daemon-0.2.7/debian/changelog --- gnome-dvb-daemon-0.1.23/debian/changelog 2011-04-10 09:29:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/changelog 2011-12-20 22:32:39.000000000 +0000 @@ -1,3 +1,21 @@ +gnome-dvb-daemon (1:0.2.7-2) unstable; urgency=low + + * Tighten dependencies between the packages (Closes: #652576) + * Use Arch: all for gnome-dvb-client, since it's written in python + + -- Sebastian Reichel Tue, 20 Dec 2011 23:31:18 +0100 + +gnome-dvb-daemon (1:0.2.7-1) unstable; urgency=low + + * New upstream release + - adds Gnome 3 compatibility (Closes: #650073) + - fixes miredo bug (Closes: #627349) + * Bump Debian Standards Version to 3.9.2 + * Update watch file + * debian/copyright: Use DEP5 Format + + -- Sebastian Reichel Thu, 15 Dec 2011 02:58:39 +0100 + gnome-dvb-daemon (1:0.1.23-1) unstable; urgency=low * Upload to unstable. diff -Nru gnome-dvb-daemon-0.1.23/debian/control gnome-dvb-daemon-0.2.7/debian/control --- gnome-dvb-daemon-0.1.23/debian/control 2011-04-10 09:38:13.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/control 2011-12-20 22:39:56.000000000 +0000 @@ -14,10 +14,8 @@ autotools-dev, intltool (>= 0.40.0), pkg-config, - valac-0.12 (>= 0.11.2), - libglib2.0-dev (>= 2.25), - libdbus-1-dev (>= 1.1), - libdbus-glib-1-dev (>= 0.74), + valac-0.14, + libglib2.0-dev (>= 2.28.5), libgee-dev (>= 0.5.0), libsqlite3-dev (>= 3.4), libgudev-1.0-dev, @@ -27,12 +25,9 @@ gstreamer0.10-plugins-bad, gstreamer0.10-plugins-good, python-dev (>= 2.5), - python-gobject-dev, - python-gtk2-dev, - python-dbus, - python-gst0.10, - python-support (>= 0.5.3) -Standards-Version: 3.9.1 + python-gobject-dev (>= 2.90.1), + python-gst0.10 +Standards-Version: 3.9.2 Homepage: http://live.gnome.org/DVBDaemon Package: gnome-dvb-daemon @@ -48,15 +43,12 @@ It can be controlled by any application via its D-Bus interface. Package: gnome-dvb-client -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, +Architecture: all +Depends: ${misc:Depends}, ${python:Depends}, - gnome-dvb-daemon, + gnome-dvb-daemon (>= ${source:Version}), gnome-icon-theme, - python-dbus, - python-gtk2, - python-gobject, + python-gobject (>= 2.90.1), python-gst0.10 Recommends: dvb-apps Description: client for gnome-dvb-daemon @@ -72,10 +64,9 @@ ${python:Depends}, totem, totem-plugins, - gnome-dvb-daemon, - gnome-dvb-client, - python-gst0.10, - python-gtk2 + gnome-dvb-client (= ${source:Version}), + gnome-dvb-daemon (>= ${source:Version}), + python-gst0.10 Description: totem plugin for gnome-dvb-daemon GNOME DVB Daemon is a GStreamer based daemon to setup your DVB devices, record and/or watch TV shows and browse EPG. diff -Nru gnome-dvb-daemon-0.1.23/debian/control.in gnome-dvb-daemon-0.2.7/debian/control.in --- gnome-dvb-daemon-0.1.23/debian/control.in 2011-04-10 09:29:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/control.in 2011-12-20 22:35:56.000000000 +0000 @@ -9,10 +9,8 @@ autotools-dev, intltool (>= 0.40.0), pkg-config, - valac-0.12 (>= 0.11.2), - libglib2.0-dev (>= 2.25), - libdbus-1-dev (>= 1.1), - libdbus-glib-1-dev (>= 0.74), + valac-0.14, + libglib2.0-dev (>= 2.28.5), libgee-dev (>= 0.5.0), libsqlite3-dev (>= 3.4), libgudev-1.0-dev, @@ -22,12 +20,9 @@ gstreamer0.10-plugins-bad, gstreamer0.10-plugins-good, python-dev (>= 2.5), - python-gobject-dev, - python-gtk2-dev, - python-dbus, - python-gst0.10, - python-support (>= 0.5.3) -Standards-Version: 3.9.1 + python-gobject-dev (>= 2.90.1), + python-gst0.10 +Standards-Version: 3.9.2 Homepage: http://live.gnome.org/DVBDaemon Package: gnome-dvb-daemon @@ -43,15 +38,12 @@ It can be controlled by any application via its D-Bus interface. Package: gnome-dvb-client -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, +Architecture: all +Depends: ${misc:Depends}, ${python:Depends}, - gnome-dvb-daemon, + gnome-dvb-daemon (>= ${source:Version}), gnome-icon-theme, - python-dbus, - python-gtk2, - python-gobject, + python-gobject (>= 2.90.1), python-gst0.10 Recommends: dvb-apps Description: client for gnome-dvb-daemon @@ -67,10 +59,9 @@ ${python:Depends}, totem, totem-plugins, - gnome-dvb-daemon, - gnome-dvb-client, - python-gst0.10, - python-gtk2 + gnome-dvb-client (= ${source:Version}), + gnome-dvb-daemon (>= ${source:Version}), + python-gst0.10 Description: totem plugin for gnome-dvb-daemon GNOME DVB Daemon is a GStreamer based daemon to setup your DVB devices, record and/or watch TV shows and browse EPG. diff -Nru gnome-dvb-daemon-0.1.23/debian/copyright gnome-dvb-daemon-0.2.7/debian/copyright --- gnome-dvb-daemon-0.1.23/debian/copyright 2010-03-08 14:25:05.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/copyright 2011-12-15 01:59:05.000000000 +0000 @@ -1,34 +1,28 @@ -This package was debianized by Sebastian Reichel on -Tue, 31 Mar 2009 21:24:13 +0200. +Format: http://dep.debian.net/deps/dep5/ +Source: http://live.gnome.org/DVBDaemon/Downloads -It was downloaded from http://live.gnome.org/DVBDaemon/Downloads - -Upstream Author: - - Sebastian Pölsterl - -Copyright: - - Copyright © 2008-2009 Sebastian Pölsterl - -License: - - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL-3'. - -The Debian packaging is © 2009, Sebastian Reichel and -is licensed under the GPL, see above. +Files: * +Copyright: 2008-2011, Sebastian Pölsterl +License: GPL-3+ + +Files: debian/* +Copyright: 2009-2011, Sebastian Reichel +License: GPL-3+ + +License: GPL-3+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-3'. diff -Nru gnome-dvb-daemon-0.1.23/debian/gnome-dvb-client.install gnome-dvb-daemon-0.2.7/debian/gnome-dvb-client.install --- gnome-dvb-daemon-0.1.23/debian/gnome-dvb-client.install 2010-05-30 08:06:15.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/gnome-dvb-client.install 2011-12-18 20:20:55.000000000 +0000 @@ -1,11 +1,6 @@ usr/bin/gnome-dvb-control usr/bin/gnome-dvb-setup -usr/lib/python*/*-packages/gnomedvb/*.py -usr/lib/python*/*-packages/gnomedvb/ui/*.py -usr/lib/python*/*-packages/gnomedvb/ui/*/*.py -usr/lib/python*/*-packages/gnomedvb/ui/*/*/*.py -usr/lib/python*/*-packages/gnomedvb/userdirs/*.py -usr/lib/python*/*-packages/gnomedvb/userdirs/*.so +usr/lib/python*/*-packages/gnomedvb/* usr/share/locale/* usr/share/applications usr/share/icons diff -Nru gnome-dvb-daemon-0.1.23/debian/rules gnome-dvb-daemon-0.2.7/debian/rules --- gnome-dvb-daemon-0.1.23/debian/rules 2011-04-10 09:29:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/rules 2011-12-15 01:22:12.000000000 +0000 @@ -1,22 +1,18 @@ #!/usr/bin/make -f - -TARBALL_EXT = tar.bz2 - include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/utils.mk include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk --include /usr/share/gnome-pkg-tools/1/rules/lp-get-source.mk -DEB_CONFIGURE_EXTRA_FLAGS := --enable-totem-plugin +DEB_CONFIGURE_EXTRA_FLAGS := --enable-totem-plugin --with-totem-plugin-dir=/usr/lib/totem/plugins -DEB_CONFIGURE_SCRIPT_ENV += VALAC="/usr/bin/valac-0.12 --target-glib=2.24" +DEB_CONFIGURE_SCRIPT_ENV += VALAC="/usr/bin/valac-0.14" binary-install/gnome-dvb-client:: - dh_pysupport -pgnome-dvb-client + dh_python2 -pgnome-dvb-client --no-guessing-versions binary-install/totem-plugins-dvb-daemon:: - dh_pysupport -ptotem-plugins-dvb-daemon /usr/lib/totem/plugins/dvb-daemon + dh_python2 -ptotem-plugins-dvb-daemon --no-guessing-versions /usr/lib/totem/plugins/dvb-daemon makebuilddir:: rm -f gnome_dvb_daemon_vala.stamp diff -Nru gnome-dvb-daemon-0.1.23/debian/totem-plugins-dvb-daemon.install gnome-dvb-daemon-0.2.7/debian/totem-plugins-dvb-daemon.install --- gnome-dvb-daemon-0.1.23/debian/totem-plugins-dvb-daemon.install 2009-09-19 22:01:47.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/totem-plugins-dvb-daemon.install 2011-12-15 01:22:12.000000000 +0000 @@ -1,2 +1,2 @@ usr/lib/totem/plugins/dvb-daemon/*.py -usr/lib/totem/plugins/dvb-daemon/*.totem-plugin +usr/lib/totem/plugins/dvb-daemon/*.plugin diff -Nru gnome-dvb-daemon-0.1.23/debian/watch gnome-dvb-daemon-0.2.7/debian/watch --- gnome-dvb-daemon-0.1.23/debian/watch 2010-02-28 14:12:24.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/debian/watch 2011-12-18 20:21:24.000000000 +0000 @@ -2,4 +2,4 @@ version=3 # DVBDaemon download page -https://launchpad.net/gnome-dvb-daemon/+download http://launchpad.net/gnome-dvb-daemon/.*/gnome-dvb-daemon-(.+)\.tar\.bz2 +http://ftp.gnome.org/pub/GNOME/sources/gnome-dvb-daemon/0.2/gnome-dvb-daemon-(.+)\.tar\.xz diff -Nru gnome-dvb-daemon-0.1.23/ltmain.sh gnome-dvb-daemon-0.2.7/ltmain.sh --- gnome-dvb-daemon-0.1.23/ltmain.sh 2011-01-14 13:59:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/ltmain.sh 2011-12-10 09:27:20.000000000 +0000 @@ -1,9 +1,9 @@ -# Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6b +# libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -32,50 +32,56 @@ # # Provide generalized library-building support services. # -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory # -# MODE-ARGS vary depending on the MODE. +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 -# automake: $automake_version -# autoconf: $autoconf_version +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4 +# automake: $automake_version +# autoconf: $autoconf_version # # Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . -PROGRAM=ltmain.sh +PROGRAM=libtool PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" +VERSION=2.4 TIMESTAMP="" -package_revision=1.3017 +package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -91,10 +97,15 @@ BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + # NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES @@ -107,15 +118,24 @@ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL $lt_unset CDPATH +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" : ${CP="cp -f"} -: ${ECHO="echo"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} @@ -144,6 +164,27 @@ dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -158,33 +199,183 @@ # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } -# Generated shell functions inserted here. +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} # The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac # Make sure we have an absolute path for reexecution: case $progpath in @@ -215,6 +406,15 @@ # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -243,7 +443,7 @@ # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -258,18 +458,25 @@ : } +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + # func_error arg... # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -326,9 +533,9 @@ case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do @@ -378,7 +585,7 @@ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $ECHO "X$my_tmpdir" | $Xsed + $ECHO "$my_tmpdir" } @@ -392,7 +599,7 @@ { case $1 in *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac @@ -419,7 +626,7 @@ { case $1 in *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ + my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; @@ -488,15 +695,39 @@ fi } - - +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} # func_version # Echo version message to standard output and exit. func_version () { - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ @@ -509,22 +740,28 @@ # Echo short help message to standard output and exit. func_usage () { - $SED -n '/^# Usage:/,/# -h/ { + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" - $ECHO + echo $ECHO "run \`$progname --help | more' for full usage" exit $? } -# func_help -# Echo long help message to standard output and exit. +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -537,8 +774,15 @@ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" - exit $? + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi } # func_missing_arg argname @@ -546,63 +790,106 @@ # exit_cmd. func_missing_arg () { - func_error "missing argument for $1" + $opt_debug + + func_error "missing argument for $1." exit_cmd=exit } -exit_cmd=: +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation +exit_cmd=: -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. @@ -636,16 +923,16 @@ # Display the features supported by this script. func_features () { - $ECHO "host: $host" + echo "host: $host" if test "$build_libtool_libs" = yes; then - $ECHO "enable shared libraries" + echo "enable shared libraries" else - $ECHO "disable shared libraries" + echo "disable shared libraries" fi if test "$build_old_libs" = yes; then - $ECHO "enable static libraries" + echo "enable static libraries" else - $ECHO "disable static libraries" + echo "disable static libraries" fi exit $? @@ -692,117 +979,204 @@ esac } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () { + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac + exit $EXIT_MISMATCH + fi +} - # Parse non-mode specific arguments: - while test "$#" -gt 0; do + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do opt="$1" shift - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" + --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" - opt_debug='set -x' $opt_debug ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift + --dry-run|--dryrun|-n) + opt_dry_run=: ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" shift ;; - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: + opt_preserve_dup_deps=: ;; - - --verbose| -v) preserve_args="$preserve_args $opt" + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) opt_silent=false +func_append preserve_args " $opt" ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" shift ;; + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) @@ -810,82 +1184,44 @@ opt_duplicate_compiler_generated_deps=: ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} + $opt_help || { + # Sanity checks first: + func_check_version_match -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" -$opt_help || { - # Sanity checks first: - func_check_version_match + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } - test -z "$mode" && func_fatal_error "error: you must specify a MODE." + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} +## ----------- ## +## Main. ## +## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. @@ -950,12 +1286,9 @@ # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -1001,6 +1334,37 @@ } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. @@ -1013,13 +1377,15 @@ if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) @@ -1030,11 +1396,13 @@ CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. @@ -1097,6 +1465,486 @@ } } + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $opt_debug + func_convert_core_file_wine_to_w32_result="$1" + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + # func_mode_compile arg... func_mode_compile () { @@ -1137,12 +1985,12 @@ ;; -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" + func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + func_append later " $arg" continue ;; @@ -1163,15 +2011,14 @@ save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" + func_append base_compile " $lastarg" continue ;; @@ -1187,8 +2034,7 @@ esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in @@ -1213,7 +2059,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) + *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -1288,7 +2134,7 @@ # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= @@ -1319,17 +2165,16 @@ $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" + func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result @@ -1349,7 +2194,7 @@ if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ @@ -1396,11 +2241,11 @@ command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then - command="$command -o $obj" + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' @@ -1445,13 +2290,13 @@ } $opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1482,10 +2327,11 @@ -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. @@ -1538,7 +2384,7 @@ The following components of INSTALL-COMMAND are treated specially: - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." @@ -1558,6 +2404,8 @@ -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) @@ -1586,6 +2434,11 @@ -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. @@ -1619,18 +2472,44 @@ ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac - $ECHO + echo $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? } - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi # func_mode_execute arg... @@ -1643,13 +2522,16 @@ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" @@ -1671,7 +2553,7 @@ dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" @@ -1712,7 +2594,7 @@ for file do case $file in - -*) ;; + -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then @@ -1728,8 +2610,7 @@ ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then @@ -1754,29 +2635,66 @@ # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" + echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug - libdirs="$nonopt" + libs= + libdirs= admincmds= - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1786,7 +2704,7 @@ if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done @@ -1795,53 +2713,55 @@ # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... @@ -1852,7 +2772,7 @@ # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -1866,7 +2786,12 @@ # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac # We need to accept at least all the BSD install flags. dest= @@ -1876,10 +2801,12 @@ install_type= isdir=no stripme= + no_mode=: for arg do + arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi @@ -1887,10 +2814,9 @@ case $arg in -d) isdir=yes ;; -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac + if $install_cp; then :; else + prev=$arg + fi ;; -g | -m | -o) prev=$arg @@ -1904,6 +2830,10 @@ *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi prev= else dest=$arg @@ -1914,7 +2844,11 @@ # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -1923,6 +2857,13 @@ test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" @@ -1977,10 +2918,13 @@ case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" @@ -1994,23 +2938,23 @@ if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" - dir="$dir$objdir" + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -2023,9 +2967,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" @@ -2043,7 +2987,7 @@ test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in @@ -2083,7 +3027,7 @@ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -2183,7 +3127,7 @@ if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no @@ -2202,7 +3146,7 @@ file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" @@ -2221,7 +3165,7 @@ } else # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi @@ -2280,7 +3224,7 @@ fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2323,6 +3267,22 @@ extern \"C\" { #endif +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* External symbol declarations for the compiler. */\ " @@ -2332,10 +3292,11 @@ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2371,7 +3332,7 @@ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -2384,10 +3345,52 @@ func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2415,36 +3418,19 @@ if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist +extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," @@ -2457,7 +3443,7 @@ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; @@ -2500,7 +3486,7 @@ for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2515,16 +3501,16 @@ case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; @@ -2538,8 +3524,8 @@ # really was required. # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } @@ -2549,6 +3535,7 @@ # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug @@ -2559,9 +3546,11 @@ win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ @@ -2590,6 +3579,131 @@ $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} # func_extract_an_archive dir oldlib @@ -2598,7 +3712,18 @@ $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else @@ -2669,7 +3794,7 @@ darwin_file= darwin_files= for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ @@ -2684,25 +3809,30 @@ func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } - -# func_emit_wrapper_part1 [arg=no] +# func_emit_wrapper [arg=no] # -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL @@ -2718,7 +3848,6 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible @@ -2749,31 +3878,132 @@ else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ " - $ECHO "\ + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then @@ -2783,30 +4013,13 @@ esac fi - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then @@ -2814,7 +4027,7 @@ fi # remove .libs from thisdir case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi @@ -2869,6 +4082,18 @@ if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ @@ -2877,253 +4102,28 @@ # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout @@ -3141,41 +4141,71 @@ This wrapper executable should never be moved out of the build directory. If it is, it will not operate correctly. - - Currently, it simply execs the wrapper *script* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. */ EOF cat <<"EOF" +#ifdef _MSC_VER +# define _CRT_SECURE_NO_DEPRECATE 1 +#endif #include #include #ifdef _MSC_VER # include # include # include -# define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); -# endif # endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ #endif -#include -#include -#include -#include -#include -#include -#include -#include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX @@ -3192,14 +4222,7 @@ # define S_IXGRP 0 #endif -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - +/* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' @@ -3230,10 +4253,6 @@ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - #ifndef FOPEN_WB # define FOPEN_WB "w" #endif @@ -3246,22 +4265,13 @@ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; #else -# define LTWRAPPER_DEBUGPRINTF(args) +static int lt_debug = 0; #endif -const char *program_name = NULL; +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); @@ -3271,41 +4281,27 @@ int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); } EOF @@ -3560,11 +4517,14 @@ mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; @@ -3586,7 +4546,7 @@ { void *p = (void *) malloc (num); if (!p) - lt_fatal ("Memory exhausted"); + lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } @@ -3620,8 +4580,8 @@ { struct stat st; - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3638,8 +4598,8 @@ int rval = 0; struct stat st; - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3665,8 +4625,8 @@ int tmp_len; char *concat_name; - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; @@ -3719,7 +4679,8 @@ { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -3744,7 +4705,8 @@ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); @@ -3770,8 +4732,9 @@ int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) @@ -3793,8 +4756,9 @@ } else { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); @@ -3807,7 +4771,8 @@ tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { - lt_fatal ("Could not follow symlinks for %s", pathspec); + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif @@ -3833,11 +4798,25 @@ return str; } +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + static void -lt_error_core (int exit_status, const char *mode, +lt_error_core (int exit_status, const char *file, + int line, const char *mode, const char *message, va_list ap) { - fprintf (stderr, "%s: %s: ", program_name, mode); + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); @@ -3846,20 +4825,32 @@ } void -lt_fatal (const char *message, ...) +lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + void lt_setenv (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ @@ -3904,95 +4895,12 @@ return new_value; } -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - void lt_update_exe_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4011,9 +4919,9 @@ void lt_update_lib_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4023,11 +4931,152 @@ } } +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' + cat <<"EOF" +} EOF } # end: func_emit_cwrapperexe_src +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + # func_mode_link arg... func_mode_link () { @@ -4072,6 +5121,7 @@ new_inherited_linker_flags= avoid_version=no + bindir= dlfiles= dlprefiles= dlself=no @@ -4164,6 +5214,11 @@ esac case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. @@ -4195,9 +5250,9 @@ ;; *) if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" + func_append dlfiles " $arg" else - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $arg" fi prev= continue @@ -4221,7 +5276,7 @@ *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; @@ -4240,7 +5295,7 @@ moreargs= for fil in `cat "$save_arg"` do -# moreargs="$moreargs $fil" +# func_append moreargs " $fil" arg=$fil # A libtool-controlled object. @@ -4269,7 +5324,7 @@ if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4281,7 +5336,7 @@ # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4351,12 +5406,12 @@ if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; - *) rpath="$rpath $arg" ;; + *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; + *) func_append xrpath " $arg" ;; esac fi prev= @@ -4368,28 +5423,28 @@ continue ;; weak) - weak_libs="$weak_libs $arg" + func_append weak_libs " $arg" prev= continue ;; xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) - compiler_flags="$compiler_flags $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -4425,6 +5480,11 @@ continue ;; + -bindir) + prev=bindir + continue + ;; + -dlopen) prev=dlfiles continue @@ -4475,15 +5535,16 @@ ;; -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -4495,24 +5556,30 @@ ;; esac case "$deplibs " in - *" -L$dir "*) ;; + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -4522,7 +5589,7 @@ -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -4536,7 +5603,7 @@ ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -4556,7 +5623,7 @@ ;; esac fi - deplibs="$deplibs $arg" + func_append deplibs " $arg" continue ;; @@ -4568,8 +5635,8 @@ # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler @@ -4577,12 +5644,12 @@ ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; @@ -4649,13 +5716,17 @@ # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac continue ;; @@ -4708,8 +5779,8 @@ for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4724,9 +5795,9 @@ for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4754,23 +5825,27 @@ arg="$func_quote_for_eval_result" ;; - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" continue ;; @@ -4782,7 +5857,7 @@ *.$objext) # A standard object. - objs="$objs $arg" + func_append objs " $arg" ;; *.lo) @@ -4813,7 +5888,7 @@ if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4825,7 +5900,7 @@ # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4870,24 +5945,25 @@ *.$libext) # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" + func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. + func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - deplibs="$deplibs $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -4925,7 +6001,7 @@ if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi @@ -4934,6 +6010,8 @@ func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" @@ -4954,12 +6032,12 @@ # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - libs="$libs $deplib" + func_append libs " $deplib" done if test "$linkmode" = lib; then @@ -4972,9 +6050,9 @@ if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" + func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= @@ -5033,10 +6111,7 @@ case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then @@ -5044,17 +6119,19 @@ for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= + func_resolve_sysroot "$lib" case $lib in - *.la) func_source "$lib" ;; + *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + func_basename "$deplib" + deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; + *) func_append deplibs " $deplib" ;; esac done done @@ -5075,11 +6152,11 @@ compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - compiler_flags="$compiler_flags $deplib" + func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5164,7 +6241,7 @@ if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5177,7 +6254,8 @@ test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then @@ -5191,7 +6269,8 @@ finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" @@ -5202,17 +6281,21 @@ -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" - dir=$func_stripname_result + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; - *.la) lib="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" @@ -5230,7 +6313,7 @@ match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi @@ -5240,15 +6323,15 @@ ;; esac if test "$valid_a_lib" != yes; then - $ECHO + echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" @@ -5275,11 +6358,11 @@ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. - newdlprefiles="$newdlprefiles $deplib" + func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - newdlfiles="$newdlfiles $deplib" + func_append newdlfiles " $deplib" fi fi continue @@ -5321,20 +6404,20 @@ # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then @@ -5345,30 +6428,36 @@ func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done continue fi # $pass = conv # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi @@ -5385,9 +6474,9 @@ # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" + func_append dlprefiles " $lib $dependency_libs" else - newdlfiles="$newdlfiles $lib" + func_append newdlfiles " $lib" fi continue fi # $pass = dlopen @@ -5409,14 +6498,14 @@ # Find the relevant object directory and library name. if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else - dir="$libdir" - absdir="$libdir" + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else @@ -5424,12 +6513,12 @@ dir="$ladir" absdir="$abs_ladir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" @@ -5440,20 +6529,46 @@ if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac fi # $pass = dlpreopen if test -z "$libdir"; then @@ -5471,7 +6586,7 @@ if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" + func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no @@ -5484,7 +6599,8 @@ for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? @@ -5495,12 +6611,12 @@ # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... @@ -5515,7 +6631,7 @@ # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; + *) func_append temp_rpath "$absdir:" ;; esac fi @@ -5527,7 +6643,7 @@ *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5536,7 +6652,7 @@ *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5561,12 +6677,12 @@ case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=yes fi ;; @@ -5583,7 +6699,7 @@ fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO + echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else @@ -5601,7 +6717,7 @@ *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5610,7 +6726,7 @@ *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5664,7 +6780,7 @@ linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then + if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= @@ -5686,9 +6802,9 @@ if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi @@ -5720,7 +6836,7 @@ if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5742,7 +6858,7 @@ if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then @@ -5756,13 +6872,13 @@ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi - if test "$linkmode" = prog || test "$mode" = relink; then + if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= @@ -5776,7 +6892,7 @@ elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then @@ -5793,7 +6909,7 @@ if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5828,21 +6944,21 @@ # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $ECHO + echo $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module @@ -5870,27 +6986,33 @@ temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; + *) func_append xrpath " $temp_xrpath";; esac;; - *) temp_deplibs="$temp_deplibs $libdir";; + *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi - newlib_search_path="$newlib_search_path $absdir" + func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then @@ -5900,8 +7022,10 @@ case $deplib in -L*) path="$deplib" ;; *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; @@ -5928,8 +7052,8 @@ if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi @@ -5962,7 +7086,7 @@ compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" @@ -5979,7 +7103,7 @@ for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; + *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= @@ -6037,10 +7161,10 @@ -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" @@ -6056,7 +7180,7 @@ ;; esac if test -n "$i" ; then - tmp_libs="$tmp_libs $i" + func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs @@ -6097,7 +7221,7 @@ # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" - objs="$objs$old_deplibs" + func_append objs "$old_deplibs" ;; lib) @@ -6130,10 +7254,10 @@ if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" + func_append libobjs " $objs" fi fi @@ -6198,7 +7322,7 @@ age="$number_minor" revision="$number_revision" ;; - freebsd-aout|freebsd-elf|sunos) + freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" @@ -6210,9 +7334,6 @@ revision="$number_minor" lt_irix_increment=no ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; esac ;; no) @@ -6334,7 +7455,7 @@ done # Make executables depend on our current version. - verstring="$verstring:${current}.0" + func_append verstring ":${current}.0" ;; qnx) @@ -6402,10 +7523,10 @@ fi func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" + func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= - if test "$mode" != relink; then + if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -6421,7 +7542,7 @@ continue fi fi - removelist="$removelist $p" + func_append removelist " $p" ;; *) ;; esac @@ -6432,27 +7553,28 @@ # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" + func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then @@ -6466,7 +7588,7 @@ for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; + *) func_append dlfiles " $lib" ;; esac done @@ -6476,19 +7598,19 @@ for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; + *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -6505,7 +7627,7 @@ *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" + func_append deplibs " -lc" fi ;; esac @@ -6554,7 +7676,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6565,21 +7687,21 @@ set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which I believe you do not have" - $ECHO "*** because a test_compile did reveal that the linker did not use it for" - $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which I believe you do not have" + echo "*** because a test_compile did reveal that the linker did not use it for" + echo "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6597,7 +7719,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6608,29 +7730,29 @@ set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because a test_compile did reveal that the linker did not use this one" - $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because a test_compile did reveal that the linker did not use this one" + echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning! Library $i is needed by this library but I was not able to" - $ECHO "*** make it link in! You will probably need to install it or some" - $ECHO "*** library that it depends on before this library will be fully" - $ECHO "*** functional. Installing it before continuing would be even better." + echo "*** make it link in! You will probably need to install it or some" + echo "*** library that it depends on before this library will be fully" + echo "*** functional. Installing it before continuing would be even better." fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6647,15 +7769,27 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + if test "$want_nocaseglob" = yes; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6672,13 +7806,13 @@ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6687,12 +7821,12 @@ fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else @@ -6703,7 +7837,7 @@ ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6719,7 +7853,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac @@ -6730,9 +7864,9 @@ potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6741,12 +7875,12 @@ fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else @@ -6757,32 +7891,32 @@ ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO + case $tmp_deplibs in + *[!\ \ ]*) + echo if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + echo "*** Warning: inter-library dependencies are not supported in this platform." else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." + echo "*** Warning: inter-library dependencies are not known to be supported." fi - $ECHO "*** All declared inter-library dependencies are being dropped." + echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes - fi + ;; + esac ;; esac versuffix=$versuffix_save @@ -6794,23 +7928,23 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" @@ -6820,16 +7954,16 @@ build_libtool_libs=no fi else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module @@ -6846,9 +7980,9 @@ # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -6861,7 +7995,7 @@ *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -6871,10 +8005,10 @@ -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" @@ -6891,10 +8025,12 @@ hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else @@ -6903,18 +8039,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_apped perm_rpath " $libdir" ;; esac fi done @@ -6932,7 +8068,7 @@ # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -6940,7 +8076,7 @@ fi shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -6966,18 +8102,18 @@ linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -7008,13 +8144,45 @@ $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd1 in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. @@ -7036,7 +8204,7 @@ if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then @@ -7048,7 +8216,7 @@ # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7058,7 +8226,7 @@ case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done @@ -7078,21 +8246,21 @@ test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi @@ -7137,7 +8305,8 @@ save_libobjs=$libobjs fi save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + func_basename "$output" + output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. @@ -7150,13 +8319,16 @@ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output + echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - $ECHO ')' >> $output - delfiles="$delfiles $output" + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" @@ -7170,10 +8342,12 @@ fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." @@ -7197,17 +8371,19 @@ # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext - objlist=$obj + objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result @@ -7217,11 +8393,12 @@ # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= @@ -7255,7 +8432,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7276,7 +8453,7 @@ if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then @@ -7288,7 +8465,7 @@ # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7329,10 +8506,10 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi @@ -7348,7 +8525,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7360,7 +8537,7 @@ IFS="$save_ifs" # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7441,18 +8618,21 @@ if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' @@ -7512,8 +8692,8 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac @@ -7524,14 +8704,14 @@ if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -7545,7 +8725,7 @@ *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7555,17 +8735,17 @@ -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7573,7 +8753,7 @@ # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7592,18 +8772,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in @@ -7612,12 +8792,12 @@ case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7643,18 +8823,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done @@ -7668,8 +8848,8 @@ if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" @@ -7681,15 +8861,15 @@ wrappers_required=yes case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no @@ -7698,13 +8878,19 @@ esac if test "$wrappers_required" = no; then # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' @@ -7727,7 +8913,7 @@ # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7735,7 +8921,7 @@ # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7745,11 +8931,18 @@ # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi @@ -7764,7 +8957,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -7776,13 +8969,19 @@ fi # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -7800,18 +8999,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -7891,7 +9079,7 @@ else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" + func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" @@ -7899,10 +9087,10 @@ if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. @@ -7913,10 +9101,10 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -7932,9 +9120,9 @@ done | sort | sort -uc >/dev/null 2>&1); then : else - $ECHO "copying selected object files to avoid basename conflicts..." + echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -7958,9 +9146,9 @@ esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi @@ -7970,6 +9158,16 @@ len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -8043,7 +9241,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -8066,9 +9264,19 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -8082,9 +9290,9 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" @@ -8101,7 +9309,7 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done @@ -8113,7 +9321,7 @@ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= @@ -8122,15 +9330,33 @@ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; esac $ECHO > $output "\ # $outputname - a libtool library file @@ -8189,7 +9415,7 @@ exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} @@ -8209,9 +9435,9 @@ for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8220,24 +9446,23 @@ rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then - objdir="$origobjdir" + odir="$objdir" else - objdir="$dir/$origobjdir" + odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + test "$opt_mode" = uninstall && odir="$dir" - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8263,18 +9488,17 @@ # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case "$opt_mode" in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then @@ -8302,19 +9526,19 @@ # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" + func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -8324,7 +9548,7 @@ noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8333,7 +9557,7 @@ func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8341,12 +9565,12 @@ # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -8354,7 +9578,6 @@ esac func_show_eval "$RM $rmfiles" 'exit_status=1' done - objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -8366,16 +9589,16 @@ exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} -test -z "$mode" && { +test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" diff -Nru gnome-dvb-daemon-0.1.23/m4/libtool.m4 gnome-dvb-daemon-0.2.7/m4/libtool.m4 --- gnome-dvb-daemon-0.1.23/m4/libtool.m4 2011-01-14 13:59:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/m4/libtool.m4 2011-12-10 09:27:20.000000000 +0000 @@ -1,7 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,7 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -37,7 +39,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) -# serial 56 LT_INIT +# serial 57 LT_INIT # LT_PREREQ(VERSION) @@ -66,6 +68,7 @@ # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl @@ -82,6 +85,8 @@ AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) @@ -118,7 +123,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) @@ -138,6 +143,9 @@ m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -160,10 +168,13 @@ dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our @@ -179,7 +190,6 @@ _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) @@ -193,23 +203,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -250,6 +243,28 @@ ])# _LT_SETUP +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' @@ -408,7 +423,7 @@ # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS @@ -418,7 +433,7 @@ # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) @@ -517,12 +532,20 @@ LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -533,9 +556,9 @@ # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -543,16 +566,38 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - _LT_OUTPUT_LIBTOOL_INIT ]) +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- @@ -562,20 +607,11 @@ AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 +lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo @@ -601,7 +637,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -646,15 +682,13 @@ # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT @@ -717,15 +751,12 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) - _LT_PROG_XSI_SHELLFNS + _LT_PROG_REPLACE_SHELLFNS - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], @@ -831,11 +862,13 @@ AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER @@ -940,6 +973,31 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -967,7 +1025,7 @@ else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -987,7 +1045,11 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in @@ -995,7 +1057,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -1011,203 +1073,142 @@ fi ]) -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + # _LT_PROG_ECHO_BACKSLASH # ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' fi -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) -AC_SUBST(lt_ECHO) -]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], @@ -1236,7 +1237,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in @@ -1354,14 +1355,47 @@ ])# _LT_ENABLE_LOCK +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) +[_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: @@ -1388,10 +1422,19 @@ esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE @@ -1416,15 +1459,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1464,7 +1507,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1527,6 +1570,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -1591,8 +1639,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -1643,7 +1691,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" +[#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -1684,7 +1732,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -1693,7 +1747,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -1869,16 +1927,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes @@ -2037,6 +2095,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ @@ -2045,16 +2104,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -2067,7 +2133,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -2087,7 +2153,13 @@ if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) @@ -2175,7 +2247,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -2206,8 +2278,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2228,36 +2301,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -2344,6 +2464,19 @@ hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -2386,8 +2519,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[[3-9]]*) @@ -2454,26 +2589,35 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2485,18 +2629,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -2717,6 +2849,8 @@ The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], @@ -2829,6 +2963,7 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], @@ -2950,6 +3085,11 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -2958,8 +3098,8 @@ fi ;; esac -_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl -_LT_DECL([], [reload_cmds], [2])dnl +_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_TAGDECL([], [reload_cmds], [2])dnl ])# _LT_CMD_RELOAD @@ -3011,16 +3151,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -3050,6 +3192,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -3058,11 +3204,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -3088,7 +3234,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -3162,6 +3308,21 @@ ;; esac ]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -3169,7 +3330,11 @@ _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD @@ -3226,7 +3391,19 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -3239,13 +3416,13 @@ AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -3260,20 +3437,81 @@ dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") @@ -3296,7 +3534,12 @@ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, @@ -3313,6 +3556,7 @@ m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl @@ -3380,8 +3624,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3417,6 +3661,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -3438,7 +3683,7 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -3450,6 +3695,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -3461,7 +3718,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -3487,15 +3744,15 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi @@ -3528,6 +3785,13 @@ AC_MSG_RESULT(ok) fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], @@ -3538,6 +3802,8 @@ _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3549,7 +3815,6 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= -AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -3600,6 +3865,11 @@ # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -3649,6 +3919,12 @@ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; dgux*) case $cc_basename in ec++*) @@ -3738,8 +4014,8 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' @@ -3769,7 +4045,7 @@ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -3801,7 +4077,7 @@ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -3905,6 +4181,12 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -3947,6 +4229,13 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -4010,7 +4299,13 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4022,25 +4317,25 @@ # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; @@ -4072,7 +4367,7 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; @@ -4129,9 +4424,11 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. @@ -4150,6 +4447,8 @@ _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # @@ -4170,6 +4469,7 @@ m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl @@ -4178,30 +4478,35 @@ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; + case $cc_basename in + cl*) ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= @@ -4261,13 +4566,36 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -4301,11 +4629,12 @@ _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -4341,10 +4670,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -4362,6 +4693,11 @@ fi ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4387,15 +4723,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4406,13 +4743,17 @@ lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -4428,17 +4769,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4447,13 +4788,13 @@ fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4471,8 +4812,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4518,8 +4859,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4559,8 +4900,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -4622,7 +4965,6 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi - _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then @@ -4648,9 +4990,9 @@ _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -4659,14 +5001,19 @@ else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -4698,20 +5045,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac ;; darwin* | rhapsody*) @@ -4749,7 +5139,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4757,7 +5147,7 @@ hpux9*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -4772,8 +5162,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -4791,16 +5181,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -4812,7 +5202,14 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi @@ -4840,19 +5237,34 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4861,7 +5273,7 @@ _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -4914,17 +5326,17 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4934,13 +5346,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -4953,9 +5365,9 @@ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -5131,36 +5543,38 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi @@ -5225,8 +5639,6 @@ to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], @@ -5237,6 +5649,8 @@ [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented @@ -5330,37 +5744,22 @@ ])# _LT_LANG_C_CONFIG -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no @@ -5382,6 +5781,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -5413,6 +5814,7 @@ # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -5430,6 +5832,7 @@ fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -5451,8 +5854,8 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5484,7 +5887,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -5593,10 +5996,10 @@ _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -5605,14 +6008,19 @@ else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -5642,28 +6050,75 @@ ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; @@ -5705,6 +6160,11 @@ gnu*) ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: @@ -5729,11 +6189,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -5794,7 +6254,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -5804,10 +6264,10 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -5837,7 +6297,7 @@ case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -5848,9 +6308,9 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -5879,7 +6339,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5916,26 +6376,26 @@ pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; @@ -5943,7 +6403,7 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -5962,9 +6422,9 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5984,13 +6444,13 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6059,7 +6519,7 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6094,15 +6554,15 @@ case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; @@ -6118,17 +6578,17 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -6138,7 +6598,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -6174,7 +6634,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -6195,7 +6655,7 @@ esac _LT_TAGVAR(link_all_deplibs, $1)=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6215,14 +6675,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -6233,7 +6693,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' @@ -6287,6 +6747,10 @@ CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -6342,6 +6806,7 @@ fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -6356,6 +6821,29 @@ ])# _LT_LANG_CXX_CONFIG +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6364,6 +6852,7 @@ # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= @@ -6414,6 +6903,13 @@ }; _LT_EOF ]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then @@ -6425,7 +6921,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -6434,13 +6930,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -6460,8 +6965,10 @@ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -6497,6 +7004,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], @@ -6533,7 +7041,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -6577,32 +7085,16 @@ ])# _LT_SYS_HIDDEN_LIBDEPS -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6621,6 +7113,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6660,7 +7154,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6714,38 +7210,24 @@ GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6764,6 +7246,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6803,7 +7287,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -6859,7 +7345,8 @@ fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP @@ -6896,10 +7383,12 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" @@ -6909,6 +7398,8 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6928,7 +7419,8 @@ AC_LANG_RESTORE GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG @@ -6963,9 +7455,11 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} +CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6978,7 +7472,8 @@ GCC=$lt_save_GCC AC_LANG_RESTORE -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG @@ -7037,6 +7532,15 @@ AC_SUBST([OBJDUMP]) ]) +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) # _LT_DECL_SED # ------------ @@ -7130,8 +7634,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -7170,208 +7674,162 @@ ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi -_LT_EOF -esac +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac ;; - esac + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac ]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff -Nru gnome-dvb-daemon-0.1.23/m4/lt~obsolete.m4 gnome-dvb-daemon-0.2.7/m4/lt~obsolete.m4 --- gnome-dvb-daemon-0.1.23/m4/lt~obsolete.m4 2011-01-14 13:59:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/m4/lt~obsolete.m4 2011-12-10 09:27:20.000000000 +0000 @@ -1,13 +1,13 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 4 lt~obsolete.m4 +# serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # @@ -77,7 +77,6 @@ m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) @@ -90,3 +89,10 @@ m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff -Nru gnome-dvb-daemon-0.1.23/m4/ltoptions.m4 gnome-dvb-daemon-0.2.7/m4/ltoptions.m4 --- gnome-dvb-daemon-0.1.23/m4/ltoptions.m4 2011-01-14 13:59:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/m4/ltoptions.m4 2011-12-10 09:27:20.000000000 +0000 @@ -1,13 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 6 ltoptions.m4 +# serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -125,7 +126,7 @@ [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) @@ -133,13 +134,13 @@ esac test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl +_LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], diff -Nru gnome-dvb-daemon-0.1.23/m4/ltversion.m4 gnome-dvb-daemon-0.2.7/m4/ltversion.m4 --- gnome-dvb-daemon-0.1.23/m4/ltversion.m4 2011-01-14 13:59:39.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/m4/ltversion.m4 2011-12-10 09:27:20.000000000 +0000 @@ -7,17 +7,17 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# Generated from ltversion.in. +# @configure_input@ -# serial 3017 ltversion.m4 +# serial 3293 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +m4_define([LT_PACKAGE_VERSION], [2.4]) +m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' +[macro_version='2.4' +macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru gnome-dvb-daemon-0.1.23/Makefile.am gnome-dvb-daemon-0.2.7/Makefile.am --- gnome-dvb-daemon-0.1.23/Makefile.am 2011-01-14 13:59:23.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/Makefile.am 2011-09-22 19:06:42.000000000 +0000 @@ -30,6 +30,7 @@ src/dbus/IDBusManager.vala \ src/dbus/IDBusRecorder.vala \ src/dbus/IDBusRecordingsStore.vala \ + src/dbus/IDBusScanner.vala \ src/dbus/IDBusSchedule.vala \ src/io/ChannelListReader.vala \ src/io/ChannelListWriter.vala \ @@ -47,6 +48,7 @@ src/Event.vala \ src/EventStorage.vala \ src/Factory.vala \ + src/Logging.vala \ src/Main.vala \ src/Manager.vala \ src/MpegTsEnums.vala \ @@ -63,15 +65,12 @@ src/rtsp/MediaFactory.vala \ src/rtsp/MediaMapping.vala \ src/rtsp/Server.vala \ - src/rygel/Interfaces.vala \ - src/rygel/Services.vala \ src/rygel/Interfaces2.vala \ src/rygel/Services2.vala \ $(NULL) vala_pkgs = \ --pkg gio-2.0 \ - --pkg dbus-glib-1 \ --pkg gstreamer-0.10 \ --pkg gee-1.0 \ --pkg sqlite3 \ @@ -133,12 +132,12 @@ $(NULL) dist-hook: - @if test -d "$(srcdir)/.bzr"; \ + @if test -d "$(srcdir)/.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ - $(top_srcdir)/missing --run bzr log -v --log-format 'gnu' ) > ChangeLog.tmp \ + $(top_srcdir)/missing --run python gen-changelog.py ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ diff -Nru gnome-dvb-daemon-0.1.23/Makefile.in gnome-dvb-daemon-0.2.7/Makefile.in --- gnome-dvb-daemon-0.1.23/Makefile.in 2011-01-14 13:59:45.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/Makefile.in 2011-12-10 09:27:25.000000000 +0000 @@ -42,13 +42,13 @@ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS compile config.guess config.rpath config.sub \ depcomp gnome_dvb_daemon_vala.stamp install-sh \ - libdvbdaemon_utils_a_vala.stamp ltmain.sh missing \ - mkinstalldirs py-compile src/Cable/CableChannel.c \ - src/Cable/CableScanner.c src/ChangeType.c src/Channel.c \ - src/ChannelFactory.c src/ChannelGroup.c src/ChannelList.c \ - src/Constants.c src/Device.c src/DeviceGroup.c \ - src/EPGScanner.c src/Event.c src/EventStorage.c src/Factory.c \ - src/Main.c src/Manager.c src/MpegTsEnums.c src/OverlapType.c \ + libdvbdaemon_utils_a_vala.stamp ltmain.sh missing py-compile \ + src/Cable/CableChannel.c src/Cable/CableScanner.c \ + src/ChangeType.c src/Channel.c src/ChannelFactory.c \ + src/ChannelGroup.c src/ChannelList.c src/Constants.c \ + src/Device.c src/DeviceGroup.c src/EPGScanner.c src/Event.c \ + src/EventStorage.c src/Factory.c src/Logging.c src/Main.c \ + src/Manager.c src/MpegTsEnums.c src/OverlapType.c \ src/Recorder.c src/Recording.c src/RecordingsStore.c \ src/Satellite/SatelliteChannel.c \ src/Satellite/SatelliteScanner.c src/ScannedItem.c \ @@ -63,12 +63,12 @@ src/database/sqlite/SqliteUtils.c src/dbus/IDBusChannelList.c \ src/dbus/IDBusDeviceGroup.c src/dbus/IDBusManager.c \ src/dbus/IDBusRecorder.c src/dbus/IDBusRecordingsStore.c \ - src/dbus/IDBusSchedule.c src/io/ChannelListReader.c \ - src/io/ChannelListWriter.c src/io/RecordingReader.c \ - src/io/RecordingWriter.c src/rtsp/MediaFactory.c \ - src/rtsp/MediaMapping.c src/rtsp/Server.c \ - src/rygel/Interfaces.c src/rygel/Interfaces2.c \ - src/rygel/Services.c src/rygel/Services2.c + src/dbus/IDBusScanner.c src/dbus/IDBusSchedule.c \ + src/io/ChannelListReader.c src/io/ChannelListWriter.c \ + src/io/RecordingReader.c src/io/RecordingWriter.c \ + src/rtsp/MediaFactory.c src/rtsp/MediaMapping.c \ + src/rtsp/Server.c src/rygel/Interfaces2.c \ + src/rygel/Services2.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gstreamer.m4 $(top_srcdir)/m4/iconv.m4 \ @@ -79,12 +79,12 @@ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -125,6 +125,7 @@ src/dbus/gnome_dvb_daemon-IDBusManager.$(OBJEXT) \ src/dbus/gnome_dvb_daemon-IDBusRecorder.$(OBJEXT) \ src/dbus/gnome_dvb_daemon-IDBusRecordingsStore.$(OBJEXT) \ + src/dbus/gnome_dvb_daemon-IDBusScanner.$(OBJEXT) \ src/dbus/gnome_dvb_daemon-IDBusSchedule.$(OBJEXT) \ src/io/gnome_dvb_daemon-ChannelListReader.$(OBJEXT) \ src/io/gnome_dvb_daemon-ChannelListWriter.$(OBJEXT) \ @@ -142,6 +143,7 @@ src/gnome_dvb_daemon-Event.$(OBJEXT) \ src/gnome_dvb_daemon-EventStorage.$(OBJEXT) \ src/gnome_dvb_daemon-Factory.$(OBJEXT) \ + src/gnome_dvb_daemon-Logging.$(OBJEXT) \ src/gnome_dvb_daemon-Main.$(OBJEXT) \ src/gnome_dvb_daemon-Manager.$(OBJEXT) \ src/gnome_dvb_daemon-MpegTsEnums.$(OBJEXT) \ @@ -158,8 +160,6 @@ src/rtsp/gnome_dvb_daemon-MediaFactory.$(OBJEXT) \ src/rtsp/gnome_dvb_daemon-MediaMapping.$(OBJEXT) \ src/rtsp/gnome_dvb_daemon-Server.$(OBJEXT) \ - src/rygel/gnome_dvb_daemon-Interfaces.$(OBJEXT) \ - src/rygel/gnome_dvb_daemon-Services.$(OBJEXT) \ src/rygel/gnome_dvb_daemon-Interfaces2.$(OBJEXT) \ src/rygel/gnome_dvb_daemon-Services2.$(OBJEXT) \ $(am__objects_1) @@ -255,8 +255,8 @@ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best +DIST_ARCHIVES = $(distdir).tar.bz2 distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ @@ -275,13 +275,10 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -317,7 +314,6 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -330,6 +326,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -352,6 +349,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@ +PYGOBJECT_LIBS = @PYGOBJECT_LIBS@ PYTHON = @PYTHON@ PYTHONDIR = @PYTHONDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ @@ -375,6 +374,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -394,8 +394,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -expanded_datadir = @expanded_datadir@ -expanded_libdir = @expanded_libdir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -409,7 +407,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -457,6 +454,7 @@ src/dbus/IDBusManager.vala \ src/dbus/IDBusRecorder.vala \ src/dbus/IDBusRecordingsStore.vala \ + src/dbus/IDBusScanner.vala \ src/dbus/IDBusSchedule.vala \ src/io/ChannelListReader.vala \ src/io/ChannelListWriter.vala \ @@ -474,6 +472,7 @@ src/Event.vala \ src/EventStorage.vala \ src/Factory.vala \ + src/Logging.vala \ src/Main.vala \ src/Manager.vala \ src/MpegTsEnums.vala \ @@ -490,15 +489,12 @@ src/rtsp/MediaFactory.vala \ src/rtsp/MediaMapping.vala \ src/rtsp/Server.vala \ - src/rygel/Interfaces.vala \ - src/rygel/Services.vala \ src/rygel/Interfaces2.vala \ src/rygel/Services2.vala \ $(NULL) vala_pkgs = \ --pkg gio-2.0 \ - --pkg dbus-glib-1 \ --pkg gstreamer-0.10 \ --pkg gee-1.0 \ --pkg sqlite3 \ @@ -758,6 +754,8 @@ src/dbus/$(am__dirstamp) src/dbus/$(DEPDIR)/$(am__dirstamp) src/dbus/gnome_dvb_daemon-IDBusRecordingsStore.$(OBJEXT): \ src/dbus/$(am__dirstamp) src/dbus/$(DEPDIR)/$(am__dirstamp) +src/dbus/gnome_dvb_daemon-IDBusScanner.$(OBJEXT): \ + src/dbus/$(am__dirstamp) src/dbus/$(DEPDIR)/$(am__dirstamp) src/dbus/gnome_dvb_daemon-IDBusSchedule.$(OBJEXT): \ src/dbus/$(am__dirstamp) src/dbus/$(DEPDIR)/$(am__dirstamp) src/io/$(am__dirstamp): @@ -804,6 +802,8 @@ src/$(DEPDIR)/$(am__dirstamp) src/gnome_dvb_daemon-Factory.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/gnome_dvb_daemon-Logging.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) src/gnome_dvb_daemon-Main.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gnome_dvb_daemon-Manager.$(OBJEXT): src/$(am__dirstamp) \ @@ -848,10 +848,6 @@ src/rygel/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/rygel/$(DEPDIR) @: > src/rygel/$(DEPDIR)/$(am__dirstamp) -src/rygel/gnome_dvb_daemon-Interfaces.$(OBJEXT): \ - src/rygel/$(am__dirstamp) src/rygel/$(DEPDIR)/$(am__dirstamp) -src/rygel/gnome_dvb_daemon-Services.$(OBJEXT): \ - src/rygel/$(am__dirstamp) src/rygel/$(DEPDIR)/$(am__dirstamp) src/rygel/gnome_dvb_daemon-Interfaces2.$(OBJEXT): \ src/rygel/$(am__dirstamp) src/rygel/$(DEPDIR)/$(am__dirstamp) src/rygel/gnome_dvb_daemon-Services2.$(OBJEXT): \ @@ -881,6 +877,7 @@ -rm -f src/dbus/gnome_dvb_daemon-IDBusManager.$(OBJEXT) -rm -f src/dbus/gnome_dvb_daemon-IDBusRecorder.$(OBJEXT) -rm -f src/dbus/gnome_dvb_daemon-IDBusRecordingsStore.$(OBJEXT) + -rm -f src/dbus/gnome_dvb_daemon-IDBusScanner.$(OBJEXT) -rm -f src/dbus/gnome_dvb_daemon-IDBusSchedule.$(OBJEXT) -rm -f src/gnome_dvb_daemon-ChangeType.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Channel.$(OBJEXT) @@ -894,6 +891,7 @@ -rm -f src/gnome_dvb_daemon-Event.$(OBJEXT) -rm -f src/gnome_dvb_daemon-EventStorage.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Factory.$(OBJEXT) + -rm -f src/gnome_dvb_daemon-Logging.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Main.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Manager.$(OBJEXT) -rm -f src/gnome_dvb_daemon-MpegTsEnums.$(OBJEXT) @@ -914,9 +912,7 @@ -rm -f src/rtsp/gnome_dvb_daemon-MediaFactory.$(OBJEXT) -rm -f src/rtsp/gnome_dvb_daemon-MediaMapping.$(OBJEXT) -rm -f src/rtsp/gnome_dvb_daemon-Server.$(OBJEXT) - -rm -f src/rygel/gnome_dvb_daemon-Interfaces.$(OBJEXT) -rm -f src/rygel/gnome_dvb_daemon-Interfaces2.$(OBJEXT) - -rm -f src/rygel/gnome_dvb_daemon-Services.$(OBJEXT) -rm -f src/rygel/gnome_dvb_daemon-Services2.$(OBJEXT) -rm -f vapi/libdvbdaemon_utils_a-cstuff.$(OBJEXT) @@ -935,6 +931,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-Event.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-EventStorage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-Factory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-Logging.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-Main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-Manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-MpegTsEnums.Po@am__quote@ @@ -967,6 +964,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusRecorder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusRecordingsStore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusScanner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusSchedule.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Po@am__quote@ @@ -975,9 +973,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/rtsp/$(DEPDIR)/gnome_dvb_daemon-MediaFactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/rtsp/$(DEPDIR)/gnome_dvb_daemon-MediaMapping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/rtsp/$(DEPDIR)/gnome_dvb_daemon-Server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@vapi/$(DEPDIR)/libdvbdaemon_utils_a-cstuff.Po@am__quote@ @@ -1328,6 +1324,22 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/dbus/gnome_dvb_daemon-IDBusRecordingsStore.obj `if test -f 'src/dbus/IDBusRecordingsStore.c'; then $(CYGPATH_W) 'src/dbus/IDBusRecordingsStore.c'; else $(CYGPATH_W) '$(srcdir)/src/dbus/IDBusRecordingsStore.c'; fi` +src/dbus/gnome_dvb_daemon-IDBusScanner.o: src/dbus/IDBusScanner.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/dbus/gnome_dvb_daemon-IDBusScanner.o -MD -MP -MF src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusScanner.Tpo -c -o src/dbus/gnome_dvb_daemon-IDBusScanner.o `test -f 'src/dbus/IDBusScanner.c' || echo '$(srcdir)/'`src/dbus/IDBusScanner.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusScanner.Tpo src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusScanner.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/dbus/IDBusScanner.c' object='src/dbus/gnome_dvb_daemon-IDBusScanner.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/dbus/gnome_dvb_daemon-IDBusScanner.o `test -f 'src/dbus/IDBusScanner.c' || echo '$(srcdir)/'`src/dbus/IDBusScanner.c + +src/dbus/gnome_dvb_daemon-IDBusScanner.obj: src/dbus/IDBusScanner.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/dbus/gnome_dvb_daemon-IDBusScanner.obj -MD -MP -MF src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusScanner.Tpo -c -o src/dbus/gnome_dvb_daemon-IDBusScanner.obj `if test -f 'src/dbus/IDBusScanner.c'; then $(CYGPATH_W) 'src/dbus/IDBusScanner.c'; else $(CYGPATH_W) '$(srcdir)/src/dbus/IDBusScanner.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusScanner.Tpo src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusScanner.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/dbus/IDBusScanner.c' object='src/dbus/gnome_dvb_daemon-IDBusScanner.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/dbus/gnome_dvb_daemon-IDBusScanner.obj `if test -f 'src/dbus/IDBusScanner.c'; then $(CYGPATH_W) 'src/dbus/IDBusScanner.c'; else $(CYGPATH_W) '$(srcdir)/src/dbus/IDBusScanner.c'; fi` + src/dbus/gnome_dvb_daemon-IDBusSchedule.o: src/dbus/IDBusSchedule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/dbus/gnome_dvb_daemon-IDBusSchedule.o -MD -MP -MF src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusSchedule.Tpo -c -o src/dbus/gnome_dvb_daemon-IDBusSchedule.o `test -f 'src/dbus/IDBusSchedule.c' || echo '$(srcdir)/'`src/dbus/IDBusSchedule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusSchedule.Tpo src/dbus/$(DEPDIR)/gnome_dvb_daemon-IDBusSchedule.Po @@ -1600,6 +1612,22 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/gnome_dvb_daemon-Factory.obj `if test -f 'src/Factory.c'; then $(CYGPATH_W) 'src/Factory.c'; else $(CYGPATH_W) '$(srcdir)/src/Factory.c'; fi` +src/gnome_dvb_daemon-Logging.o: src/Logging.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/gnome_dvb_daemon-Logging.o -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-Logging.Tpo -c -o src/gnome_dvb_daemon-Logging.o `test -f 'src/Logging.c' || echo '$(srcdir)/'`src/Logging.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-Logging.Tpo src/$(DEPDIR)/gnome_dvb_daemon-Logging.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/Logging.c' object='src/gnome_dvb_daemon-Logging.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/gnome_dvb_daemon-Logging.o `test -f 'src/Logging.c' || echo '$(srcdir)/'`src/Logging.c + +src/gnome_dvb_daemon-Logging.obj: src/Logging.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/gnome_dvb_daemon-Logging.obj -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-Logging.Tpo -c -o src/gnome_dvb_daemon-Logging.obj `if test -f 'src/Logging.c'; then $(CYGPATH_W) 'src/Logging.c'; else $(CYGPATH_W) '$(srcdir)/src/Logging.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-Logging.Tpo src/$(DEPDIR)/gnome_dvb_daemon-Logging.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/Logging.c' object='src/gnome_dvb_daemon-Logging.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/gnome_dvb_daemon-Logging.obj `if test -f 'src/Logging.c'; then $(CYGPATH_W) 'src/Logging.c'; else $(CYGPATH_W) '$(srcdir)/src/Logging.c'; fi` + src/gnome_dvb_daemon-Main.o: src/Main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/gnome_dvb_daemon-Main.o -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-Main.Tpo -c -o src/gnome_dvb_daemon-Main.o `test -f 'src/Main.c' || echo '$(srcdir)/'`src/Main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-Main.Tpo src/$(DEPDIR)/gnome_dvb_daemon-Main.Po @@ -1856,38 +1884,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/rtsp/gnome_dvb_daemon-Server.obj `if test -f 'src/rtsp/Server.c'; then $(CYGPATH_W) 'src/rtsp/Server.c'; else $(CYGPATH_W) '$(srcdir)/src/rtsp/Server.c'; fi` -src/rygel/gnome_dvb_daemon-Interfaces.o: src/rygel/Interfaces.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/rygel/gnome_dvb_daemon-Interfaces.o -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces.Tpo -c -o src/rygel/gnome_dvb_daemon-Interfaces.o `test -f 'src/rygel/Interfaces.c' || echo '$(srcdir)/'`src/rygel/Interfaces.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Interfaces.c' object='src/rygel/gnome_dvb_daemon-Interfaces.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/rygel/gnome_dvb_daemon-Interfaces.o `test -f 'src/rygel/Interfaces.c' || echo '$(srcdir)/'`src/rygel/Interfaces.c - -src/rygel/gnome_dvb_daemon-Interfaces.obj: src/rygel/Interfaces.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/rygel/gnome_dvb_daemon-Interfaces.obj -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces.Tpo -c -o src/rygel/gnome_dvb_daemon-Interfaces.obj `if test -f 'src/rygel/Interfaces.c'; then $(CYGPATH_W) 'src/rygel/Interfaces.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Interfaces.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Interfaces.c' object='src/rygel/gnome_dvb_daemon-Interfaces.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/rygel/gnome_dvb_daemon-Interfaces.obj `if test -f 'src/rygel/Interfaces.c'; then $(CYGPATH_W) 'src/rygel/Interfaces.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Interfaces.c'; fi` - -src/rygel/gnome_dvb_daemon-Services.o: src/rygel/Services.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/rygel/gnome_dvb_daemon-Services.o -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services.Tpo -c -o src/rygel/gnome_dvb_daemon-Services.o `test -f 'src/rygel/Services.c' || echo '$(srcdir)/'`src/rygel/Services.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Services.c' object='src/rygel/gnome_dvb_daemon-Services.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/rygel/gnome_dvb_daemon-Services.o `test -f 'src/rygel/Services.c' || echo '$(srcdir)/'`src/rygel/Services.c - -src/rygel/gnome_dvb_daemon-Services.obj: src/rygel/Services.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/rygel/gnome_dvb_daemon-Services.obj -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services.Tpo -c -o src/rygel/gnome_dvb_daemon-Services.obj `if test -f 'src/rygel/Services.c'; then $(CYGPATH_W) 'src/rygel/Services.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Services.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Services.c' object='src/rygel/gnome_dvb_daemon-Services.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/rygel/gnome_dvb_daemon-Services.obj `if test -f 'src/rygel/Services.c'; then $(CYGPATH_W) 'src/rygel/Services.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Services.c'; fi` - src/rygel/gnome_dvb_daemon-Interfaces2.o: src/rygel/Interfaces2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/rygel/gnome_dvb_daemon-Interfaces2.o -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces2.Tpo -c -o src/rygel/gnome_dvb_daemon-Interfaces2.o `test -f 'src/rygel/Interfaces2.c' || echo '$(srcdir)/'`src/rygel/Interfaces2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces2.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces2.Po @@ -2014,6 +2010,11 @@ rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ fi +$(srcdir)/src/dbus/IDBusScanner.c: $(srcdir)/gnome_dvb_daemon_vala.stamp + @if test -f $@; then :; else \ + rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ + $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ + fi $(srcdir)/src/dbus/IDBusSchedule.c: $(srcdir)/gnome_dvb_daemon_vala.stamp @if test -f $@; then :; else \ rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ @@ -2099,6 +2100,11 @@ rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ fi +$(srcdir)/src/Logging.c: $(srcdir)/gnome_dvb_daemon_vala.stamp + @if test -f $@; then :; else \ + rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ + $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ + fi $(srcdir)/src/Main.c: $(srcdir)/gnome_dvb_daemon_vala.stamp @if test -f $@; then :; else \ rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ @@ -2179,16 +2185,6 @@ rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ fi -$(srcdir)/src/rygel/Interfaces.c: $(srcdir)/gnome_dvb_daemon_vala.stamp - @if test -f $@; then :; else \ - rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ - $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ - fi -$(srcdir)/src/rygel/Services.c: $(srcdir)/gnome_dvb_daemon_vala.stamp - @if test -f $@; then :; else \ - rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ - $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ - fi $(srcdir)/src/rygel/Interfaces2.c: $(srcdir)/gnome_dvb_daemon_vala.stamp @if test -f $@; then :; else \ rm -f $(srcdir)/gnome_dvb_daemon_vala.stamp; \ @@ -2449,7 +2445,6 @@ $(am__remove_distdir) dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) @@ -2600,6 +2595,7 @@ -rm -f src/Event.c -rm -f src/EventStorage.c -rm -f src/Factory.c + -rm -f src/Logging.c -rm -f src/Main.c -rm -f src/Manager.c -rm -f src/MpegTsEnums.c @@ -2630,6 +2626,7 @@ -rm -f src/dbus/IDBusManager.c -rm -f src/dbus/IDBusRecorder.c -rm -f src/dbus/IDBusRecordingsStore.c + -rm -f src/dbus/IDBusScanner.c -rm -f src/dbus/IDBusSchedule.c -rm -f src/io/ChannelListReader.c -rm -f src/io/ChannelListWriter.c @@ -2638,9 +2635,7 @@ -rm -f src/rtsp/MediaFactory.c -rm -f src/rtsp/MediaMapping.c -rm -f src/rtsp/Server.c - -rm -f src/rygel/Interfaces.c -rm -f src/rygel/Interfaces2.c - -rm -f src/rygel/Services.c -rm -f src/rygel/Services2.c clean: clean-recursive @@ -2740,12 +2735,12 @@ dist-hook: - @if test -d "$(srcdir)/.bzr"; \ + @if test -d "$(srcdir)/.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ - $(top_srcdir)/missing --run bzr log -v --log-format 'gnu' ) > ChangeLog.tmp \ + $(top_srcdir)/missing --run python gen-changelog.py ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ diff -Nru gnome-dvb-daemon-0.1.23/mkinstalldirs gnome-dvb-daemon-0.2.7/mkinstalldirs --- gnome-dvb-daemon-0.1.23/mkinstalldirs 2011-01-14 13:59:45.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/mkinstalldirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,162 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2009-04-28.21; # UTC - -# Original author: Noah Friedman -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' -IFS=" "" $nl" -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp=$pathcomp/ - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru gnome-dvb-daemon-0.1.23/NEWS gnome-dvb-daemon-0.2.7/NEWS --- gnome-dvb-daemon-0.1.23/NEWS 2011-01-15 16:58:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/NEWS 2011-12-10 09:35:24.000000000 +0000 @@ -1,3 +1,173 @@ +============= +Version 0.2.7 +============= + +This release fixes a bug where selecting a device in gnome-dvb-setup causes a crash. + +- gnomedvb: Let get_adapter_info return a dict + +============= +Version 0.2.6 +============= + +This is release fixes a couple of bugs, including one that caused Totem to crash +if the plugin was enabled. + +- Don't use deprecated GTK+ widgets anymore +- Use ugettext to make sure we always obtain an utf8 encoded string +- totem-plugin: Change title of window to the name of the channel that is currently playing +- gnomedvb: Remove userdirs module and use GLib via introspection instead +- Added GetAdapterInfo method to Manager DBus interface +- Droped python-gstreamer dependency + +============= +Version 0.2.5 +============= + +This release updates the list of supported countries for DVB-C and DVB-T. + +- Append recordings to TreeStore with a single function call +- Added dvb-t initial tuning data for Andorra, Azerbaijan, Croatia, Hungary, Israel, Iran, Lithuania, Latvia, Romania, Slovenia, Viet Nam +- Added dvb-c initial tuning data for Czech Republic, Denmark, Spain, France, Hungary, Luxemburg + +============= +Version 0.2.4 +============= + +This release fixes a couple of issues with vala 0.14.0, +which is now the required mininum version. + +- Fixed various issues with vala 0.14.0 +- When searching for recordings, skip hidden directories and set maximum recursion depth to three. + +Translations: +------------- +- Updated es: Daniel Mustieles +- Updated fr: Claude Paroz +- Updated sl: Martin Srebotnjak + +============= +Version 0.2.3 +============= + +This release fixes a couple of issue with pygobject-3.0. +pygobject 2.90.1 or later is required. Furthermore, it is +now possible to add fake devices for development purposes. + +- Fixed bug where extended event description was not displayed when selecting an event in SchedulePaned +- Use GObject instead of gobject module +- Fixed retrieving iter pointing to start of previous day in ScheduleStore +- Don't bind gettext domain globally to avoid interfering with applications that import gnomedvb +- Allow to add fake devices to settings.ini +- Raised pygobject minimum version to 2.90.1 +- Changed order of columns in RecordingsView + +Translations: +------------- +- Updated gl: Fran Diéguez +- Updated nb: Kjartan Maraas +- Updated sl: Matej Urbančič +- Updated zh_CN: Yinghua Wang + +============= +Version 0.2.2 +============= + +This release fixes a bug where the EPG was not restored on startup. + +- Make sure that Channel's GroupId is set in the constructor. +- Removed shebang from DBusWrapper.py +- Removed MediaServer1 D-Bus service file + +Translations: +------------- +- Updated ru: Yuri Myasoedov + +============= +Version 0.2.1 +============= + +This release fixes a bug that localization in the GUI +did not work correctly. In addition, DVB-T brute-force +scan works correctly, again. + +- Fixed binding gettext domain +- gnomedvb: Set window position of preferences window +- gnomedvb: Launch gnome-dvb-setup when pressing on preferences button +- Manager: disconnect from destroyed signal before destroying Scanners in shutdown +- Adjusted DVB-T brute-force scan to new signature of AddScanningData method + +Updated Translations: +--------------------- +- Updated el: Giannis Katsampirhs + +============= +Version 0.2.0 +============= + +- Fixed a couple of issues revealed by pylint +- Totem: Fixed spawning of gnome-dvb-setup +- Use void* instead of bool as return value in GThread function +- Use async methods instead of calling the methods with Idle.add + +Updated Translations: +--------------------- +- cs: Marek Černocký +- de: Mario Blättermann +- es: Jorge González +- pl: Piotr Drąg +- sl: Matej Urbančič + +============== +Version 0.1.90 +============== + +This is the first release towards a GNOME3-compatible version. +The GUI has been ported from PyGTK using GTK+2 to PyGObject +and GObject-Introspection using GTK+3. In addition, the Totem +plugin has been ported to libpeas and works with Totem 3. +Both the daemon and the GUI use GDBus instead of dbus-glib to +communicate over DBus now. +This version does not support GNOME2, i.e. it won't work with +GTK+2 and Totem 2. + +Minimum dependencies: + - glib 2.28.5 + - gobject-introspection 0.10.8 + - pygobject 2.28.4 + - Vala 0.12.0 + +- Ported GUI to PyGI and GTK+3 +- Use appointment-soon icon instead of stock_timer +- Do not use Gtk.Alignment anymore +- Mark what's on buttons insensitive if no device has been setup +- Retrieve totem plugin dir from pkg-config variable +- Avoid NULL pointer dereference in get_adapters() +- Totem: Ported plugin to PyGI, GTK+3 and libpeas +- Totem: Display recordings when changing 'group by' type. +- Fixed --{enable,disable}-totem-plugin option +- Ported the daemon to use gdbus instead of libdbus. +- Removed support for Rygel's MediaServer1 interface. +- Don't use deprecated functions anymore. Requires Vala >= 0.12.0 +- Use a single Scanner DBus interface for all adapter types +- Ported GUI to use GDBus. Require pygobject >= 2.28.4 and glib >= 2.28.5 +- Totem: Ported plugin to GDBus +- Use new logging facility + +Updated Translations: +--------------------- +- ar (Khaled Hosny) +- da (Ask Hjorth Larsen) +- de (Mario Blättermann) +- fi (Timo Jyrinki) +- fr (Claude Paroz) +- hu (Gabor Kelemen) +- lt (Mantas Kriaučiūnas) +- pl (Piotr Drąg) +- pt_BR (Edvaldo de Souza Cruz) +- sl (Matej Urbančič) +- sv (Daniel Nylander) + ============== Version 0.1.23 ============== diff -Nru gnome-dvb-daemon-0.1.23/po/ar.po gnome-dvb-daemon-0.2.7/po/ar.po --- gnome-dvb-daemon-0.1.23/po/ar.po 2011-01-15 16:56:24.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/ar.po 2011-04-19 21:15:08.000000000 +0000 @@ -2,32 +2,32 @@ # Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 # This file is distributed under the same license as the gnome-dvb-daemon package. # FIRST AUTHOR , 2010. -# +# Khaled Hosny , 2011. msgid "" msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-11-02 23:42+0000\n" -"Last-Translator: someone \n" -"Language-Team: Arabic \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-04-17 21:18+0200\n" +"PO-Revision-Date: 2011-04-17 21:18+0300\n" +"Last-Translator: Khaled Hosny \n" +"Language-Team: Arabic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n % 100 >= " -"3 && n % 100 <= 10 ? 3 : n % 100 >= 11 && n % 100 <= 99 ? 4 : 5;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" +"X-Generator: Virtaal 0.6.1\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" -msgstr "GNOME DVB Daemon" +msgstr "عفريت DVB جنوم" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" -msgstr "موقع GNOME DVB Daemon" +msgstr "موقع عفريت DVB جنوم" -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" @@ -38,7 +38,7 @@ msgstr[4] "%d ساعات" msgstr[5] "%d ساعات" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" @@ -49,7 +49,7 @@ msgstr[4] "%d دقائق" msgstr[5] "%d دقائق" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -64,37 +64,37 @@ msgid "Edit Channel Lists" msgstr "تحرير قائمة القنوات" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" msgstr "مجموعات القنوات" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_مجموعة:" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" msgstr "مجموعات الأجهزة" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" msgstr "كل القنوات" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:95 msgid "Channel" msgstr "قناة" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" msgstr "إختر مجموعة قنوات" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" msgstr "مجموعة قنوات" @@ -115,200 +115,199 @@ msgid "An error occured while removing the group" msgstr "حدث خطأ ما أثناء حذف المجموعة" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" msgstr "مركز تحكم DVB" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" msgstr "لعرض دليل البرامج إختر جهاز الإلتقاط والقناة من القائمة على اليسار" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." msgstr "لم يتم إعداد أي أجهزة. فضلا إذهب إلى الخصائص لإعدادها." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 msgid "There is currently no schedule available for this channel" msgstr "لا يوجد حاليا أي جدول متاح لهذه القناة" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "_Recording schedule" msgstr "_جدولة التسجيل" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" msgstr "_تحرير" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" msgstr "_عرض" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" msgstr "مساعدة" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_إدارة" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" msgstr "إدارة جدولة التسجيل" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" msgstr "_التسجيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" msgstr "إدارة التسجيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" -msgstr "_خروج" +msgstr "أ_نهِ" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" -msgstr "الخروج من البرنامج" +msgstr "أنهِ البرنامج" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" msgstr "_قوائم القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" msgstr "حرر قوائم القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" msgstr "_التفضيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" msgstr "تفضيلات العرض" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" msgstr "_ماذا يعرض الآن" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" msgstr "إكتشف ما يعرض الآن وما سيعرض لاحقا" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" msgstr "_حدِّث" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" msgstr "حدث دليل البرامج" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" msgstr "_اليوم السابق" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" -msgstr "إذهب الى اليوم السابق" +msgstr "اذهب إلى اليوم السابق" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" msgstr "_اليوم التالي" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" -msgstr "إذهب الى اليوم التالي" +msgstr "اذهب إلى اليوم التالي" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" msgstr "_القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" -msgstr "عرض/إخفاء القنوات" +msgstr "اعرض/أخفِ القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" msgstr "_شريط الأدوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" -msgstr "عرض/إخفاء شريط الأدوات" +msgstr "اعرض/أخفِ شريط الأدوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" -msgstr "_حَول" +msgstr "_عن" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" -msgstr "إعرض معلومات حول البرنامج" +msgstr "اعرض معلومات عن البرنامج" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" -msgstr "جدولة التسجيل" +msgstr "جدول التسجيل" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:32 +#: ../client/totem-plugin/dvb-daemon.py:308 msgid "Recordings" msgstr "التسجيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:335 +#: ../client/totem-plugin/dvb-daemon.py:356 msgid "What's on now" msgstr "ماذا يعرض الآن" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" msgstr "اليوم السابق" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" msgstr "اليوم التالي" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:180 msgid "Schedule recording for the selected event?" -msgstr "إدراج موعد تسجيل للحدث المحدد؟" +msgstr "أأجدول موعد تسجيل للحدث المحدد؟" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" -"Launchpad Contributions:\n" +"فريق عربآيز http://www.arabeyes.org:\n" +"خالد حسني\t\n" +"مترجمي لنشباد:\n" " Sebastian Pölsterl https://launchpad.net/~sebp\n" " finalfantasy1st https://launchpad.net/~finalfantasy1st\n" " saudi linux https://launchpad.net/~saudi-unix\n" " someone https://launchpad.net/~somehow" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" msgstr "الأجهزة" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 #, python-format msgid "Adapter: %d, Frontend: %d" msgstr "المحول: %d, الواجهة: %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" msgstr "المجموعة %d" @@ -317,112 +316,112 @@ msgid "Add to Group" msgstr "أضف إلى المجموعة" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" msgstr "أضف الجهاز إلى المجموعة" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" msgstr "إنشاء مجموعة جديدة" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" msgstr "عام" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" -msgstr "_الاسم:" +msgstr "الا_سم:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" msgstr "ملف _القنوات:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" msgstr "_دليل:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" msgstr "اختر ملف" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" msgstr "اختر دليل" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" -msgstr "تعديل مجموعه" +msgstr "حرّر المجموعه" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Digital TV Preferences" -msgstr "خصائص التلفاز الرقمي" +msgstr "تفضيلات التلفاز الرقمي" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" msgstr "حرر المجموعة المحددة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" -msgstr "إحذف الجهاز المحدد" +msgstr "احذف الجهاز المحدد" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" -msgstr "إعداد" +msgstr "اضبط" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" -msgstr "إعداد الأجهزة" +msgstr "اضبط الأجهزة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" -msgstr "إنشاء مجموعة جديدة" +msgstr "أنشئ مجموعة جديدة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" -msgstr "إنشاء مجموعة جديدة للجهاز المحدد" +msgstr "أنشئ مجموعة جديدة للجهاز المحدد" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" -msgstr "أضف إلى مجموعة" +msgstr "أضف إلى المجموعة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" msgstr "أضف الجهاز المحدد إلى مجموعة موجودة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" -msgstr "الأجهزة المثبتة" +msgstr "الأجهزة المُعدّة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" -msgstr "الأجهزة الغير مثبتة" +msgstr "الأجهزة غير المُعدّة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" msgstr "لا يمكن حذف الجهاز من المجموعة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" msgstr "هل أنت متأكد من رغبتك بحذف الجهاز %s من %s" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" msgstr "لا يمكن إنشاء المجموعة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" -"تأكد من إختيارك ملف القنوات ومجلد حفظ التسجيلات الصحيحين وقابليتهما للقراءة ." +"تأكد من اختيارك ملف القنوات ومجلد حفظ التسجيلات الصحيحين وقابليتهما للقراءة." -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" msgstr "لا يمكن إضافة الجهاز إلى المجموعة" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 msgid "" "Make sure that the device isn't already assigned to a different group and " "that all devices in the group are of the same type." @@ -430,13 +429,13 @@ "تأكد من عدم وجود الجهاز في مجموعة أخرى وأن كل الأجهزة في المجموعة من نفس " "النوع." -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:97 msgid "Delete selected recordings?" msgstr "هل تريد حذف التسجيلات المحددة؟" -#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:26 msgid "Pick a date" -msgstr "إختر تاريخ" +msgstr "اختر تاريخا" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 @@ -448,7 +447,7 @@ msgstr "وقت البدء" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" msgstr "المدة" @@ -458,27 +457,27 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 msgid "Abort active recording?" -msgstr "هل تريد انهاء التسجيل؟" +msgstr "هل تريد إنهاء التسجيل؟" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "The timer you selected belongs to a currently active recording." -msgstr "المؤقت الذي قمت بإختياره يعود لعملية تسجيل نشطة." +msgstr "المؤقت الذي اخترته يعود لعملية تسجيل نشطة." #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 msgid "Deleting this timer will abort the recording." msgstr "حذف هذا الموقت سينهي عملية التسجيل." -#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:29 msgid "Timer could not be created" msgstr "لا يمكن إنشاء المؤقت" -#: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:31 msgid "" "Make sure that the timer doesn't conflict with another one and doesn't start " "in the past." -msgstr "تأكد من أن المؤقت لا يتعارض مع مؤقت آخر و أن وقت البدء ليس في الماضي" +msgstr "تأكد من أن المؤقت لا يتعارض مع مؤقت آخر و أن وقت البدء ليس في الماضي." -#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:41 msgid "Recording has been scheduled successfully" msgstr "تم جدولة التسجيل بنجاح" @@ -488,26 +487,26 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:67 msgid "_Channel:" -msgstr "_القناة:" +msgstr "ال_قناة:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:84 msgid "Edit Timer" -msgstr "توقيت التحرير" +msgstr "حرّر المُؤقّت" #: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:59 msgid "Channel:" msgstr "القناة:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:94 msgid "_Start time:" msgstr "_وقت البدء:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:109 msgid "_Duration:" -msgstr "_المدة:" +msgstr "ال_مدة:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:123 msgid "minutes" msgstr "دقائق" @@ -529,25 +528,21 @@ #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "_الوقت:" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "تفاصيل" +msgstr "الو_قت:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:55 msgid "Title:" -msgstr "العنوان :" +msgstr "العنوان:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:63 msgid "Date:" msgstr "التاريخ:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:67 msgid "Duration:" msgstr "المدة:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:71 msgid "Description:" msgstr "الوصف:" @@ -559,86 +554,84 @@ msgid "Length" msgstr "الطول" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" msgstr "الآن" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" msgstr "التالي" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 msgid "No devices have been found." -msgstr "لم يتم إيجاد أي أجهزة" +msgstr "لم يُعثر على أي أجهزة" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 msgid "" "Either no DVB cards are installed or all cards are busy. In the latter case " "make sure you close all programs such as video players that access your DVB " "card." msgstr "" -"إما أنه لم يتم تثبيت أية بطاقات DVB أو أن جميع البطاقات مشغولة. في الحالة " -"الأخيرة تأكد من إغلاق كافة البرامج مثل مشغلات الفيديو التي لها صلاحية وصول " -"لبطاقة DVB." +"إما أنه لم تُثبّت أية بطاقات DVB أو أن جميع البطاقات مشغولة. في الحالة الأخيرة " +"تأكد من إغلاق كافة البرامج مثل مشغلات الفيديو التي لها صلاحية وصول لبطاقة " +"DVB." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:66 msgid "Name" -msgstr "الإسم" +msgstr "الاسم" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:72 msgid "Type" msgstr "النوع" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:83 msgid "Select the device you want to configure." -msgstr "إختر الجهاز المراد إعداده" +msgstr "اختر الجهاز المراد إعداده." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:97 msgid "All devices are already configured." msgstr "كل الأجهزة معدة مسبقا." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:99 msgid "" "Go to the control center if you want to alter the settings of already " "configured devices." -msgstr "" -"انتقل إلى مركز التحكم إذا كنت تريد تغيير إعدادات أجهزة تم إعدادها بالفعل." +msgstr "انتقل إلى مركز التحكم إذا كنت تريد تغيير إعدادات أجهزة سبق إعدادها." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:107 msgid "An error occured while retrieving devices." msgstr "حدث خطأ أثناء استرداد الأجهزة." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:109 msgid "" "Make sure other applications don't access DVB devices and you have " "permissions to access them." msgstr "" -"تأكد من أن التطبيقات الأخرى لا تصل لأجهزة DVB وأن لديك صلاحيات للوصول إليها." +"تأكد من أن التطبيقات الأخرى لا تصل لأجهزة DVB وأن لك صلاحية الوصول إليها." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:111 msgid "The detailed error message is:" -msgstr "تفاصيل رسالة الخطأ هي :" +msgstr "تفاصيل رسالة الخطأ:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:120 msgid "Searching for devices" -msgstr "جاري البحث عن أجهزة" +msgstr "يبحث عن الأجهزة" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:136 msgid "Device selection" -msgstr "إختيار الأجهزة" +msgstr "اختيار الأجهزة" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:237 #, python-format msgid "%s\n" -msgstr "" +msgstr "%s\n" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 msgid "This process can take some time." msgstr "يمكن أن تستغرق هذه العملية بعض الوقت." #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +msgid "You can select the channels you want to have in your list of channels." msgstr "يمكنك تحديد القنوات التي تريد أن تكون في قائمة القنوات الخاصة بك." #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 @@ -649,25 +642,25 @@ msgid "Deselect all" msgstr "ألغ أختيار الكل" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:83 msgid "_Channels:" -msgstr "_قنوات:" +msgstr "ال_قنوات:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:118 msgid "Select _scrambled channels" msgstr "حدد قنوات المجمعة" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:134 msgid "Signal quality:" msgstr "جودة الإشارة:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:145 msgid "Signal strength:" msgstr "قوة الإشارة:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:160 msgid "Scanning for channels" -msgstr "جاري البحث عن قنوات" +msgstr "يبحث عن القنوات" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" @@ -675,7 +668,7 @@ #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" -msgstr "إختيار الدولة و الهوائي" +msgstr "اختيار الدولة و الهوائي" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 msgid "Satellite selection" @@ -683,7 +676,7 @@ #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" -msgstr "إختيار الدولة وموفر الخدمة" +msgstr "اختيار الدولة وموفر الخدمة" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" @@ -693,7 +686,7 @@ #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "نأسف, لكن بطاقات '%s' غير مدعومة." +msgstr "نأسف، لكن بطاقات '%s' غير مدعومة." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." @@ -706,226 +699,232 @@ #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." -msgstr "فضلا إختر الدولة والهوائي القريب من موقعك" +msgstr "فضلا اختر الدولة والهوائي القريب من موقعك." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 msgid "" "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." -msgstr "إن لم تعلم ما نوع الهوائي إختر \"لا أعلم\" من قائمة موفري الخدمة" +msgstr "إن لم تعلم ما نوع الهوائي اختر \"لا أعلم\" من قائمة موفري الخدمة." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." -msgstr "مع ذلك ، سوف تستغرق عملية البحث عن القنوات وقتا أطول على هذا النحو." +msgid "However, searching for channels will take considerably longer this way." +msgstr "سوف تستغرق عملية البحث عن القنوات وقتا أطول على هذا النحو." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "ليست مدرجة" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:153 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:224 msgid "_Country:" msgstr "_الدولة:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:177 msgid "_Antenna:" msgstr "_الهوائي:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:186 msgid "Antenna" -msgstr "هوائي" +msgstr "الهوائي" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:198 msgid "_Satellite:" msgstr "_القمر الصناعي:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:206 msgid "Satellite" -msgstr "قمر صناعي" +msgstr "القمر صناعي" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:246 msgid "_Providers:" -msgstr "_مقدمي الخدمات:" +msgstr "_موفري الخدمات:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:254 msgid "Provider" -msgstr "مقدمة الخدمة" +msgstr "موفر الخدمة" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:303 msgid "Don't know" msgstr "لا أعلم" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." msgstr "مرحبا بك في مساعد التلفاز الرقمي." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." -msgstr "سيتم ضبط الأجهزة والبحث عن القنوات آليا, إن كان ذلك ضروريا." +msgstr "سيُعِدّ الأجهزة ويبحث عن القنوات آليا إن دعت الحاجة." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." -msgstr "انقر \"الى الامام\" للبدء." +msgstr "انقر \"إلى الأمام\" للبدء." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" -msgstr "_الوضعية المتقدمة" +msgstr "الو_ضعي المتقدم" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" msgstr "إعداد التلفاز الرقمي" #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 msgid "Choose a location where you want to save the list of channels." -msgstr "إختر مكان حفظ قائمة القنوات." +msgstr "اختر مكان حفظ قائمة القنوات." #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" -msgstr "حفظ القنوات" +msgstr "احفظ القنوات" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" msgstr "إعداد الجهاز" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" msgstr "التلفاز" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." -msgstr "لم يتم العثور على قنوات." +msgstr "لم يُعثر على أي قنوات." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "" "Make sure that the antenna is connected and you have selected the correct " "tuning data." -msgstr "تأكد من توصيل الهوائي، وقمت بتحديد البيانات الضبط الصحيحة." +msgstr "تأكد من توصيل الهوائي واختيارك لبيانات الضبط الصحيحة." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." -msgstr "تم إضافة الجهاز الى المجموعة %s." +msgstr "أضيف الجهاز إلى المجموعة %s." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." -msgstr "حدث خطأ ما أثناء تثبيت الجهاز." +msgstr "حدث خطأ ما أثناء ضبط الجهاز." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" -msgstr "إعداد جهاز آخر" +msgstr "اضبط جهازا آخر" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" -msgstr "إنتهى الإعداد" +msgstr "انتهى الإعداد" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." msgstr "تم إعداد الجهاز %s بنجاح." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." -msgstr "فشل في تكوين الجهاز %s ." +msgstr "فشل ضبط الجهاز %s." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:45 msgid "Cleaning up. This may take a while." -msgstr "يتم الآن عملية التنظيف، قد يستغرق ذلك بعض وقت." +msgstr "يُنظّف، قد يستغرق ذلك بعض وقت." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:83 #: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "إعداد التلفاز الرقمي" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:168 msgid "" "The generated channels file can be used to configure your devices in the " "control center." -msgstr "ملف القنوات المعد يمكن إستخدامه لإعداد الأجهزة في لوحة التحكم." +msgstr "ملف القنوات المعد يمكن استخدامه لإعداد الأجهزة في لوحة التحكم." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:215 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" "هل أنت متأكد من رغبتك بالخروج؟\n" -"سيتم إلغاء كل العمليات." +"ستُلغى كل العمليات." #: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:196 +#: ../client/totem-plugin/dvb-daemon.py:341 msgid "Program Guide" -msgstr "دليل البرنامج" +msgstr "دليل البرامج" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Digital TV" msgstr "التلفاز الرقمي" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Watch TV" msgstr "شاهد التلفاز" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "Digital _TV" -msgstr "التلفاز الرقمي" +msgstr "ال_تلفاز الرقمي" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Program Guide" msgstr "_دليل البرامج" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "_Delete" -msgstr "_حذف" +msgstr "ا_حذف" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "D_etails" -msgstr "تفاصيل" +msgstr "الت_فاصيل" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Order channels" msgstr "_رتب القنوات" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "By _name" -msgstr "بالإسم" +msgstr "بالا_سم" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "By _group" -msgstr "بالمجموعة" +msgstr "بال_مجموعة" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:367 msgid "_Reverse order" -msgstr "_اقلب الترتيب" +msgstr "ا_عكس الترتيب" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:519 msgid "Delete selected recording?" msgstr "هل تريد حذف التسجيلات؟" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:597 #, python-format msgid "Recording %d" -msgstr "تسجيل %d" +msgstr "يُسجّل %d" + +#: ../client/totem-plugin/dvb-daemon.py:657 +msgid "Setup Failed" +msgstr "فشل الضبط" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:658 msgid "GNOME DVB Daemon is not installed" -msgstr "GNOME DVB Daemon غير مثبت" +msgstr "عفريت DVB جنوم غير مثبت" #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 msgid "Digital TV Control Center" -msgstr "مركز التحكم في التلفزيون الرقمي" +msgstr "مركز التحكم في التلفاز الرقمي" #: ../data/gnome-dvb-control.desktop.in.in.h:2 msgid "Schedule recordings and browse program guide" -msgstr "جدولة التسجيلات واستعرض دليل البرنامج" +msgstr "جدول التسجيلات واستعرض دليل البرامج" #: ../data/gnome-dvb-setup.desktop.in.in.h:1 msgid "Digital TV Setup" -msgstr "إعداد التلفزيون الرقمي" +msgstr "إعداد التلفاز الرقمي" + +#~ msgid "Details" +#~ msgstr "التفاصيل" #~ msgid "Select scrambled channels" #~ msgstr "إختر قنوات مشفرة" @@ -934,7 +933,8 @@ #~ "Choose the channels you want to have in your list of channels. You can " #~ "reorder the channels, too." #~ msgstr "" -#~ "إختر القنوات التي ترغب بإضافتها إلى القائمة.يمكنك أيضا إعادة ترتيب القنوات." +#~ "إختر القنوات التي ترغب بإضافتها إلى القائمة.يمكنك أيضا إعادة ترتيب " +#~ "القنوات." #~ msgid "Providers:" #~ msgstr "موفري الخدمة:" diff -Nru gnome-dvb-daemon-0.1.23/po/cs.po gnome-dvb-daemon-0.2.7/po/cs.po --- gnome-dvb-daemon-0.1.23/po/cs.po 2011-01-15 16:56:19.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/cs.po 2011-04-25 18:01:27.000000000 +0000 @@ -1,32 +1,32 @@ # Czech translation for gnome-dvb-daemon # Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 # This file is distributed under the same license as the gnome-dvb-daemon package. -# FIRST AUTHOR , 2010. +# Marek Černocký , 2011. # msgid "" msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-12-09 09:47+0000\n" -"Last-Translator: David Štancl \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-" +"daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-04-23 12:06+0000\n" +"PO-Revision-Date: 2011-04-24 11:55+0200\n" +"Last-Translator: Marek Černocký \n" "Language-Team: cs \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: cs\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" -msgstr "GNOME DVB Daemon" +msgstr "Démon GNOME DVB" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" -msgstr "Web GNOME DVB Daemon" +msgstr "Webové stránky démona GNOME DVB" -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" @@ -34,7 +34,7 @@ msgstr[1] "%d hodiny" msgstr[2] "%d hodin" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" @@ -42,7 +42,7 @@ msgstr[1] "%d minuty" msgstr[2] "%d minut" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -52,39 +52,39 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 msgid "Edit Channel Lists" -msgstr "Upravit seznamy kanálů" +msgstr "Úprava seznamu kanálů" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" msgstr "Skupiny kanálů" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_Skupina:" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" msgstr "Skupiny zařízení" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" msgstr "Všechny kanály" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 msgid "Channel" msgstr "Kanál" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" -msgstr "Vybrat skupinu kanálů" +msgstr "Vyberte skupinu kanálů" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" msgstr "Kanály skupiny" @@ -95,191 +95,187 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "Jste si jisti, že chcete odstranit skupinu '%s'?" +msgstr "Opravdu chcete odstranit skupinu „%s“?" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." -msgstr "Všechna přiřazení do této skupiny budou ztracena" +msgstr "Všechna přiřazení do této skupiny budou ztracena." #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 msgid "An error occured while removing the group" msgstr "Nastala chyba při odstraňování skupiny" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" msgstr "Ovládací centrum DVB" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" -msgstr "" -"Pro zobrazení průvodce programem vyberte v levé části skupinu zařízení a " -"kanál" - #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." -msgstr "" -"Žádná zařízení nejsou nastavena. Prosím jděte do Nastavení a nakonfigurujte " -"je." +msgid "Choose a device group and channel on the left to view the program guide" +msgstr "Pro zobrazení programu vyberte vlevo skupinu zařízení a kanál" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "" +"Nejsou nastavena žádná zařízení. Přejděte prosím do předvoleb a nastavte je." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 msgid "There is currently no schedule available for this channel" -msgstr "Pro tento kanál program není k dispozici" +msgstr "Pro tento kanál není nic naplánováno" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "_Recording schedule" msgstr "Plán nah_rávání" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" msgstr "_Upravit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" msgstr "_Zobrazit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" -msgstr "_Nápověda" +msgstr "Nápověda" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_Správa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" msgstr "Správa plánu nahrávání" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" msgstr "_Nahrávky" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" msgstr "Správa nahrávek" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" msgstr "U_končit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" msgstr "Ukončit aplikaci" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" msgstr "_Seznamy kanálů" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" msgstr "Upravit seznamy kanálů" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" -msgstr "_Nastavení" +msgstr "_Předvolby" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" msgstr "Zobrazit předvolby" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" msgstr "_Právě se vysílá" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" msgstr "Zjistěte co se právě vysílá a co je na programu dále" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" -msgstr "_Obnovit" +msgstr "_Občerstvit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" -msgstr "Obnovit průvodce programem" +msgstr "Občerstvit program vysílání" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" msgstr "_Předchozí den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" -msgstr "Jít na předchozí den" +msgstr "Přejít na předchozí den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" msgstr "_Následující den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" -msgstr "Jít na následující den" +msgstr "Přejít na následující den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" msgstr "_Kanály" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" -msgstr "Zobrazit/Skrýt kanály" +msgstr "Zobrazit/skrýt kanály" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" -msgstr "_Nástrojová lišta" +msgstr "Liš_ta nástrojů" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" -msgstr "Zobrazit/Skrýt nástrojovou lištu" +msgstr "Zobrazit/skrýt lištu nástrojů" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" msgstr "O _aplikaci" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" msgstr "Zobrazit informace o aplikaci" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Plán nahrávání" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 msgid "Recordings" msgstr "Nahrávky" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 msgid "What's on now" msgstr "Právě se vysílá" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" msgstr "Předchozí den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" msgstr "Následující den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 msgid "Schedule recording for the selected event?" -msgstr "Nastavit nahrávání vybraného pořadu do rozvrhu?" +msgstr "Naplánovat nahrávání vybraného pořadu?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" +"Marek Černocký \n" +"\n" "Launchpad Contributions:\n" " David Štancl https://launchpad.net/~david-stancl\n" " David Štancl https://launchpad.net/~dstancl-dstancl\n" @@ -288,23 +284,23 @@ " Ondra 'Kepi' Kudlík https://launchpad.net/~kepi-orthank\n" " Sebastian Pölsterl https://launchpad.net/~sebp" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" msgstr "Zařízení" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 #, python-format msgid "Adapter: %d, Frontend: %d" msgstr "Adaptér: %d, Frontend: %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" msgstr "Skupina %d" @@ -313,155 +309,155 @@ msgid "Add to Group" msgstr "Přidat do skupiny" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" msgstr "Přidat zařízení do skupiny" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" msgstr "Vytvořit novou skupinu" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" msgstr "Obecné" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" msgstr "_Název:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" msgstr "_Soubor s kanály:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" -msgstr "_Adresář:" +msgstr "S_ložka:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" -msgstr "Vybrat soubor" +msgstr "Výběr souboru" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" -msgstr "Vybrat adresář" +msgstr "Výběr složky" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" -msgstr "Upravit skupinu" +msgstr "Úprava skupiny" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "Digital TV Preferences" msgstr "Předvolby Digitální TV" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" msgstr "Upravit vybranou skupinu" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" -msgstr "Odstranit vybrané zařízení" +msgstr "Odebrat vybrané zařízení" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" msgstr "Nastavit" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" msgstr "Nastavit zařízení" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" msgstr "Vytvořit novou skupinu" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" msgstr "Vytvořit novou skupinu pro vybrané zařízení" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" msgstr "Přidat do skupiny" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" msgstr "Přidat vybrané zařízení do existující skupiny" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" msgstr "Nastavená zařízení" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" msgstr "Nenastavená zařízení" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" msgstr "Zařízení nemohlo být odebráno ze skupiny" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" -msgstr "Jste si jisti, že chcete odebrat zařízení %s z %s" +msgstr "Opravdu chcete odebrat zařízení %s ze skupiny %s" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" msgstr "Nelze vytvořit skupinu" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" -"Ujistěte se že jste vybrali správný soubor s kanály a adresář, kde jsou " -"ukládány nahrávky a zkontrolujte, že mají práva na čtení." +"Ujistěte se, že jste vybrali správný soubor s kanály a složku, kde jsou " +"ukládány nahrávky a zkontrolujte, že k obojímu máte práva ke čtení." -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" msgstr "Zařízení nemohlo být přidáno do skupiny" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 msgid "" "Make sure that the device isn't already assigned to a different group and " "that all devices in the group are of the same type." msgstr "" "Ujistěte se, že zařízení již není přiděleno do jiné skupiny, a že jsou " -"všechna zařízení ve skupině mají stejný typ." +"všechna zařízení ve skupině stejného typu." -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 msgid "Delete selected recordings?" msgstr "Odstranit vybrané nahrávky?" #: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 msgid "Pick a date" -msgstr "Vyberte datum" +msgstr "Výběr data" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 msgid "Title" msgstr "Název" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 msgid "Start time" msgstr "Čas začátku" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" msgstr "Délka" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 msgid "Timer could not be deleted" msgstr "Časovač nemohl být smazán" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "Abort active recording?" msgstr "Zrušit probíhající nahrávání?" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 msgid "The timer you selected belongs to a currently active recording." msgstr "Časovač, který byl vybrán, náleží k právě probíhajícímu nahrávání." -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 msgid "Deleting this timer will abort the recording." msgstr "Odstraněním tohoto časovače zruší nahrávání." @@ -478,34 +474,34 @@ #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "Nahrávání bylo úspěšně nastaveno" +msgstr "Nahrávání bylo úspěšně naplánováno" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 msgid "Add Timer" msgstr "Přidat časovač" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 msgid "_Channel:" -msgstr "_Kanál" +msgstr "_Kanál:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 msgid "Edit Timer" -msgstr "Upravit časovač" +msgstr "Úprava časovače" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 msgid "Channel:" msgstr "Kanál" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 msgid "_Start time:" msgstr "_Čas začátku" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 msgid "_Duration:" msgstr "_Délka:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 msgid "minutes" msgstr "minut" @@ -527,27 +523,23 @@ #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "_Čas" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "Podrobnosti" +msgstr "_Čas:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 msgid "Title:" -msgstr "Název" +msgstr "Název:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 msgid "Date:" -msgstr "Datum" +msgstr "Datum:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 msgid "Duration:" msgstr "Délka:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 msgid "Description:" -msgstr "Popis" +msgstr "Popis:" #: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 msgid "Start" @@ -557,17 +549,17 @@ msgid "Length" msgstr "Délka" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" msgstr "Nyní" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" msgstr "Další" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." -msgstr "Žádná zařízení nebyla nalezena" +msgstr "Žádná zařízení nebyla nalezena." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 msgid "" @@ -575,9 +567,9 @@ "make sure you close all programs such as video players that access your DVB " "card." msgstr "" -"Buď nejsou nainstalovány žádné DVB karty, nebo jsou všechny zaměstnány. Ve " -"druhém případě zavřete všechny programy, jako video přehrávače, které mají " -"přístup k vaší DVB kartě." +"Buď nejsou nainstalovány žádné karty DVB nebo jsou všechny zaneprázdněny. Ve " +"druhém případě zavřete všechny programy, jako videopřehrávače, které mají " +"přístup k vaší kartě DVB." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" @@ -612,7 +604,7 @@ "Make sure other applications don't access DVB devices and you have " "permissions to access them." msgstr "" -"Ujistěte se, že jiné aplikace nepřistupují k DVB zařízením a vy k nim máte " +"Ujistěte se, že jiné aplikace nepřistupují k zařízením DVB a vy k nim máte " "povolen přístup." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 @@ -632,154 +624,151 @@ msgid "%s\n" msgstr "%s\n" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 msgid "This process can take some time." msgstr "Tato operace může zabrat nějaký čas." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." msgstr "Můžete vybrat ty kanály, které budete chtít ve svém seznamu kanálů." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 msgid "Select all" msgstr "Vybrat vše" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 msgid "Deselect all" msgstr "Zrušit výběr" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 msgid "_Channels:" msgstr "_Kanály:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 msgid "Select _scrambled channels" msgstr "Vybrat i _zakódované kanály" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 msgid "Signal quality:" msgstr "Kvalita signálu:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 msgid "Signal strength:" msgstr "Síla signálu:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 msgid "Scanning for channels" msgstr "Hledání kanálů" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:86 msgid "Missing requirements" msgstr "Chybějící požadavky" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:92 msgid "Country and antenna selection" -msgstr "Výběr země a vysílače (antény)" +msgstr "Výběr země a vysílače" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:95 msgid "Satellite selection" msgstr "Výběr satelitu" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 msgid "Country and provider selection" msgstr "Výběr země a poskytovatele" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:100 msgid "Unsupported adapter" msgstr "Nepodporovaný adaptér" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:125 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "Promiňte, ale '%s' karty nejsou podporovány." +msgstr "Litujeme, ale karty „%s“ nejsou podporovány." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:129 msgid "Could not find initial tuning data." -msgstr "Nelze nalézt výchozí údaje pro lazení." +msgstr "Nelze najít výchozí údaje pro ladění." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Please make sure that the dvb-apps package is installed." -msgstr "Ujistěte se prosím, že balíček dvb-apps je nainstalován." +msgstr "Ujistěte se prosím, že je balíček dvb-apps nainstalován." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 msgid "" "Please choose a country and the antenna that is closest to your location." -msgstr "Prosím vyberte zemi a vysílač nejbližší k místu, kde se nacházíte." +msgstr "Vyberte prosím zemi a vysílač nejbližší k místu, kde se nacházíte." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." msgstr "" -"Pokud nevíte, který vysílač zvolit, vyberte \"Není na seznamu\" ze seznamu " -"poskytovatelů." +"Pokud nevíte, který vysílač zvolit, vyberte ze seznamu poskytovatelů „Nevím“." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "However, searching for channels will take considerably longer this way." msgstr "Hledání kanálu však bude trvat mnohem déle." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:141 msgid "Not listed" msgstr "Není na seznamu" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:152 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:223 msgid "_Country:" msgstr "_Země:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:176 msgid "_Antenna:" -msgstr "Vysíl_ač" +msgstr "Vysíl_ač:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:185 msgid "Antenna" msgstr "Vysílač" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:197 msgid "_Satellite:" -msgstr "_Satelit" +msgstr "_Satelit:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:205 msgid "Satellite" msgstr "Satelit" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:245 msgid "_Providers:" msgstr "_Poskytovatelé:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:253 msgid "Provider" msgstr "Poskytovatel" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:302 msgid "Don't know" msgstr "Nevím" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." -msgstr "Vítejte v pomocníku nastavení digitální televize." +msgstr "Vítejte v průvodci nastavení digitální televize." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" "Pokud to bude nutné, pomůže vám automaticky nastavit zařízení a najít kanály." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." -msgstr "Začněte tlačítkem \"Vpřed\"" +msgstr "Začněte kliknutím na tlačítko „Vpřed“" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" -msgstr "Mód pro _odborníky" +msgstr "R_ežim pro odborníky" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" -msgstr "Nastavení Digitální TV" +msgstr "Nastavení digitální TV" #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 msgid "Choose a location where you want to save the list of channels." @@ -789,20 +778,20 @@ msgid "Save channels" msgstr "Uložit kanály" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" msgstr "Nastavení zařízení" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" msgstr "TV" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." -msgstr "Žádné kanály nebyly nalezeny" +msgstr "Žádné kanály nebyly nalezeny." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "" "Make sure that the antenna is connected and you have selected the correct " "tuning data." @@ -810,29 +799,29 @@ "Ujistěte se, že je anténa připojena a že jsou vybrány správné údaje pro " "ladění." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." msgstr "Zařízení bylo přidáno do skupiny %s." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." msgstr "Nastala chyba při pokusu o nastavení zařízení." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" msgstr "Nastavit další zařízení" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" msgstr "Nastavení dokončeno" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." -msgstr "Zařízení %s bylo nastaveno úspěšně." +msgstr "Zařízení %s bylo úspěšně nastaveno." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." msgstr "Selhalo nastavování zařízení %s." @@ -844,9 +833,9 @@ #: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 #: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" -msgstr "Nastavit digitální TV" +msgstr "Nastavení digitální TV" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -854,72 +843,82 @@ "Vytvořený soubor s kanály může být použit pro nastavení zařízení v ovládacím " "centru." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -"Jste si jisti, že chcete operaci zrušit?\n" +"Opravdu chcete operaci zrušit?\n" "Celý dosavadní průběh bude ztracen." -#: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 msgid "Program Guide" msgstr "Programový průvodce" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:306 msgid "Digital TV" msgstr "Digitální TV" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Watch TV" msgstr "Sledovat TV" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "Digital _TV" msgstr "Digitální _TV" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Program Guide" -msgstr "_Programový průvodce" +msgstr "_Program pořadů" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "_Delete" msgstr "_Smazat" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "D_etails" msgstr "Po_drobnosti" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:365 msgid "_Order channels" msgstr "_Seřadit kanály" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:368 msgid "By _name" msgstr "Podle _názvu" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:369 msgid "By _group" msgstr "Podle _skupiny" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:372 msgid "_Reverse order" msgstr "_Obrácené pořadí" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:524 msgid "Delete selected recording?" -msgstr "Odstranit vybrané nahrávání?" +msgstr "Odstranit vybranou nahrávku?" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:602 #, python-format msgid "Recording %d" -msgstr "Nahrávání %d" +msgstr "Nahrávka %d" + +#: ../client/totem-plugin/dvb-daemon.py:662 +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "Setup Failed" +msgstr "Nastavení selhalo" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:663 msgid "GNOME DVB Daemon is not installed" -msgstr "GNOME DVB Daemon není nainstalován" +msgstr "Démon GNOME DVB není nainstalován" + +#: ../client/totem-plugin/dvb-daemon.py:666 +#| msgid "GNOME DVB Daemon Website" +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Nelze spustit nastavení démona GNOME DVB" #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 @@ -928,36 +927,8 @@ #: ../data/gnome-dvb-control.desktop.in.in.h:2 msgid "Schedule recordings and browse program guide" -msgstr "Plánování nahrávání a prohlížení programového průvodce" +msgstr "Plánování nahrávání a prohlížení programu pořadů" #: ../data/gnome-dvb-setup.desktop.in.in.h:1 msgid "Digital TV Setup" msgstr "Nastavení digitální TV" - -#~ msgid "Country:" -#~ msgstr "Země" - -#~ msgid "Antenna:" -#~ msgstr "Vysílač" - -#~ msgid "Expert mode" -#~ msgstr "Režim pro znalce" - -#~ msgid "Providers:" -#~ msgstr "Poskytovatel" - -#~ msgid "Satellite:" -#~ msgstr "Satelit" - -#~ msgid "Totem Movie Player" -#~ msgstr "Přehrávač filmů Totem" - -#~ msgid "Select scrambled channels" -#~ msgstr "Vyberte smíchané kanály" - -#~ msgid "" -#~ "Choose the channels you want to have in your list of channels. You can " -#~ "reorder the channels, too." -#~ msgstr "" -#~ "Vyberte kanály, které chcete mít ve svém seznamu kanálů. Také můžete měnit " -#~ "jejich pořadí." diff -Nru gnome-dvb-daemon-0.1.23/po/da.po gnome-dvb-daemon-0.2.7/po/da.po --- gnome-dvb-daemon-0.1.23/po/da.po 2011-01-15 16:56:23.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/da.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,16 +7,16 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-12-23 01:12+0000\n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" +"PO-Revision-Date: 2011-03-20 23:59+0000\n" "Last-Translator: Ask Hjorth Larsen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" @@ -434,7 +434,7 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 msgid "Start time" -msgstr "" +msgstr "Starttidspunkt" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 #: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 @@ -622,7 +622,7 @@ #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 #, python-format msgid "%s\n" -msgstr "" +msgstr "%s\n" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 msgid "This process can take some time." @@ -643,19 +643,19 @@ #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 msgid "_Channels:" -msgstr "" +msgstr "_Kanaler:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 msgid "Select _scrambled channels" -msgstr "" +msgstr "Vælg _kodede kanaler" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 msgid "Signal quality:" -msgstr "" +msgstr "Signalkvalitet:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 msgid "Signal strength:" -msgstr "" +msgstr "Signalstyrke:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" diff -Nru gnome-dvb-daemon-0.1.23/po/de.po gnome-dvb-daemon-0.2.7/po/de.po --- gnome-dvb-daemon-0.1.23/po/de.po 2011-01-15 16:56:20.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/de.po 2011-04-25 18:01:27.000000000 +0000 @@ -1,46 +1,47 @@ # German translation for gnome-dvb-daemon # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the gnome-dvb-daemon package. -# FIRST AUTHOR , 2009. +# Mario Blättermann , 2009, 2011. # msgid "" msgstr "" -"Project-Id-Version: gnome-dvb-daemon\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-08-23 16:06+0000\n" -"Last-Translator: Jan-Christoph Borchardt \n" -"Language-Team: German \n" +"Project-Id-Version: gnome-dvb-daemon master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-" +"daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-04-23 12:06+0000\n" +"PO-Revision-Date: 2011-04-23 17:14+0100\n" +"Last-Translator: Mario Blättermann \n" +"Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" -msgstr "GNOME DVB Daemon" +msgstr "GNOME DVB-Daemon" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" -msgstr "GNOME DVB Daemon Website" +msgstr "GNOME DVB-Daemon-Website" -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d Stunde" msgstr[1] "%d Stunden" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d Minute" msgstr[1] "%d Minuten" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -51,37 +52,37 @@ msgid "Edit Channel Lists" msgstr "Kanalliste bearbeiten" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" -msgstr "Kannalgruppe" +msgstr "Kanalgruppe" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_Gruppe:" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" -msgstr "Gerätegruppe" +msgstr "Gerätegruppen" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" msgstr "Alle Känale" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 msgid "Channel" msgstr "Kanal" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" -msgstr "Wähle eine Kannalgruppe" +msgstr "Eine Kanalgruppe wählen" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" msgstr "Kanäle der Gruppe" @@ -92,7 +93,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "Sind Sie sicher das Sie die Gruppe '%s' löschen wollen?" +msgstr "Sind Sie sicher, dass Sie die Gruppe »%s« löschen wollen?" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." @@ -102,208 +103,207 @@ msgid "An error occured while removing the group" msgstr "Es trat ein Fehler beim Entfernen der Gruppe auf." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" -msgstr "DVB Kontrollzentrum" +msgstr "DVB-Kontrollzentrum" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" msgstr "" "Wählen Sie links eine Gerätegruppe und einen Kanal, um den Programmführer zu " "sehen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." msgstr "" -"Es wurden noch keine Geräte konfiguriert. Bitte konfigurieren Sie diese in " -"den Einstellungen." +"Es wurden noch keine Geräte eingerichtet. Bitte richten Sie diese in den " +"Einstellungen ein." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 msgid "There is currently no schedule available for this channel" msgstr "Momentan ist kein Programm für diesen Kanal verfügbar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "_Recording schedule" msgstr "Geplante Au_fzeichnungen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" -msgstr "B_earbeiten" +msgstr "_Bearbeiten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" msgstr "_Ansicht" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" msgstr "Hilfe" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_Verwalten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" msgstr "Geplante Aufzeichnungen verwalten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" -msgstr "A_ufzeichnungen" +msgstr "_Aufzeichnungen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" msgstr "Aufzeichnungen verwalten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" -msgstr "Beenden" +msgstr "_Beenden" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" msgstr "Programm beenden" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" -msgstr "_Kanalliste" +msgstr "_Kanallisten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" -msgstr "Kannaliste bearbeiten" +msgstr "Kanallisten bearbeiten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" -msgstr "Einstellungen" +msgstr "_Eigenschaften" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" msgstr "Einstellungen anzeigen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" msgstr "_Was läuft gerade" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" msgstr "Was läuft jetzt und demnächst." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" msgstr "_Aktualisieren" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" msgstr "Programmführer aktualisieren" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" -msgstr "_Letzter Tag" +msgstr "_Vorheriger Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" msgstr "Zu vorherigem Tag wechseln" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" msgstr "_Nächster Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" msgstr "Zu nächstem Tag wechseln" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" msgstr "_Kanäle" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" -msgstr "Sender anzeigen/verstecken" +msgstr "Sender anzeigen/verbergen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" msgstr "_Werkzeugleiste" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" -msgstr "Werkzeugleiste anzeigen/verstecken" +msgstr "Werkzeugleiste anzeigen/verbergen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" -msgstr "_Über" +msgstr "_Info" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" msgstr "Information über das Programm anzeigen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Geplante Aufzeichnungen" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 msgid "Recordings" msgstr "Aufnahmen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 msgid "What's on now" msgstr "Was läuft gerade" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" msgstr "Vorheriger Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" msgstr "Nächster Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 msgid "Schedule recording for the selected event?" msgstr "Aufnahme für die ausgewählte Veranstaltung planen?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " Florian Steinel https://launchpad.net/~florian-steinel\n" " Jan-Christoph Borchardt https://launchpad.net/~jancborchardt\n" +" Mario Blättermann https://launchpad.net/~mario.blaettermann\n" " Mario Rometsch https://launchpad.net/~roman-rometsch\n" +" Maximilian Schaar https://launchpad.net/~u-admin-maxi-schaar-com\n" " Nils Naumann https://launchpad.net/~nau\n" " Sebastian Pölsterl https://launchpad.net/~sebp\n" " SpaceCafé https://launchpad.net/~spacecafe\n" " Tim Fuchs https://launchpad.net/~tim-fuchs\n" " staedtler-przyborski https://launchpad.net/~staedtler-przyborski" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" msgstr "Geräte" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 #, python-format msgid "Adapter: %d, Frontend: %d" msgstr "Adapter: %d, Frontend: %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" msgstr "Gruppe %d" @@ -312,122 +312,122 @@ msgid "Add to Group" msgstr "Zu Gruppe hinzufügen" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" msgstr "Das Gerät zur Gruppe hinzufügen" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" msgstr "Neue Gruppe erstellen" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" msgstr "Allgemein" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" msgstr "_Name:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" -msgstr "Kanallisten _Datei" +msgstr "Kanallisten-_Datei" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" -msgstr "_Verzeichnis:" +msgstr "_Ordner:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" msgstr "Datei auswählen" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" -msgstr "Verzeichnis auswählen" +msgstr "Ordner auswählen" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" msgstr "Gruppe bearbeiten" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "Digital TV Preferences" -msgstr "Einstellungen für Digital TV" +msgstr "Einstellungen für Digitales Fernsehen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" msgstr "Ausgewählte Gruppe bearbeiten" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" msgstr "Ausgewähltes Gerät entfernen?" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" -msgstr "Einstellungen" +msgstr "Einrichtung" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" msgstr "Geräte einrichten" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" msgstr "Neue Gruppe hinzufügen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" msgstr "Neue Gruppe für das ausgewählte Gerät hinzufügen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" msgstr "Zur Gruppe hinzufügen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" msgstr "Ausgewählte Geräte zur Gruppe hinzufügen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" msgstr "Konfigurierte Geräte" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" msgstr "Noch nicht konfigurierte Geräte" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" msgstr "Das Gerät konnte nicht aus der Gruppe entfernt werden" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" msgstr "" "Sind Sie sicher, dass Sie das Gerät %s aus %s entfernen wollen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" msgstr "Die Gruppe konnte nicht angelegt werden" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" -"Vergewissern Sie sich, dass Sie die korrekte Kanalliste und das " -"Aufnahmeverzeichnis ausgewählt haben und das beide lesbar sind" +"Vergewissern Sie sich, dass Sie die korrekte Kanalliste und den " +"Aufnahmeordner ausgewählt haben, und dass beide lesbar sind" -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" msgstr "Das Gerät konnte nicht zur Gruppe hinzugefügt werden" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 msgid "" "Make sure that the device isn't already assigned to a different group and " "that all devices in the group are of the same type." msgstr "" "Vergewissern Sie sich, dass das Gerät noch nicht einer anderen Gruppe " -"zugeordnet ist und das alle Geräte der Gruppe vom selben Typ sind" +"zugeordnet ist und dass alle Geräte der Gruppe vom selben Typ sind" -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 msgid "Delete selected recordings?" msgstr "Ausgewählte Aufzeichnungen löschen?" @@ -435,35 +435,35 @@ msgid "Pick a date" msgstr "Datum wählen" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 msgid "Title" msgstr "Titel" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 msgid "Start time" msgstr "Startzeit" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" msgstr "Dauer" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 msgid "Timer could not be deleted" msgstr "Der Timer konnte nicht gelöscht werden." -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "Abort active recording?" msgstr "Aktive Aufnahme abbrechen?" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 msgid "The timer you selected belongs to a currently active recording." -msgstr "Der ausgewählte Timer gehört zu einer aktiven Aufnahme" +msgstr "Der ausgewählte Timer gehört zu einer aktiven Aufnahme." -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 msgid "Deleting this timer will abort the recording." -msgstr "Das Löschen dieses Timers wird die Aufnahme abbrechen" +msgstr "Das Löschen dieses Timers wird die Aufnahme abbrechen." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 msgid "Timer could not be created" @@ -475,38 +475,38 @@ "in the past." msgstr "" "Vergewissern Sie sich, dass der Timer nicht mit einem anderen kollidiert und " -"nicht in der Vergangenheit startet" +"nicht in der Vergangenheit startet." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" msgstr "Aufnahme erfolgreich in Planung aufgenommen" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 msgid "Add Timer" msgstr "Timer hinzufügen" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 msgid "_Channel:" msgstr "_Kanal:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 msgid "Edit Timer" msgstr "Timer bearbeiten" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 msgid "Channel:" msgstr "Kanal:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 msgid "_Start time:" msgstr "_Anfangszeit:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 msgid "_Duration:" msgstr "_Dauer:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 msgid "minutes" msgstr "Minuten" @@ -530,23 +530,19 @@ msgid "_Time:" msgstr "_Zeit:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "Details" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 msgid "Title:" msgstr "Titel:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 msgid "Date:" msgstr "Datum:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 msgid "Duration:" msgstr "Länge:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 msgid "Description:" msgstr "Beschreibung:" @@ -558,11 +554,11 @@ msgid "Length" msgstr "Laufzeit" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" msgstr "Jetzt" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" msgstr "Nächster" @@ -577,8 +573,8 @@ "card." msgstr "" "Entweder wurde keine DVB Karte gefunden oder sie sind alle belegt. Bitte " -"schließen Sie im letzteren Fall alle Programme wie z.B. Video-Player, die " -"auf Ihre DVB Karte zugreifen." +"schließen Sie im letzteren Fall alle Programme wie z.B. Video-Player, die auf " +"Ihre DVB-Karte zugreifen." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" @@ -613,7 +609,7 @@ "Make sure other applications don't access DVB devices and you have " "permissions to access them." msgstr "" -"Vergewissern Sie sich, dass keine andere Anwendung die DVB Karte belegt und " +"Vergewissern Sie sich, dass keine andere Anwendung die DVB-Karte belegt und " "dass Sie auf die Karte zugreifen können." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 @@ -631,144 +627,141 @@ #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 #, python-format msgid "%s\n" -msgstr "" +msgstr "%s\n" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 msgid "This process can take some time." msgstr "Dieser Vorgang kann etwas Zeit benötigen" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." msgstr "" -"Sie können die Känale welche in ihrer Kanalliste sein sollen auswählen" +"Sie können die Kanäle auswählen, welche in ihrer Kanalliste erscheinen sollen." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 msgid "Select all" msgstr "Alle auswählen" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 msgid "Deselect all" msgstr "Auswahl aufheben" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 msgid "_Channels:" msgstr "_Kanäle:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 msgid "Select _scrambled channels" msgstr "_Verschlüsselte Kanäle auswählen" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 msgid "Signal quality:" msgstr "Signalqualität:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 msgid "Signal strength:" msgstr "Signalstärke:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 msgid "Scanning for channels" msgstr "Es wird nach Kanälen gesucht" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:86 msgid "Missing requirements" msgstr "Fehlende Voraussetzungen" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:92 msgid "Country and antenna selection" msgstr "Länder- und Antennenauswahl" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:95 msgid "Satellite selection" msgstr "Auswahl des Satelliten" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 msgid "Country and provider selection" msgstr "Auswahl des Landes und des Versorgers" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:100 msgid "Unsupported adapter" -msgstr "Nichtunterstützter Adapter" +msgstr "Nicht unterstützter Adapter" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:125 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "Leider werden '%s' Karten nicht unterstützt." +msgstr "Leider werden »%s«-Karten nicht unterstützt." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:129 msgid "Could not find initial tuning data." msgstr "Es konnten keine Anfangs-Empfangseinstellungen gefunden werden." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Please make sure that the dvb-apps package is installed." -msgstr "" -"Bitte vergewissern Sie sich, dass das dvb-apps Paket installiert ist." +msgstr "Bitte vergewissern Sie sich, dass das Paket dvb-apps installiert ist." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "" "Bitte wählen Sie ein Land und eine Antenne, die sich am nächsten zu Ihrer " "Position befinden." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" -"If you don't know which antenna to choose select \"Don't know\" from the " -"list of providers." +"If you don't know which antenna to choose select \"Don't know\" from the list " +"of providers." msgstr "" -"Wenn Sie nicht wissen, welche Antenne Sie auswählen müssen, wählen Sie " -"\"Keine Ahnung\"." +"Wenn Sie nicht wissen, welche Antenne Sie auswählen müssen, wählen Sie »Keine " +"Ahnung«." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "However, searching for channels will take considerably longer this way." msgstr "" "Diese Methode der Kanalsuche wird deutlich mehr Zeit in Anspruch nehmen." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:141 msgid "Not listed" msgstr "Nicht aufgeführt" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:152 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:223 msgid "_Country:" msgstr "_Land:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:176 msgid "_Antenna:" msgstr "_Antenne:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:185 msgid "Antenna" msgstr "Antenne" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:197 msgid "_Satellite:" msgstr "_Satellit:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:205 msgid "Satellite" msgstr "Satellit" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:245 msgid "_Providers:" msgstr "_Versorger:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:253 msgid "Provider" msgstr "Versorger" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:302 msgid "Don't know" msgstr "Keine Ahnung" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." msgstr "Willkommen zum Assistenten für den Digitalen Fernsehempfang" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -776,15 +769,15 @@ "Dies wird ihr Empfangsgerät automatisch konfigurieren und, falls nötig, nach " "Kanälen suchen." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." -msgstr "Drücken Sie \"Weiter\" um fortzufahren" +msgstr "Klicken Sie auf »Weiter«, um fortzufahren" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" msgstr "_Expertenmodus" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" msgstr "Konfiguration für das Digitale Fernsehen" @@ -794,66 +787,66 @@ #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" -msgstr "Kanalliste abspeichern" +msgstr "Kanalliste speichern" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" msgstr "Gerätekonfiguration" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" msgstr "Fernsehen" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." msgstr "Keine Kanäle gefunden" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "" "Make sure that the antenna is connected and you have selected the correct " "tuning data." msgstr "" -"Stellen Sie sicher, dass die Antenne angschlossen ist und die richtigen " +"Stellen Sie sicher, dass die Antenne angeschlossen ist und die richtigen " "Tuningdaten ausgewählt wurden." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." msgstr "Das Gerät wurde zur Gruppe %s hinzugefügt." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." msgstr "Beim Einrichten des Gerätes ist ein Fehler aufgetreten." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" msgstr "Ein weiteres Gerät konfigurieren" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" msgstr "Konfiguration abgeschlossen" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." msgstr "Das Gerät %s wurde erfolgreich konfiguriert." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." msgstr "Konfiguration von Gerät %s fehlgeschlagen." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 msgid "Cleaning up. This may take a while." -msgstr "Aufräumen. Dies kann eine Weile andauern." +msgstr "Aufräumen. Dies kann eine Weile dauern." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 #: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "Digitales Fernsehen einrichten" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -861,7 +854,7 @@ "Die erzeugte Kanallisten-Datei kann verwendet werden, um Ihre Empfangsgeräte " "zu konfigurieren." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -869,69 +862,78 @@ "Sind Sie sicher, dass Sie abbrechen wollen?\n" "Jeglicher Fortschritt wird verloren gehen." -#: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 msgid "Program Guide" msgstr "Programmführer" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:306 msgid "Digital TV" msgstr "Digitales Fernsehen" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Watch TV" msgstr "Fernsehen" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "Digital _TV" msgstr "_Digitales Fernsehen" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Program Guide" msgstr "_Programmführer" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "_Delete" msgstr "_Löschen" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "D_etails" msgstr "D_etails" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:365 msgid "_Order channels" msgstr "Kanäle _sortieren" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:368 msgid "By _name" msgstr "Nach _Name" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:369 msgid "By _group" msgstr "Nach _Gruppe" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:372 msgid "_Reverse order" msgstr "_Reihenfolge umkehren" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:524 msgid "Delete selected recording?" msgstr "Ausgewählte Aufnahme löschen?" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:602 #, python-format msgid "Recording %d" msgstr "Aufnahme %d" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:662 +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "Setup Failed" +msgstr "Einrichtung ist fehlgeschlagen" + +#: ../client/totem-plugin/dvb-daemon.py:663 msgid "GNOME DVB Daemon is not installed" -msgstr "Der GNOME DVB Daemon ist nicht installiert" +msgstr "Der GNOME DVB-Daemon ist nicht installiert" + +#: ../client/totem-plugin/dvb-daemon.py:666 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Die Einrichtung von GNOME DVB-Daemon konnte nicht gestartet werden" #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 msgid "Digital TV Control Center" -msgstr "Digital Fernsehen Kontrollzentrum" +msgstr "Kontrollzentrum für Digitales Fernsehen" #: ../data/gnome-dvb-control.desktop.in.in.h:2 msgid "Schedule recordings and browse program guide" @@ -939,175 +941,4 @@ #: ../data/gnome-dvb-setup.desktop.in.in.h:1 msgid "Digital TV Setup" -msgstr "Digital Fernsehen Einstellungen" - -#~ msgid "Refresh" -#~ msgstr "Aktualisieren" - -#~ msgid "Channels" -#~ msgstr "Kanäle" - -#~ msgid "Toolbar" -#~ msgstr "Werkzeugleiste" - -#~ msgid "Channel List Editor" -#~ msgstr "Kannallisten Editor" - -#~ msgid "Device groups:" -#~ msgstr "Gerätegruppe:" - -#~ msgid "Channel lists" -#~ msgstr "Kannalliste" - -#~ msgid "Create Group" -#~ msgstr "Neue Gruppe…" - -#~ msgid "Name" -#~ msgstr "Name" - -#~ msgid "Timer" -#~ msgstr "Timer" - -#~ msgid "Channel:" -#~ msgstr "Kannal:" - -#~ msgid "Duration:" -#~ msgstr "Laufzeit:" - -#~ msgid "Description:" -#~ msgstr "Beschreibung:" - -#~ msgid "Title:" -#~ msgstr "Titel:" - -#~ msgid "Date:" -#~ msgstr "Datum:" - -#~ msgid "Austria" -#~ msgstr "Österreich" - -#~ msgid "Belgium" -#~ msgstr "Belgien" - -#~ msgid "Australia" -#~ msgstr "Australien" - -#~ msgid "Switzerland" -#~ msgstr "Schweiz" - -#~ msgid "Italy" -#~ msgstr "Italien" - -#~ msgid "Germany" -#~ msgstr "Deutschland" - -#~ msgid "Czech Republic" -#~ msgstr "Tschechische Republik" - -#~ msgid "Spain" -#~ msgstr "Spanien" - -#~ msgid "Denmark" -#~ msgstr "Dänemark" - -#~ msgid "Hungary" -#~ msgstr "Ungarn" - -#~ msgid "Finland" -#~ msgstr "Finnland" - -#~ msgid "France" -#~ msgstr "Frankreich" - -#~ msgid "Iceland" -#~ msgstr "Island" - -#~ msgid "Greece" -#~ msgstr "Griechenland" - -#~ msgid "Netherlands" -#~ msgstr "Niederlande" - -#~ msgid "Sweden" -#~ msgstr "Schweden" - -#~ msgid "Taiwan" -#~ msgstr "Taiwan" - -#~ msgid "Country:" -#~ msgstr "Land:" - -#~ msgid "Hong Kong" -#~ msgstr "Hong Kong" - -#~ msgid "New Zealand" -#~ msgstr "Neuseeland" - -#~ msgid "Poland" -#~ msgstr "Polen" - -#~ msgid "Expert mode" -#~ msgstr "Expertenmodus" - -#~ msgid "Norway" -#~ msgstr "Norwegen" - -#~ msgid "Antenna:" -#~ msgstr "Antenne:" - -#~ msgid "Totem Movie Player" -#~ msgstr "Totem Video-Player" - -#~ msgid "Select a group:" -#~ msgstr "Wählen Sie eine Gruppe:" - -#~ msgid "Add To Group" -#~ msgstr "Zu Gruppe hinzufügen" - -#~ msgid "Channels File" -#~ msgstr "Kanalliste" - -#~ msgid "Recordings' Directory" -#~ msgstr "Aufnahmeverzeichnis" - -#~ msgid "Delete selected recordings?" -#~ msgstr "" -#~ "Ausgewählte Aufnahmen löschen?" - -#~ msgid "Pick date" -#~ msgstr "Datum auswählen" - -#~ msgid "Start time:" -#~ msgstr "Anfangszeit:" - -#, python-format -#~ msgid "Scanning for channels on device %s" -#~ msgstr "Es wird auf Gerät %s nach Kanälen gesucht" - -#~ msgid "Antenna:" -#~ msgstr "Antenne:" - -#~ msgid "Country:" -#~ msgstr "Land:" - -#~ msgid "Satellite:" -#~ msgstr "Satellit:" - -#~ msgid "Do you want to search for channels now?" -#~ msgstr "Möchten Sie jtzt nach Kanälen suchen?" - -#~ msgid "" -#~ "Choose the channels you want to have in your list of channels. You can " -#~ "reorder the channels, too." -#~ msgstr "" -#~ "Wählen Sie die Kanäle für Ihre Kanalliste aus. Sie können diese auch " -#~ "umsortieren." - -#~ msgid "Providers:" -#~ msgstr "Versorger:" - -#~ msgid "DVB card is not configured" -#~ msgstr "DVB Karte ist noch nicht konfiguriert" - -#~ msgid "Select scrambled channels" -#~ msgstr "Verschlüsselte Kanäle auswählen." +msgstr "Einstellungen für Digitales Fernsehen" diff -Nru gnome-dvb-daemon-0.1.23/po/el.po gnome-dvb-daemon-0.2.7/po/el.po --- gnome-dvb-daemon-0.1.23/po/el.po 2011-01-15 16:56:24.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/el.po 2011-05-23 16:38:55.000000000 +0000 @@ -2,45 +2,48 @@ # Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 # This file is distributed under the same license as the gnome-dvb-daemon package. # FIRST AUTHOR , 2010. +# Mel Argyropoulou , 2011. +# Giannis Katsampirhs , 2011. # msgid "" msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-12-14 23:23+0000\n" -"Last-Translator: dpdt1 \n" -"Language-Team: Greek \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-" +"daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-04-23 12:06+0000\n" +"PO-Revision-Date: 2011-05-22 13:30+0300\n" +"Last-Translator: Giannis Katsampirhs \n" +"Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" -msgstr "" +msgstr "DVB δαίμονας του GNOME" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" -msgstr "" +msgstr "Ιστοσελίδα DVB δαίμονα του GNOME " -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d ώρα" msgstr[1] "%d ώρες" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d λεπτό" msgstr[1] "%d λεπτά" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -49,508 +52,515 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 msgid "Edit Channel Lists" -msgstr "Επεξεργασία Λίστας Καναλιών" +msgstr "Επεξεργασία λίστας καναλιών" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" -msgstr "" +msgstr "Ομάδες καναλιών" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_Ομάδα:" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" -msgstr "" +msgstr "Ομάδες συσκευών" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" msgstr "Όλα τα κανάλια" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 msgid "Channel" msgstr "Κανάλι" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" -msgstr "" +msgstr "Επιλέξτε μία ομάδα καναλιών" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" -msgstr "" +msgstr "Κανάλια ομάδας" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 msgid "An error occured while adding the group" -msgstr "" +msgstr "Παρουσιάστηκε σφάλμα κατά την προσθήκη της ομάδας" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "" +msgstr "Είστε βέβαιοι ότι επιθυμείτε να διαγράψετε την ομάδα «%s»;" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." -msgstr "" +msgstr "Όλες οι εργασίες που έχουν ανατεθεί σε αυτή την ομάδα θα χαθούν." #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 msgid "An error occured while removing the group" -msgstr "" +msgstr "Παρουσιάστηκε σφάλμα κατά την αφαίρεση της ομάδας" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" -msgstr "" - -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" -msgstr "" +msgstr "Κέντρο ελέγχου DVB" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." +msgid "Choose a device group and channel on the left to view the program guide" msgstr "" +"Επιλέξτε ομάδα συσκευών και κανάλι στα αριστερά για να δείτε τον οδηγό " +"προγράμματος" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 -msgid "There is currently no schedule available for this channel" +msgid "No devices are configured. Please go to preferences to configure them." msgstr "" +"Δεν έχει ρυθμιστεί καμία συσκευή. Παρακαλώ μεταβείτε στις προτιμήσεις για να " +"τις ρυθμίσετε." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 -msgid "_Recording schedule" -msgstr "" +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 +msgid "There is currently no schedule available for this channel" +msgstr "Δεν υπάρχει τρέχον πρόγραμμα διαθέσιμο για αυτό το κανάλι" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "_Recording schedule" +msgstr "Πρόγραμμα ε_γγραφών" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" msgstr "_Επεξεργασία" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" -msgstr "_Προβολή" +msgstr "Π_ροβολή" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" msgstr "Βοήθεια" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_Διαχείριση" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" -msgstr "" +msgstr "Διαχείριση προγράμματος εγγραφών" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" -msgstr "" +msgstr "Εγγρα_φές" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" -msgstr "" +msgstr "Διαχείριση εγγραφών" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" -msgstr "_Έξοδος" +msgstr "_Τερματισμός" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" -msgstr "" +msgstr "Τερματισμός προγράμματος" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" -msgstr "" +msgstr "Λί_στες Καναλιών" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" -msgstr "" +msgstr "Επεξεργασία λίστας καναλιών" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" -msgstr "" +msgstr "Προ_τιμήσεις" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" -msgstr "" +msgstr "Εμφάνιση προτιμήσεων" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" -msgstr "" +msgstr "Τι α_ναπαράγεται τώρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" -msgstr "" +msgstr "Δείτε τι αναπαράγεται τώρα και τι ακολουθεί" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" -msgstr "" +msgstr "Ανανέωσ_η" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" -msgstr "" +msgstr "Ανανέωση οδηγού προγράμματος" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" -msgstr "" +msgstr "Προηγού_μενη ημέρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" -msgstr "" +msgstr "Μετάβαση στην προηγούμενη ημέρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" -msgstr "" +msgstr "Ε_πόμενη Ημέρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" -msgstr "" +msgstr "Μετάβαση στην επόμενη ημέρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" -msgstr "" +msgstr "_Κανάλια" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" -msgstr "" +msgstr "Προβολή/Απόκρυψη καναλιών" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" -msgstr "" +msgstr "Γραμμή εργαλεί_ων" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" -msgstr "" +msgstr "Προβολή/Απόκρυψη γραμμής εργαλείων" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" -msgstr "" +msgstr "Π_ερί" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" -msgstr "" +msgstr "Εμφάνιση πληροφοριών για το πρόγραμμα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" -msgstr "" +msgstr "Πρόγραμμα εγγραφών" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 msgid "Recordings" -msgstr "" +msgstr "Εγγραφές" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 msgid "What's on now" -msgstr "" +msgstr "Τι αναπαράγεται τώρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" -msgstr "" +msgstr "Προηγούμενη ημέρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" -msgstr "" +msgstr "Επόμενη ημέρα" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 msgid "Schedule recording for the selected event?" -msgstr "" +msgstr "Να προγραμματιστεί εγγραφή για το επιλεγμένο γεγονός;" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" -"Launchpad Contributions:\n" -" dpdt1 https://launchpad.net/~dpdt1" +"Ελληνική μεταφραστική ομάδα GNOME\n" +"\n" +"Mel Argyropoulou , 2011\n" +"Giannis Katsampirhs , 2011" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" -msgstr "" +msgstr "Συσκευές" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" -msgstr "" +msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 #, python-format msgid "Adapter: %d, Frontend: %d" -msgstr "" +msgstr "Προσαρμογέας: %d, Διεπαφή: %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" -msgstr "" +msgstr "Ομάδα %d" #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "" +msgstr "Προσθήκη σε ομάδα" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" -msgstr "" +msgstr "Προσθήκη συσκευής σε ομάδα" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" -msgstr "" +msgstr "Δημιουργία νέας ομάδας" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" -msgstr "" +msgstr "Γενικά" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" -msgstr "" +msgstr "Όνομ_α:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" -msgstr "" +msgstr "Αρ_χείο καναλιών:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" -msgstr "" +msgstr "Κατάλο_γος:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" -msgstr "" +msgstr "Επιλογή αρχείου" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" -msgstr "" +msgstr "Επιλογή καταλόγου" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" -msgstr "" +msgstr "Επεξεργασία ομάδας" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "Digital TV Preferences" -msgstr "" +msgstr "Προτιμήσεις ψηφιακής τηλεόρασης" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" -msgstr "" +msgstr "Επεξεργασία επιλεγμένης ομάδας" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" -msgstr "" +msgstr "Αφαίρεση επιλεγμένης συσκευής" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" -msgstr "" +msgstr "Ρύθμιση" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" -msgstr "" +msgstr "Ρύθμιση συσκευών" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" -msgstr "" +msgstr "Δημιουργία νέας ομάδας" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" -msgstr "" +msgstr "Δημιουργία νέας ομάδας για την επιλεγμένη συσκευή" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" -msgstr "" +msgstr "Προσθήκη στην ομάδα" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" -msgstr "" +msgstr "Προσθήκη της επιλεγμένης συσκευής σε υπάρχουσα ομάδα" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" -msgstr "" +msgstr "Ρυθμισμένες συσκευές" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" -msgstr "" +msgstr "Μη ρυθμισμένες συσκευές" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" -msgstr "" +msgstr "Δεν ήταν δυνατή η απομάκρυνση της συσκευής από την ομάδα" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" msgstr "" +"Είστε βέβαιοι ότι επιθυμείτε να αφαιρέσετε τη συσκευή %s από το " +"%s;" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" -msgstr "" +msgstr "Δεν ήταν δυνατή η δημιουργία ομάδας" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" +"Επιβεβαιώστε ότι επιλέξατε το σωστό αρχείο καναλιών και τον κατάλογο όπου " +"αποθηκεύονται οι εγγραφές και ότι και τα δύο είναι αναγνώσιμα." -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" -msgstr "" +msgstr "Δεν ήταν δυνατή η προσθήκη της συσκευής σε ομάδα" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 msgid "" "Make sure that the device isn't already assigned to a different group and " "that all devices in the group are of the same type." msgstr "" +"Επιβεβαιώστε ότι η συσκευή δεν έχει ήδη ανατεθεί σε διαφορετική ομάδα και " +"ότι όλες οι συσκευές της ομάδας είναι του ίδιου τύπου." -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 msgid "Delete selected recordings?" -msgstr "" +msgstr "Διαγραφή επιλεγμένων εγγραφών;" #: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 msgid "Pick a date" -msgstr "" +msgstr "Επιλογή ημερομηνίας" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 msgid "Title" -msgstr "" +msgstr "Τίτλος" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 msgid "Start time" -msgstr "" +msgstr "Χρόνος έναρξης" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" -msgstr "" +msgstr "Διάρκεια" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 msgid "Timer could not be deleted" -msgstr "" +msgstr "Δεν ήταν δυνατή η διαγραφή χρονομέτρου" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "Abort active recording?" -msgstr "" +msgstr "Διακοπή τρέχουσας εγγραφής;" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 msgid "The timer you selected belongs to a currently active recording." -msgstr "" +msgstr "Το χρονόμετρο που επιλέξατε ανήκει σε ενεργή εγγραφή." -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 msgid "Deleting this timer will abort the recording." -msgstr "" +msgstr "Η διαγραφή αυτού του χρονομέτρου θα διακόψει την εγγραφή." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 msgid "Timer could not be created" -msgstr "" +msgstr "Δεν ήταν δυνατή η δημιουργία χρονομέτρου" #: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 msgid "" "Make sure that the timer doesn't conflict with another one and doesn't start " "in the past." msgstr "" +"Επιβεβαιώστε ότι το χρονόμετρο δε συγκρούεται με άλλο και δεν ξεκινάει στο " +"παρελθόν." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "" +msgstr "Η εγγραφή προγραμματίστηκε με επιτυχία" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 msgid "Add Timer" -msgstr "" +msgstr "Προσθήκη χρονομέτρου" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 msgid "_Channel:" -msgstr "" +msgstr "Κανά_λι:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 msgid "Edit Timer" -msgstr "" +msgstr "Επεξεργασία χρονομέτρου" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 msgid "Channel:" -msgstr "" +msgstr "Κανάλι:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 msgid "_Start time:" -msgstr "" +msgstr "_Χρόνος έναρξης:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 msgid "_Duration:" -msgstr "" +msgstr "_Διάρκεια:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 msgid "minutes" -msgstr "" +msgstr "λεπτά" #: ../client/gnomedvb/ui/wizard/__init__.py:4 msgid "digital cable" -msgstr "" +msgstr "ψηφιακό καλώδιο" #: ../client/gnomedvb/ui/wizard/__init__.py:5 msgid "digital satellite" -msgstr "" +msgstr "ψηφιακή κεραία δορυφόρου" #: ../client/gnomedvb/ui/wizard/__init__.py:6 msgid "digital terrestrial" -msgstr "" +msgstr "ψηφιακή επίγεια κεραία" #: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 msgid "Channel group" -msgstr "" +msgstr "Ομάδα καναλιών" #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "" +msgstr "_Ώρα:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 msgid "Title:" -msgstr "" +msgstr "Τίτλος:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 msgid "Date:" -msgstr "" +msgstr "Ημερομηνία:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 msgid "Duration:" -msgstr "" +msgstr "Διάρκεια:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 msgid "Description:" -msgstr "" +msgstr "Περιγραφή:" #: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 msgid "Start" -msgstr "" +msgstr "Έναρξη" #: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 msgid "Length" -msgstr "" +msgstr "Διάρκεια" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" -msgstr "" +msgstr "Τώρα" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" -msgstr "" +msgstr "Επόμενο" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." -msgstr "" +msgstr "Δε βρέθηκαν συσκευές." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 msgid "" @@ -558,345 +568,375 @@ "make sure you close all programs such as video players that access your DVB " "card." msgstr "" +"Είτε δεν έχουν εγκατασταθεί κάρτες DVB ή όλες οι κάρτες είναι απασχολημένες. " +"Στην τελευταία περίπτωση, επιβεβαιώστε ότι έχετε κλείσει όλα τα προγράμματα " +"όπως αναπαραγωγείς βίντεο που έχουν πρόσβαση στην κάρτα DVB σας." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" -msgstr "" +msgstr "Όνομα" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" -msgstr "" +msgstr "Τύπος" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 msgid "Select the device you want to configure." -msgstr "" +msgstr "Επιλέξτε τη συσκευή που επιθυμείτε να ρυθμίσετε." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." -msgstr "" +msgstr "Όλες οι συσκευές είναι ρυθμισμένες ήδη." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 msgid "" "Go to the control center if you want to alter the settings of already " "configured devices." msgstr "" +"Μεταβείτε στο κέντρο ελέγχου αν επιθυμείτε να αλλάξετε τις ρυθμίσεις των ήδη " +"ρυθμισμένων συσκευών." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." -msgstr "" +msgstr "Παρουσιάστηκε σφάλμα κατά την ανάκτηση συσκευών." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 msgid "" "Make sure other applications don't access DVB devices and you have " "permissions to access them." msgstr "" +"Επιβεβαιώστε ότι άλλες εφαρμογές δεν έχουν πρόσβαση στις συσκευές DVB και " +"ότι έχετε άδειες πρόσβασης σε αυτές." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" -msgstr "" +msgstr "Το αναλυτικό μήνυμα σφάλματος είναι:" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" -msgstr "" +msgstr "Αναζήτηση για συσκευές" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" -msgstr "" +msgstr "Επιλογή συσκευής" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 #, python-format msgid "%s\n" -msgstr "" +msgstr "%s\n" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 msgid "This process can take some time." -msgstr "" +msgstr "Αυτή η διαδικασία ενδεχομένως να διαρκέσει λίγο." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." msgstr "" +"Μπορείτε να επιλέξετε τα κανάλια που επιθυμείτε να έχετε στη λίστα καναλιών " +"σας." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 msgid "Select all" -msgstr "" +msgstr "Επιλογή όλων" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 msgid "Deselect all" -msgstr "" +msgstr "Αποεπιλογή όλων" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 msgid "_Channels:" -msgstr "" +msgstr "_Κανάλια:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 msgid "Select _scrambled channels" -msgstr "" +msgstr "Επιλογή _περιπλεγμένων καναλιών" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 msgid "Signal quality:" -msgstr "" +msgstr "Ποιότητα σήματος:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 msgid "Signal strength:" -msgstr "" +msgstr "Ισχύς σήματος:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 msgid "Scanning for channels" -msgstr "" +msgstr "Σάρωση για κανάλια" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:86 msgid "Missing requirements" -msgstr "" +msgstr "Λείπουν απαιτήσεις" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:92 msgid "Country and antenna selection" -msgstr "" +msgstr "Επιλογή χώρας και κεραίας" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:95 msgid "Satellite selection" -msgstr "" +msgstr "Επιλογή δορυφόρου" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 msgid "Country and provider selection" -msgstr "" +msgstr "Επιλογή χώρας και παρόχου" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:100 msgid "Unsupported adapter" -msgstr "" +msgstr "Μη υποστηριζόμενος προσαρμογέας" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:125 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "" +msgstr "Λυπούμαστε, αλλά οι κάρτες '%s' δεν υποστηρίζονται." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:129 msgid "Could not find initial tuning data." -msgstr "" +msgstr "Δεν ήταν δυνατή η εύρεση αρχικών δεδομένων συντονισμού." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Please make sure that the dvb-apps package is installed." -msgstr "" +msgstr "Παρακαλώ ελέγξτε ότι είναι εγκατεστημένο το πακέτο dvb-apps." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "" +"Παρακαλώ επιλέξτε τη χώρα και την κεραία που βρίσκονται πλησιέστερα στην " +"τοποθεσία σας." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." msgstr "" +"Αν δε γνωρίζετε ποια κεραία να επιλέξετε, επιλέξτε «Δε γνωρίζω» από τη λίστα " +"παρόχων." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "However, searching for channels will take considerably longer this way." msgstr "" +"Παρόλα αυτά, η αναζήτηση καναλιών ενδεχομένως διαρκέσει αρκετά περισσότερο." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:141 msgid "Not listed" -msgstr "" +msgstr "Δεν είναι στη λίστα" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:152 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:223 msgid "_Country:" -msgstr "" +msgstr "_Χώρα:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:176 msgid "_Antenna:" -msgstr "" +msgstr "_Κεραία:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:185 msgid "Antenna" -msgstr "" +msgstr "Κεραία" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:197 msgid "_Satellite:" -msgstr "" +msgstr "_Δορυφόρος:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:205 msgid "Satellite" -msgstr "" +msgstr "Δορυφόρος" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:245 msgid "_Providers:" -msgstr "" +msgstr "_Πάροχοι:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:253 msgid "Provider" -msgstr "" +msgstr "Πάροχος" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:302 msgid "Don't know" -msgstr "" +msgstr "Δε γνωρίζω" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." -msgstr "" +msgstr "Καλωσήλθατε στον ψηφιακό τηλεοπτικό Βοηθό." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" +"Θα ρυθμίσει αυτόματα τις συσκευές σας και θα κάνει αναζήτηση για κανάλια, αν " +"είναι ανάγκη." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." -msgstr "" +msgstr "Κάντε κλικ στο «Μπροστά» για να ξεκινήσετε." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" -msgstr "" +msgstr "_Εξειδικευμένη λειτουργία" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" -msgstr "" +msgstr "Ρυθμίσεις ψηφιακής τηλεόρασης" #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 msgid "Choose a location where you want to save the list of channels." msgstr "" +"Επιλέξτε τοποθεσία όπου επιθυμείτε να αποθηκεύσετε τη λίστα καναλιών σας." #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" -msgstr "" +msgstr "Αποθήκευση καναλιών" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" -msgstr "" +msgstr "Ρύθμιση συσκευής" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" -msgstr "" +msgstr "Τηλεόραση" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." -msgstr "" +msgstr "Δε βρέθηκαν κανάλια." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "" "Make sure that the antenna is connected and you have selected the correct " "tuning data." msgstr "" +"Επιβεβαιώστε ότι η κεραία είναι συνδεδεμένη και ότι έχετε επιλέξει τα σωστά " +"δεδομένα συντονισμού." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." -msgstr "" +msgstr "Η συσκευή προστέθηκε στην ομάδα %s." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." -msgstr "" +msgstr "Παρουσιάστηκε σφάλμα κατά την προσπάθεια ρύθμισης της συσκευής." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" -msgstr "" +msgstr "Ρύθμιση άλλης συσκευής" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" -msgstr "" +msgstr "Ολοκληρώθηκε η ρύθμιση" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." -msgstr "" +msgstr "Η συσκευή %s ρυθμίστηκε επιτυχώς." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Αποτυχία ρύθμισης της συσκευής %s." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 msgid "Cleaning up. This may take a while." -msgstr "" +msgstr "Γίνεται εκκαθάριση. Αυτό ενδεχομένως διαρκέσει λίγο χρόνο." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 #: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" -msgstr "" +msgstr "Ρύθμιση ψηφιακής τηλεόρασης" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 msgid "" "The generated channels file can be used to configure your devices in the " "control center." msgstr "" +"Το δημιουργημένο αρχείο καναλιών μπορεί να χρησιμοποιηθεί για να ρυθμίσετε " +"τις συσκευές σας στο κέντρο ελέγχου." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" +"Είστε βέβαιοι ότι επιθυμείτε να κάνετε διακοπή;\n" +"Όλες οι διεργασίες θα χαθούν." -#: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 msgid "Program Guide" -msgstr "" +msgstr "Οδηγός προγράμματος" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:306 msgid "Digital TV" -msgstr "" +msgstr "Ψηφιακή τηλεόραση" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Watch TV" -msgstr "" +msgstr "Παρακολούθηση τηλεόρασης" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "Digital _TV" -msgstr "" +msgstr "Ψηφιακή _τηλεόραση" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Program Guide" -msgstr "" +msgstr "_Οδηγός προγράμματος" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "_Delete" -msgstr "" +msgstr "_Διαγραφή" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "D_etails" -msgstr "" +msgstr "Λ_επτομέρειες" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:365 msgid "_Order channels" -msgstr "" +msgstr "_Ταξινόμηση καναλιών" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:368 msgid "By _name" -msgstr "" +msgstr "Κατά ό_νομα" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:369 msgid "By _group" -msgstr "" +msgstr "Κατά _ομάδα" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:372 msgid "_Reverse order" -msgstr "" +msgstr "_Αναστροφή σειράς" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:524 msgid "Delete selected recording?" -msgstr "" +msgstr "Διαγραφή επιλεγμένης εγγραφής;" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:602 #, python-format msgid "Recording %d" -msgstr "" +msgstr "Εγγραφή %d" + +#: ../client/totem-plugin/dvb-daemon.py:662 +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "Setup Failed" +msgstr "Αποτυχία ρύθμισης" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:663 msgid "GNOME DVB Daemon is not installed" -msgstr "" +msgstr "Δεν έχει εγκατασταθεί ο DVB δαίμονας του GNOME " + +#: ../client/totem-plugin/dvb-daemon.py:666 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Αποτυχία έναρξης ρύθμισης του DVB δαίμονα του GNOME" #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 msgid "Digital TV Control Center" -msgstr "" +msgstr "Κέντρο ελέγχου ψηφιακής τηλεόρασης" #: ../data/gnome-dvb-control.desktop.in.in.h:2 msgid "Schedule recordings and browse program guide" -msgstr "" +msgstr "Προγραμματισμός εγγραφών και περιήγηση στον οδηγό προγράμματος" #: ../data/gnome-dvb-setup.desktop.in.in.h:1 msgid "Digital TV Setup" -msgstr "" +msgstr "Ρυθμίσεις ψηφιακής τηλεόρασης" diff -Nru gnome-dvb-daemon-0.1.23/po/en_GB.po gnome-dvb-daemon-0.2.7/po/en_GB.po --- gnome-dvb-daemon-0.1.23/po/en_GB.po 2011-01-15 16:56:20.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/en_GB.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" "PO-Revision-Date: 2010-08-23 16:06+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: English (United Kingdom) \n" @@ -15,8 +15,8 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" diff -Nru gnome-dvb-daemon-0.1.23/po/es.po gnome-dvb-daemon-0.2.7/po/es.po --- gnome-dvb-daemon-0.1.23/po/es.po 2011-01-15 16:56:18.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/es.po 2011-09-29 20:27:47.000000000 +0000 @@ -2,45 +2,48 @@ # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the gnome-dvb-daemon package. # FIRST AUTHOR , 2009. +# Jorge González , 2011. +# Daniel Mustieles , 2011. # msgid "" msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2011-01-01 09:02+0000\n" -"Last-Translator: Fitoschido \n" -"Language-Team: Spanish \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-" +"daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-04-24 09:16+0000\n" +"PO-Revision-Date: 2011-09-15 16:26+0200\n" +"Last-Translator: Daniel Mustieles \n" +"Language-Team: Español \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" msgstr "Demonio GNOME DVB" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" msgstr "Sitio web de GNOME DVB Daemon" -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d hora" msgstr[1] "%d horas" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minuto" msgstr[1] "%d minutos" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -51,37 +54,37 @@ msgid "Edit Channel Lists" msgstr "Editar lista de canales" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" msgstr "Grupos de canales" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_Grupo:" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" msgstr "Grupos de dispositivos" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" msgstr "Todos los canales" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 msgid "Channel" msgstr "Canal" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" msgstr "Elija un grupo de canales" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" msgstr "Canales del grupo" @@ -102,179 +105,176 @@ msgid "An error occured while removing the group" msgstr "Ha ocurrido un error mientras se eliminaba el grupo" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" msgstr "Centro de control DVB" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" msgstr "" "Elija un grupo de dispositivo y canal en la izquierda para ver la guía de " "programación" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." msgstr "" "No se ha configurado ningún dispositivo. Acceda a las preferencias para " "configurarlos." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 msgid "There is currently no schedule available for this channel" msgstr "No hay planificación disponible para este canal en este momento" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "_Recording schedule" msgstr "Planificación de _grabación" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" msgstr "_Editar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" msgstr "_Ver" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" msgstr "Ayuda" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_Administrar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" msgstr "Administrar la planificación de grabación" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" msgstr "_Grabaciones" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" msgstr "Administrar grabaciones" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" msgstr "_Salir" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" msgstr "Salir del programa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" msgstr "_Lista de canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" msgstr "Editar listas de canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" msgstr "_Preferencias" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" msgstr "Preferencias de visualización" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" msgstr "Qué hay de _nuevo" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" msgstr "Mirar qué se está emitiendo y qué viene después" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" msgstr "_Actualizar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" msgstr "Actualizar la guía de programación" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" msgstr "Día _anterior" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" msgstr "Ir al día anterior" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" msgstr "Día _siguiente" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" msgstr "Ir al día siguiente" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" msgstr "_Canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" msgstr "Ver/Ocultar canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" msgstr "Barra de _herramientas" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" msgstr "Ver/Ocultar barra de herramientas" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" msgstr "Acerca _de" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" msgstr "Mostrar información acerca del programa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Programa de grabación" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 msgid "Recordings" msgstr "Grabaciones" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 msgid "What's on now" msgstr "Qué se está emitiendo ahora" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" msgstr "Día anterior" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" msgstr "Día siguiente" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 msgid "Schedule recording for the selected event?" msgstr "¿Programar una grabación para el evento seleccionado?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" @@ -293,140 +293,139 @@ " pico.dev https://launchpad.net/~pico.dev\n" " zer berros https://launchpad.net/~cerverros" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" msgstr "Dispositivos" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 #, python-format msgid "Adapter: %d, Frontend: %d" msgstr "Adaptador %d, frontend %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" msgstr "Grupo %d" #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "Agregar al grupo" +msgstr "Añadir al grupo" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" msgstr "Añadir dispositivo al grupo" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" msgstr "Crear nuevo grupo" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" msgstr "General" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" msgstr "_Nombre:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" msgstr "_Archivo de canales:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" -msgstr "_Directorio:" +msgstr "_Carpeta:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" msgstr "Seleccionar archivo" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" -msgstr "Seleccionar directorio" +msgstr "Seleccionar carpeta" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" msgstr "Editar grupo" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "Digital TV Preferences" msgstr "Preferencias de TV Digital" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" msgstr "Editar grupo seleccionado" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" msgstr "Eliminar dispositivo seleccionado" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" msgstr "Configurar" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" msgstr "Configurar dispositivos" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" msgstr "Crear un nuevo grupo" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" msgstr "Crear un nuevo grupo para el dispositivo seleccionado" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" -msgstr "Agregar al grupo" +msgstr "Añadir al grupo" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" msgstr "Añadir el dispositivo seleccionado a un grupo existente" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" msgstr "Dispositivos configurados" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" msgstr "Dispositivos desconocidos" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" msgstr "No se pudo eliminar el dispositivo del grupo" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" msgstr "" -"¿Estás seguro que deseas eliminar el dispositivo %s de %s?" +"¿Está seguro de que quiere eliminar el dispositivo %s de %s?" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" msgstr "No se pudo crear el grupo" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" -"Asegúrese de que ha seleccionado el archivo de canales correcto y el " -"directorio donde las grabaciones están almacenadas y que ambos se pueden " -"leer." +"Asegúrese de que ha seleccionado el archivo de canales correcto y la carpeta " +"donde las grabaciones están almacenadas y que ambos se pueden leer." -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" msgstr "No se pudo añadir el dispositivo al grupo" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 msgid "" "Make sure that the device isn't already assigned to a different group and " "that all devices in the group are of the same type." @@ -434,7 +433,7 @@ "Asegúrese de que el dispositivo no ha sido asignado ya a un grupo diferente " "y que todos los dispositivos del grupo son del mismo tipo." -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 msgid "Delete selected recordings?" msgstr "¿Eliminar las grabaciones seleccionadas?" @@ -442,33 +441,33 @@ msgid "Pick a date" msgstr "Seleccione una fecha" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 msgid "Title" msgstr "Título" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 msgid "Start time" msgstr "Hora de inicio" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" msgstr "Duración" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 msgid "Timer could not be deleted" msgstr "No se pudo eliminar la programación" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "Abort active recording?" msgstr "¿Cancelar grabación activa?" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 msgid "The timer you selected belongs to a currently active recording." msgstr "El temporizador que ha elegido pertenece a una grabación activa." -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 msgid "Deleting this timer will abort the recording." msgstr "Eliminar este temporizador abortará la grabación." @@ -488,32 +487,32 @@ msgid "Recording has been scheduled successfully" msgstr "La grabación ha sido programada correctamente" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 msgid "Add Timer" msgstr "Añadir temporizador" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 msgid "_Channel:" msgstr "_Canal:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 msgid "Edit Timer" msgstr "Editar Temporizador" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 msgid "Channel:" msgstr "Canal:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 msgid "_Start time:" msgstr "_Hora de inicio:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 msgid "_Duration:" msgstr "_Duración:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 msgid "minutes" msgstr "minutos" @@ -537,23 +536,19 @@ msgid "_Time:" msgstr "_Hora:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "Detalles" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 msgid "Title:" -msgstr "Título" +msgstr "Título:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 msgid "Date:" msgstr "Fecha:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 msgid "Duration:" msgstr "Duración:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 msgid "Description:" msgstr "Descripción:" @@ -565,11 +560,11 @@ msgid "Length" msgstr "Duración" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" msgstr "Ahora" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" msgstr "Siguiente" @@ -640,84 +635,83 @@ msgid "%s\n" msgstr "%s\n" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 msgid "This process can take some time." msgstr "Este proceso puede durar algún tiempo." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." msgstr "Puede elegir los canales que quiere tener en su lista de canales." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 msgid "Select all" msgstr "Seleccionar todo" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 msgid "Deselect all" msgstr "Deseleccionar todo" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 msgid "_Channels:" msgstr "_Canales:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 msgid "Select _scrambled channels" msgstr "Seleccionar canales _codificados" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 msgid "Signal quality:" msgstr "Calidad de la señal:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 msgid "Signal strength:" msgstr "Potencia de señal:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 msgid "Scanning for channels" msgstr "Buscando canales" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:86 msgid "Missing requirements" msgstr "Requerimientos faltantes" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:92 msgid "Country and antenna selection" msgstr "Selección de país y antena" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:95 msgid "Satellite selection" msgstr "Selección del satélite" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 msgid "Country and provider selection" msgstr "Selección de país y proveedor" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:100 msgid "Unsupported adapter" msgstr "Adaptador no soportado" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:125 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "Lo sentimos, pero las tarjetas '%s' no están soportadas." +msgstr "Las tarjetas «%s» no están soportadas." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:129 msgid "Could not find initial tuning data." msgstr "No se pudo encontrar información inicial de ajuste." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Please make sure that the dvb-apps package is installed." -msgstr "Por favor, asegúrese de que el paquete dvb-apps está instalado." +msgstr "Asegúrese de que el paquete dvb-apps está instalado." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "" -"Por favor, seleccione un país y la antena más cercana a tu localización." +"Por favor, seleccione un país y la antena más cercana a su localización." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." @@ -725,69 +719,68 @@ "Si no sabe qué antena elegir, seleccione «No lo sé» de la lista de " "proveedores." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "However, searching for channels will take considerably longer this way." msgstr "No obstante, buscar canales tardará mucho más de esta forma." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:141 msgid "Not listed" msgstr "No está en la lista" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:152 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:223 msgid "_Country:" msgstr "_País:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:176 msgid "_Antenna:" msgstr "_Antena" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:185 msgid "Antenna" msgstr "Antena" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:197 msgid "_Satellite:" msgstr "_Satélite:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:205 msgid "Satellite" msgstr "Satélite" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:245 msgid "_Providers:" msgstr "_Proveedores:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:253 msgid "Provider" msgstr "Proveedor" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:302 msgid "Don't know" msgstr "No lo sé" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." msgstr "Bienvenido al asistente de televisión digital." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -"Configurará automáticamente tus dispositivos y buscará canales, de ser " +"Configurará automáticamente sus dispositivos y buscará canales, de ser " "necesario." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." -msgstr "Haga clic en «Adelante» para empezar." +msgstr "Pulse en «Adelante» para empezar." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" msgstr "_Modo experto" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" msgstr "Configuración de TV digital" @@ -799,20 +792,20 @@ msgid "Save channels" msgstr "Guardar canales" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" msgstr "Configurando el dispositivo" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" msgstr "TV" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." msgstr "No se encontraron canales." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "" "Make sure that the antenna is connected and you have selected the correct " "tuning data." @@ -820,45 +813,44 @@ "Asegúrese de que la antena está conectada y ha seleccionado los datos de " "sintonización correctos." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." msgstr "El dispositivo ha sido añadido al grupo %s." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." msgstr "" -"Ha ocurrido un error mientras se intentaba ejecutar el servicio de " -"instalación" +"Ocurrió un error mientras se intentaba ejecutar el servicio de instalación" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" msgstr "Configurar otro dispositivo" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" msgstr "La configuración ha terminado" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." -msgstr "El dispositivo %s ha sido configurado con éxito." +msgstr "Se configuró correctamente el dispositivo %s." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." -msgstr "Fallo configurando el dispositivo %s." +msgstr "Falló al configurar el dispositivo %s." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 msgid "Cleaning up. This may take a while." -msgstr "Limpiando. Esto puede llevar un momento." +msgstr "Limpiando. Esto puede llevar cierto tiempo." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 #: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "Configurar la TV digital" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -866,73 +858,82 @@ "El archivo de canales generado puede ser utilizado para configurar sus " "dispositivos en el centro de control." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -"¿Está seguro que desea abortar?\n" -"Todos los procesos se perderán." +"¿Está seguro que quiere abortar?\n" +"Se perderán todos los procesos." -#: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 msgid "Program Guide" msgstr "Guía de programas" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:306 msgid "Digital TV" msgstr "TV Digital" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Watch TV" msgstr "Ver TV" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "Digital _TV" msgstr "_TV Digital" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Program Guide" msgstr "_Programación" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "_Delete" msgstr "_Eliminar" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "D_etails" msgstr "D_etalles" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:365 msgid "_Order channels" msgstr "_Ordenar canales" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:368 msgid "By _name" msgstr "Por _nombre" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:369 msgid "By _group" msgstr "Por _grupo" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:372 msgid "_Reverse order" msgstr "_Orden reverso" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:524 msgid "Delete selected recording?" msgstr "¿Eliminar la grabación seleccionada?" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:602 #, python-format msgid "Recording %d" msgstr "Grabando %d" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:662 +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "Setup Failed" +msgstr "Falló la configuración" + +#: ../client/totem-plugin/dvb-daemon.py:663 msgid "GNOME DVB Daemon is not installed" msgstr "El demonio GNOME DVB no esta instalado" +#: ../client/totem-plugin/dvb-daemon.py:666 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "No se pudo iniciar la configuración del demonio de GNOME DVB" + #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 msgid "Digital TV Control Center" @@ -946,6 +947,9 @@ msgid "Digital TV Setup" msgstr "Ajustes de televisión digital" +#~ msgid "Details" +#~ msgstr "Detalles" + #~ msgid "Device groups:" #~ msgstr "Grupos de dispositivo:" @@ -953,8 +957,8 @@ #~ msgstr "Refrescar" #~ msgid "" -#~ "Schedule recording for the selected " -#~ "event?" +#~ "Schedule recording for the selected event?" #~ msgstr "" #~ "¿Programar grabación para el evento " #~ "seleccionado?" @@ -981,8 +985,8 @@ #~ msgstr "Archivo de Canales" #~ msgid "" -#~ "Device could not be removed from " -#~ "group" +#~ "Device could not be removed from group" #~ msgstr "" #~ "El dispositivo no pudo ser eliminado del " #~ "grupo" @@ -999,8 +1003,8 @@ #~ msgid "" #~ "Device could not be added to group" #~ msgstr "" -#~ "El dispositivo no pudo agregarse al " -#~ "grupo" +#~ "El dispositivo no pudo agregarse al grupo" #~ msgid "Title:" #~ msgstr "Título:" @@ -1019,8 +1023,8 @@ #~ msgid "Delete selected recordings?" #~ msgstr "" -#~ "¿Eliminar las grabaciones " -#~ "seleccionadas?" +#~ "¿Eliminar las grabaciones seleccionadas?" #~ msgid "Pick date" #~ msgstr "Seleccione una fecha" @@ -1033,7 +1037,8 @@ #~ msgid "Timer could not be deleted" #~ msgstr "" -#~ "El temporizador no pudo ser eliminado" +#~ "El temporizador no pudo ser eliminado" #~ msgid "Abort active recording?" #~ msgstr "" @@ -1042,7 +1047,6 @@ #~ msgid "Select device you want to configure." #~ msgstr "Seleccione el dispositivo que desee configurar." -#, python-format #~ msgid "Scanning for channels on device %s" #~ msgstr "Buscando canales en el dispositivo %s" @@ -1157,7 +1161,6 @@ #~ msgid "Australia" #~ msgstr "Australia" -#, python-format #~ msgid "Adapter: %d, Frontend: %d" #~ msgstr "Adaptador: %d, Frontend: %d" diff -Nru gnome-dvb-daemon-0.1.23/po/fi.po gnome-dvb-daemon-0.2.7/po/fi.po --- gnome-dvb-daemon-0.1.23/po/fi.po 2011-01-15 16:56:20.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/fi.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" "PO-Revision-Date: 2010-08-23 16:08+0000\n" "Last-Translator: Timo Jyrinki \n" "Language-Team: Finnish \n" @@ -15,8 +15,8 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" @@ -277,7 +277,7 @@ "Launchpad Contributions:\n" " Eetu Huisman https://launchpad.net/~eh\n" " Heikki Kulhia https://launchpad.net/~hessuk\n" -" Jussi Aalto https://launchpad.net/~jtaalto\n" +" Jussi Aalto https://launchpad.net/~jtaalto-deactivatedaccount\n" " Timo Jyrinki https://launchpad.net/~timo-jyrinki" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 diff -Nru gnome-dvb-daemon-0.1.23/po/fr.po gnome-dvb-daemon-0.2.7/po/fr.po --- gnome-dvb-daemon-0.1.23/po/fr.po 2011-01-15 16:56:21.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/fr.po 2011-10-06 15:38:55.000000000 +0000 @@ -1,46 +1,47 @@ # French translation for gnome-dvb-daemon -# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# Copyright (c) 2009-2011 Listed translators # This file is distributed under the same license as the gnome-dvb-daemon package. -# FIRST AUTHOR , 2009. +# Rosetta Contributors and Canonical Ltd 2009 +# Claude Paroz , 2011 # msgid "" msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2011-01-02 03:04+0000\n" -"Last-Translator: Thibault Févry \n" -"Language-Team: French \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-" +"daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-04-23 12:06+0000\n" +"PO-Revision-Date: 2011-04-17 21:49+0200\n" +"Last-Translator: Claude Paroz \n" +"Language-Team: GNOME French Team \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" msgstr "Service DVB pour GNOME" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" -msgstr "Site Internet du Service DVB pour GNOME" +msgstr "Site Web du service DVB pour GNOME" -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d heure" msgstr[1] "%d heures" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minute" msgstr[1] "%d minutes" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -51,37 +52,37 @@ msgid "Edit Channel Lists" msgstr "Modifier les listes de chaînes" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" -msgstr "Groupes de canaux" +msgstr "Groupes de chaînes" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_Groupe :" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" msgstr "Groupes de périphériques" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" -msgstr "Tous les canaux" +msgstr "Toutes les chaînes" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 msgid "Channel" msgstr "Chaîne" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" msgstr "Choisissez un groupe de chaînes" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" msgstr "Chaînes du groupe" @@ -92,188 +93,185 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "Êtes-vous sûr de vouloir supprimer le groupe '%s' ?" +msgstr "Voulez-vous vraiment supprimer le groupe « %s » ?" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." -msgstr "Tous les paramétrages du groupe seront perdus" +msgstr "Tous les paramétrages du groupe seront perdus." #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 msgid "An error occured while removing the group" msgstr "Une erreur est survenue lors de la suppression du groupe" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" msgstr "Centre de contrôle DVB" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" msgstr "" -"Choisissez un groupe de périphérique et une chaîne à gauche pour voir le " +"Choisissez un groupe de périphériques et une chaîne à gauche pour voir le " "guide TV" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." -msgstr "Aucun matériel n'est configuré. Configurez-le dans Préférences." - #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "Aucun matériel n'est configuré. Configurez-le dans les préférences." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 msgid "There is currently no schedule available for this channel" msgstr "" "Il n'y a actuellement aucune programmation disponible pour cette chaîne" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "_Recording schedule" -msgstr "_Planning d'enregistrements" +msgstr "_Horaire d'enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" -msgstr "_Édition" +msgstr "É_dition" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" msgstr "_Affichage" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" msgstr "Aide" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_Gérer" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" msgstr "Gestion de la programmation des enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" msgstr "_Enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" msgstr "Gérer les enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" msgstr "_Quitter" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" msgstr "Quitter le programme" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" msgstr "_Listes des chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" -msgstr "Editer les listes de chaînes" +msgstr "Modifier les listes de chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" msgstr "_Préférences" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" msgstr "Afficher les préférences" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" msgstr "_En ce moment" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" msgstr "Voir le programme actuel et le prochain" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" msgstr "_Actualiser" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" msgstr "Actualiser le guide TV" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" -msgstr "_Jour précédent" +msgstr "Jour _précédent" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" msgstr "Aller au jour précédent" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" -msgstr "_Jour suivant" +msgstr "Jour _suivant" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" msgstr "Aller au jour suivant" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" msgstr "_Chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" -msgstr "Montrer/Cacher les chaînes" +msgstr "Afficher/masquer les chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" msgstr "_Barre d'outils" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" -msgstr "Montrer/Cacher la barre d'outils" +msgstr "Afficher/masquer la barre d'outils" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" -msgstr "_À propos" +msgstr "À _propos" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" msgstr "Afficher les informations sur le programme" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" -msgstr "Planning d'enregistrement" +msgstr "Horaire d'enregistrement" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 msgid "Recordings" msgstr "Enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 msgid "What's on now" msgstr "En ce moment" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" -msgstr "Jour Précédent" +msgstr "Jour précédent" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" -msgstr "Jour Suivant" +msgstr "Jour suivant" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 msgid "Schedule recording for the selected event?" -msgstr "Programmer un enregistrement pour l'évènement sélectionné?" +msgstr "Programmer un enregistrement pour l'évènement sélectionné ?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" @@ -287,183 +285,182 @@ " durden https://launchpad.net/~david-lebouquin\n" " rudy1210 https://launchpad.net/~rudy1210" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" msgstr "Périphériques" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 #, python-format msgid "Adapter: %d, Frontend: %d" -msgstr "Adaptateur : %d, Vue : %d" +msgstr "Adaptateur : %d, Interface : %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" msgstr "Groupe %d" #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "Ajouter au Groupe" +msgstr "Ajouter au groupe" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" -msgstr "Ajouter le Périphérique au Groupe" +msgstr "Ajouter le périphérique au groupe" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" -msgstr "Créer un nouveau Groupe" +msgstr "Créer un nouveau groupe" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" msgstr "Général" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" -msgstr "_Nom :" +msgstr "_Nom :" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" -msgstr "_Fichier des chaînes" +msgstr "_Fichier des chaînes :" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" -msgstr "_Dossier :" +msgstr "_Dossier :" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" msgstr "Choisir un fichier" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" -msgstr "Sélectionner un répertoire" +msgstr "Sélectionner un dossier" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" msgstr "Modifier le groupe" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "Digital TV Preferences" -msgstr "Préférences de la Télévision Numérique" +msgstr "Préférences de la télévision numérique" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" -msgstr "Editer le groupe sélectionné" +msgstr "Modifier le groupe sélectionné" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" msgstr "Enlever le périphérique sélectionné" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" msgstr "Configuration" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" msgstr "Configurer le matériel" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" msgstr "Créer un nouveau groupe" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" msgstr "Créer un nouveau groupe pour le périphérique sélectionné" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" msgstr "Ajouter au groupe" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" msgstr "Ajouter le périphérique sélectionné au groupe existant" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" msgstr "Périphériques configurés" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" msgstr "Périphériques non configurés" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" msgstr "Le périphérique n'a pas pu être enlevé du groupe" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" -msgstr "" -"Êtes-vous sûr de vouloir enlever le périphérique %s de %s" +msgstr "Voulez-vous vraiment enlever le périphérique %s de %s" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" -msgstr "Le groupe n'a pas pu être crée" +msgstr "Le groupe n'a pas pu être créé" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" -"Vérifier que vous avez sélectionné le fichier des chaînes et le répertoire " -"corrects où les enregistrements sont stockés et que les deux sont lisibles." +"Vérifiez que vous avez correctement sélectionné le fichier des chaînes et le " +"dossier où les enregistrements sont stockés et que les deux sont lisibles." -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" msgstr "Le périphérique n'a pas pu être ajouté au groupe" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 msgid "" "Make sure that the device isn't already assigned to a different group and " "that all devices in the group are of the same type." msgstr "" -"Vérifier que le périphérique n'est pas déjà attribué à un autre groupe et " +"Vérifiez que le périphérique n'est pas déjà attribué à un autre groupe et " "que tous les périphériques du groupe sont du même type." -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 msgid "Delete selected recordings?" -msgstr "Effacer les enregistrements sélectionnés?" +msgstr "Effacer les enregistrements sélectionnés ?" #: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 msgid "Pick a date" msgstr "Sélectionner une date" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 msgid "Title" msgstr "Titre" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 msgid "Start time" msgstr "Heure de début" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" msgstr "Durée" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 msgid "Timer could not be deleted" msgstr "Le minuteur n'a pas pu être effacé" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "Abort active recording?" -msgstr "Abandonner l'enregistrement actif?" +msgstr "Abandonner l'enregistrement actif ?" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 msgid "The timer you selected belongs to a currently active recording." msgstr "" "Le minuteur que vous avez sélectionné appartient à un enregistrement " "actuellement actif." -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 msgid "Deleting this timer will abort the recording." msgstr "Supprimer ce minuteur arrêtera l'enregistrement." @@ -476,39 +473,39 @@ "Make sure that the timer doesn't conflict with another one and doesn't start " "in the past." msgstr "" -"Vérifier que le minuteur n'entre pas en conflit avec un autre et ne commence " +"Vérifiez que le minuteur n'entre pas en conflit avec un autre et ne commence " "pas dans le passé." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" msgstr "L'enregistrement a été programmé avec succès" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 msgid "Add Timer" msgstr "Ajouter le minuteur" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 msgid "_Channel:" -msgstr "_Chaîne :" +msgstr "_Chaîne :" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 msgid "Edit Timer" -msgstr "Editer le minuteur" +msgstr "Modifier le minuteur" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 msgid "Channel:" -msgstr "Chaîne:" +msgstr "Chaîne :" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 msgid "_Start time:" -msgstr "_Heure de début :" +msgstr "_Heure de début :" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 msgid "_Duration:" -msgstr "_Durée :" +msgstr "_Durée :" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 msgid "minutes" msgstr "minutes" @@ -530,27 +527,23 @@ #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "_Heure :" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "Détails" +msgstr "_Heure :" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 msgid "Title:" -msgstr "Titre :" +msgstr "Titre :" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 msgid "Date:" -msgstr "Date :" +msgstr "Date :" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 msgid "Duration:" -msgstr "Durée :" +msgstr "Durée :" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 msgid "Description:" -msgstr "Description :" +msgstr "Description :" #: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 msgid "Start" @@ -560,11 +553,11 @@ msgid "Length" msgstr "Durée" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" msgstr "Maintenant" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" msgstr "Suivant" @@ -578,8 +571,8 @@ "make sure you close all programs such as video players that access your DVB " "card." msgstr "" -"Soit aucune carte DVB est installée soit toutes les cartes sont occupées. " -"Dans ce dernier cas, fermer tous les programmes tel que les lecteurs vidéo " +"Soit aucune carte DVB n'est installée, soit toutes les cartes sont occupées. " +"Dans ce dernier cas, fermez tous les programmes tels que les lecteurs vidéo " "qui accèdent à votre carte DVB." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 @@ -592,11 +585,11 @@ #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 msgid "Select the device you want to configure." -msgstr "Sélectionner le matériel que vous souhaitez configurer." +msgstr "Sélectionnez le matériel que vous souhaitez configurer." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." -msgstr "Tous les matériels sont déjà configurés" +msgstr "Tous les périphériques sont déjà configurés." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 msgid "" @@ -620,7 +613,7 @@ #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" -msgstr "Le message d'erreur détaillé est :" +msgstr "Le message d'erreur détaillé est :" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" @@ -635,299 +628,305 @@ msgid "%s\n" msgstr "%s\n" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 msgid "This process can take some time." -msgstr "Ce processus risque de prendre un certain temps" +msgstr "Ce processus risque de prendre un certain temps." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." msgstr "" -"Vous pouvez sélectionner les canaux que vous désirez avoir dans votre liste " -"de canaux" +"Vous pouvez sélectionner les chaînes que vous désirez avoir dans votre liste " +"de chaînes." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 msgid "Select all" msgstr "Tout sélectionner" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 msgid "Deselect all" msgstr "Tout désélectionner" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 msgid "_Channels:" -msgstr "_Chaînes :" +msgstr "_Chaînes :" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 msgid "Select _scrambled channels" msgstr "_Sélectionner les chaînes cryptées" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 msgid "Signal quality:" -msgstr "Qualité du signal :" +msgstr "Qualité du signal :" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 msgid "Signal strength:" -msgstr "Intensité du signal :" +msgstr "Intensité du signal :" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 msgid "Scanning for channels" msgstr "Recherche des chaînes" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:86 msgid "Missing requirements" msgstr "Paramètres manquants" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:92 msgid "Country and antenna selection" msgstr "Choix de pays et d'émetteur" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:95 msgid "Satellite selection" msgstr "Choix du satellite" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 msgid "Country and provider selection" msgstr "Choix du pays et du fournisseur" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:100 msgid "Unsupported adapter" -msgstr "Tuner non supporté" +msgstr "Adaptateur non pris en charge" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:125 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "Désolé mais les cartes '%s' ne sont pas supportées." +msgstr "Désolé mais les cartes « %s » ne sont pas prises en charge." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:129 msgid "Could not find initial tuning data." -msgstr "Aucun paramètre initial de réglage n'a été trouvé" +msgstr "Aucun paramètre initial de réglage n'a été trouvé." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Please make sure that the dvb-apps package is installed." -msgstr "Vérifier que le paquet dvb-apps est bien installé." +msgstr "Vérifiez que le paquet dvb-apps est bien installé." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 msgid "" "Please choose a country and the antenna that is closest to your location." -msgstr "" -"Choisissez le pays et l'émetteur le plus proche de votre emplacement." +msgstr "Choisissez le pays et l'émetteur le plus proche de votre emplacement." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." msgstr "" -"Si vous ne savez pas quel émetteur choisir, choisissez \"Je ne sais pas\" " +"Si vous ne savez pas quel émetteur choisir, choisissez « Je ne sais pas » " "dans la liste." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." -msgstr "Néanmoins, la recherche de chaînes sera plus longue." +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "However, searching for channels will take considerably longer this way." +msgstr "Néanmoins, la recherche de chaînes sera ainsi plus longue." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:141 msgid "Not listed" msgstr "Non listé" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:152 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:223 msgid "_Country:" -msgstr "_Pays :" +msgstr "_Pays :" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:176 msgid "_Antenna:" -msgstr "_Emetteur :" +msgstr "É_metteur :" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:185 msgid "Antenna" -msgstr "Emetteur" +msgstr "Émetteur" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:197 msgid "_Satellite:" -msgstr "_Satellite :" +msgstr "_Satellite :" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:205 msgid "Satellite" msgstr "Satellite" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:245 msgid "_Providers:" -msgstr "_Fournisseurs d'accés :" +msgstr "_Fournisseurs :" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:253 msgid "Provider" -msgstr "Fournisseur d'accès" +msgstr "Fournisseur" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:302 msgid "Don't know" msgstr "Je ne sais pas" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." msgstr "Bienvenue dans l'assistant de la télévision numérique." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -"Cela va configurer automatiquement vos périphériques et effectuer la " -"recherche des chaînes si nécessaire." +"Il va configurer automatiquement vos périphériques et effectuer la recherche " +"des chaînes si nécessaire." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." -msgstr "Cliquer \"Suivant\" pour commencer" +msgstr "Cliquez sur « Suivant » pour commencer." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" msgstr "_Mode expert" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" msgstr "Configuration de la télévision numérique" #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 msgid "Choose a location where you want to save the list of channels." -msgstr "Choisissez un dossier où sauvegarder la liste des chaînes." +msgstr "Choisissez un dossier où enregistrer la liste des chaînes." #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" -msgstr "Sauvegarde des chaînes" +msgstr "Enregistrer les chaînes" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" msgstr "Configuration du périphérique" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" msgstr "TV" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." -msgstr "Aucune chaîne(s) trouvée(s)." +msgstr "Aucune chaîne trouvée." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "" "Make sure that the antenna is connected and you have selected the correct " "tuning data." msgstr "" -"Assurez vous que votre antenne est branchée et que vous avez sélectionné les " +"Vérifiez que votre antenne est branchée et que vous avez sélectionné les " "bons réglages." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." msgstr "Le périphérique a été ajouté au groupe %s." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." msgstr "Une erreur est survenue en essayant de configurer le périphérique." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" msgstr "Configurer un autre périphérique" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" msgstr "Configuration terminée" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." msgstr "Lé périphérique %s a été configuré avec succès." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." -msgstr "Echec de configuration du périphérique %s." +msgstr "Échec de configuration du périphérique %s." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 msgid "Cleaning up. This may take a while." -msgstr "RAZ. Patience..." +msgstr "Fin de configuration. Veuillez patienter." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 #: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "Réglage TV numérique" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 msgid "" "The generated channels file can be used to configure your devices in the " "control center." msgstr "" -"Le fichier des chaînes généré peut être utilisé pour configurer votre " -"périphérique dans le centre de contrôle." +"Le fichier des chaînes généré peut être utilisé pour configurer vos " +"périphériques dans le centre de contrôle." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -"Êtes-vous sûr de vouloir annuler ?\n" +"Voulez-vous vraiment abandonner ?\n" "Tous les processus seront perdus." -#: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 msgid "Program Guide" msgstr "Guide des programmes" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:306 msgid "Digital TV" msgstr "Télévision numérique" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Watch TV" msgstr "Regarder la télévision" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "Digital _TV" msgstr "_Télévision numérique" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Program Guide" msgstr "_Guide des programmes" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "_Delete" msgstr "_Supprimer" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "D_etails" msgstr "_Détails" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:365 msgid "_Order channels" msgstr "_Ordre des chaînes" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:368 msgid "By _name" msgstr "Par _nom" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:369 msgid "By _group" msgstr "Par _groupe" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:372 msgid "_Reverse order" msgstr "_Inverser l'ordre" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:524 msgid "Delete selected recording?" -msgstr "Supprimer l'enregistrement sélectionné ?" +msgstr "Supprimer l'enregistrement sélectionné ?" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:602 #, python-format msgid "Recording %d" msgstr "Enregistrement %d" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:662 +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "Setup Failed" +msgstr "La configuration a échoué" + +#: ../client/totem-plugin/dvb-daemon.py:663 msgid "GNOME DVB Daemon is not installed" msgstr "Le service GNOME DVB n'est pas installé" +#: ../client/totem-plugin/dvb-daemon.py:666 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Impossible de démarrer la configuration du service DVB pour GNOME" + #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 msgid "Digital TV Control Center" @@ -935,75 +934,8 @@ #: ../data/gnome-dvb-control.desktop.in.in.h:2 msgid "Schedule recordings and browse program guide" -msgstr "Plannifier les enregistrements et voir le programme TV" +msgstr "Planifier les enregistrements et voir le programme TV" #: ../data/gnome-dvb-setup.desktop.in.in.h:1 msgid "Digital TV Setup" -msgstr "Réglage DVB" - -#~ msgid "Toolbar" -#~ msgstr "Barre d'outils" - -#~ msgid "Create Group" -#~ msgstr "Créer le Groupe" - -#~ msgid "Name" -#~ msgstr "Nom" - -#~ msgid "Add To Group" -#~ msgstr "Ajouter au Groupe" - -#~ msgid "Title:" -#~ msgstr "Titre :" - -#~ msgid "Date:" -#~ msgstr "Date :" - -#~ msgid "Duration:" -#~ msgstr "Durée :" - -#~ msgid "Description:" -#~ msgstr "Description :" - -#~ msgid "Totem Movie Player" -#~ msgstr "Lecteur vidéo Totem" - -#~ msgid "Channel List Editor" -#~ msgstr "Editeur de liste de canaux" - -#~ msgid "Channel lists" -#~ msgstr "Listes de chaînes" - -#~ msgid "Channels" -#~ msgstr "Chaînes" - -#~ msgid "Refresh" -#~ msgstr "Actualiser" - -#~ msgid "Device groups:" -#~ msgstr "Groupes de périphériques:" - -#~ msgid "Do you want to search for channels now?" -#~ msgstr "Voulez-vous rechercher les chaînes maintenant ?" - -#~ msgid "DVB card is not configured" -#~ msgstr "La carte DVB n'est pas configurée" - -#~ msgid "Country:" -#~ msgstr "Pays :" - -#~ msgid "Satellite:" -#~ msgstr "Satellite :" - -#~ msgid "Antenna:" -#~ msgstr "Antenne :" - -#~ msgid "Expert mode" -#~ msgstr "Mode expert" - -#~ msgid "" -#~ "Choose the channels you want to have in your list of channels. You can " -#~ "reorder the channels, too." -#~ msgstr "" -#~ "Choisissez les chaînes que vous souhaitez mettre dans votre liste de " -#~ "chaînes. Vous pouvez aussi réordonner les chaînes." +msgstr "Réglage de la TV numérique" diff -Nru gnome-dvb-daemon-0.1.23/po/gl.po gnome-dvb-daemon-0.2.7/po/gl.po --- gnome-dvb-daemon-0.1.23/po/gl.po 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/gl.po 2011-09-22 20:08:40.000000000 +0000 @@ -0,0 +1,906 @@ +# Galician translation for gnome-dvb-daemon. +# Copyright (C) 2011 gnome-dvb-daemon's COPYRIGHT HOLDER +# This file is distributed under the same license as the gnome-dvb-daemon package. +# FIRST AUTHOR , YEAR. +# Fran Diéguez , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: gnome-dvb-daemon master\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-08-16 23:50+0200\n" +"PO-Revision-Date: 2011-08-16 23:49+0200\n" +"Last-Translator: Fran Diéguez \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../client/gnomedvb/__init__.py:32 +msgid "GNOME DVB Daemon" +msgstr "Daemon GNOME DVB" + +#: ../client/gnomedvb/__init__.py:35 +msgid "GNOME DVB Daemon Website" +msgstr "Sitio web de Daemon GNOME DVB" + +#: ../client/gnomedvb/__init__.py:65 +#, python-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "%d hora" +msgstr[1] "%d horas" + +#: ../client/gnomedvb/__init__.py:67 +#, python-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "%d minuto" +msgstr[1] "%d minutos" + +#: ../client/gnomedvb/__init__.py:69 +#, python-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "%d segundo" +msgstr[1] "%d segundos" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 +msgid "Edit Channel Lists" +msgstr "Editar lista de canles" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 +msgid "Channel groups" +msgstr "Grupos de canles" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 +msgid "_Group:" +msgstr "_Grupo:" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 +msgid "Device groups" +msgstr "Grupos de dispositivos" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 +msgid "All channels" +msgstr "Tódalas canles" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 +#: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 +msgid "Channel" +msgstr "Canle" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 +msgid "Choose a channel group" +msgstr "Seleccione un grupo de canles" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 +msgid "Channels of group" +msgstr "Canles do grupo" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 +msgid "An error occured while adding the group" +msgstr "Produciuse un erro ao engadir o grupo" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 +#, python-format +msgid "Are you sure you want to delete the group '%s'?" +msgstr "Ten certeza que quere eliminar o grupo «%s»?" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 +msgid "All assignments to this group will be lost." +msgstr "Perderanse tódalas asignacións a este grupo." + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 +msgid "An error occured while removing the group" +msgstr "Produciuse un erro ao eliminar o grupo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 +msgid "DVB Control Center" +msgstr "Centro de control DVB" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" +msgstr "" +"Elixa un grupo de dispositivos e canle na esquerda para ver a guía de " +"programación" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "" +"Non se configurou ningún dispositivo. Acceda ás preferencias para " +"configuralos." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 +msgid "There is currently no schedule available for this channel" +msgstr "Non hai planificación para esta canle neste momento" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "_Recording schedule" +msgstr "Planificación de _gravación" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +msgid "_Edit" +msgstr "_Editar" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +msgid "_View" +msgstr "_Ver" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 +msgid "Help" +msgstr "Axuda" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +msgid "_Manage" +msgstr "_Administrar" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 +msgid "Manage recording schedule" +msgstr "Administrar a planificación de gravación" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +msgid "_Recordings" +msgstr "_Gravacións" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +msgid "Manage recordings" +msgstr "Administrar gravacións" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +msgid "_Quit" +msgstr "_Saír" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 +msgid "Quit the Program" +msgstr "Saír do programa" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +msgid "_Channel Lists" +msgstr "_Lista de canles" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +msgid "Edit channel lists" +msgstr "Editar lista de canles" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +msgid "_Preferences" +msgstr "_Preferencias" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 +msgid "Display preferences" +msgstr "Preferencias de visualización" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +msgid "_What's on now" +msgstr "Que hai de _novo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +msgid "See what's currently on and is coming next" +msgstr "Mirar que se está emitindo e que ven despois" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +msgid "_Refresh" +msgstr "_Actualizar" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 +msgid "Refresh program guide" +msgstr "Actualizar a guía de programación" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +msgid "_Previous Day" +msgstr "Día _anterior" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 +msgid "Go to previous day" +msgstr "Ir ao día anterior" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +msgid "_Next Day" +msgstr "Seguinte _día" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 +msgid "Go to next day" +msgstr "Ir ao seguinte día" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +msgid "_Channels" +msgstr "_Canles" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +msgid "View/Hide channels" +msgstr "Ver/agochar canles" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +msgid "_Toolbar" +msgstr "Barra de _ferramentas" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 +msgid "View/Hide toolbar" +msgstr "Ver/agochar barra de ferramentas" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +msgid "_About" +msgstr "_Sobre" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 +msgid "Display informations about the program" +msgstr "Mostra información sobre o programa" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 +msgid "Recording schedule" +msgstr "Programa de gravación" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 +msgid "Recordings" +msgstr "Gravacións" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 +msgid "What's on now" +msgstr "Que se está emitindo agora" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 +msgid "Previous Day" +msgstr "Día anterior" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 +msgid "Next Day" +msgstr "Día seguinte" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 +msgid "Schedule recording for the selected event?" +msgstr "Programar unha gravación para o evento seleccionado?" + +#. translators: These appear in the About dialog, usual format applies. +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 +msgid "translator-credits" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 +msgid "Devices" +msgstr "Dispositivos" + +#. translators: first is device's name, second its type +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#, python-format +msgid "%s (%s)\n" +msgstr "%s (%s)\n" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 +#, python-format +msgid "Adapter: %d, Frontend: %d" +msgstr "Adaptador: %d, Frontend: %d" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 +#, python-format +msgid "Group %d" +msgstr "Grupo %d" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:29 +msgid "Add to Group" +msgstr "Engadir ao grupo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 +msgid "Add Device to Group" +msgstr "Engadir dispositivo ao grupo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 +msgid "Create new Group" +msgstr "Crear novo grupo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 +msgid "General" +msgstr "Xeral" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 +msgid "_Name:" +msgstr "_Nome:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 +msgid "Channels _file:" +msgstr "_Ficheiro de canles:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 +msgid "_Directory:" +msgstr "_Cartafol:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 +msgid "Select File" +msgstr "Seleccionar ficheiro" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 +msgid "Select Directory" +msgstr "Seleccionar cartafol" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 +msgid "Edit group" +msgstr "Editar grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 +msgid "Digital TV Preferences" +msgstr "Preferencias de TV dixital" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:90 +msgid "Edit selected group" +msgstr "Editar grupo seleccionado" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:97 +msgid "Remove selected device" +msgstr "Eliminar dispositivo seleccionado" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +msgid "Setup" +msgstr "Configurar" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:108 +msgid "Setup devices" +msgstr "Configurar dispositivos" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:115 +msgid "Create new group" +msgstr "Crear un novo grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:119 +msgid "Create new group for selected device" +msgstr "Crear un novo grupo para o dispositivo seleccionado" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:125 +msgid "Add to group" +msgstr "Engadir ao grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:129 +msgid "Add selected device to existing group" +msgstr "Engadir o dispositivo seleccionado ao grupo existente" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:145 +msgid "Configured devices" +msgstr "Dispositivos configurados" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:156 +msgid "Unconfigured devices" +msgstr "Dispositivos descoñecidos" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:221 +msgid "Device could not be removed from group" +msgstr "Non foi posíbel eliminar o dispositivo do grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:235 +#, python-format +msgid "Are you sure you want to remove device %s from %s" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 +msgid "Group could not be created" +msgstr "Non foi posíbel crear o grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 +msgid "" +"Make sure that you selected the correct channels file and directory where " +"recordings are stored and that both are readable." +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 +msgid "Device could not be added to group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 +msgid "" +"Make sure that the device isn't already assigned to a different group and " +"that all devices in the group are of the same type." +msgstr "" + +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 +msgid "Delete selected recordings?" +msgstr "" + +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +msgid "Pick a date" +msgstr "Seleccione unha data" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 +msgid "Title" +msgstr "Título" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 +msgid "Start time" +msgstr "Hora de inicio" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 +msgid "Duration" +msgstr "Duración" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 +msgid "Timer could not be deleted" +msgstr "Non foi posíbel eliminar a programación" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +msgid "Abort active recording?" +msgstr "Cancelar a gravación activa?" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 +msgid "The timer you selected belongs to a currently active recording." +msgstr "" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 +msgid "Deleting this timer will abort the recording." +msgstr "" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +msgid "Timer could not be created" +msgstr "" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 +msgid "" +"Make sure that the timer doesn't conflict with another one and doesn't start " +"in the past." +msgstr "" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +msgid "Recording has been scheduled successfully" +msgstr "" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 +msgid "Add Timer" +msgstr "Engadir temporizador" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 +msgid "_Channel:" +msgstr "_Canle:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 +msgid "Edit Timer" +msgstr "Editar temporizador" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 +msgid "Channel:" +msgstr "Canle:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 +msgid "_Start time:" +msgstr "_Hora de inicio:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 +msgid "_Duration:" +msgstr "_Duración:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 +msgid "minutes" +msgstr "minutos" + +#: ../client/gnomedvb/ui/wizard/__init__.py:4 +msgid "digital cable" +msgstr "cable dixital" + +#: ../client/gnomedvb/ui/wizard/__init__.py:5 +msgid "digital satellite" +msgstr "satélite dixital" + +#: ../client/gnomedvb/ui/wizard/__init__.py:6 +msgid "digital terrestrial" +msgstr "dixital terrestre" + +#: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 +msgid "Channel group" +msgstr "Canle de grupo" + +#: ../client/gnomedvb/ui/widgets/DateTime.py:50 +msgid "_Time:" +msgstr "_Hora:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 +msgid "Title:" +msgstr "Título:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 +msgid "Date:" +msgstr "Data:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 +msgid "Duration:" +msgstr "Duración:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 +msgid "Description:" +msgstr "Descrición:" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 +msgid "Start" +msgstr "Comezar" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 +msgid "Length" +msgstr "Duración" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 +msgid "Now" +msgstr "Agora" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 +msgid "Next" +msgstr "Seguinte" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +msgid "No devices have been found." +msgstr "Non se atoparon dispositivos:" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 +msgid "" +"Either no DVB cards are installed or all cards are busy. In the latter case " +"make sure you close all programs such as video players that access your DVB " +"card." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 +msgid "Name" +msgstr "Nome" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 +msgid "Type" +msgstr "Tipo" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Seleccione o dispositivo que desexa configurar." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +msgid "All devices are already configured." +msgstr "Tódolos dispositivos están xa configurados." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 +msgid "" +"Go to the control center if you want to alter the settings of already " +"configured devices." +msgstr "" +"Vaia ao centro de control se quere configurar parámetros de dispositivos xa " +"configurados." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +msgid "An error occured while retrieving devices." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 +msgid "" +"Make sure other applications don't access DVB devices and you have " +"permissions to access them." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +msgid "The detailed error message is:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +msgid "Searching for devices" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +msgid "Device selection" +msgstr "Selección de dispositivos" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 +#, python-format +msgid "%s\n" +msgstr "%s\n" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 +msgid "This process can take some time." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 +msgid "Select all" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 +msgid "Deselect all" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 +msgid "_Channels:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 +msgid "Select _scrambled channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 +msgid "Signal quality:" +msgstr "Calidade da sinal:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 +msgid "Signal strength:" +msgstr "Potencia da sinal:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 +msgid "Scanning for channels" +msgstr "Buscando canles" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +msgid "Missing requirements" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +msgid "Country and antenna selection" +msgstr "Selección de pais e antena" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Selección de satélite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +msgid "Country and provider selection" +msgstr "Selección de país e fornecedor" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +msgid "Unsupported adapter" +msgstr "Adaptador non compatíbel" + +#. translators: first %s is the DVB type, e.g. DVB-S +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#, python-format +msgid "Sorry, but '%s' cards aren't supported." +msgstr "As tarxetas «%s» non son compatíbeis." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +msgid "Could not find initial tuning data." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +msgid "Please make sure that the dvb-apps package is installed." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +msgid "" +"Please choose a country and the antenna that is closest to your location." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "" +"If you don't know which antenna to choose select \"Don't know\" from the " +"list of providers." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 +msgid "However, searching for channels will take considerably longer this way." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +msgid "Not listed" +msgstr "Non está na lista" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:153 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:224 +msgid "_Country:" +msgstr "_País:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:177 +msgid "_Antenna:" +msgstr "_Antena:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:186 +msgid "Antenna" +msgstr "Antena" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:198 +msgid "_Satellite:" +msgstr "_Satélite:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:206 +msgid "Satellite" +msgstr "Satélite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:246 +msgid "_Providers:" +msgstr "_Fornecedores:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:254 +msgid "Provider" +msgstr "Fornecedor" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:303 +msgid "Don't know" +msgstr "Non o sei" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 +msgid "Welcome to the digital television Assistant." +msgstr "Benvido ao asistente de televisión dixital." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 +msgid "" +"It will automatically configure your devices and search for channels, if " +"necessary." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +msgid "Click \"Forward\" to begin." +msgstr "Prema «Adiante» para comezar." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 +msgid "_Expert mode" +msgstr "Modo _experto" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 +msgid "Digital TV configuration" +msgstr "Configuración de TV dixital" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 +msgid "Choose a location where you want to save the list of channels." +msgstr "Seleccione a localización onde gardar a lista de canles." + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 +msgid "Save channels" +msgstr "Gardar canles" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 +msgid "Configuring device" +msgstr "Configurando o dispositivo" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 +msgid "TV" +msgstr "TV" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 +msgid "No channels were found." +msgstr "Non se atoparon canles." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "" +"Make sure that the antenna is connected and you have selected the correct " +"tuning data." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 +#, python-format +msgid "The device has been added to the group %s." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 +msgid "An error occured while trying to setup the device." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 +msgid "Configure Another Device" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +msgid "Configuration finished" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#, python-format +msgid "The device %s has been configured sucessfully." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 +#, python-format +msgid "Failed configuring device %s." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 +msgid "Setup digital TV" +msgstr "Configurar a TV dixital" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 +msgid "" +"The generated channels file can be used to configure your devices in the " +"control center." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 +msgid "" +"Are you sure you want to abort?\n" +"All process will be lost." +msgstr "" + +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 +msgid "Program Guide" +msgstr "Guía de programación" + +#: ../client/totem-plugin/dvb-daemon.py:306 +msgid "Digital TV" +msgstr "TV dixital" + +#: ../client/totem-plugin/dvb-daemon.py:357 +msgid "Watch TV" +msgstr "Ver TV" + +#: ../client/totem-plugin/dvb-daemon.py:358 +msgid "Digital _TV" +msgstr "_TV dixital" + +#: ../client/totem-plugin/dvb-daemon.py:360 +msgid "_Program Guide" +msgstr "_Programación" + +#: ../client/totem-plugin/dvb-daemon.py:363 +msgid "_Delete" +msgstr "_Eliminar" + +#: ../client/totem-plugin/dvb-daemon.py:364 +msgid "D_etails" +msgstr "D_etalles" + +#: ../client/totem-plugin/dvb-daemon.py:365 +msgid "_Order channels" +msgstr "_Ordenar canles" + +#: ../client/totem-plugin/dvb-daemon.py:368 +msgid "By _name" +msgstr "Por _nome" + +#: ../client/totem-plugin/dvb-daemon.py:369 +msgid "By _group" +msgstr "Por _grupo" + +#: ../client/totem-plugin/dvb-daemon.py:372 +msgid "_Reverse order" +msgstr "_Orde inverso" + +#: ../client/totem-plugin/dvb-daemon.py:524 +msgid "Delete selected recording?" +msgstr "Desexa eliminar a gravación seleccionada?" + +#: ../client/totem-plugin/dvb-daemon.py:604 +#, python-format +msgid "Recording %d" +msgstr "Gravando %d" + +#: ../client/totem-plugin/dvb-daemon.py:664 +#: ../client/totem-plugin/dvb-daemon.py:667 +msgid "Setup Failed" +msgstr "Fallou a configuración" + +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "GNOME DVB Daemon is not installed" +msgstr "O daemon GNOME DVB non está instalado" + +#: ../client/totem-plugin/dvb-daemon.py:668 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Non foi posíbel iniciar a configuración do daemon de GNOME DVB" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Centro de control da TV dixital" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Programe gravacións e navegue pola guía de programación" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Axustes de televisión dixital" diff -Nru gnome-dvb-daemon-0.1.23/po/hu.po gnome-dvb-daemon-0.2.7/po/hu.po --- gnome-dvb-daemon-0.1.23/po/hu.po 2011-01-15 16:56:19.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/hu.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,24 +7,24 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-12-18 17:41+0000\n" -"Last-Translator: Papp Bence \n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" +"PO-Revision-Date: 2011-01-27 01:48+0000\n" +"Last-Translator: Gabor Kelemen \n" "Language-Team: Hungarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" -msgstr "GNOME DVB Daemon" +msgstr "GNOME DVB démon" #: ../client/gnomedvb/__init__.py:37 msgid "GNOME DVB Daemon Website" -msgstr "GNOME DVB Daemon Honlapja" +msgstr "A GNOME DVB démon honlapja" #: ../client/gnomedvb/__init__.py:86 #, python-format @@ -49,11 +49,11 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 msgid "Edit Channel Lists" -msgstr "Csatorna lista szerkesztése" +msgstr "Csatornalisták szerkesztése" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 msgid "Channel groups" -msgstr "Csatorna csoportok" +msgstr "Csatornacsoportok" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 #: ../client/gnomedvb/ui/preferences/Dialogs.py:54 @@ -62,7 +62,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 msgid "Device groups" -msgstr "Eszköz csoportok" +msgstr "Eszközcsoportok" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 msgid "All channels" @@ -79,7 +79,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 msgid "Choose a channel group" -msgstr "Válasszon egy csatorna csoportot" +msgstr "Válasszon egy csatornacsoportot" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 msgid "Channels of group" @@ -87,38 +87,37 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 msgid "An error occured while adding the group" -msgstr "Hiba lépett fel a csoporthoz adás közben" +msgstr "Hiba történt a csoport felvétele közben" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "Biztos benne, hogy törli a ''%s csoportot?" +msgstr "Biztos benne, hogy törli a(z) „%s” csoportot?" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." -msgstr "Az összes feladat ehez a csoporthot el fog veszni." +msgstr "Az összes feladat ehhez a csoporthoz el fog veszni." #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 msgid "An error occured while removing the group" -msgstr "Hiba lépet fel a csoport törlése során" +msgstr "Hiba történt a csoport törlése közben" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 msgid "DVB Control Center" -msgstr "DVB Kezelőpult" +msgstr "DVB vezérlőpult" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 msgid "" "Choose a device group and channel on the left to view the program guide" msgstr "" -"Válasszon egy eszköz csoportot és egy csatornát a baloldalról, hogy " -"megnézhesse a műsorfüzetet" +"A műsorfüzet megjelenítéséhez válasszon egy eszközcsoportot és egy csatornát " +"a bal oldalról" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 msgid "" "No devices are configured. Please go to preferences to configure them." msgstr "" -"Egyetlen eszköz sincs beállítva. Kérem menjen a Beállítások menübe, hogy " -"beállíthassa." +"Egyetlen eszköz sincs beállítva. A Beállítások menüben állítsa be azokat." #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 msgid "There is currently no schedule available for this channel" @@ -127,7 +126,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 #: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" -msgstr "_Felvétel ütemező" +msgstr "_Felvételütemező" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" @@ -143,12 +142,12 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" -msgstr "_Kezel" +msgstr "_Kezelés" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" -msgstr "Felvétel ütemező kezelése" +msgstr "Felvételütemező kezelése" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" @@ -168,11 +167,11 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" -msgstr "_Csatorna listák" +msgstr "_Csatornalisták" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" -msgstr "Csatorna listák szerkesztése" +msgstr "Csatornalisták szerkesztése" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" @@ -180,7 +179,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" -msgstr "Beállítások mutatása" +msgstr "Beállítások megjelenítése" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" @@ -188,7 +187,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" -msgstr "Láthatja mi megy éppen és mi fog következni" +msgstr "Láthatja, mi megy éppen, és mi fog következni" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" @@ -197,7 +196,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" -msgstr "Programfüzet frissítése" +msgstr "Műsorfüzet frissítése" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" @@ -206,7 +205,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" -msgstr "Előző naphoz ugrik" +msgstr "Ugrás az előző napra" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" @@ -215,7 +214,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" -msgstr "Következő naphoz ugrik" +msgstr "Ugrás a következő napra" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" @@ -223,7 +222,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" -msgstr "Mutassa/Rejtse el a csatornákat" +msgstr "Csatornák megjelenítése/elrejtése" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" @@ -231,7 +230,7 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" -msgstr "Mutassa/Rejtse el az eszköztárat" +msgstr "Eszköztár megjelenítése/elrejtése" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" @@ -239,12 +238,12 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" -msgstr "Információkat jelenít meg az alkalmazásról" +msgstr "Információk megjelenítése a programról" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" -msgstr "Felvétel ütemező" +msgstr "Felvételütemező" #. Add recordings #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 @@ -271,13 +270,14 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 #: ../client/totem-plugin/dvb-daemon.py:179 msgid "Schedule recording for the selected event?" -msgstr "A kiválasztott eseményt hozzáadja az ütemezett felvételekhez?" +msgstr "Beütemezi a kiválasztott esemény felvételét?" #. translators: These appear in the About dialog, usual format applies. #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" +" Gabor Kelemen https://launchpad.net/~kelemeng\n" " Papp Bence https://launchpad.net/~sclegnrbs" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 @@ -299,11 +299,11 @@ #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 #, python-format msgid "Group %d" -msgstr "Csoport %d" +msgstr "%d. csoport" #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "Csoprthoz adás" +msgstr "Csoporthoz adás" #: ../client/gnomedvb/ui/preferences/Dialogs.py:47 msgid "Add Device to Group" @@ -311,7 +311,7 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:92 msgid "Create new Group" -msgstr "Új csoport készítése" +msgstr "Új csoport létrehozása" #: ../client/gnomedvb/ui/preferences/Dialogs.py:112 msgid "General" @@ -323,7 +323,7 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:130 msgid "Channels _file:" -msgstr "Csatornák _fájl:" +msgstr "Csatorna_fájl:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:159 msgid "_Directory:" @@ -344,7 +344,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:38 #: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" -msgstr "Digitális TV Beállításai" +msgstr "Digitális TV beállításai" #: ../client/gnomedvb/ui/preferences/Preferences.py:88 msgid "Edit selected group" @@ -360,15 +360,15 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:106 msgid "Setup devices" -msgstr "Eszközök beállításafájlt" +msgstr "Eszközök beállítása" #: ../client/gnomedvb/ui/preferences/Preferences.py:113 msgid "Create new group" -msgstr "Új csoport készítése" +msgstr "Új csoport létrehozása" #: ../client/gnomedvb/ui/preferences/Preferences.py:117 msgid "Create new group for selected device" -msgstr "Új csoport készítése a kiválasztott eszköznek" +msgstr "Új csoport létrehozása a kiválasztott eszközhöz" #: ../client/gnomedvb/ui/preferences/Preferences.py:123 msgid "Add to group" @@ -380,7 +380,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:143 msgid "Configured devices" -msgstr "Eszközök konfigurálása" +msgstr "Beállított eszközök" #: ../client/gnomedvb/ui/preferences/Preferences.py:154 msgid "Unconfigured devices" @@ -393,19 +393,19 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:233 #, python-format msgid "Are you sure you want to remove device %s from %s" -msgstr "Biztos benne, hogy eltávolítja a %s eszközt innen %s" +msgstr "Biztos, hogy eltávolítja a(z) %s eszközt innen: %s?" #: ../client/gnomedvb/ui/preferences/Preferences.py:255 msgid "Group could not be created" -msgstr "Csoport nem hozható létre" +msgstr "A csoport nem hozható létre" #: ../client/gnomedvb/ui/preferences/Preferences.py:257 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" -"Győződjön meg róla, hogy a helyes csatornák fájlt és könyvárat választotta " -"ki, illetve mindkettő olvasható-e?" +"Győződjön meg róla, hogy a megfelelő csatornafájlt és könyvtárat választotta " +"ki, illetve mindkettő olvasható." #: ../client/gnomedvb/ui/preferences/Preferences.py:286 msgid "Device could not be added to group" @@ -417,7 +417,7 @@ "that all devices in the group are of the same type." msgstr "" "Győződjön meg róla, hogy a kiválasztott eszköz nincs-e más csoporthoz is " -"hozzáadva, és a csoportban levő eszközök azonos típusúak-e?" +"hozzáadva, és a csoportban levő eszközök azonos típusúak." #: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 msgid "Delete selected recordings?" @@ -439,11 +439,11 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 #: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 msgid "Duration" -msgstr "Időtartam" +msgstr "Hossz" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 msgid "Timer could not be deleted" -msgstr "Időzítő nem törölhető" +msgstr "Az időzítő nem törölhető" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 msgid "Abort active recording?" @@ -451,15 +451,15 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "The timer you selected belongs to a currently active recording." -msgstr "Az időzítő amit kiválasztott az előbb éppen felvételt készít." +msgstr "A kiválasztott időzítő éppen felvételt készít." #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 msgid "Deleting this timer will abort the recording." -msgstr "Ha törli ezt az időzítőt a felvétel meg lesz szakítva." +msgstr "Az időzítő törlése megszakítja a felvételt." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 msgid "Timer could not be created" -msgstr "Időzítő nem hozható létre" +msgstr "Az időzítő nem hozható létre" #: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 msgid "" @@ -471,7 +471,7 @@ #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "Felvétel sikeresen ütemezve lett" +msgstr "A felvétel sikeresen ütemezve" #: ../client/gnomedvb/ui/timers/TimerDialog.py:64 msgid "Add Timer" @@ -496,7 +496,7 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" -msgstr "_Időtartam:" +msgstr "_Hossz:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" @@ -516,7 +516,7 @@ #: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 msgid "Channel group" -msgstr "Csatorna csoport" +msgstr "Csatornacsoport" #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" @@ -536,7 +536,7 @@ #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 msgid "Duration:" -msgstr "Időtartam:" +msgstr "Hossz:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 msgid "Description:" @@ -568,9 +568,8 @@ "make sure you close all programs such as video players that access your DVB " "card." msgstr "" -"DVB kártya nincs telepítve vagy az összes használatban van. Az utóbbi " -"esetben kérem zárja be az összes programot, például videó lejátszókat, hogy " -"hozzáférjen a DVB kártyához." +"Nincsenek DVB kártyák, vagy az összes használatban van. Utóbbi esetben zárja " +"be az összes, a DVB kártyákat használó programot, például a videolejátszókat." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" @@ -582,19 +581,18 @@ #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 msgid "Select the device you want to configure." -msgstr "Válasszon egy eszközt, amit konfigurálni szeretne." +msgstr "Válassza ki a konfigurálandó eszközt." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." -msgstr "Az összes eszköz már be van konfigurálva." +msgstr "Már az összes eszköz be van konfigurálva." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 msgid "" "Go to the control center if you want to alter the settings of already " "configured devices." msgstr "" -"Menjen a kezelőpultba, ha meg akarja változtatni a már bekonfigurált " -"eszközök beállításait." +"A vezérlőpultban megváltoztathatja a már bekonfigurált eszközök beállításait." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." @@ -605,12 +603,12 @@ "Make sure other applications don't access DVB devices and you have " "permissions to access them." msgstr "" -"Győződjön meg róla, hogy más alkalmazás nem fér hozzá a DVB eszközökhöz, és " -"önnek van-e jogosultsága a hozzáférésükhöz." +"Győződjön meg róla, hogy nem használja más alkalmazás a DVB-eszközöket, és " +"van jogosultsága az elérésükhöz." #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" -msgstr "A részletes hiba üzenet:" +msgstr "A részletes hibaüzenet:" #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" @@ -632,16 +630,15 @@ #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 msgid "" "You can select the channels you want to have in your list of channels." -msgstr "" -"Kiválaszthatja a csatornákat, amiket a csatornák listájához szeretne adni." +msgstr "Kiválaszthatja a csatornalistájához adandó csatornákat." #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" -msgstr "Mindet kijelöl" +msgstr "Összes kijelölése" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" -msgstr "Kijelölés megszüntetése" +msgstr "Kijelölés törlése" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 msgid "_Channels:" @@ -653,7 +650,7 @@ #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 msgid "Signal quality:" -msgstr "A jel minősége:" +msgstr "Jelminőség:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 msgid "Signal strength:" @@ -687,40 +684,38 @@ #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "Sajnálom, de a '%s' kártyák nem támogatottak." +msgstr "Elnézést, a(z) „%s” kártyák nem támogatottak." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." -msgstr "Nem található kezdő hangolási adat." +msgstr "Nem találhatók kiinduló hangolási adatok." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." -msgstr "Kérem győződjön meg róla, hogy a dvb-apps csomag telepítve van." +msgstr "Győződjön meg róla, hogy a dvb-apps csomag telepítve van." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "" -"Kérem válassza ki az országot és az antennát ami legközelebb van az ön " -"helyzetéhez." +"Válasszon egy országot, és a tartózkodási helyéhez legközelebbi antennát." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 msgid "" "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." msgstr "" -"Ha nem tudja melyik antennát válassza, válassza a 'Nem tudom' opciót a " +"Ha nem tudja, melyik antennát válassza, válassza a „Nem tudom” opciót a " "szolgáltatók listáról." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 msgid "" "However, searching for channels will take considerably longer this way." -msgstr "" -"Habár, a csatornák keresése meglehetősen több időt igényel ezen az úton." +msgstr "A csatornák keresése azonban így sokkal tovább tart." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" -msgstr "Nincs a listán" +msgstr "Nincs felsorolva" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 @@ -737,7 +732,7 @@ #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 msgid "_Satellite:" -msgstr "_Műhold" +msgstr "_Műhold:" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 msgid "Satellite" @@ -745,7 +740,7 @@ #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 msgid "_Providers:" -msgstr "_Szolgáltatók" +msgstr "_Szolgáltatók:" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 msgid "Provider" @@ -757,19 +752,19 @@ #: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 msgid "Welcome to the digital television Assistant." -msgstr "Üdvözlöm a digitális televízió Varázslóban." +msgstr "Üdvözöljük a Digitális televízió varázslóban." #: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -"Ez automatikus bekonfigurálja az eszközeit és megkeresi az összes csatornát, " -"ha szükséges." +"Ez automatikusan beállítja az eszközeit, és megkeresi a csatornákat, ha " +"szükséges." #: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." -msgstr "Kattintson a 'Következő'-re a kezdéshez." +msgstr "Kattintson a „Tovább” gombra a kezdéshez." #: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 msgid "_Expert mode" @@ -781,7 +776,7 @@ #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 msgid "Choose a location where you want to save the list of channels." -msgstr "Válasszon helyet, ahová menteni szeretné a csatornák listáját." +msgstr "Válassza ki, hová szeretné menteni a csatornák listáját." #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" @@ -805,17 +800,17 @@ "Make sure that the antenna is connected and you have selected the correct " "tuning data." msgstr "" -"Győződjön meg róla, hogy az antenna csatlakoztatva van-e és helyesen " -"választotta ki a behangolási adatokat." +"Győződjön meg róla, hogy az antenna csatlakoztatva van, és helyes hangolási " +"adatokat választott ki." #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 #, python-format msgid "The device has been added to the group %s." -msgstr "Az eszköz hozzá lett adva %s csoporthoz." +msgstr "Az eszköz hozzáadva a(z) %s csoporthoz." #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 msgid "An error occured while trying to setup the device." -msgstr "Hiba lépett fel az eszköz beállítása során." +msgstr "Hiba történt az eszköz beállítása során." #: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" @@ -828,12 +823,12 @@ #: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." -msgstr "A %s eszköz sikeresen be lett konfigurálva." +msgstr "A(z) %s eszköz sikeresen konfigurálva." #: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "Nem lehet a %s eszközt bekonfigurálni." +msgstr "A(z) %s eszköz konfigurálása meghiúsult." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 msgid "Cleaning up. This may take a while." @@ -849,16 +844,16 @@ "The generated channels file can be used to configure your devices in the " "control center." msgstr "" -"A generált csatornák fájl használható az eszközök konfigurálására a " -"kezelőpultban." +"A generált csatornafájl használható az eszközök konfigurálására a " +"vezérlőpultban." #: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -"Biztos benne, hogy megszakítja?\n" -"Az összes folyamat el fog veszni." +"Biztos, hogy megszakítja?\n" +"A megadott adatok el fognak veszni." #: ../client/totem-plugin/dvb-daemon.py:151 #: ../client/totem-plugin/dvb-daemon.py:195 @@ -892,7 +887,7 @@ #: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" -msgstr "Csa_tornák szerint" +msgstr "Csa_tornák rendezése" #: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" @@ -900,7 +895,7 @@ #: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" -msgstr "Cso_portok szerint" +msgstr "Cso_port szerint" #: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" @@ -913,20 +908,20 @@ #: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" -msgstr "Felvétel %d" +msgstr "%d. felvétel" #: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" -msgstr "GNOME DVB Daemon nincs telepítve" +msgstr "A GNOME DVB démon nincs telepítve" #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 msgid "Digital TV Control Center" -msgstr "Digitális TV beállításkezelő" +msgstr "Digitális TV vezérlőpult" #: ../data/gnome-dvb-control.desktop.in.in.h:2 msgid "Schedule recordings and browse program guide" -msgstr "Felvételütemező és műsorfüzet böngésző" +msgstr "Felvételek ütemezése és a műsorfüzet böngészése" #: ../data/gnome-dvb-setup.desktop.in.in.h:1 msgid "Digital TV Setup" diff -Nru gnome-dvb-daemon-0.1.23/po/it.po gnome-dvb-daemon-0.2.7/po/it.po --- gnome-dvb-daemon-0.1.23/po/it.po 2011-01-15 16:56:21.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/it.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,16 +7,16 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-10-11 15:46+0000\n" -"Last-Translator: Sebastian Pölsterl \n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" +"PO-Revision-Date: 2011-01-17 20:38+0000\n" +"Last-Translator: r1348 \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" @@ -624,7 +624,7 @@ #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 #, python-format msgid "%s\n" -msgstr "" +msgstr "%s\n" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 msgid "This process can take some time." diff -Nru gnome-dvb-daemon-0.1.23/po/LINGUAS gnome-dvb-daemon-0.2.7/po/LINGUAS --- gnome-dvb-daemon-0.1.23/po/LINGUAS 2011-01-15 17:00:32.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/LINGUAS 2011-09-22 20:08:40.000000000 +0000 @@ -9,12 +9,17 @@ es fi fr +gl hu it lt +nb pl pt_BR +ru +sl sr sv te tr +zh_CN diff -Nru gnome-dvb-daemon-0.1.23/po/lt.po gnome-dvb-daemon-0.2.7/po/lt.po --- gnome-dvb-daemon-0.1.23/po/lt.po 2011-01-15 16:56:21.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/lt.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" "PO-Revision-Date: 2010-10-11 15:46+0000\n" "Last-Translator: Mantas Kriaučiūnas \n" "Language-Team: Lithuanian \n" @@ -16,8 +16,8 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "(n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" diff -Nru gnome-dvb-daemon-0.1.23/po/nb.po gnome-dvb-daemon-0.2.7/po/nb.po --- gnome-dvb-daemon-0.1.23/po/nb.po 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/nb.po 2011-09-22 20:08:40.000000000 +0000 @@ -0,0 +1,954 @@ +# Norwegian bokmål translation of gnome-dvb-daemon. +# Copyright (C) 2002-2005 Free Software Foundation, Inc. +# Kjartan Maraas , 2002-2011. +# Terance Edward Sola , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: gnome-dvb-daemon 1.x\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-05 07:57+0200\n" +"PO-Revision-Date: 2011-09-05 07:59+0200\n" +"Last-Translator: Kjartan Maraas \n" +"Language-Team: Norwegian Bokmal \n" +"Language: nb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../client/gnomedvb/__init__.py:36 +msgid "GNOME DVB Daemon" +msgstr "" + +#: ../client/gnomedvb/__init__.py:39 +msgid "GNOME DVB Daemon Website" +msgstr "" + +#: ../client/gnomedvb/__init__.py:62 +#, python-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "%d time" +msgstr[1] "%d timer" + +#: ../client/gnomedvb/__init__.py:64 +#, python-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "%d minutt" +msgstr[1] "%d minutter" + +#: ../client/gnomedvb/__init__.py:66 +#, python-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "%d sekund" +msgstr[1] "%d sekunder" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 +msgid "Edit Channel Lists" +msgstr "Rediger kanallister" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 +msgid "Channel groups" +msgstr "Kanalgrupper" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 +msgid "_Group:" +msgstr "_Gruppe:" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 +msgid "Device groups" +msgstr "" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 +msgid "All channels" +msgstr "Alle kanaler" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 +#: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 +msgid "Channel" +msgstr "Kanal" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 +msgid "Choose a channel group" +msgstr "" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 +#, fuzzy +msgid "Channels of group" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 +#, fuzzy +msgid "An error occured while adding the group" +msgstr "En feil oppsto under lagring av kapitler" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 +#, python-format +msgid "Are you sure you want to delete the group '%s'?" +msgstr "" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 +msgid "All assignments to this group will be lost." +msgstr "" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 +#, fuzzy +msgid "An error occured while removing the group" +msgstr "En feil oppsto under lagring av kapitler" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 +msgid "DVB Control Center" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 +msgid "There is currently no schedule available for this channel" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "_Recording schedule" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +msgid "_Edit" +msgstr "R_ediger" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +msgid "_View" +msgstr "_Vis" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 +#, fuzzy +msgid "Help" +msgstr "_Hjelp:" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +msgid "_Manage" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 +msgid "Manage recording schedule" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#, fuzzy +msgid "_Recordings" +msgstr "_Koding:" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +msgid "Manage recordings" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +msgid "_Quit" +msgstr "A_vslutt" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 +#, fuzzy +msgid "Quit the Program" +msgstr "Avslutt programmet" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#, fuzzy +msgid "_Channel Lists" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +msgid "Edit channel lists" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#, fuzzy +msgid "_Preferences" +msgstr "Brukervalg" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 +#, fuzzy +msgid "Display preferences" +msgstr "Brukervalg" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +msgid "_What's on now" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +msgid "See what's currently on and is coming next" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +msgid "_Refresh" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 +msgid "Refresh program guide" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#, fuzzy +msgid "_Previous Day" +msgstr "Forrige" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 +msgid "Go to previous day" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#, fuzzy +msgid "_Next Day" +msgstr "Neste" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 +msgid "Go to next day" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#, fuzzy +msgid "_Channels" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +msgid "View/Hide channels" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +msgid "_Toolbar" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 +msgid "View/Hide toolbar" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +msgid "_About" +msgstr "_Om" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 +#, fuzzy +msgid "Display informations about the program" +msgstr "Mer informasjon om media-tillegg" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 +msgid "Recording schedule" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 +#, fuzzy +msgid "Recordings" +msgstr "_Koding:" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 +msgid "What's on now" +msgstr "" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 +#, fuzzy +msgid "Previous Day" +msgstr "Forrige" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 +#, fuzzy +msgid "Next Day" +msgstr "Neste" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 +msgid "Schedule recording for the selected event?" +msgstr "" + +#. translators: These appear in the About dialog, usual format applies. +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 +msgid "translator-credits" +msgstr "" +"Kjartan Maraas \n" +"Espen Stefansen " + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 +#, fuzzy +msgid "Devices" +msgstr "enhet%d" + +#. translators: first is device's name, second its type +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#, python-format +msgid "%s (%s)\n" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 +#, python-format +msgid "Adapter: %d, Frontend: %d" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 +#, python-format +msgid "Group %d" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:29 +msgid "Add to Group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 +msgid "Add Device to Group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 +msgid "Create new Group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 +msgid "General" +msgstr "Generelt" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 +msgid "_Name:" +msgstr "_Navn:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 +#, fuzzy +msgid "Channels _file:" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 +msgid "_Directory:" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 +#, fuzzy +msgid "Select File" +msgstr "Velg en mappe" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 +msgid "Select Directory" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 +msgid "Edit group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 +#, fuzzy +msgid "Digital TV Preferences" +msgstr "Brukervalg for Totem" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:90 +msgid "Edit selected group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:97 +msgid "Remove selected device" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +msgid "Setup" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:108 +msgid "Setup devices" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:115 +msgid "Create new group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:119 +#, fuzzy +msgid "Create new group for selected device" +msgstr "Lag en ny kapittelliste for filmen" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:125 +msgid "Add to group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:129 +msgid "Add selected device to existing group" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:145 +#, fuzzy +msgid "Configured devices" +msgstr "Konfigurer tillegg" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:156 +msgid "Unconfigured devices" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:221 +#, fuzzy +msgid "Device could not be removed from group" +msgstr "Kunne ikke ta opp filmen." + +#: ../client/gnomedvb/ui/preferences/Preferences.py:235 +#, python-format +msgid "Are you sure you want to remove device %s from %s" +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 +#, fuzzy +msgid "Group could not be created" +msgstr "Kunne ikke ta opp filmen." + +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 +msgid "" +"Make sure that you selected the correct channels file and directory where " +"recordings are stored and that both are readable." +msgstr "" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 +#, fuzzy +msgid "Device could not be added to group" +msgstr "Kunne ikke ta opp filmen." + +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 +msgid "" +"Make sure that the device isn't already assigned to a different group and " +"that all devices in the group are of the same type." +msgstr "" + +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 +msgid "Delete selected recordings?" +msgstr "" + +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +msgid "Pick a date" +msgstr "" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 +#, fuzzy +msgid "Title" +msgstr "Tittel:" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 +msgid "Start time" +msgstr "" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 +msgid "Duration" +msgstr "Varighet" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 +#, fuzzy +msgid "Timer could not be deleted" +msgstr "Kunne ikke ta opp filmen." + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +#, fuzzy +msgid "Abort active recording?" +msgstr "Koding av tekst" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 +msgid "The timer you selected belongs to a currently active recording." +msgstr "" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 +msgid "Deleting this timer will abort the recording." +msgstr "" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +#, fuzzy +msgid "Timer could not be created" +msgstr "Kunne ikke ta opp filmen." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 +msgid "" +"Make sure that the timer doesn't conflict with another one and doesn't start " +"in the past." +msgstr "" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +msgid "Recording has been scheduled successfully" +msgstr "" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 +msgid "Add Timer" +msgstr "" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 +#, fuzzy +msgid "_Channel:" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 +msgid "Edit Timer" +msgstr "" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 +#, fuzzy +msgid "Channel:" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 +msgid "_Start time:" +msgstr "" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 +#, fuzzy +msgid "_Duration:" +msgstr "Varighet:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 +#, fuzzy +msgid "minutes" +msgstr "%d minutt" + +#: ../client/gnomedvb/ui/wizard/__init__.py:4 +msgid "digital cable" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/__init__.py:5 +msgid "digital satellite" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/__init__.py:6 +msgid "digital terrestrial" +msgstr "" + +#: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 +#, fuzzy +msgid "Channel group" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/widgets/DateTime.py:50 +#, fuzzy +msgid "_Time:" +msgstr "Tid:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 +msgid "Title:" +msgstr "Tittel:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 +#, fuzzy +msgid "Date:" +msgstr "Bitrate:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 +msgid "Duration:" +msgstr "Varighet:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 +#, fuzzy +msgid "Description:" +msgstr "Varighet:" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 +#, fuzzy +msgid "Start" +msgstr "Starter %s" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 +msgid "Length" +msgstr "" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 +msgid "Now" +msgstr "" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 +msgid "Next" +msgstr "Neste" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +msgid "No devices have been found." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 +msgid "" +"Either no DVB cards are installed or all cards are busy. In the latter case " +"make sure you close all programs such as video players that access your DVB " +"card." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 +#, fuzzy +msgid "Name" +msgstr "_Navn:" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 +msgid "Type" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +msgid "All devices are already configured." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 +msgid "" +"Go to the control center if you want to alter the settings of already " +"configured devices." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#, fuzzy +msgid "An error occured while retrieving devices." +msgstr "En feil oppsto under lagring av kapitler" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 +msgid "" +"Make sure other applications don't access DVB devices and you have " +"permissions to access them." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +#, fuzzy +msgid "The detailed error message is:" +msgstr "Ingen feilmelding" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +#, fuzzy +msgid "Searching for devices" +msgstr "Søker etter undertekster …" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +msgid "Device selection" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 +#, python-format +msgid "%s\n" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 +msgid "This process can take some time." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 +#, fuzzy +msgid "Select all" +msgstr "Velg en mappe" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 +msgid "Deselect all" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 +#, fuzzy +msgid "_Channels:" +msgstr "Kanaler:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 +msgid "Select _scrambled channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 +msgid "Signal quality:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 +msgid "Signal strength:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 +msgid "Scanning for channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +msgid "Missing requirements" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +msgid "Country and antenna selection" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +msgid "Country and provider selection" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +msgid "Unsupported adapter" +msgstr "" + +#. translators: first %s is the DVB type, e.g. DVB-S +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#, python-format +msgid "Sorry, but '%s' cards aren't supported." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +#, fuzzy +msgid "Could not find initial tuning data." +msgstr "Kunne ikke initiere lirc." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +#, fuzzy +msgid "Please make sure that the dvb-apps package is installed." +msgstr "Sjekk at Totem er korrekt installert." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +msgid "" +"Please choose a country and the antenna that is closest to your location." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "" +"If you don't know which antenna to choose select \"Don't know\" from the " +"list of providers." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 +msgid "However, searching for channels will take considerably longer this way." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +msgid "Not listed" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:153 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:224 +msgid "_Country:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:177 +msgid "_Antenna:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:186 +msgid "Antenna" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:198 +msgid "_Satellite:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:206 +msgid "Satellite" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:246 +#, fuzzy +msgid "_Providers:" +msgstr "Egenska_per" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:254 +msgid "Provider" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:303 +msgid "Don't know" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 +msgid "Welcome to the digital television Assistant." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 +msgid "" +"It will automatically configure your devices and search for channels, if " +"necessary." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +msgid "Click \"Forward\" to begin." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 +#, fuzzy +msgid "_Expert mode" +msgstr "Repeteringsmodus" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 +msgid "Digital TV configuration" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 +msgid "Choose a location where you want to save the list of channels." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 +#, fuzzy +msgid "Save channels" +msgstr "Lagre endringer" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 +msgid "Configuring device" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 +msgid "TV" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 +#, fuzzy +msgid "No channels were found." +msgstr "Ingen resultater funnet." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "" +"Make sure that the antenna is connected and you have selected the correct " +"tuning data." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 +#, python-format +msgid "The device has been added to the group %s." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 +#, fuzzy +msgid "An error occured while trying to setup the device." +msgstr "En feil oppsto under lagring av kapitler" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 +#, fuzzy +msgid "Configure Another Device" +msgstr "Konfigurer programmet" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#, fuzzy +msgid "Configuration finished" +msgstr "Konfigurer tillegg" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#, python-format +msgid "The device %s has been configured sucessfully." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 +#, python-format +msgid "Failed configuring device %s." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 +msgid "Setup digital TV" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 +msgid "" +"The generated channels file can be used to configure your devices in the " +"control center." +msgstr "" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 +msgid "" +"Are you sure you want to abort?\n" +"All process will be lost." +msgstr "" + +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 +msgid "Program Guide" +msgstr "Programoversikt" + +#: ../client/totem-plugin/dvb-daemon.py:306 +msgid "Digital TV" +msgstr "Digital TV" + +#: ../client/totem-plugin/dvb-daemon.py:357 +msgid "Watch TV" +msgstr "Se på TV" + +#: ../client/totem-plugin/dvb-daemon.py:358 +msgid "Digital _TV" +msgstr "Digital _TV" + +#: ../client/totem-plugin/dvb-daemon.py:360 +msgid "_Program Guide" +msgstr "_Programoversikt" + +#: ../client/totem-plugin/dvb-daemon.py:363 +msgid "_Delete" +msgstr "_Slett" + +#: ../client/totem-plugin/dvb-daemon.py:364 +msgid "D_etails" +msgstr "D_etaljer" + +#: ../client/totem-plugin/dvb-daemon.py:365 +msgid "_Order channels" +msgstr "S_orter kanaler" + +#: ../client/totem-plugin/dvb-daemon.py:368 +msgid "By _name" +msgstr "Etter _navn" + +#: ../client/totem-plugin/dvb-daemon.py:369 +msgid "By _group" +msgstr "Etter _gruppe" + +#: ../client/totem-plugin/dvb-daemon.py:372 +msgid "_Reverse order" +msgstr "Omvendt _rekkefølge" + +#: ../client/totem-plugin/dvb-daemon.py:524 +msgid "Delete selected recording?" +msgstr "Slett valgt opptak?" + +#: ../client/totem-plugin/dvb-daemon.py:604 +#, python-format +msgid "Recording %d" +msgstr "Tar opp %d" + +#: ../client/totem-plugin/dvb-daemon.py:664 +#: ../client/totem-plugin/dvb-daemon.py:667 +msgid "Setup Failed" +msgstr "" + +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "GNOME DVB Daemon is not installed" +msgstr "" + +#: ../client/totem-plugin/dvb-daemon.py:668 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Kontrollsenter for digital TV" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Oppsett av digital TV" diff -Nru gnome-dvb-daemon-0.1.23/po/pl.po gnome-dvb-daemon-0.2.7/po/pl.po --- gnome-dvb-daemon-0.1.23/po/pl.po 2011-01-15 16:56:24.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/pl.po 2011-05-10 00:30:40.000000000 +0000 @@ -1,33 +1,35 @@ -# Polish translation for gnome-dvb-daemon -# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 -# This file is distributed under the same license as the gnome-dvb-daemon package. -# FIRST AUTHOR , 2009. -# +# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +# Aviary.pl +# Jeśli masz jakiekolwiek uwagi odnoszące się do tłumaczenia lub chcesz +# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas: +# gnomepl@aviary.pl +# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- msgid "" msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-12-06 16:13+0000\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-04-27 12:41+0200\n" +"PO-Revision-Date: 2011-04-27 12:42+0200\n" "Last-Translator: Piotr Drąg \n" -"Language-Team: Polish \n" +"Language-Team: Polish \n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Poedit-Language: Polish\n" +"X-Poedit-Country: Poland\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" msgstr "Usługa DVB środowiska GNOME" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" msgstr "Witryna usługi DVB środowiska GNOME" -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" @@ -35,7 +37,7 @@ msgstr[1] "%d godziny" msgstr[2] "%d godzin" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" @@ -43,7 +45,7 @@ msgstr[1] "%d minuty" msgstr[2] "%d minut" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -55,37 +57,37 @@ msgid "Edit Channel Lists" msgstr "Modyfikuj listę kanałów" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" msgstr "Grupy kanałów" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_Grupa:" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" msgstr "Grupy urządzeń" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" msgstr "Wszystkie kanały" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 msgid "Channel" msgstr "Kanał" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" msgstr "Wybór grupy kanałów" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" msgstr "Kanały z grupy" @@ -106,206 +108,201 @@ msgid "An error occured while removing the group" msgstr "Wystąpił błąd podczas usuwania grupy" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" msgstr "Centrum sterowania DVB" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" msgstr "" "Proszę wybrać grupę urządzeń i kanał z lewej strony, aby wyświetlić " "przewodnik po programach" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." msgstr "" "Brak skonfigurowanych urządzeń. Proszę przejść do preferencji, aby je " "skonfigurować." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 msgid "There is currently no schedule available for this channel" msgstr "W tej chwili nie ma zaprogramowanego nagrania dla tego kanału" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "_Recording schedule" msgstr "_Harmonogram nagrań" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" msgstr "_Edycja" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" msgstr "_Widok" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" msgstr "Pomoc" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_Zarządzaj" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" msgstr "Zarządzanie harmonogramem nagrań" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" msgstr "_Nagrania" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" msgstr "Zarządzanie nagraniami" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" msgstr "Za_kończ" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" msgstr "Kończy działanie programu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" msgstr "_Lista kanałów" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" msgstr "Modyfikuje listę kanałów" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" msgstr "_Preferencje" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" msgstr "Wyświetla preferencje" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" msgstr "_Teraz na antenie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" msgstr "Wyświetla nadawany program i co będzie następnie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" msgstr "_Odśwież" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" msgstr "Odświeża przewodnik po programach" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" msgstr "_Poprzedni dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" msgstr "Przechodzi do poprzedniego dnia" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" msgstr "_Następny dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" msgstr "Przechodzi do następnego dnia" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" msgstr "_Kanały" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" msgstr "Wyświetla/ukrywa kanały" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" msgstr "Pasek _narzędziowy" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" msgstr "Wyświetla/ukrywa pasek narzędziowy" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" msgstr "_O programie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" msgstr "Wyświetla informacje o programie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Harmonogram nagrań" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 msgid "Recordings" msgstr "Nagrania" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 msgid "What's on now" msgstr "Teraz na antenie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" msgstr "Poprzedni dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" msgstr "Następny dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 msgid "Schedule recording for the selected event?" msgstr "Zaplanować nagranie wybranego programu?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" -"Launchpad Contributions:\n" -" Jarosław Ogrodnik https://launchpad.net/~goz\n" -" Michał Sawicz https://launchpad.net/~saviq\n" -" Piotr Drąg https://launchpad.net/~raven46\n" -" Sebastian Pölsterl https://launchpad.net/~sebp\n" -" Tomasz Świątek https://launchpad.net/~devegoo\n" -" pp/bs https://launchpad.net/~pawprok" +"Jarosław Ogrodnik https://launchpad.net/~goz\n" +"Michał Sawicz https://launchpad.net/~saviq\n" +"Tomasz Świątek https://launchpad.net/~devegoo\n" +"pp/bs https://launchpad.net/~pawprok\n" +"Aviary.pl , 2011" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" msgstr "Urządzenia" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 #, python-format msgid "Adapter: %d, Frontend: %d" msgstr "Adapter %d, tuner: %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" msgstr "Grupa %d" @@ -314,101 +311,101 @@ msgid "Add to Group" msgstr "Dodaj do grupy" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" msgstr "Dodaj urządzenie do grupy" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" msgstr "Utwórz nową grupę" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" msgstr "Ogólne" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" msgstr "_Nazwa:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" msgstr "_Plik kanałów:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" msgstr "_Katalog:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" msgstr "Wybór pliku" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" msgstr "Wybór katalogu" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" msgstr "Modyfikuj grupę" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "Digital TV Preferences" msgstr "Preferencje telewizji cyfrowej" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" msgstr "Modyfikuje wybraną grupę" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" msgstr "Usuwa wybrane urządzenie" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" msgstr "Ustawienia" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" msgstr "Ustawia urządzenia" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" msgstr "Utwórz nową grupę" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" msgstr "Tworzy nową grupę dla wybranego urządzenia" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" msgstr "Dodaj do grupy" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" msgstr "Dodaje wybrane urządzenie do istniejącej grupy" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" msgstr "Skonfigurowane urządzenia" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" msgstr "Nieskonfigurowane urządzenia" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" msgstr "Urządzenia nie można usunąć z grupy" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" msgstr "Na pewno usunąć urządzenie %s z grupy %s?" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" msgstr "Grupa nie może zostać utworzona" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 msgid "" "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." @@ -416,11 +413,11 @@ "Proszę upewnić się, że wybrano poprawny plik z kanałami i katalog " "przechowywania oraz to, czy oba są dostępne do odczytu." -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" msgstr "Urządzenie nie może zostać dodane do grupy" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 msgid "" "Make sure that the device isn't already assigned to a different group and " "that all devices in the group are of the same type." @@ -428,7 +425,7 @@ "Proszę upewnić się, że to urządzenie nie jest już przypisane do innej grupy " "oraz to, czy wszystkie urządzenia w grupie są tego samego typu." -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 msgid "Delete selected recordings?" msgstr "Usunąć wybrane nagrania?" @@ -436,33 +433,33 @@ msgid "Pick a date" msgstr "Wybór daty" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 msgid "Title" msgstr "Tytuł" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 msgid "Start time" msgstr "Czas rozpoczęcia" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" msgstr "Czas trwania" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 msgid "Timer could not be deleted" msgstr "Zaplanowane nagranie nie może zostać usunięte" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "Abort active recording?" msgstr "Usunąć trwające nagranie?" -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 msgid "The timer you selected belongs to a currently active recording." msgstr "Wybrany czas zaplanowanego nagrania należy do aktywnego nagrania." -#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 msgid "Deleting this timer will abort the recording." msgstr "Usunięcie tego zaplanowanego nagrania przerwie nagrywanie." @@ -482,32 +479,32 @@ msgid "Recording has been scheduled successfully" msgstr "Nagranie zostało poprawnie rozpoczęte" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 msgid "Add Timer" msgstr "Dodaj nagranie" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 msgid "_Channel:" msgstr "_Kanał:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 msgid "Edit Timer" msgstr "Modyfikuj zaplanowane nagranie" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 msgid "Channel:" msgstr "Kanał:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 msgid "_Start time:" msgstr "_Czas rozpoczęcia:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 msgid "_Duration:" msgstr "_Czas trwania:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 msgid "minutes" msgstr "minut" @@ -531,23 +528,19 @@ msgid "_Time:" msgstr "_Czas:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "Szczegóły" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 msgid "Title:" msgstr "Tytuł:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 msgid "Date:" msgstr "Data:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 msgid "Duration:" msgstr "Czas trwania:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 msgid "Description:" msgstr "Opis:" @@ -559,11 +552,11 @@ msgid "Length" msgstr "Długość" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" msgstr "Teraz" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" msgstr "Następny" @@ -634,136 +627,134 @@ msgid "%s\n" msgstr "%s\n" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 msgid "This process can take some time." msgstr "Ten proces może chwilę potrwać." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." msgstr "Można wybrać kanały, które mają znaleźć się na liście." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 msgid "Select all" msgstr "Zaznacz wszystko" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 msgid "Deselect all" msgstr "Odznacz wszystko" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 msgid "_Channels:" msgstr "_Kanały:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 msgid "Select _scrambled channels" msgstr "Zaznacz _kodowane kanały" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 msgid "Signal quality:" msgstr "Jakość sygnału:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 msgid "Signal strength:" msgstr "Moc sygnału:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 msgid "Scanning for channels" msgstr "Wyszukiwanie kanałów" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:86 msgid "Missing requirements" msgstr "Brakujące wymagania" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:92 msgid "Country and antenna selection" msgstr "Wybór kraju i nadajnika" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:95 msgid "Satellite selection" msgstr "Wybór satelit" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 msgid "Country and provider selection" msgstr "Wybór kraju i dostawcy" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:100 msgid "Unsupported adapter" msgstr "Nieobsługiwany adapter" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:125 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Karty typu \"%s\" nie są obsługiwane." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:129 msgid "Could not find initial tuning data." msgstr "Nie można odnaleźć początkowych danych strojenia." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Please make sure that the dvb-apps package is installed." msgstr "Proszę upewnić się, że zainstalowano pakiet dvb-apps." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "Proszę wybrać kraj oraz najbliższy nadajnik." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." msgstr "" "Jeśli nadajnik jest nieznany, należy wybrać \"Nieznany\" z listy dostawców." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "However, searching for channels will take considerably longer this way." msgstr "Proszę mieć na uwadze, że wyszukiwanie kanałów potrwa wtedy dłużej." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:141 msgid "Not listed" msgstr "Brak na liście" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:152 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:223 msgid "_Country:" msgstr "_Kraj:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:176 msgid "_Antenna:" msgstr "N_adajnik:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:185 msgid "Antenna" msgstr "Nadajnik" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:197 msgid "_Satellite:" msgstr "_Satelita:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:205 msgid "Satellite" msgstr "Satelita" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:245 msgid "_Providers:" msgstr "_Dostawcy:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:253 msgid "Provider" msgstr "Dostawca" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:302 msgid "Don't know" msgstr "Nieznany" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." msgstr "Witamy w asystencie telewizji cyfrowej." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -771,15 +762,15 @@ "Asystent automatycznie skonfiguruje i wyszuka kanały, jeśli będzie to " "konieczne." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." msgstr "Kliknięcie przycisku \"Dalej\" rozpocznie." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" msgstr "Tryb _eksperta" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" msgstr "Konfiguracja telewizji cyfrowej" @@ -791,20 +782,20 @@ msgid "Save channels" msgstr "Zapisz kanały" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" msgstr "Konfigurowanie urządzenia" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" msgstr "Telewizja" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." msgstr "Nie odnaleziono kanałów." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "" "Make sure that the antenna is connected and you have selected the correct " "tuning data." @@ -812,29 +803,29 @@ "Proszę upewnić się, że antena jest podłączona oraz wybrano poprawne dane " "strojenia." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." msgstr "Urządzenie zostało dodane do grupy %s." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." msgstr "Wystąpił błąd podczas próby ustawienia urządzenia." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" msgstr "Skonfiguruj inne urządzenie" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" msgstr "Konfiguracja została ukończona" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." msgstr "Urządzenie %s zostało pomyślnie skonfigurowane." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." msgstr "Skonfigurowanie urządzenia %s się nie powiodło." @@ -848,7 +839,7 @@ msgid "Setup digital TV" msgstr "Ustawienie telewizji cyfrowej" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -856,7 +847,7 @@ "Utworzona lista kanałów może zostać użyta do skonfigurowania urządzeń w " "centrum sterowania." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -864,65 +855,74 @@ "Na pewno przerwać?\n" "Wszystkie dane zostaną utracone." -#: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 msgid "Program Guide" msgstr "Przewodnik po programach" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:306 msgid "Digital TV" msgstr "Telewizja cyfrowa" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Watch TV" msgstr "Oglądaj telewizję" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "Digital _TV" msgstr "_Telewizja cyfrowa" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Program Guide" msgstr "_Przewodnik po programach" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "_Delete" msgstr "_Usuń" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "D_etails" msgstr "_Szczegóły" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:365 msgid "_Order channels" msgstr "_Uporządkuj kanały" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:368 msgid "By _name" msgstr "Według _nazw" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:369 msgid "By _group" msgstr "Według gr_up" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:372 msgid "_Reverse order" msgstr "_Odwrócony porządek" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:524 msgid "Delete selected recording?" msgstr "Usunąć wybrane nagranie?" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:602 #, python-format msgid "Recording %d" msgstr "Nagrywanie %d" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:662 +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "Setup Failed" +msgstr "Ustawienie się nie powiodło" + +#: ../client/totem-plugin/dvb-daemon.py:663 msgid "GNOME DVB Daemon is not installed" msgstr "Usługa DVB środowiska GNOME nie jest zainstalowana" +#: ../client/totem-plugin/dvb-daemon.py:666 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Nie można uruchomić ustawień usługi DVB środowiska GNOME" + #. www.k-d-w.org/ #: ../data/gnome-dvb-control.desktop.in.in.h:1 msgid "Digital TV Control Center" @@ -935,242 +935,3 @@ #: ../data/gnome-dvb-setup.desktop.in.in.h:1 msgid "Digital TV Setup" msgstr "Ustawienia telewizji cyfrowej" - -#~ msgid "Device groups:" -#~ msgstr "Grupy urządzeń:" - -#~ msgid "" -#~ "No devices are configured. Please go to preferences and to configure them." -#~ msgstr "" -#~ "Nie skonfigurowano żadnych urządzeń. Przejdź do preferencji by dodać nowe " -#~ "urządzenia." - -#~ msgid "Refresh" -#~ msgstr "Odśwież" - -#~ msgid "Channels" -#~ msgstr "Kanały" - -#~ msgid "Toolbar" -#~ msgstr "Pasek narzędzi" - -#~ msgid "" -#~ "Schedule recording for the selected " -#~ "event?" -#~ msgstr "" -#~ "Zaplanować nagranie wybranego " -#~ "programu?" - -#~ msgid "Channels File" -#~ msgstr "Plik kanałów" - -#~ msgid "Recordings' Directory" -#~ msgstr "Katalog nagrań" - -#~ msgid "Create Group" -#~ msgstr "Stwórz grupę" - -#~ msgid "Name" -#~ msgstr "Nazwa" - -#~ msgid "Add To Group" -#~ msgstr "Dodaj do grupy" - -#~ msgid "Select a group:" -#~ msgstr "Wybierz grupę:" - -#~ msgid "" -#~ "Device could not be removed from " -#~ "group" -#~ msgstr "" -#~ "Nie można usunąć urządzenia z grupy" - -#~ msgid "Group could not be created" -#~ msgstr "Nie można utworzyć grupy" - -#~ msgid "Configured devices" -#~ msgstr "Urządzenia skonfigurowane" - -#~ msgid "Unconfigured devices" -#~ msgstr "Urządzenia nieskonfigurowane" - -#~ msgid "" -#~ "Device could not be added to group" -#~ msgstr "" -#~ "Nie można dodać urządzenia do grupy" - -#~ msgid "Duration:" -#~ msgstr "Czas trwania:" - -#~ msgid "Title:" -#~ msgstr "Tytuł:" - -#~ msgid "Channel:" -#~ msgstr "Kanał" - -#~ msgid "Date:" -#~ msgstr "Data:" - -#~ msgid "Description:" -#~ msgstr "Opis:" - -#~ msgid "Delete selected recordings?" -#~ msgstr "Usunąć wybrane nagrania?" - -#~ msgid "Pick date" -#~ msgstr "Wybierz datę" - -#~ msgid "Start time:" -#~ msgstr "Czas rozpoczęcia:" - -#~ msgid "Timer could not be deleted" -#~ msgstr "Nie można usunąć zegara" - -#~ msgid "Abort active recording?" -#~ msgstr "Przerwać trwające nagranie?" - -#~ msgid "Select device you want to configure." -#~ msgstr "Wybierz urządzenie, które chcesz skonfigurować." - -#~ msgid "" -#~ "Choose the channels you want to have in your list of channels. You can " -#~ "reorder the channels, too." -#~ msgstr "" -#~ "Wybierz kanały, które mają pojawić się na liście kanałów. Możesz także " -#~ "zmienić ich kolejność." - -#~ msgid "Australia" -#~ msgstr "Australia" - -#~ msgid "Austria" -#~ msgstr "Austria" - -#~ msgid "Germany" -#~ msgstr "Niemcy" - -#~ msgid "Czech Republic" -#~ msgstr "Czechy" - -#~ msgid "Switzerland" -#~ msgstr "Szwajcaria" - -#~ msgid "Belgium" -#~ msgstr "Belgia" - -#~ msgid "Denmark" -#~ msgstr "Dania" - -#~ msgid "Spain" -#~ msgstr "Hiszpania" - -#~ msgid "Netherlands" -#~ msgstr "Holandia" - -#~ msgid "New Zealand" -#~ msgstr "Nowa Zelandia" - -#~ msgid "Poland" -#~ msgstr "Polska" - -#~ msgid "Hungary" -#~ msgstr "Węgry" - -#~ msgid "Finland" -#~ msgstr "Finlandia" - -#~ msgid "France" -#~ msgstr "Francja" - -#~ msgid "Luxemburg" -#~ msgstr "Luksemburg" - -#~ msgid "Iceland" -#~ msgstr "Islandia" - -#~ msgid "Italy" -#~ msgstr "Włochy" - -#~ msgid "Greece" -#~ msgstr "Grecja" - -#~ msgid "Providers:" -#~ msgstr "Dostawca:" - -#~ msgid "Norway" -#~ msgstr "Norwegia" - -#~ msgid "Slovakia" -#~ msgstr "Słowacja" - -#~ msgid "Sweden" -#~ msgstr "Szwecja" - -#~ msgid "United Kingdom" -#~ msgstr "Wielka Brytania" - -#~ msgid "Taiwan" -#~ msgstr "Tajwan" - -#~ msgid "Country:" -#~ msgstr "Kraj:" - -#~ msgid "Satellite:" -#~ msgstr "Satelita:" - -#~ msgid "Antenna:" -#~ msgstr "Nadajnik:" - -#~ msgid "Expert mode" -#~ msgstr "Tryb zaawansowany" - -#~ msgid "Do you want to search for channels now?" -#~ msgstr "Czy chcesz teraz wyszukać kanały?" - -#~ msgid "Totem Movie Player" -#~ msgstr "Totem - odtwarzacz filmów" - -#~ msgid "DVB card is not configured" -#~ msgstr "Karta DVB nie jest skonfigurowana" - -#~ msgid "Select scrambled channels" -#~ msgstr "Wybieraj zakodowane kanały" - -#, python-format -#~ msgid "Scanning for channels on device %s" -#~ msgstr "Wyszukiwanie kanałów w urządzeniu %s" - -#~ msgid "Hong Kong" -#~ msgstr "Hongkong" - -#~ msgid "Channel lists" -#~ msgstr "Lista kanałów" - -#~ msgid "Select a group:" -#~ msgstr "Zaznacz grupę" - -#~ msgid "Channels File" -#~ msgstr "plik kanałów" - -#~ msgid "Recordings' Directory" -#~ msgstr "Katalog nagrań" - -#~ msgid "Timer" -#~ msgstr "Zaplanowane nagranie" - -#~ msgid "Start time:" -#~ msgstr "Czas rozpoczęcia:" - -#~ msgid "Providers:" -#~ msgstr "Dostawca:" - -#~ msgid "Satellite:" -#~ msgstr "Satelita:" - -#~ msgid "Channel List Editor" -#~ msgstr "Edytor Listy Kanałów" - -#~ msgid "Country:" -#~ msgstr "Kraj:" - -#~ msgid "Antenna:" -#~ msgstr "Antena" diff -Nru gnome-dvb-daemon-0.1.23/po/POTFILES.in gnome-dvb-daemon-0.2.7/po/POTFILES.in --- gnome-dvb-daemon-0.1.23/po/POTFILES.in 2010-04-01 09:50:30.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/POTFILES.in 2011-04-17 10:51:56.000000000 +0000 @@ -28,6 +28,6 @@ client/gnomedvb/ui/wizard/pages/SummaryPage.py client/gnomedvb/ui/wizard/SetupWizard.py client/totem-plugin/dvb-daemon.py -client/totem-plugin/dvb-daemon.totem-plugin.in +client/totem-plugin/dvb-daemon.plugin.in data/gnome-dvb-control.desktop.in.in data/gnome-dvb-setup.desktop.in.in diff -Nru gnome-dvb-daemon-0.1.23/po/pt_BR.po gnome-dvb-daemon-0.2.7/po/pt_BR.po --- gnome-dvb-daemon-0.1.23/po/pt_BR.po 2011-01-15 16:56:22.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/pt_BR.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,16 +7,16 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-10-11 15:46+0000\n" -"Last-Translator: Sebastian Pölsterl \n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" +"PO-Revision-Date: 2011-04-11 02:56+0000\n" +"Last-Translator: Edvaldo de Souza Cruz \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" @@ -278,6 +278,7 @@ msgstr "" "Launchpad Contributions:\n" " Douglas Santos https://launchpad.net/~douglasrpg\n" +" Edvaldo de Souza Cruz https://launchpad.net/~edvaldoscruz\n" " Felipe G. Wozniak https://launchpad.net/~felipewozniak\n" " Marcos Paulo Siqueira https://launchpad.net/~marcosx\n" " Sebastian Pölsterl https://launchpad.net/~sebp\n" @@ -627,7 +628,7 @@ #: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 #, python-format msgid "%s\n" -msgstr "" +msgstr "%s\n" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 msgid "This process can take some time." diff -Nru gnome-dvb-daemon-0.1.23/po/ru.po gnome-dvb-daemon-0.2.7/po/ru.po --- gnome-dvb-daemon-0.1.23/po/ru.po 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/ru.po 2011-06-20 16:42:35.000000000 +0000 @@ -0,0 +1,882 @@ +# Russian translation for gnome-dvb-daemon. +# Copyright (C) 2011 gnome-dvb-daemon's COPYRIGHT HOLDER +# This file is distributed under the same license as the gnome-dvb-daemon package. +# Yuri Myasoedov , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: gnome-dvb-daemon master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-06-03 02:28+0000\n" +"PO-Revision-Date: 2011-06-10 23:09+0300\n" +"Last-Translator: Yuri Myasoedov \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../client/gnomedvb/__init__.py:32 +msgid "GNOME DVB Daemon" +msgstr "Служба GNOME DVB" + +#: ../client/gnomedvb/__init__.py:35 +msgid "GNOME DVB Daemon Website" +msgstr "Веб-сайт службы GNOME DVB" + +#: ../client/gnomedvb/__init__.py:65 +#, python-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "%d час" +msgstr[1] "%d часа" +msgstr[2] "%d часов" + +#: ../client/gnomedvb/__init__.py:67 +#, python-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "%d минута" +msgstr[1] "%d минуты" +msgstr[2] "%d минут" + +#: ../client/gnomedvb/__init__.py:69 +#, python-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "%d секунда" +msgstr[1] "%d секунды" +msgstr[2] "%d секунд" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 +msgid "Edit Channel Lists" +msgstr "Изменить список каналов" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 +msgid "Channel groups" +msgstr "Группы каналов" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 +msgid "_Group:" +msgstr "_Группа:" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 +msgid "Device groups" +msgstr "Группы устройств" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 +msgid "All channels" +msgstr "Все каналы" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 +#: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 +msgid "Channel" +msgstr "Канал" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 +msgid "Choose a channel group" +msgstr "Выберите группу каналов" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 +msgid "Channels of group" +msgstr "Каналы групп" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 +msgid "An error occured while adding the group" +msgstr "При добавлении группы произошла ошибка" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 +#, python-format +msgid "Are you sure you want to delete the group '%s'?" +msgstr "Действительно удалить группу «%s»?" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 +msgid "All assignments to this group will be lost." +msgstr "Все назначения для этой группы будут утрачены." + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 +msgid "An error occured while removing the group" +msgstr "При удалении группы произошла ошибка" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 +msgid "DVB Control Center" +msgstr "Центр управления DVB" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" +msgstr "Выберите слева группу устройств и канал, чтобы просмотреть ТВ-гид" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "Нет настроенных устройств. Перейдите к настройке устройств." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 +msgid "There is currently no schedule available for this channel" +msgstr "В данный момент для этого канала ничего не запланировано" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "_Recording schedule" +msgstr "_Планирование записи" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +msgid "_Edit" +msgstr "_Правка" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +msgid "_View" +msgstr "_Вид" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 +msgid "Help" +msgstr "Справка" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +msgid "_Manage" +msgstr "_Управление" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 +msgid "Manage recording schedule" +msgstr "Управление планированием записей" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +msgid "_Recordings" +msgstr "_Записи" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +msgid "Manage recordings" +msgstr "Управление записями" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +msgid "_Quit" +msgstr "_Закончить" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 +msgid "Quit the Program" +msgstr "Закрыть программу" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +msgid "_Channel Lists" +msgstr "_Списки каналов" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +msgid "Edit channel lists" +msgstr "Изменить списки каналов" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +msgid "_Preferences" +msgstr "_Настройки" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 +msgid "Display preferences" +msgstr "Настройки экрана" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +msgid "_What's on now" +msgstr "_Что идёт" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +msgid "See what's currently on and is coming next" +msgstr "Посмотреть, что сейчас идёт и что будет далее" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +msgid "_Refresh" +msgstr "_Обновить" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 +msgid "Refresh program guide" +msgstr "Обновить ТВ-гид" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +msgid "_Previous Day" +msgstr "_Предыдущий день" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 +msgid "Go to previous day" +msgstr "К предыдущему дню" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +msgid "_Next Day" +msgstr "_Следующий день" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 +msgid "Go to next day" +msgstr "К следующему дню" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +msgid "_Channels" +msgstr "_Каналы" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +msgid "View/Hide channels" +msgstr "Показывать/скрывать каналы" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +msgid "_Toolbar" +msgstr "_Панель управления" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 +msgid "View/Hide toolbar" +msgstr "Показывать/скрывать панель инструментов" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +msgid "_About" +msgstr "_О программе" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 +msgid "Display informations about the program" +msgstr "Показать информацию о программе" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 +msgid "Recording schedule" +msgstr "Планирование записи" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 +msgid "Recordings" +msgstr "Записи" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 +msgid "What's on now" +msgstr "Что сейчас идёт" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 +msgid "Previous Day" +msgstr "Предыдущий день" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 +msgid "Next Day" +msgstr "Следующий день" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 +msgid "Schedule recording for the selected event?" +msgstr "Запланировать запись для выбранного события?" + +#. translators: These appear in the About dialog, usual format applies. +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 +msgid "translator-credits" +msgstr "Юрий Мясоедов , 2011" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 +msgid "Devices" +msgstr "Устройства" + +#. translators: first is device's name, second its type +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#, python-format +msgid "%s (%s)\n" +msgstr "%s (%s)\n" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 +#, python-format +msgid "Adapter: %d, Frontend: %d" +msgstr "Адаптер: %d; фронт-энд: %d" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 +#, python-format +msgid "Group %d" +msgstr "Группа %d" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:29 +msgid "Add to Group" +msgstr "Добавить в группу" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 +msgid "Add Device to Group" +msgstr "Добавить устройство в группу" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 +msgid "Create new Group" +msgstr "Создать новую группу" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 +msgid "General" +msgstr "Общие" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 +msgid "_Name:" +msgstr "_Название:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 +msgid "Channels _file:" +msgstr "_Файл каналов:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 +msgid "_Directory:" +msgstr "_Каталог:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 +msgid "Select File" +msgstr "Выбрать файл" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 +msgid "Select Directory" +msgstr "Выбрать каталог" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 +msgid "Edit group" +msgstr "Изменить группу" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 +msgid "Digital TV Preferences" +msgstr "Настройки цифрового ТВ" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:90 +msgid "Edit selected group" +msgstr "Изменить выбранную группу" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:97 +msgid "Remove selected device" +msgstr "Удалить выбранное устройство" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +msgid "Setup" +msgstr "Настройка" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:108 +msgid "Setup devices" +msgstr "Настройка устройств" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:115 +msgid "Create new group" +msgstr "Создать новую группу" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:119 +msgid "Create new group for selected device" +msgstr "Создать новую группу для выбранного устройства" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:125 +msgid "Add to group" +msgstr "Добавить в группу" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:129 +msgid "Add selected device to existing group" +msgstr "Добавить выбранное устройство в существующую группу" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:145 +msgid "Configured devices" +msgstr "Настроенные устройства" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:156 +msgid "Unconfigured devices" +msgstr "Ненастроенный устройства" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:221 +msgid "Device could not be removed from group" +msgstr "Устройство не может быть удалено из группы" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:235 +#, python-format +msgid "Are you sure you want to remove device %s from %s" +msgstr "Действительно удалить удалённое устройство %s из %s" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 +msgid "Group could not be created" +msgstr "Не удалось создать группу" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 +msgid "Make sure that you selected the correct channels file and directory where recordings are stored and that both are readable." +msgstr "Убедитесь, что выбран правильный файл с каналами и каталог с записями, а также что они доступны для чтения." + +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 +msgid "Device could not be added to group" +msgstr "Не удалось добавить устройство в группу" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 +msgid "Make sure that the device isn't already assigned to a different group and that all devices in the group are of the same type." +msgstr "Убедитесь, что устройство не относится к другой группе, и что все устройства в группе относятся к одному и тому же типу." + +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 +msgid "Delete selected recordings?" +msgstr "Удалить выбранные записи?" + +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +msgid "Pick a date" +msgstr "Выберите дату" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 +msgid "Title" +msgstr "Заголовок" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 +msgid "Start time" +msgstr "Время начала" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 +msgid "Duration" +msgstr "Длительность" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 +msgid "Timer could not be deleted" +msgstr "Не удалось удалить таймер" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +msgid "Abort active recording?" +msgstr "Отменить запущенные записи?" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 +msgid "The timer you selected belongs to a currently active recording." +msgstr "Выбранный таймер относится к запущенной записи." + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 +msgid "Deleting this timer will abort the recording." +msgstr "Удаление этого таймера приведёт к отмене записи." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +msgid "Timer could not be created" +msgstr "Не удалось создать таймер" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 +msgid "Make sure that the timer doesn't conflict with another one and doesn't start in the past." +msgstr "Убедитесь, что таймер не конфликтует с другим таймером и его запуск не запланирован в прошлом." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +msgid "Recording has been scheduled successfully" +msgstr "Запись успешно запланирована" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 +msgid "Add Timer" +msgstr "Добавить таймер" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 +msgid "_Channel:" +msgstr "_Канал:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 +msgid "Edit Timer" +msgstr "Изменить таймер" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 +msgid "Channel:" +msgstr "Канал:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 +msgid "_Start time:" +msgstr "_Время начала:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 +msgid "_Duration:" +msgstr "_Длительность:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 +msgid "minutes" +msgstr "мин" + +#: ../client/gnomedvb/ui/wizard/__init__.py:4 +msgid "digital cable" +msgstr "цифровое кабельное ТВ" + +#: ../client/gnomedvb/ui/wizard/__init__.py:5 +msgid "digital satellite" +msgstr "цифровое спутниковое ТВ" + +#: ../client/gnomedvb/ui/wizard/__init__.py:6 +msgid "digital terrestrial" +msgstr "всемирное цифровое ТВ" + +#: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 +msgid "Channel group" +msgstr "Группа каналов" + +#: ../client/gnomedvb/ui/widgets/DateTime.py:50 +msgid "_Time:" +msgstr "_Время:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 +msgid "Title:" +msgstr "Название:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 +msgid "Date:" +msgstr "Дата:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 +msgid "Duration:" +msgstr "Длительность:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 +msgid "Description:" +msgstr "Описание:" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 +msgid "Start" +msgstr "Начало" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 +msgid "Length" +msgstr "Длина" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 +msgid "Now" +msgstr "Сейчас" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 +msgid "Next" +msgstr "Далее" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +msgid "No devices have been found." +msgstr "Устройства не найдены." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 +msgid "Either no DVB cards are installed or all cards are busy. In the latter case make sure you close all programs such as video players that access your DVB card." +msgstr "Нет установленных карт DVB, или все карты заняты. В последнем случае, закройте все приложения, например видеопроигрыватели, которые могут использовать карту DVB." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 +msgid "Name" +msgstr "Название" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 +msgid "Type" +msgstr "Тип" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Выберите устройство для настройки." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +msgid "All devices are already configured." +msgstr "Все устройства настроены." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 +msgid "Go to the control center if you want to alter the settings of already configured devices." +msgstr "Перейдите в центр управления, если вы хотите изменить параметры настроенных устройств." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +msgid "An error occured while retrieving devices." +msgstr "При извлечении устройств произошла ошибка." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 +msgid "Make sure other applications don't access DVB devices and you have permissions to access them." +msgstr "Убедитесь, что другие приложения не используют устройства DVB, и вас есть права доступа к этим устройствам." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +msgid "The detailed error message is:" +msgstr "Подробное сообщение об ошибке:" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +msgid "Searching for devices" +msgstr "Поиск устройств" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +msgid "Device selection" +msgstr "Выбор устройства" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 +#, python-format +msgid "%s\n" +msgstr "%s\n" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 +msgid "This process can take some time." +msgstr "Этот процесс может занять некоторое время." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." +msgstr "Можно выбрать каналы, которые необходимо поместить в список каналов." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 +msgid "Select all" +msgstr "Выбрать все" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 +msgid "Deselect all" +msgstr "Убрать выбор" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 +msgid "_Channels:" +msgstr "_Каналы:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 +msgid "Select _scrambled channels" +msgstr "Выбрать _каналы с шифрованием" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 +msgid "Signal quality:" +msgstr "Качество сигнала:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 +msgid "Signal strength:" +msgstr "Мощность сигнала:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 +msgid "Scanning for channels" +msgstr "Поиск каналов" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +msgid "Missing requirements" +msgstr "Отсутствующие зависимости" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +msgid "Country and antenna selection" +msgstr "Выбор страны и антенны" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Выбор спутника" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +msgid "Country and provider selection" +msgstr "Выбор страны и провайдера" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +msgid "Unsupported adapter" +msgstr "Неподдерживаемый адаптер" + +#. translators: first %s is the DVB type, e.g. DVB-S +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#, python-format +msgid "Sorry, but '%s' cards aren't supported." +msgstr "Карты «%s» не поддерживаются." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +msgid "Could not find initial tuning data." +msgstr "Не удалось обнаружить начальные данные настройки." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +msgid "Please make sure that the dvb-apps package is installed." +msgstr "Убедитесь, что пакет с приложениями dvb установлен." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +msgid "Please choose a country and the antenna that is closest to your location." +msgstr "Выберите страну и ближайшую к вам антенну." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "If you don't know which antenna to choose select \"Don't know\" from the list of providers." +msgstr "Если вы не знаете, какую антенну выбрать, выберите из списка провайдеров пункт «Не знаю»." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 +msgid "However, searching for channels will take considerably longer this way." +msgstr "Однако поиск каналов займёт больше времени." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +msgid "Not listed" +msgstr "Нет в списке" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:153 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:224 +msgid "_Country:" +msgstr "_Страна:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:177 +msgid "_Antenna:" +msgstr "_Антенна:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:186 +msgid "Antenna" +msgstr "Антенна" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:198 +msgid "_Satellite:" +msgstr "_Спутник:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:206 +msgid "Satellite" +msgstr "Спутник" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:246 +msgid "_Providers:" +msgstr "_Провайдеры:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:254 +msgid "Provider" +msgstr "Провайдер" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:303 +msgid "Don't know" +msgstr "Не знаю" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 +msgid "Welcome to the digital television Assistant." +msgstr "Добро пожаловать в помощник по цифровому ТВ" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 +msgid "It will automatically configure your devices and search for channels, if necessary." +msgstr "Он автоматически настроит устройства и найдёт каналы, если это необходимо." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +msgid "Click \"Forward\" to begin." +msgstr "Чтобы начать, нажмите «Вперёд»." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 +msgid "_Expert mode" +msgstr "_Режим эксперта" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 +msgid "Digital TV configuration" +msgstr "Настройка цифрового ТВ" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 +msgid "Choose a location where you want to save the list of channels." +msgstr "Укажите местоположение для сохранения списка каналов." + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 +msgid "Save channels" +msgstr "Сохранить каналы" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 +msgid "Configuring device" +msgstr "Настройка устройства" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 +msgid "TV" +msgstr "ТВ" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 +msgid "No channels were found." +msgstr "Каналы не найдены." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "Make sure that the antenna is connected and you have selected the correct tuning data." +msgstr "Убедитесь, что антенна подключена и что выбраны корректные данные настройки." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 +#, python-format +msgid "The device has been added to the group %s." +msgstr "Устройство было добавлено в группу %s." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 +msgid "An error occured while trying to setup the device." +msgstr "При попытке настройки устройства произошла ошибка." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 +msgid "Configure Another Device" +msgstr "Настроить другое устройство" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +msgid "Configuration finished" +msgstr "Настройка завершена" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#, python-format +msgid "The device %s has been configured sucessfully." +msgstr "Устройство %s было успешно настроено." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 +#, python-format +msgid "Failed configuring device %s." +msgstr "Не удалось настроить устройство %s." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Очистка. Это может занять некоторое время." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 +msgid "Setup digital TV" +msgstr "Настройка цифрового ТВ" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 +msgid "The generated channels file can be used to configure your devices in the control center." +msgstr "Созданный файл каналов можно использовать в центре управления для настройки устройств." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 +msgid "" +"Are you sure you want to abort?\n" +"All process will be lost." +msgstr "" +"Действительно хотите отменить?\n" +"Весь процесс будет потерян." + +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 +msgid "Program Guide" +msgstr "ТВ-гид" + +#: ../client/totem-plugin/dvb-daemon.py:306 +msgid "Digital TV" +msgstr "Цифровое ТВ" + +#: ../client/totem-plugin/dvb-daemon.py:357 +msgid "Watch TV" +msgstr "Смотреть ТВ" + +#: ../client/totem-plugin/dvb-daemon.py:358 +msgid "Digital _TV" +msgstr "_Цифровое ТВ" + +#: ../client/totem-plugin/dvb-daemon.py:360 +msgid "_Program Guide" +msgstr "_ТВ-гид" + +#: ../client/totem-plugin/dvb-daemon.py:363 +msgid "_Delete" +msgstr "_Удалить" + +#: ../client/totem-plugin/dvb-daemon.py:364 +msgid "D_etails" +msgstr "По_дробности" + +#: ../client/totem-plugin/dvb-daemon.py:365 +msgid "_Order channels" +msgstr "_Порядок каналов" + +#: ../client/totem-plugin/dvb-daemon.py:368 +msgid "By _name" +msgstr "По _имени" + +#: ../client/totem-plugin/dvb-daemon.py:369 +msgid "By _group" +msgstr "По _группе" + +#: ../client/totem-plugin/dvb-daemon.py:372 +msgid "_Reverse order" +msgstr "В _обратном порядке" + +#: ../client/totem-plugin/dvb-daemon.py:524 +msgid "Delete selected recording?" +msgstr "Удалить выбранную запись?" + +#: ../client/totem-plugin/dvb-daemon.py:604 +#, python-format +msgid "Recording %d" +msgstr "Запись %d" + +#: ../client/totem-plugin/dvb-daemon.py:664 +#: ../client/totem-plugin/dvb-daemon.py:667 +msgid "Setup Failed" +msgstr "Сбой установки" + +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "GNOME DVB Daemon is not installed" +msgstr "Служба GNOME DVB не установлена" + +#: ../client/totem-plugin/dvb-daemon.py:668 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Не удалось запустить установку службы GNOME DVB" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Центр управления цифровым ТВ" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Планирование записей и обзор ТВ-гида" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Настройка цифрового ТВ" + diff -Nru gnome-dvb-daemon-0.1.23/po/sl.po gnome-dvb-daemon-0.2.7/po/sl.po --- gnome-dvb-daemon-0.1.23/po/sl.po 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/sl.po 2011-09-29 20:27:47.000000000 +0000 @@ -0,0 +1,893 @@ +# Slovenian translations for gnome-dvb-daemon. +# Copyright (C) 2011 gnome-dvb-daemon's COPYRIGHT HOLDER +# This file is distributed under the same license as the gnome-dvb-daemon package. +# +# Matej Urbančič , 2011. +# Martin Srebotnjak , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: gnome-dvb-daemon master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-07-19 20:27+0000\n" +"PO-Revision-Date: 2011-09-11 22:16+0100\n" +"Last-Translator: Martin Srebotnjak \n" +"Language-Team: Slovenian GNOME Translation Team \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" +"X-Poedit-Language: Slovenian\n" +"X-Poedit-Country: SLOVENIA\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: ../client/gnomedvb/__init__.py:32 +msgid "GNOME DVB Daemon" +msgstr "Ozadnji program GNOME DVB" + +#: ../client/gnomedvb/__init__.py:35 +msgid "GNOME DVB Daemon Website" +msgstr "Spletna stran ozadnjega programa GNOME DVB" + +#: ../client/gnomedvb/__init__.py:65 +#, python-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "%d ur" +msgstr[1] "%d ura" +msgstr[2] "%d uri" +msgstr[3] "%d ure" + +#: ../client/gnomedvb/__init__.py:67 +#, python-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "%d minut" +msgstr[1] "%d minuta" +msgstr[2] "%d minuti" +msgstr[3] "%d minute" + +#: ../client/gnomedvb/__init__.py:69 +#, python-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "%d sekund" +msgstr[1] "%d sekunda" +msgstr[2] "%d sekundi" +msgstr[3] "%d sekunde" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 +msgid "Edit Channel Lists" +msgstr "Uredi seznam kanalov" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 +msgid "Channel groups" +msgstr "Skupine kanalov" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 +msgid "_Group:" +msgstr "_Skupina:" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 +msgid "Device groups" +msgstr "Skupine naprav" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 +msgid "All channels" +msgstr "Vsi kanali" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 +#: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 +msgid "Channel" +msgstr "Kanal" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 +msgid "Choose a channel group" +msgstr "Izbor skupine kanalov" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 +msgid "Channels of group" +msgstr "Kanali skupine" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 +msgid "An error occured while adding the group" +msgstr "Prišlo je do napake med dodajanjem skupine" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 +#, python-format +msgid "Are you sure you want to delete the group '%s'?" +msgstr "Ali ste prepričani, da želite izbrisati skupino '%s'?" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 +msgid "All assignments to this group will be lost." +msgstr "Vse dodelitve tej skupini bodo izgubljene." + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 +msgid "An error occured while removing the group" +msgstr "Prišlo je do napake med odstranjevanjem skupine" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 +msgid "DVB Control Center" +msgstr "Nadzorno središče DVB" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" +msgstr "Izberite skupino naprav in kanal na levi za ogled programskega vodiča" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "Ni nastavljenih naprav. Naprave je mogoče dodati med nastavitvami." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 +msgid "There is currently no schedule available for this channel" +msgstr "Za ta program ni določenega urnika snemanja." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "_Recording schedule" +msgstr "_Načrtovanje snemanja ..." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +msgid "_Edit" +msgstr "_Uredi" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +msgid "_View" +msgstr "_Pogled" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 +msgid "Help" +msgstr "Pomoč" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +msgid "_Manage" +msgstr "_Upravljanje" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 +msgid "Manage recording schedule" +msgstr "Upravljanje z načrtovanjem snemanja" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +msgid "_Recordings" +msgstr "_Posnetki" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +msgid "Manage recordings" +msgstr "Upravljanje s posnetki" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +msgid "_Quit" +msgstr "_Končaj" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 +msgid "Quit the Program" +msgstr "Končaj program" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +msgid "_Channel Lists" +msgstr "_Seznam kanalov" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +msgid "Edit channel lists" +msgstr "Uredi seznam kanalov" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +msgid "_Preferences" +msgstr "_Možnosti" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 +msgid "Display preferences" +msgstr "Možnosti prikaza" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +msgid "_What's on now" +msgstr "_Kaj je trenutno na sporedu" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +msgid "See what's currently on and is coming next" +msgstr "Ogled trenutnega programa in prihajajočih oddaj" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +msgid "_Refresh" +msgstr "_Osveži" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 +msgid "Refresh program guide" +msgstr "Osveži programski spored" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +msgid "_Previous Day" +msgstr "_Predhodni dan" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 +msgid "Go to previous day" +msgstr "Skoči na predhodni dan" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +msgid "_Next Day" +msgstr "_Naslednji dan" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 +msgid "Go to next day" +msgstr "Skoči na naslednji dan" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +msgid "_Channels" +msgstr "_Kanali" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +msgid "View/Hide channels" +msgstr "Prikazovanje in skrivanje kanalov" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +msgid "_Toolbar" +msgstr "_Orodna vrstica" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 +msgid "View/Hide toolbar" +msgstr "Prikaz in skrivanje orodne vrstice" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +msgid "_About" +msgstr "_O programu" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 +msgid "Display informations about the program" +msgstr "Prikaz podrobnosti o programu" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 +msgid "Recording schedule" +msgstr "Načrtovanje snemanja" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 +msgid "Recordings" +msgstr "Posnetki" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 +msgid "What's on now" +msgstr "Kaj je trenutno na sporedu" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 +msgid "Previous Day" +msgstr "Predhodni dan" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 +msgid "Next Day" +msgstr "Naslednji dan" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 +msgid "Schedule recording for the selected event?" +msgstr "Ali naj se izbrani dogodek vpiše v urnik snemanja?" + +#. translators: These appear in the About dialog, usual format applies. +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 +msgid "translator-credits" +msgstr "" +"Matej Urbančič \n" +"Martin Srebotnjak " + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 +msgid "Devices" +msgstr "Naprave" + +#. translators: first is device's name, second its type +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#, python-format +msgid "%s (%s)\n" +msgstr "%s (%s)\n" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 +#, python-format +msgid "Adapter: %d, Frontend: %d" +msgstr "Vmesnik: %d, ospredje: %d" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 +#, python-format +msgid "Group %d" +msgstr "Skupina %d" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:29 +msgid "Add to Group" +msgstr "Dodaj v skupino" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 +msgid "Add Device to Group" +msgstr "Dodaj napravo k skupini" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 +msgid "Create new Group" +msgstr "Ustvari novo skupino" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 +msgid "General" +msgstr "Splošno" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 +msgid "_Name:" +msgstr "_Ime:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 +msgid "Channels _file:" +msgstr "Datoteka _kanalov:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 +msgid "_Directory:" +msgstr "_Mapa:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 +msgid "Select File" +msgstr "Izbor datoteke" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 +msgid "Select Directory" +msgstr "Izbor mape" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 +msgid "Edit group" +msgstr "Uredi skupino" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 +msgid "Digital TV Preferences" +msgstr "Možnosti digitalne TV" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:90 +msgid "Edit selected group" +msgstr "Uredi izbrano skupino" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:97 +msgid "Remove selected device" +msgstr "Odstrani izbrano napravo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +msgid "Setup" +msgstr "Nastavitve" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:108 +msgid "Setup devices" +msgstr "Nastavitev naprave" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:115 +msgid "Create new group" +msgstr "Ustvari novo skupino" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:119 +msgid "Create new group for selected device" +msgstr "Ustvari novo skupino za izbrano napravo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:125 +msgid "Add to group" +msgstr "Dodaj v skupino" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:129 +msgid "Add selected device to existing group" +msgstr "Dodaj izbrano napravo v obstoječo skupino" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:145 +msgid "Configured devices" +msgstr "Nastavljene naprave" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:156 +msgid "Unconfigured devices" +msgstr "Nenastavljene naprave" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:221 +msgid "Device could not be removed from group" +msgstr "Naprave iz skupine ni mogoče odstraniti" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:235 +#, python-format +msgid "Are you sure you want to remove device %s from %s" +msgstr "Ali zares želite odstraniti napravo %s iz %s?" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 +msgid "Group could not be created" +msgstr "Skupine ni mogoče ustvariti" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 +msgid "Make sure that you selected the correct channels file and directory where recordings are stored and that both are readable." +msgstr "Preverite, da je izbrana prava berljiva datoteka kanalov in ustrezna berljiva mapa za shranjevanje posnetkov." + +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 +msgid "Device could not be added to group" +msgstr "Naprave ni mogoče dodati k skupini" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 +msgid "Make sure that the device isn't already assigned to a different group and that all devices in the group are of the same type." +msgstr "Preverite, da naprava že ni dodeljena drugi skupini in da so vse naprave v skupini enake vrste." + +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 +msgid "Delete selected recordings?" +msgstr "Ali naj se izbrišejo izbrani posnetki?" + +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +msgid "Pick a date" +msgstr "Izbor datuma" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 +msgid "Title" +msgstr "Naslov" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 +msgid "Start time" +msgstr "Čas začetka" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 +msgid "Duration" +msgstr "Trajanje" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 +msgid "Timer could not be deleted" +msgstr "Časovnika ni mogoče izbrisati" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +msgid "Abort active recording?" +msgstr "Ali naj se prekine dejavno snemanje?" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 +msgid "The timer you selected belongs to a currently active recording." +msgstr "Izbrani časovnik pripada trenutno dejavnemu snemanju." + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 +msgid "Deleting this timer will abort the recording." +msgstr "Z izbrisom časovnika se izbriše tudi urnik snemanja." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +msgid "Timer could not be created" +msgstr "Časovnika ni mogoče ustvariti" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 +msgid "Make sure that the timer doesn't conflict with another one and doesn't start in the past." +msgstr "Preverite, da časovnik ni v sporu z drugim in da v preteklosti že ni bil zagnan." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +msgid "Recording has been scheduled successfully" +msgstr "Urnik snemanja programa je uspešno zapisan." + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 +msgid "Add Timer" +msgstr "Dodaj časovnik" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 +msgid "_Channel:" +msgstr "_Kanal:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 +msgid "Edit Timer" +msgstr "Uredi časovnik" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 +msgid "Channel:" +msgstr "Kanal:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 +msgid "_Start time:" +msgstr "_Začetni čas:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 +msgid "_Duration:" +msgstr "_Trajanje:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 +msgid "minutes" +msgstr "minut" + +#: ../client/gnomedvb/ui/wizard/__init__.py:4 +msgid "digital cable" +msgstr "digitalna kabelska" + +#: ../client/gnomedvb/ui/wizard/__init__.py:5 +msgid "digital satellite" +msgstr "digitalna satelitska" + +#: ../client/gnomedvb/ui/wizard/__init__.py:6 +msgid "digital terrestrial" +msgstr "digitalna zemeljska" + +#: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 +msgid "Channel group" +msgstr "Skupina kanala" + +#: ../client/gnomedvb/ui/widgets/DateTime.py:50 +msgid "_Time:" +msgstr "_Čas:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 +msgid "Title:" +msgstr "Naslov:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 +msgid "Date:" +msgstr "Datum:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 +msgid "Duration:" +msgstr "Trajanje:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 +msgid "Description:" +msgstr "Opis:" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 +msgid "Start" +msgstr "Začetek" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 +msgid "Length" +msgstr "Dolžina" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 +msgid "Now" +msgstr "Takoj" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 +msgid "Next" +msgstr "Naslednja" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +msgid "No devices have been found." +msgstr "Ni najdenih novih naprav." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 +msgid "Either no DVB cards are installed or all cards are busy. In the latter case make sure you close all programs such as video players that access your DVB card." +msgstr "Kartice DVB niso nameščene ali pa so vse zasedene. V slednjem primeru preverite, da ste zaprli vse programe, kot so predvajalniki videa, ki imajo dostop tudi do vaše kartice DVB." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 +msgid "Name" +msgstr "Ime" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 +msgid "Type" +msgstr "Vrsta" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Izbor naprave za nastavljanje." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +msgid "All devices are already configured." +msgstr "Vse naprave so že nastavljene." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 +msgid "Go to the control center if you want to alter the settings of already configured devices." +msgstr "V nadzornem središču je mogoče spremeniti nastavitve že nastavljenih naprav." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +msgid "An error occured while retrieving devices." +msgstr "Prišlo je do napake med pridobivanjem naprav." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 +msgid "Make sure other applications don't access DVB devices and you have permissions to access them." +msgstr "Preverite, da drugi programi ne dostopajo do naprav DVB in da imate ustrezne pravice za dostop do njih." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +msgid "The detailed error message is:" +msgstr "Podrobno sporočilo o napaki:" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +msgid "Searching for devices" +msgstr "Iskanje naprav" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +msgid "Device selection" +msgstr "Izbor naprave" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 +#, python-format +msgid "%s\n" +msgstr "%s\n" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 +msgid "This process can take some time." +msgstr "Opravilo je lahko dolgotrajno." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." +msgstr "Za svoj seznam kanalov lahko izberete želene kanale." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 +msgid "Select all" +msgstr "Izberi vse" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 +msgid "Deselect all" +msgstr "Počisti izbor" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 +msgid "_Channels:" +msgstr "_Kanali:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 +msgid "Select _scrambled channels" +msgstr "Izberi _kodirane kanale" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 +msgid "Signal quality:" +msgstr "Kakovost signala:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 +msgid "Signal strength:" +msgstr "Moč signala:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 +msgid "Scanning for channels" +msgstr "Preiskovanje kanalov" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +msgid "Missing requirements" +msgstr "Manjkajoče zahteve" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +msgid "Country and antenna selection" +msgstr "Izbor države in antene" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Izbor satelita" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +msgid "Country and provider selection" +msgstr "Izbor države in ponudnika" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +msgid "Unsupported adapter" +msgstr "Nepodprt prilagodilnik" + +#. translators: first %s is the DVB type, e.g. DVB-S +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#, python-format +msgid "Sorry, but '%s' cards aren't supported." +msgstr "Kartice '%s' niso podprte." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +msgid "Could not find initial tuning data." +msgstr "Ni mogoče najti začetnih podatkov za naravnanje." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +msgid "Please make sure that the dvb-apps package is installed." +msgstr "Prepričajte se, da je nameščen paket dvb-apps." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +msgid "Please choose a country and the antenna that is closest to your location." +msgstr "Izberite državo in anteno, ki je najbližje vašemu mestu." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "If you don't know which antenna to choose select \"Don't know\" from the list of providers." +msgstr "Če ne veste, katero anteno bi izbrali, s seznama ponudnikov izberite \"Ne vem\"." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 +msgid "However, searching for channels will take considerably longer this way." +msgstr "Iskanje kanalov na takšen način pa bo trajalo opazno dlje." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +msgid "Not listed" +msgstr "Ni na seznamu" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:153 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:224 +msgid "_Country:" +msgstr "Držav_a:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:177 +msgid "_Antenna:" +msgstr "_Antena:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:186 +msgid "Antenna" +msgstr "Antena" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:198 +msgid "_Satellite:" +msgstr "_Satelit:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:206 +msgid "Satellite" +msgstr "Satelit" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:246 +msgid "_Providers:" +msgstr "_Ponudniki:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:254 +msgid "Provider" +msgstr "Ponudnik" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:303 +msgid "Don't know" +msgstr "Ni znano" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 +msgid "Welcome to the digital television Assistant." +msgstr "Dobrodošli v pomočniku nastavitve digitalne televizije." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 +msgid "It will automatically configure your devices and search for channels, if necessary." +msgstr "Čarovnik samodejno prilagodi naprave in po potrebi poišče kanale." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +msgid "Click \"Forward\" to begin." +msgstr "Kliknite na gumb \"Naprej\" za nadaljevanje." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 +msgid "_Expert mode" +msgstr "_Napredni način" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 +msgid "Digital TV configuration" +msgstr "Nastavitev digitalne TV" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 +msgid "Choose a location where you want to save the list of channels." +msgstr "Izbor mesta za shranjevanje seznama kanalov." + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 +msgid "Save channels" +msgstr "Shrani kanale" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 +msgid "Configuring device" +msgstr "Nastavljanje naprave" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 +msgid "TV" +msgstr "TV" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 +msgid "No channels were found." +msgstr "Ni najdenih kanalov." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "Make sure that the antenna is connected and you have selected the correct tuning data." +msgstr "Prepričajte se, da je antena povezana in da je izbran ustrezen program za uravnavanje." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 +#, python-format +msgid "The device has been added to the group %s." +msgstr "Naprava je dodana skupini %s." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 +msgid "An error occured while trying to setup the device." +msgstr "Prišlo je do napake med poskusom nastavljanja naprave." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 +msgid "Configure Another Device" +msgstr "Nastavi drugo napravo" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +msgid "Configuration finished" +msgstr "Nastavitev je končana" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#, python-format +msgid "The device %s has been configured sucessfully." +msgstr "Nastavitev naprave %s je uspešno končana." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 +#, python-format +msgid "Failed configuring device %s." +msgstr "Nastavljanje naprave %s je spodletelo." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Prilagajanje in čiščenje. Dejanje je lahko dolgotrajno ..." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 +msgid "Setup digital TV" +msgstr "Nastavitev digitalne TV" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 +msgid "The generated channels file can be used to configure your devices in the control center." +msgstr "Ustvarjeno datoteko kanalov je mogoče uporabiti za nastavljanje naprav v nadzornem središču." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 +msgid "" +"Are you sure you want to abort?\n" +"All process will be lost." +msgstr "" +"Ali ste prepričani, da želite opravilo prekiniti?\n" +"Vsa opravila bodo izgubljena." + +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 +msgid "Program Guide" +msgstr "Programski spored" + +#: ../client/totem-plugin/dvb-daemon.py:306 +msgid "Digital TV" +msgstr "Digitalna TV" + +#: ../client/totem-plugin/dvb-daemon.py:357 +msgid "Watch TV" +msgstr "Gledanje TV" + +#: ../client/totem-plugin/dvb-daemon.py:358 +msgid "Digital _TV" +msgstr "Digitalna _TV" + +#: ../client/totem-plugin/dvb-daemon.py:360 +msgid "_Program Guide" +msgstr "_Programski spored" + +#: ../client/totem-plugin/dvb-daemon.py:363 +msgid "_Delete" +msgstr "_Izbriši" + +#: ../client/totem-plugin/dvb-daemon.py:364 +msgid "D_etails" +msgstr "_Podrobnosti" + +#: ../client/totem-plugin/dvb-daemon.py:365 +msgid "_Order channels" +msgstr "_Razvrščanje kanalov" + +#: ../client/totem-plugin/dvb-daemon.py:368 +msgid "By _name" +msgstr "Po _imenu" + +#: ../client/totem-plugin/dvb-daemon.py:369 +msgid "By _group" +msgstr "Po _skupini" + +#: ../client/totem-plugin/dvb-daemon.py:372 +msgid "_Reverse order" +msgstr "_Obrnjen vrstni red" + +#: ../client/totem-plugin/dvb-daemon.py:524 +msgid "Delete selected recording?" +msgstr "Ali naj se izbriše izbrani posnetek?" + +#: ../client/totem-plugin/dvb-daemon.py:604 +#, python-format +msgid "Recording %d" +msgstr "Posnetek %d" + +#: ../client/totem-plugin/dvb-daemon.py:664 +#: ../client/totem-plugin/dvb-daemon.py:667 +msgid "Setup Failed" +msgstr "Namestitev je spodletela" + +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "GNOME DVB Daemon is not installed" +msgstr "Ozadnji program GNOME DVB ni nameščen" + +#: ../client/totem-plugin/dvb-daemon.py:668 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "Ni mogoče začeti nastavitev ozadnjega programa GNOME DVB" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Nadzorno središče digitalne TV" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Določanje urnika snemanja in brskanje med programskim sporedom" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Nastavitev digitalne TV" + diff -Nru gnome-dvb-daemon-0.1.23/po/sr.po gnome-dvb-daemon-0.2.7/po/sr.po --- gnome-dvb-daemon-0.1.23/po/sr.po 2011-01-15 16:56:22.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/sr.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" "PO-Revision-Date: 2010-06-21 20:33+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: Serbian \n" @@ -16,8 +16,8 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" diff -Nru gnome-dvb-daemon-0.1.23/po/sv.po gnome-dvb-daemon-0.2.7/po/sv.po --- gnome-dvb-daemon-0.1.23/po/sv.po 2011-01-15 16:56:23.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/sv.po 2011-04-18 12:27:47.000000000 +0000 @@ -1,46 +1,45 @@ # Swedish translation for DVB Daemon. -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008, 2011 Free Software Foundation, Inc. # This file is distributed under the same license as the dvb-daemon package. -# Daniel Nylander , 2008. +# Daniel Nylander , 2008, 2011. # msgid "" msgstr "" -"Project-Id-Version: dvb-daemon\n" +"Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" -"PO-Revision-Date: 2010-08-23 16:13+0000\n" -"Last-Translator: Daniel Nylander \n" +"POT-Creation-Date: 2011-04-17 21:06+0200\n" +"PO-Revision-Date: 2011-04-17 21:07+0100\n" +"Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" -#: ../client/gnomedvb/__init__.py:34 +#: ../client/gnomedvb/__init__.py:33 msgid "GNOME DVB Daemon" msgstr "GNOME DVB Daemon" -#: ../client/gnomedvb/__init__.py:37 +#: ../client/gnomedvb/__init__.py:36 msgid "GNOME DVB Daemon Website" msgstr "Webbplats för GNOME DVB Daemon" -#: ../client/gnomedvb/__init__.py:86 +#: ../client/gnomedvb/__init__.py:73 #, python-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d timme" msgstr[1] "%d timmar" -#: ../client/gnomedvb/__init__.py:88 +#: ../client/gnomedvb/__init__.py:75 #, python-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minut" msgstr[1] "%d minuter" -#: ../client/gnomedvb/__init__.py:90 +#: ../client/gnomedvb/__init__.py:77 #, python-format msgid "%d second" msgid_plural "%d seconds" @@ -51,37 +50,37 @@ msgid "Edit Channel Lists" msgstr "Redigera kanallistor" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 msgid "Channel groups" msgstr "Kanalgrupper" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 msgid "_Group:" msgstr "_Grupp:" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 msgid "Device groups" msgstr "Enhetsgrupper" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 msgid "All channels" msgstr "Alla kanaler" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:72 #: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:33 -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:95 msgid "Channel" msgstr "Kanal" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 msgid "Choose a channel group" msgstr "Välj en kanalgrupp" -#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 msgid "Channels of group" msgstr "Kanaler i grupp" @@ -102,176 +101,172 @@ msgid "An error occured while removing the group" msgstr "Ett fel inträffade när gruppen togs bort" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 msgid "DVB Control Center" msgstr "DVB-kontrollpanel" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 -msgid "" -"Choose a device group and channel on the left to view the program guide" -msgstr "Välj en enhetsgrupp och kanal i det vänstra fältet av programguiden" - #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 -msgid "" -"No devices are configured. Please go to preferences to configure them." -msgstr "" -"Inga enheter är konfigurerade. Gå till inställningar för att konfigurera dem." +msgid "Choose a device group and channel on the left to view the program guide" +msgstr "Välj en enhetsgrupp och kanal i det vänstra fältet av programguiden" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "Inga enheter är konfigurerade. Gå till inställningar för att konfigurera dem." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 msgid "There is currently no schedule available for this channel" msgstr "Det finns inget schema tillgängligt för denna kanal" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 -#: ../client/totem-plugin/dvb-daemon.py:349 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "_Recording schedule" msgstr "_Inspelningsschema" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_Edit" -msgstr "_Redigera" +msgstr "R_edigera" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "_View" msgstr "_Visa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 msgid "Help" msgstr "Hjälp" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 msgid "_Manage" msgstr "_Hantera" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 msgid "Manage recording schedule" msgstr "Hantera inspelningsschemat" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "_Recordings" msgstr "_Inspelningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "Manage recordings" msgstr "Hantera inspelningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "_Quit" msgstr "A_vsluta" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 msgid "Quit the Program" msgstr "Avsluta programmet" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "_Channel Lists" msgstr "_Kanallistor" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "Edit channel lists" msgstr "Redigera kanallistor" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "_Preferences" msgstr "_Inställningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 msgid "Display preferences" msgstr "Visningsinställningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "_What's on now" msgstr "_Vad går på tv nu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "See what's currently on and is coming next" msgstr "Se vad som visas nu och vad som kommer senare" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 msgid "_Refresh" msgstr "_Uppdatera" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 msgid "Refresh program guide" msgstr "Uppdatera programguide" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 msgid "_Previous Day" msgstr "_Föregående dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 msgid "Go to previous day" msgstr "Gå till föregående dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 msgid "_Next Day" msgstr "_Nästa dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 msgid "Go to next day" msgstr "Gå till nästa dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "_Channels" msgstr "_Kanaler" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "View/Hide channels" msgstr "Visa/Dölj kanaler" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "_Toolbar" msgstr "Ver_ktygsrad" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 msgid "View/Hide toolbar" msgstr "Visa/Göm verktygsfält" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "_About" msgstr "_Om" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 msgid "Display informations about the program" msgstr "Visa information om programmet" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Inspelningsschema" -#. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:276 -#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:30 -#: ../client/totem-plugin/dvb-daemon.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:32 +#: ../client/totem-plugin/dvb-daemon.py:308 msgid "Recordings" msgstr "Inspelningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 -#: ../client/totem-plugin/dvb-daemon.py:330 -#: ../client/totem-plugin/dvb-daemon.py:351 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:335 +#: ../client/totem-plugin/dvb-daemon.py:356 msgid "What's on now" msgstr "Vad visas nu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 msgid "Previous Day" msgstr "Föregående dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 msgid "Next Day" msgstr "Nästa dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 -#: ../client/totem-plugin/dvb-daemon.py:179 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:180 msgid "Schedule recording for the selected event?" msgstr "Schemalägg inspelning för den markerade händelsen?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" @@ -279,23 +274,23 @@ " Daniel Nylander https://launchpad.net/~yeager\n" " faultygearbox https://launchpad.net/~faultygearbox" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 msgid "Devices" msgstr "Enheter" #. translators: first is device's name, second its type -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "%s (%s)\n" msgstr "%s (%s)\n" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 #, python-format msgid "Adapter: %d, Frontend: %d" msgstr "Adapter: %d, Framände: %d" -#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 #, python-format msgid "Group %d" msgstr "Grupp %d" @@ -304,125 +299,117 @@ msgid "Add to Group" msgstr "Lägg till i grupp" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 msgid "Add Device to Group" msgstr "Lägg till enhet till grupp" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 msgid "Create new Group" msgstr "Skapa ny grupp" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 msgid "General" msgstr "Allmänt" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 msgid "_Name:" msgstr "_Namn:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 msgid "Channels _file:" msgstr "Fil med kana_ler:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 msgid "_Directory:" msgstr "_Katalog:" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 msgid "Select File" msgstr "Välj fil" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 msgid "Select Directory" msgstr "Välj katalog" -#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 msgid "Edit group" msgstr "Redigera grupp" -#: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:352 +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:357 msgid "Digital TV Preferences" msgstr "Inställningar för digital-tv" -#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +#: ../client/gnomedvb/ui/preferences/Preferences.py:89 msgid "Edit selected group" msgstr "Redigera markerad grupp" -#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +#: ../client/gnomedvb/ui/preferences/Preferences.py:96 msgid "Remove selected device" msgstr "Ta bort markerad enhet" -#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +#: ../client/gnomedvb/ui/preferences/Preferences.py:105 msgid "Setup" msgstr "Konfigurera" -#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +#: ../client/gnomedvb/ui/preferences/Preferences.py:107 msgid "Setup devices" msgstr "Konfigurera enheter" -#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +#: ../client/gnomedvb/ui/preferences/Preferences.py:114 msgid "Create new group" msgstr "Skapa ny grupp" -#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +#: ../client/gnomedvb/ui/preferences/Preferences.py:118 msgid "Create new group for selected device" msgstr "Skapa ny grupp för markerad enhet" -#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +#: ../client/gnomedvb/ui/preferences/Preferences.py:124 msgid "Add to group" msgstr "Lägg till i grupp" -#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +#: ../client/gnomedvb/ui/preferences/Preferences.py:128 msgid "Add selected device to existing group" msgstr "Lägg till markerad enhet till befintlig grupp" -#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +#: ../client/gnomedvb/ui/preferences/Preferences.py:144 msgid "Configured devices" msgstr "Konfigurerade enheter" -#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +#: ../client/gnomedvb/ui/preferences/Preferences.py:155 msgid "Unconfigured devices" msgstr "Icke-konfigurerade enheter" -#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +#: ../client/gnomedvb/ui/preferences/Preferences.py:220 msgid "Device could not be removed from group" msgstr "Enheten kunde inte tas bort från gruppen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#: ../client/gnomedvb/ui/preferences/Preferences.py:234 #, python-format msgid "Are you sure you want to remove device %s from %s" msgstr "Är du säker att du vill ta bort enheten %s från %s" -#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 msgid "Group could not be created" msgstr "Gruppen kunde inte skapas" -#: ../client/gnomedvb/ui/preferences/Preferences.py:257 -msgid "" -"Make sure that you selected the correct channels file and directory where " -"recordings are stored and that both are readable." -msgstr "" -"Försäkra dig om att du valde den korrekta kanalfilen och katalog där " -"inspelningarna ska lagras samt att båda är läsbara." +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 +msgid "Make sure that you selected the correct channels file and directory where recordings are stored and that both are readable." +msgstr "Försäkra dig om att du valde den korrekta kanalfilen och katalog där inspelningarna ska lagras samt att båda är läsbara." -#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 msgid "Device could not be added to group" msgstr "Enheten kunde inte läggas till gruppen" -#: ../client/gnomedvb/ui/preferences/Preferences.py:288 -msgid "" -"Make sure that the device isn't already assigned to a different group and " -"that all devices in the group are of the same type." -msgstr "" -"Försäkra dig om att enheten inte redan är tilldelad till en annan grupp och " -"att alla enheter i gruppen är av samma typ." +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 +msgid "Make sure that the device isn't already assigned to a different group and that all devices in the group are of the same type." +msgstr "Försäkra dig om att enheten inte redan är tilldelad till en annan grupp och att alla enheter i gruppen är av samma typ." -#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:97 msgid "Delete selected recordings?" msgstr "Ta bort markerade inspelningar?" -#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:26 msgid "Pick a date" msgstr "Välj ett datum" @@ -436,7 +423,7 @@ msgstr "Starttid" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 -#: ../client/gnomedvb/ui/widgets/ScheduleView.py:91 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 msgid "Duration" msgstr "Speltid" @@ -456,19 +443,15 @@ msgid "Deleting this timer will abort the recording." msgstr "Borttagning av denna tidsinspelning kommer att avbryta inspelningen." -#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:29 msgid "Timer could not be created" msgstr "Tidsinspelning kunde inte skapas" -#: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 -msgid "" -"Make sure that the timer doesn't conflict with another one and doesn't start " -"in the past." -msgstr "" -"Försäkra dig om att tidsinspelningen inte är i konflikt med någon annan och " -"inte startar före aktuell tidpunkt." +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:31 +msgid "Make sure that the timer doesn't conflict with another one and doesn't start in the past." +msgstr "Försäkra dig om att tidsinspelningen inte är i konflikt med någon annan och inte startar före aktuell tidpunkt." -#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:41 msgid "Recording has been scheduled successfully" msgstr "Inspelningen har schemalagts" @@ -485,19 +468,19 @@ msgstr "Redigera tidsinspelning" #: ../client/gnomedvb/ui/timers/TimerDialog.py:87 -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:59 msgid "Channel:" msgstr "Kanal:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:94 msgid "_Start time:" msgstr "_Starttid:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:109 msgid "_Duration:" msgstr "_Längd:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:123 msgid "minutes" msgstr "minuter" @@ -521,23 +504,19 @@ msgid "_Time:" msgstr "_Tid:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 -msgid "Details" -msgstr "Detaljer" - -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:55 msgid "Title:" msgstr "Titel:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:63 msgid "Date:" msgstr "Datum:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:67 msgid "Duration:" msgstr "Längd:" -#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:71 msgid "Description:" msgstr "Beskrivning:" @@ -549,88 +528,73 @@ msgid "Length" msgstr "Längd" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 msgid "Now" msgstr "Nu" -#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 msgid "Next" msgstr "Nästa" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 msgid "No devices have been found." msgstr "Ingen enhet har hittats." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 -msgid "" -"Either no DVB cards are installed or all cards are busy. In the latter case " -"make sure you close all programs such as video players that access your DVB " -"card." -msgstr "" -"Antingen finns inget DVB-kort installerade eller så är alla kort upptagna. I " -"det senare fallet bör du försäkra dig om att stänga alla program såsom " -"videouppspelare som använder ditt DVB-kort." +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +msgid "Either no DVB cards are installed or all cards are busy. In the latter case make sure you close all programs such as video players that access your DVB card." +msgstr "Antingen finns inget DVB-kort installerade eller så är alla kort upptagna. I det senare fallet bör du försäkra dig om att stänga alla program såsom videouppspelare som använder ditt DVB-kort." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:66 msgid "Name" msgstr "Namn" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:72 msgid "Type" msgstr "Typ" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:83 msgid "Select the device you want to configure." msgstr "Välj enheten du vill konfigurera." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:97 msgid "All devices are already configured." msgstr "Alla enheter är redan konfigurerade." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 -msgid "" -"Go to the control center if you want to alter the settings of already " -"configured devices." -msgstr "" -"Gå till kontrollpanelen om du vill ändra inställningarna för redan " -"konfigurerade enheter." +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:99 +msgid "Go to the control center if you want to alter the settings of already configured devices." +msgstr "Gå till kontrollpanelen om du vill ändra inställningarna för redan konfigurerade enheter." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:107 msgid "An error occured while retrieving devices." msgstr "Ett fel inträffade under hämtandet av enheter." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 -msgid "" -"Make sure other applications don't access DVB devices and you have " -"permissions to access them." -msgstr "" -"Försäkra dig om att andra applikationer inte kommer åt DVB-enheterna samt " -"att du själv har behörighet att komma åt dem." +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:109 +msgid "Make sure other applications don't access DVB devices and you have permissions to access them." +msgstr "Försäkra dig om att andra applikationer inte kommer åt DVB-enheterna samt att du själv har behörighet att komma åt dem." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:111 msgid "The detailed error message is:" msgstr "Detaljerade felmeddelandet är:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:120 msgid "Searching for devices" msgstr "Söker efter enheter" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:136 msgid "Device selection" msgstr "Enhetsval" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:237 #, python-format msgid "%s\n" -msgstr "" +msgstr "%s\n" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 msgid "This process can take some time." msgstr "Denna process kan ta lite tid." #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 -msgid "" -"You can select the channels you want to have in your list of channels." +msgid "You can select the channels you want to have in your list of channels." msgstr "Du kan välja de kanaler som du vill ha i din kanallista." #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 @@ -641,23 +605,23 @@ msgid "Deselect all" msgstr "Avmarkera alla" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:83 msgid "_Channels:" msgstr "_Kanaler:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:118 msgid "Select _scrambled channels" msgstr "Välj k_odade kanaler" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:134 msgid "Signal quality:" msgstr "Signalkvalitet:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:145 msgid "Signal strength:" msgstr "Signalstyrka:" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:160 msgid "Scanning for channels" msgstr "Söker efter kanaler" @@ -696,82 +660,71 @@ msgstr "Försäkra dig om att paketet dvb-apps är installerat." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 -msgid "" -"Please choose a country and the antenna that is closest to your location." +msgid "Please choose a country and the antenna that is closest to your location." msgstr "Välj ett land och den antenn som finns närmast dig." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 -msgid "" -"If you don't know which antenna to choose select \"Don't know\" from the " -"list of providers." -msgstr "" -"Om du inte vet vilken antenn du ska välja så välj \"Vet inte\" från " -"leverantörslistan." +msgid "If you don't know which antenna to choose select \"Don't know\" from the list of providers." +msgstr "Om du inte vet vilken antenn du ska välja så välj \"Vet inte\" från leverantörslistan." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 -msgid "" -"However, searching for channels will take considerably longer this way." -msgstr "" -"Dock kommer sökning efter kanaler att ta mycket längre tid med detta sätt." +msgid "However, searching for channels will take considerably longer this way." +msgstr "Dock kommer sökning efter kanaler att ta mycket längre tid med detta sätt." #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Ej listad" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:153 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:224 msgid "_Country:" msgstr "_Land:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:177 msgid "_Antenna:" msgstr "_Antenn:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:186 msgid "Antenna" msgstr "Antenn" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:198 msgid "_Satellite:" msgstr "_Satellit:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:206 msgid "Satellite" msgstr "Satellit" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:246 msgid "_Providers:" msgstr "_Leverantörer:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:254 msgid "Provider" msgstr "Leverantör" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:303 msgid "Don't know" msgstr "Vet ej" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 msgid "Welcome to the digital television Assistant." msgstr "Välkommen till den digitala televisionsguiden." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 -msgid "" -"It will automatically configure your devices and search for channels, if " -"necessary." -msgstr "" -"Den kommer automatiskt att konfigurera dina enheter och även söka efter " -"kanaler om det behövs." +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 +msgid "It will automatically configure your devices and search for channels, if necessary." +msgstr "Den kommer automatiskt att konfigurera dina enheter och även söka efter kanaler om det behövs." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "Click \"Forward\" to begin." msgstr "Klicka på \"Framåt\" för att starta." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 msgid "_Expert mode" msgstr "_Expertläge" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 msgid "Digital TV configuration" msgstr "Konfiguration av digital-tv" @@ -783,72 +736,64 @@ msgid "Save channels" msgstr "Spara kanaler" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 msgid "Configuring device" msgstr "Konfigurerar enhet" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 msgid "TV" msgstr "TV" -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 msgid "No channels were found." msgstr "Inga kanaler hittades." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:129 -msgid "" -"Make sure that the antenna is connected and you have selected the correct " -"tuning data." -msgstr "" -"Försäkra dig om att antennen är ansluten och att du har valt de korrekta " -"inställningarna." +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "Make sure that the antenna is connected and you have selected the correct tuning data." +msgstr "Försäkra dig om att antennen är ansluten och att du har valt de korrekta inställningarna." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 #, python-format msgid "The device has been added to the group %s." msgstr "Enheten har lagts till i gruppen %s." -#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 msgid "An error occured while trying to setup the device." msgstr "Ett fel inträffade vid försök att konfigurera enheten." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 msgid "Configure Another Device" msgstr "Konfigurera en annan enhet" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configuration finished" msgstr "Konfigurationen är färdig" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 #, python-format msgid "The device %s has been configured sucessfully." msgstr "Enheten %s har nu konfigurerats." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 #, python-format msgid "Failed configuring device %s." msgstr "Misslyckades med att konfigurera enheten %s." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:45 msgid "Cleaning up. This may take a while." msgstr "Städar upp. Detta kan ta lite tid." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:83 #: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "Konfigurera digital-tv" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 -msgid "" -"The generated channels file can be used to configure your devices in the " -"control center." -msgstr "" -"Den genererade kanalfilen kan användas för att konfigurera dina enheter i " -"kontrollpanelen." +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:168 +msgid "The generated channels file can be used to configure your devices in the control center." +msgstr "Den genererade kanalfilen kan användas för att konfigurera dina enheter i kontrollpanelen." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:215 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -857,61 +802,65 @@ "Alla ändringar kommer att gå förlorade." #: ../client/totem-plugin/dvb-daemon.py:151 -#: ../client/totem-plugin/dvb-daemon.py:195 -#: ../client/totem-plugin/dvb-daemon.py:336 +#: ../client/totem-plugin/dvb-daemon.py:196 +#: ../client/totem-plugin/dvb-daemon.py:341 msgid "Program Guide" msgstr "Programguide" -#: ../client/totem-plugin/dvb-daemon.py:307 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Digital TV" msgstr "Digital-tv" -#: ../client/totem-plugin/dvb-daemon.py:347 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Watch TV" msgstr "Se på tv" -#: ../client/totem-plugin/dvb-daemon.py:348 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "Digital _TV" msgstr "Digital-_tv" -#: ../client/totem-plugin/dvb-daemon.py:350 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Program Guide" msgstr "_Programguide" -#: ../client/totem-plugin/dvb-daemon.py:353 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "_Delete" msgstr "_Ta bort" -#: ../client/totem-plugin/dvb-daemon.py:354 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "D_etails" msgstr "D_etaljer" -#: ../client/totem-plugin/dvb-daemon.py:355 +#: ../client/totem-plugin/dvb-daemon.py:360 msgid "_Order channels" msgstr "_Ordna kanaler" -#: ../client/totem-plugin/dvb-daemon.py:358 +#: ../client/totem-plugin/dvb-daemon.py:363 msgid "By _name" msgstr "Efter _namn" -#: ../client/totem-plugin/dvb-daemon.py:359 +#: ../client/totem-plugin/dvb-daemon.py:364 msgid "By _group" msgstr "Efter _grupp" -#: ../client/totem-plugin/dvb-daemon.py:362 +#: ../client/totem-plugin/dvb-daemon.py:367 msgid "_Reverse order" msgstr "_Baklänges" -#: ../client/totem-plugin/dvb-daemon.py:514 +#: ../client/totem-plugin/dvb-daemon.py:519 msgid "Delete selected recording?" msgstr "Ta bort markerad inspelning?" -#: ../client/totem-plugin/dvb-daemon.py:588 +#: ../client/totem-plugin/dvb-daemon.py:597 #, python-format msgid "Recording %d" msgstr "Inspelning %d" -#: ../client/totem-plugin/dvb-daemon.py:648 +#: ../client/totem-plugin/dvb-daemon.py:657 +msgid "Setup Failed" +msgstr "Konfigurationen misslyckades" + +#: ../client/totem-plugin/dvb-daemon.py:658 msgid "GNOME DVB Daemon is not installed" msgstr "GNOME DVB Daemon är inte installerat" @@ -928,316 +877,224 @@ msgid "Digital TV Setup" msgstr "Konfigurera digital-tv" -#, python-format +#~ msgid "Details" +#~ msgstr "Detaljer" #~ msgid "Adapter: %d, Frontend: %d" #~ msgstr "Adapter: %d, Frontend: %d" - #~ msgid "Add To Group" #~ msgstr "Lägg till i grupp" - #~ msgid "Select a group:" #~ msgstr "Välj en grupp:" - #~ msgid "Create Group" #~ msgstr "Skapa grupp" - #~ msgid "Channels File" #~ msgstr "Kanalfil" - #~ msgid "Recordings' Directory" #~ msgstr "Inspelningskatalog" - #~ msgid "Configure DVB" #~ msgstr "Konfigurera DVB" - #~ msgid "Registered groups" #~ msgstr "Registrerade grupper" - #~ msgid "Unassigned devices" #~ msgstr "Ej tilldelade enheter" - -#~ msgid "Are you sure you want to remove device %s from group %s" +#~ msgid "" +#~ "Are you sure you want to remove device %s from group %s" #~ msgstr "" -#~ "Är du säker på att du vill ta bort enheten %s från gruppen %s" - +#~ "Är du säker på att du vill ta bort enheten %s från gruppen %s" #~ msgid "" -#~ "Device could not be removed from " -#~ "group" +#~ "Device could not be removed from group" #~ msgstr "" -#~ "Enheten kunde inte tas bort från " -#~ "gruppen" - +#~ "Enheten kunde inte tas bort från gruppen" #~ msgid "Group could not be created" #~ msgstr "Gruppen kunde inte skapas" - #~ msgid "" #~ "Device could not be added to group" #~ msgstr "" -#~ "Enheten kunde inte läggas till i " -#~ "gruppen" - +#~ "Enheten kunde inte läggas till i gruppen" #~ msgid "Schedule Recordings" #~ msgstr "Schemalägg inspelningar" - #~ msgid "Choose device group:" #~ msgstr "Välj enhetsgrupp:" - #~ msgid "Scheduled recordings:" #~ msgstr "Schemalagda inspelningar:" - #~ msgid "ID" #~ msgstr "ID" - #~ msgid "Duration in minutes" #~ msgstr "Speltid i minuter" - #~ msgid "Abort active recording?" #~ msgstr "Avbryt aktiv inspelning?" - #~ msgid "Channel:" #~ msgstr "Kanal:" - #~ msgid "Start time:" #~ msgstr "Starttid:" - #~ msgid "Pick date" #~ msgstr "Välj datum" - #~ msgid "Duration:" #~ msgstr "Speltid:" - #~ msgid "No devices have been found." #~ msgstr "Inga enheter hittades." - #~ msgid "Select device you want to scan channels." #~ msgstr "Välj enheten som du vill söka efter kanaler på." - #~ msgid "Setup adapter" #~ msgstr "Konfigurera adapter" - #~ msgid "Frequency" #~ msgstr "Frekvens" - #~ msgid "TV channels" #~ msgstr "TV-kanaler" - #~ msgid "Radio channels" #~ msgstr "Radiokanaler" - #~ msgid "Austria" #~ msgstr "Österrike" - #~ msgid "Australia" #~ msgstr "Australien" - #~ msgid "Belgium" #~ msgstr "Belgien" - #~ msgid "Switzerland" #~ msgstr "Schweiz" - #~ msgid "Czech Republic" #~ msgstr "Tjeckien" - #~ msgid "Germany" #~ msgstr "Tyskland" - #~ msgid "Denmark" #~ msgstr "Danmark" - #~ msgid "Spain" #~ msgstr "Spanien" - #~ msgid "Finland" #~ msgstr "Finland" - #~ msgid "France" #~ msgstr "Frankrike" - #~ msgid "Greece" #~ msgstr "Grekland" - #~ msgid "Hungary" #~ msgstr "Ungern" - #~ msgid "Iceland" #~ msgstr "Island" - #~ msgid "Italy" #~ msgstr "Italien" - #~ msgid "Luxemburg" #~ msgstr "Luxemburg" - #~ msgid "Netherlands" #~ msgstr "Nederländerna" - #~ msgid "Poland" #~ msgstr "Polen" - #~ msgid "Sweden" #~ msgstr "Sverige" - #~ msgid "Slovakia" #~ msgstr "Slovakien" - #~ msgid "Taiwan" #~ msgstr "Taiwan" - #~ msgid "United Kingdom" #~ msgstr "Storbritannien" - #~ msgid "Country:" #~ msgstr "Land:" - #~ msgid "Antenna:" #~ msgstr "Antenn:" - #~ msgid "Scan all frequencies" #~ msgstr "Sök igenom alla frekvenser" - #~ msgid "Satellite:" #~ msgstr "Satellit:" - #~ msgid "Norway" #~ msgstr "Norge" - #~ msgid "Providers:" #~ msgstr "Leverantörer:" - #~ msgid "" -#~ "This wizard will guide you through the process of setting up your DVB cards." +#~ "This wizard will guide you through the process of setting up your DVB " +#~ "cards." #~ msgstr "" #~ "Denna guide kommer att hjälpa dig genom konfigurationen av dina DVB-kort." - #~ msgid "Welcome" #~ msgstr "Välkommen" - #~ msgid "Your DVB cards are now setup." #~ msgstr "Dina DVB-kort är nu konfigurerade." - -#~ msgid "Setup finished" -#~ msgstr "Konfiguration färdig" - #~ msgid "Setup DVB" #~ msgstr "Konfigurera DVB" - #~ msgid "Description" #~ msgstr "Beskrivning" - #~ msgid "Program guide" #~ msgstr "Programguide" - #~ msgid "DVB Radio" #~ msgstr "DVB-radio" - #~ msgid "Device groups:" #~ msgstr "Enhetsgrupper:" - #~ msgid "Refresh" #~ msgstr "Uppdatera" - #~ msgid "Channels" #~ msgstr "Kanaler" - #~ msgid "Name" #~ msgstr "Namn" - #~ msgid "Configured devices" #~ msgstr "Konfigurerade enheter" - #~ msgid "Unconfigured devices" #~ msgstr "Okonfigurerade enheter" - #~ msgid "Title:" #~ msgstr "Titel:" - #~ msgid "Date:" #~ msgstr "Datum:" - #~ msgid "Description:" #~ msgstr "Beskrivning:" - #~ msgid "Select device you want to configure." #~ msgstr "Välj enhet du vill konfigurera." - -#, python-format #~ msgid "Scanning for channels on device %s" #~ msgstr "Söker efter kanaler på enhet %s" - #~ msgid "New Zealand" #~ msgstr "Nya Zeeland" - #~ msgid "Hong Kong" #~ msgstr "Hong Kong" - #~ msgid "Expert mode" #~ msgstr "Expertläge" - #~ msgid "" #~ "No devices are configured. Please go to preferences and to configure them." #~ msgstr "" #~ "Inga enheter konfigurerade.Gå till inställningarna och konfigurera dem." - #~ msgid "Toolbar" #~ msgstr "Verktygsrad" - #~ msgid "Delete selected recordings?" -#~ msgstr "Ta bort markerad inspelning?" - +#~ msgstr "" +#~ "Ta bort markerad inspelning?" #~ msgid "Channel List Editor" #~ msgstr "Redigera kanallista" - #~ msgid "Channel lists" #~ msgstr "Kanallistor" - #~ msgid "Timer" #~ msgstr "Tidsinspelning" - #~ msgid "Select scrambled channels" #~ msgstr "Välj kodade kanaler" - #~ msgid "DVB card is not configured" #~ msgstr "DVB-kortet är inte konfigurerat" - #~ msgid "Do you want to search for channels now?" #~ msgstr "Vill du söka efter kanaler nu?" - #~ msgid "Totem Movie Player" #~ msgstr "Filmspelaren Totem" - #~ msgid "Timer could not be deleted" #~ msgstr "" -#~ "Tidsinspelningen kunde inte tas bort" - +#~ "Tidsinspelningen kunde inte tas bort" #~ msgid "" -#~ "Schedule recording for the selected " -#~ "event?" +#~ "Schedule recording for the selected event?" #~ msgstr "" #~ "Schemalägg inspelning för den markerade " #~ "händelsen?" - #~ msgid "" #~ "Choose the channels you want to have in your list of channels. You can " #~ "reorder the channels, too." #~ msgstr "" #~ "Markera de kanaler som du vill ha i din kanallista. Du kan även sortera " #~ "kanalerna som du önskar." - #~ msgid "Select a group:" #~ msgstr "Välj en grupp:" - #~ msgid "Start time:" #~ msgstr "Starttid:" - #~ msgid "Providers:" #~ msgstr "Leverantörer:" - #~ msgid "Country:" #~ msgstr "Land:" - #~ msgid "Satellite:" #~ msgstr "Satellit:" - #~ msgid "Antenna:" #~ msgstr "Antenn:" + diff -Nru gnome-dvb-daemon-0.1.23/po/te.po gnome-dvb-daemon-0.2.7/po/te.po --- gnome-dvb-daemon-0.1.23/po/te.po 2011-01-15 16:56:23.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/te.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" "PO-Revision-Date: 2010-06-21 20:29+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: Telugu \n" @@ -15,8 +15,8 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" diff -Nru gnome-dvb-daemon-0.1.23/po/tr.po gnome-dvb-daemon-0.2.7/po/tr.po --- gnome-dvb-daemon-0.1.23/po/tr.po 2011-01-15 16:56:22.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/tr.po 2011-04-17 10:51:56.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-05 14:08+0000\n" +"POT-Creation-Date: 2011-01-15 17:40+0100\n" "PO-Revision-Date: 2010-06-21 20:26+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: Turkish \n" @@ -15,8 +15,8 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Launchpad-Export-Date: 2011-01-15 16:56+0000\n" -"X-Generator: Launchpad (build 12200)\n" +"X-Launchpad-Export-Date: 2011-04-16 19:16+0000\n" +"X-Generator: Launchpad (build 12821)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" diff -Nru gnome-dvb-daemon-0.1.23/po/zh_CN.po gnome-dvb-daemon-0.2.7/po/zh_CN.po --- gnome-dvb-daemon-0.1.23/po/zh_CN.po 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/po/zh_CN.po 2011-09-22 20:08:40.000000000 +0000 @@ -0,0 +1,905 @@ +# Chinese (China) translation for gnome-dvb-daemon. +# Copyright (C) 2011 gnome-dvb-daemon's COPYRIGHT HOLDER +# This file is distributed under the same license as the gnome-dvb-daemon package. +# Yinghua_Wang , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: gnome-dvb-daemon master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=dvb-" +"daemon&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2011-07-19 20:27+0000\n" +"PO-Revision-Date: 2011-08-16 15:12+0000\n" +"Last-Translator: Yinghua Wang \n" +"Language-Team: Chinese (China) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../client/gnomedvb/__init__.py:32 +msgid "GNOME DVB Daemon" +msgstr "GNOME DVB 守护程序" + +#: ../client/gnomedvb/__init__.py:35 +msgid "GNOME DVB Daemon Website" +msgstr "GNOME DVB 守护程序网站" + +#: ../client/gnomedvb/__init__.py:65 +#, python-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "%d 小时" + +#: ../client/gnomedvb/__init__.py:67 +#, python-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "%d 分钟" + +#: ../client/gnomedvb/__init__.py:69 +#, python-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "%d 秒" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 +msgid "Edit Channel Lists" +msgstr "编辑频道列表" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:54 +msgid "Channel groups" +msgstr "频道组" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:95 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:51 +msgid "_Group:" +msgstr "组(_G):" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:102 +msgid "Device groups" +msgstr "设备组" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:124 +msgid "All channels" +msgstr "所有频道" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:138 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:74 +#: ../client/gnomedvb/ui/widgets/ChannelsView.py:35 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:38 +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:36 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:94 +msgid "Channel" +msgstr "频道" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:152 +msgid "Choose a channel group" +msgstr "选择一个频道组" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:153 +msgid "Channels of group" +msgstr "组中的频道" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 +msgid "An error occured while adding the group" +msgstr "添加组时出现了一个错误" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 +#, python-format +msgid "Are you sure you want to delete the group '%s'?" +msgstr "您确定要删除“%s”这个组吗?" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 +#, fuzzy +msgid "All assignments to this group will be lost." +msgstr "对该组所做的所有安排均会丢失。" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 +msgid "An error occured while removing the group" +msgstr "删除组时出现了一个错误" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:54 +msgid "DVB Control Center" +msgstr "DVB 控制中心" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "Choose a device group and channel on the left to view the program guide" +msgstr "从左侧选择一个设备组和频道来查看节目指南" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "No devices are configured. Please go to preferences to configure them." +msgstr "没有已配置的设备。请转到首选项对它们进行配置。" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:105 +msgid "There is currently no schedule available for this channel" +msgstr "当前没有该频道的录制计划" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "_Recording schedule" +msgstr "录制计划" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +msgid "_Edit" +msgstr "编辑(_E)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +msgid "_View" +msgstr "查看(_V)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:161 +msgid "Help" +msgstr "帮助" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +msgid "_Manage" +msgstr "管理(_M)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:271 +msgid "Manage recording schedule" +msgstr "管理录制计划" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +msgid "_Recordings" +msgstr "录制(_R)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +msgid "Manage recordings" +msgstr "管理录制" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +msgid "_Quit" +msgstr "退出(_Q)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:173 +msgid "Quit the Program" +msgstr "退出程序" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +msgid "_Channel Lists" +msgstr "频道列表(_C)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +msgid "Edit channel lists" +msgstr "编辑频道列表" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +msgid "_Preferences" +msgstr "首选项(_P)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:181 +msgid "Display preferences" +msgstr "显示首选项" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +msgid "_What's on now" +msgstr "正在播出(_W)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +msgid "See what's currently on and is coming next" +msgstr "查看正在播出和即将播出的节目" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +msgid "_Refresh" +msgstr "刷新(_R)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:300 +msgid "Refresh program guide" +msgstr "刷新节目指南" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +msgid "_Previous Day" +msgstr "前一天(_P)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:308 +msgid "Go to previous day" +msgstr "转到前一天" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +msgid "_Next Day" +msgstr "下一天(_N)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:317 +msgid "Go to next day" +msgstr "转到下一天" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +msgid "_Channels" +msgstr "频道(_C)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +msgid "View/Hide channels" +msgstr "查看/隐藏频道" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +msgid "_Toolbar" +msgstr "工具栏(_T)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:200 +msgid "View/Hide toolbar" +msgstr "查看/隐藏工具栏" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +msgid "_About" +msgstr "关于(_A)" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:211 +msgid "Display informations about the program" +msgstr "显示节目的有关信息" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 +msgid "Recording schedule" +msgstr "录制计划" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:278 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:148 +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:31 +#: ../client/totem-plugin/dvb-daemon.py:313 +msgid "Recordings" +msgstr "录制" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:287 +#: ../client/totem-plugin/dvb-daemon.py:340 +#: ../client/totem-plugin/dvb-daemon.py:361 +msgid "What's on now" +msgstr "正在播出" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:306 +msgid "Previous Day" +msgstr "前一天" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:315 +msgid "Next Day" +msgstr "下一天" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:508 +#: ../client/totem-plugin/dvb-daemon.py:185 +msgid "Schedule recording for the selected event?" +msgstr "计划录制所选的事件?" + +#. translators: These appear in the About dialog, usual format applies. +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:596 +msgid "translator-credits" +msgstr "Yinghua Wang , 2011" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:58 +msgid "Devices" +msgstr "设备" + +#. translators: first is device's name, second its type +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#, python-format +msgid "%s (%s)\n" +msgstr "%s (%s)\n" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:239 +#, python-format +msgid "Adapter: %d, Frontend: %d" +msgstr "适配器:%d,前端:%d" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:73 +#, python-format +msgid "Group %d" +msgstr "组 %d" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:29 +msgid "Add to Group" +msgstr "添加到组" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:45 +msgid "Add Device to Group" +msgstr "将设备添加到组" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:89 +msgid "Create new Group" +msgstr "创建新组" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:109 +msgid "General" +msgstr "常规" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:114 +msgid "_Name:" +msgstr "名称(_N):" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:125 +msgid "Channels _file:" +msgstr "频道文件(_F):" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:153 +msgid "_Directory:" +msgstr "目录(_D):" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:181 +msgid "Select File" +msgstr "选择文件" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:190 +msgid "Select Directory" +msgstr "选择目录" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:203 +msgid "Edit group" +msgstr "编辑组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:39 +#: ../client/totem-plugin/dvb-daemon.py:362 +msgid "Digital TV Preferences" +msgstr "数字电视首选项" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:90 +msgid "Edit selected group" +msgstr "编辑选择的组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:97 +msgid "Remove selected device" +msgstr "移动选择的设备" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +msgid "Setup" +msgstr "设置" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:108 +msgid "Setup devices" +msgstr "设置设备" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:115 +msgid "Create new group" +msgstr "创建新组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:119 +msgid "Create new group for selected device" +msgstr "为选择的设备创建新组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:125 +msgid "Add to group" +msgstr "添加到组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:129 +msgid "Add selected device to existing group" +msgstr "将选择的设备添加到现有组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:145 +msgid "Configured devices" +msgstr "已配置的设备" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:156 +msgid "Unconfigured devices" +msgstr "未配置的设备" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:221 +msgid "Device could not be removed from group" +msgstr "无法将设备从组中移除" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:235 +#, python-format +msgid "Are you sure you want to remove device %s from %s" +msgstr "您确定要将 %s%s 中移除吗" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:258 +msgid "Group could not be created" +msgstr "无法创建组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:260 +msgid "" +"Make sure that you selected the correct channels file and directory where " +"recordings are stored and that both are readable." +msgstr "" +"确保您选择的频道文件和目录保存了录制的节目,并且有读相应文件和位置的权限。" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:289 +msgid "Device could not be added to group" +msgstr "无法将设备添加到组" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:291 +msgid "" +"Make sure that the device isn't already assigned to a different group and " +"that all devices in the group are of the same type." +msgstr "确保该设备未分配给其他组,且所在组中的设备具有同样的类型。" + +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:96 +msgid "Delete selected recordings?" +msgstr "删除选择的录制?" + +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +msgid "Pick a date" +msgstr "选择一个日期" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:85 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 +msgid "Title" +msgstr "标题" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:93 +msgid "Start time" +msgstr "开始时间" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:100 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:99 +msgid "Duration" +msgstr "持续时间" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:167 +msgid "Timer could not be deleted" +msgstr "无法删除定时器" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +msgid "Abort active recording?" +msgstr "中止进行中的录制?" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:181 +msgid "The timer you selected belongs to a currently active recording." +msgstr "您选择的定时器属于一个进行中的录制。" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:182 +msgid "Deleting this timer will abort the recording." +msgstr "删除此定时器将中止录制。" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +msgid "Timer could not be created" +msgstr "无法创建定时器" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 +msgid "" +"Make sure that the timer doesn't conflict with another one and doesn't start " +"in the past." +msgstr "确保定时器与其他定时器不冲突,且不是始于过去某个时刻。" + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +msgid "Recording has been scheduled successfully" +msgstr "成功安排了录制" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:62 +msgid "Add Timer" +msgstr "添加定时器" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:65 +msgid "_Channel:" +msgstr "频道(_C):" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:82 +msgid "Edit Timer" +msgstr "编辑定时器" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:85 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:58 +msgid "Channel:" +msgstr "频道:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:92 +msgid "_Start time:" +msgstr "开始时间(_S):" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:107 +msgid "_Duration:" +msgstr "持续时间(_D):" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:121 +msgid "minutes" +msgstr "分钟" + +#: ../client/gnomedvb/ui/wizard/__init__.py:4 +msgid "digital cable" +msgstr "数字线" + +#: ../client/gnomedvb/ui/wizard/__init__.py:5 +msgid "digital satellite" +msgstr "数字卫星" + +#: ../client/gnomedvb/ui/wizard/__init__.py:6 +#, fuzzy +msgid "digital terrestrial" +msgstr "地面数字电视" + +#: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 +msgid "Channel group" +msgstr "频道组" + +#: ../client/gnomedvb/ui/widgets/DateTime.py:50 +msgid "_Time:" +msgstr "时间(_T):" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:54 +msgid "Title:" +msgstr "标题:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:62 +msgid "Date:" +msgstr "日期:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:66 +msgid "Duration:" +msgstr "持续时间:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:70 +msgid "Description:" +msgstr "描述:" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 +msgid "Start" +msgstr "开始" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 +msgid "Length" +msgstr "长度" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:44 +msgid "Now" +msgstr "现在" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:56 +msgid "Next" +msgstr "下个" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +msgid "No devices have been found." +msgstr "找不到设备。" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:54 +msgid "" +"Either no DVB cards are installed or all cards are busy. In the latter case " +"make sure you close all programs such as video players that access your DVB " +"card." +msgstr "" +"没有安装 DVB 卡,或所有的卡都忙。如果是后者,请确保您关闭了所有访问 DVB 卡的" +"程序,如视频播放器。" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 +msgid "Name" +msgstr "名称" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 +msgid "Type" +msgstr "类型" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "选择您想配置的设备。" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +msgid "All devices are already configured." +msgstr "所有设备均已配置。" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:100 +msgid "" +"Go to the control center if you want to alter the settings of already " +"configured devices." +msgstr "如果您想调整已配置设备的设置,请转到控制中心。" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +msgid "An error occured while retrieving devices." +msgstr "在检索设备时出现了一个错误。" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:110 +msgid "" +"Make sure other applications don't access DVB devices and you have " +"permissions to access them." +msgstr "确保没有其他应用程序访问 DVB 设备,且您有访问这些设备的权限。" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +msgid "The detailed error message is:" +msgstr "详细的错误信息为:" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +msgid "Searching for devices" +msgstr "搜索设备" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +msgid "Device selection" +msgstr "设备选择" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:238 +#, python-format +msgid "%s\n" +msgstr "%s\n" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:59 +msgid "This process can take some time." +msgstr "这一过程可能需要一段时间。" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "You can select the channels you want to have in your list of channels." +msgstr "您可以选择想放进频道列表的那些频道。" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:66 +msgid "Select all" +msgstr "选择全部" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:68 +msgid "Deselect all" +msgstr "全部不选" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:82 +msgid "_Channels:" +msgstr "频道(_C):" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:117 +#, fuzzy +msgid "Select _scrambled channels" +msgstr "选择乱台的频道(_S)" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:133 +msgid "Signal quality:" +msgstr "信号质量:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:144 +msgid "Signal strength:" +msgstr "信号强度:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:159 +msgid "Scanning for channels" +msgstr "正在扫描频道" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +#, fuzzy +msgid "Missing requirements" +msgstr "缺少要求" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +msgid "Country and antenna selection" +msgstr "国家和天线选择" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "卫星选择" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +msgid "Country and provider selection" +msgstr "国家和供应商选择" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +msgid "Unsupported adapter" +msgstr "不支持的适配器" + +#. translators: first %s is the DVB type, e.g. DVB-S +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 +#, python-format +msgid "Sorry, but '%s' cards aren't supported." +msgstr "抱歉,不支持“%s”卡。" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +msgid "Could not find initial tuning data." +msgstr "找不到初始调谐数据。" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +msgid "Please make sure that the dvb-apps package is installed." +msgstr "请确保安装了 dvb-apps 软件包。" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +msgid "" +"Please choose a country and the antenna that is closest to your location." +msgstr "请选择离您最近的国家和天线。" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:136 +msgid "" +"If you don't know which antenna to choose select \"Don't know\" from the " +"list of providers." +msgstr "如果您不知道用哪个天线,从供应商列表中选择“不知道”。" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 +msgid "However, searching for channels will take considerably longer this way." +msgstr "但是,这样的话搜索频道会花相当长的时间。" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +msgid "Not listed" +msgstr "未列出" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:153 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:224 +msgid "_Country:" +msgstr "国家(_C):" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:177 +msgid "_Antenna:" +msgstr "天线(_A):" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:186 +msgid "Antenna" +msgstr "天线" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:198 +msgid "_Satellite:" +msgstr "卫星(_S):" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:206 +msgid "Satellite" +msgstr "卫星" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:246 +msgid "_Providers:" +msgstr "供应商(_P):" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:254 +msgid "Provider" +msgstr "供应商" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:303 +msgid "Don't know" +msgstr "不知道" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:28 +msgid "Welcome to the digital television Assistant." +msgstr "欢迎使用数字电视助手。" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:32 +msgid "" +"It will automatically configure your devices and search for channels, if " +"necessary." +msgstr "它会自动配置您的设备并在需要的情况下搜索频道。" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +msgid "Click \"Forward\" to begin." +msgstr "点击“前进”开始。" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:40 +msgid "_Expert mode" +msgstr "专家模式(_E)" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:44 +msgid "Digital TV configuration" +msgstr "数字电视配置" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 +msgid "Choose a location where you want to save the list of channels." +msgstr "选择一个您想保存频道列表的位置。" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 +msgid "Save channels" +msgstr "保存频道" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:45 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:89 +msgid "Configuring device" +msgstr "正在配置设备" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:118 +msgid "TV" +msgstr "电视" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:127 +msgid "No channels were found." +msgstr "未找到频道。" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "" +"Make sure that the antenna is connected and you have selected the correct " +"tuning data." +msgstr "确保天线已连接,且您选择了正确的调谐数据。" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:139 +#, python-format +msgid "The device has been added to the group %s." +msgstr "设备已添加到组 %s。" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:148 +msgid "An error occured while trying to setup the device." +msgstr "在尝试配置设备时出现了一个错误。" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:32 +msgid "Configure Another Device" +msgstr "配置另一个设备" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +msgid "Configuration finished" +msgstr "配置完成" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#, python-format +msgid "The device %s has been configured sucessfully." +msgstr "设备 %s 已成功配置。" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:46 +#, python-format +msgid "Failed configuring device %s." +msgstr "配置设备 %s 失败。" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "正在清理。这可能需要一段时间。" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 +msgid "Setup digital TV" +msgstr "设置数字电视" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:167 +msgid "" +"The generated channels file can be used to configure your devices in the " +"control center." +msgstr "生成的频道文件可以用于在控制中心中配置您的设备。" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:214 +msgid "" +"Are you sure you want to abort?\n" +"All process will be lost." +msgstr "" +"您确定要中止吗?\n" +"所有进度将丢失。" + +#: ../client/totem-plugin/dvb-daemon.py:156 +#: ../client/totem-plugin/dvb-daemon.py:201 +#: ../client/totem-plugin/dvb-daemon.py:346 +msgid "Program Guide" +msgstr "节目指南" + +#: ../client/totem-plugin/dvb-daemon.py:306 +msgid "Digital TV" +msgstr "数字电视" + +#: ../client/totem-plugin/dvb-daemon.py:357 +msgid "Watch TV" +msgstr "看电视" + +#: ../client/totem-plugin/dvb-daemon.py:358 +msgid "Digital _TV" +msgstr "数字电视(_T)" + +#: ../client/totem-plugin/dvb-daemon.py:360 +msgid "_Program Guide" +msgstr "节目指南(_P)" + +#: ../client/totem-plugin/dvb-daemon.py:363 +msgid "_Delete" +msgstr "删除(_D)" + +#: ../client/totem-plugin/dvb-daemon.py:364 +msgid "D_etails" +msgstr "详情(_E)" + +#: ../client/totem-plugin/dvb-daemon.py:365 +msgid "_Order channels" +msgstr "排序频道(_O)" + +#: ../client/totem-plugin/dvb-daemon.py:368 +msgid "By _name" +msgstr "按名称(_N)" + +#: ../client/totem-plugin/dvb-daemon.py:369 +msgid "By _group" +msgstr "按组(_G)" + +#: ../client/totem-plugin/dvb-daemon.py:372 +msgid "_Reverse order" +msgstr "逆序(_R)" + +#: ../client/totem-plugin/dvb-daemon.py:524 +msgid "Delete selected recording?" +msgstr "删除选择的录制?" + +#: ../client/totem-plugin/dvb-daemon.py:604 +#, python-format +msgid "Recording %d" +msgstr "正在录制 %d" + +#: ../client/totem-plugin/dvb-daemon.py:664 +#: ../client/totem-plugin/dvb-daemon.py:667 +msgid "Setup Failed" +msgstr "设置失败" + +#: ../client/totem-plugin/dvb-daemon.py:665 +msgid "GNOME DVB Daemon is not installed" +msgstr "GNOME DVB 守护进程未安装" + +#: ../client/totem-plugin/dvb-daemon.py:668 +msgid "Could not start GNOME DVB Daemon setup" +msgstr "无法启动 GNOME DVB 守护进程" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "数字电视控制中心" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "计划录制和浏览节目指南" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "数字电视设置" diff -Nru gnome-dvb-daemon-0.1.23/README gnome-dvb-daemon-0.2.7/README --- gnome-dvb-daemon-0.1.23/README 2010-05-23 13:54:09.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/README 2011-09-22 20:08:40.000000000 +0000 @@ -6,22 +6,19 @@ ============ Daemon: - - GStreamer >= 0.10.25 + - GStreamer >= 0.10.29 - gst-plugins-good >= 0.10.14 - gst-plugins-bad >= 0.10.13 - - glib >= 2.16 - - dbus-glib >= 0.74 + - glib >= 2.28.5 - libgee >= 0.5.0 - sqlite >= 3.4 - - gst-rtsp-server 0.10.5 (http://people.freedesktop.org/~wtay/) + - gst-rtsp-server 0.10.7 (http://people.freedesktop.org/~wtay/) - gudev UI: - Python >= 2.5 - - python-gstramer - - pygobject >= 2.15.3 - - python-gtk >= 2.10 - - python-dbus + - python-gstreamer + - pygobject >= 2.90.1 - (Recommended) dvb-apps for initial tuning data Configuration options diff -Nru gnome-dvb-daemon-0.1.23/src/Cable/CableChannel.c gnome-dvb-daemon-0.2.7/src/Cable/CableChannel.c --- gnome-dvb-daemon-0.1.23/src/Cable/CableChannel.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Cable/CableChannel.c 2011-09-29 18:32:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* CableChannel.c generated by valac 0.11.3, the Vala compiler +/* CableChannel.c generated by valac 0.14.0, the Vala compiler * generated from CableChannel.vala, do not modify */ /* @@ -131,6 +131,9 @@ DVB_CABLE_CHANNEL_CODE_RATE, DVB_CABLE_CHANNEL_MODULATION }; +DVBCableChannel* dvb_cable_channel_new (guint group_id); +DVBCableChannel* dvb_cable_channel_construct (GType object_type, guint group_id); +DVBChannel* dvb_channel_construct (GType object_type, guint group_id); DVBCableChannel* dvb_cable_channel_new_without_schedule (void); DVBCableChannel* dvb_cable_channel_construct_without_schedule (GType object_type); DVBChannel* dvb_channel_construct_without_schedule (GType object_type); @@ -146,9 +149,6 @@ guint dvb_channel_get_VideoPID (DVBChannel* self); gchar* dvb_channel_get_audio_pids_string (DVBChannel* self); guint dvb_channel_get_Sid (DVBChannel* self); -DVBCableChannel* dvb_cable_channel_new (void); -DVBCableChannel* dvb_cable_channel_construct (GType object_type); -DVBChannel* dvb_channel_construct (GType object_type); void dvb_cable_channel_set_Inversion (DVBCableChannel* self, DVBDvbSrcInversion value); void dvb_cable_channel_set_SymbolRate (DVBCableChannel* self, guint value); void dvb_cable_channel_set_CodeRate (DVBCableChannel* self, DVBDvbSrcCodeRate value); @@ -158,6 +158,20 @@ static void _vala_dvb_cable_channel_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +DVBCableChannel* dvb_cable_channel_construct (GType object_type, guint group_id) { + DVBCableChannel * self = NULL; + guint _tmp0_; + _tmp0_ = group_id; + self = (DVBCableChannel*) dvb_channel_construct (object_type, _tmp0_); + return self; +} + + +DVBCableChannel* dvb_cable_channel_new (guint group_id) { + return dvb_cable_channel_construct (DVB_TYPE_CABLE_CHANNEL, group_id); +} + + DVBCableChannel* dvb_cable_channel_construct_without_schedule (GType object_type) { DVBCableChannel * self = NULL; self = (DVBCableChannel*) dvb_channel_construct_without_schedule (object_type); @@ -172,116 +186,158 @@ static void dvb_cable_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source) { DVBCableChannel * self; - guint _tmp0_; + GstElement* _tmp0_; + guint _tmp1_; + guint _tmp2_; + GstElement* _tmp3_; + DVBDvbSrcInversion _tmp4_; + GstElement* _tmp5_; + guint _tmp6_; + GstElement* _tmp7_; + DVBDvbSrcCodeRate _tmp8_; + GstElement* _tmp9_; + DVBDvbSrcModulation _tmp10_; self = (DVBCableChannel*) base; g_return_if_fail (source != NULL); - _tmp0_ = dvb_channel_get_Frequency ((DVBChannel*) self); - g_object_set ((GObject*) source, "frequency", _tmp0_, NULL); - g_object_set ((GObject*) source, "inversion", self->priv->_Inversion, NULL); - g_object_set ((GObject*) source, "symbol-rate", self->priv->_SymbolRate, NULL); - g_object_set ((GObject*) source, "code-rate-hp", self->priv->_CodeRate, NULL); - g_object_set ((GObject*) source, "modulation", self->priv->_Modulation, NULL); + _tmp0_ = source; + _tmp1_ = dvb_channel_get_Frequency ((DVBChannel*) self); + _tmp2_ = _tmp1_; + g_object_set ((GObject*) _tmp0_, "frequency", _tmp2_, NULL); + _tmp3_ = source; + _tmp4_ = self->priv->_Inversion; + g_object_set ((GObject*) _tmp3_, "inversion", _tmp4_, NULL); + _tmp5_ = source; + _tmp6_ = self->priv->_SymbolRate; + g_object_set ((GObject*) _tmp5_, "symbol-rate", _tmp6_, NULL); + _tmp7_ = source; + _tmp8_ = self->priv->_CodeRate; + g_object_set ((GObject*) _tmp7_, "code-rate-hp", _tmp8_, NULL); + _tmp9_ = source; + _tmp10_ = self->priv->_Modulation; + g_object_set ((GObject*) _tmp9_, "modulation", _tmp10_, NULL); } static gchar* dvb_cable_channel_real_to_string (DVBChannel* base) { DVBCableChannel * self; gchar* result = NULL; - const gchar* _tmp0_ = NULL; - guint _tmp1_; - const gchar* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; - const gchar* _tmp4_ = NULL; - guint _tmp5_; - gchar* _tmp6_ = NULL; - gchar* _tmp7_; - guint _tmp8_; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; + const gchar* _tmp0_; + const gchar* _tmp1_; + guint _tmp2_; + guint _tmp3_; + DVBDvbSrcInversion _tmp4_; + const gchar* _tmp5_ = NULL; + guint _tmp6_; + DVBDvbSrcCodeRate _tmp7_; + const gchar* _tmp8_ = NULL; + DVBDvbSrcModulation _tmp9_; + const gchar* _tmp10_ = NULL; + guint _tmp11_; + guint _tmp12_; + gchar* _tmp13_ = NULL; + gchar* _tmp14_; + guint _tmp15_; + guint _tmp16_; + gchar* _tmp17_ = NULL; + gchar* _tmp18_; self = (DVBCableChannel*) base; - _tmp0_ = dvb_channel_get_Name (DVB_CHANNEL (self)); - _tmp1_ = dvb_channel_get_Frequency (DVB_CHANNEL (self)); - _tmp2_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_INVERSION, (gint) self->priv->_Inversion); - _tmp3_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) self->priv->_CodeRate); - _tmp4_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_MODULATION, (gint) self->priv->_Modulation); - _tmp5_ = dvb_channel_get_VideoPID (DVB_CHANNEL (self)); - _tmp6_ = dvb_channel_get_audio_pids_string (DVB_CHANNEL (self)); - _tmp7_ = _tmp6_; - _tmp8_ = dvb_channel_get_Sid (DVB_CHANNEL (self)); - _tmp9_ = g_strdup_printf ("%s:%u:%s:%u:%s:%s:%u:%s:%u", _tmp0_, _tmp1_, _tmp2_, self->priv->_SymbolRate * 1000, _tmp3_, _tmp4_, _tmp5_, _tmp7_, _tmp8_); - result = (_tmp10_ = _tmp9_, _g_free0 (_tmp7_), _tmp10_); + _tmp0_ = dvb_channel_get_Name ((DVBChannel*) self); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_channel_get_Frequency ((DVBChannel*) self); + _tmp3_ = _tmp2_; + _tmp4_ = self->priv->_Inversion; + _tmp5_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_INVERSION, (gint) _tmp4_); + _tmp6_ = self->priv->_SymbolRate; + _tmp7_ = self->priv->_CodeRate; + _tmp8_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp7_); + _tmp9_ = self->priv->_Modulation; + _tmp10_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_MODULATION, (gint) _tmp9_); + _tmp11_ = dvb_channel_get_VideoPID ((DVBChannel*) self); + _tmp12_ = _tmp11_; + _tmp13_ = dvb_channel_get_audio_pids_string ((DVBChannel*) self); + _tmp14_ = _tmp13_; + _tmp15_ = dvb_channel_get_Sid ((DVBChannel*) self); + _tmp16_ = _tmp15_; + _tmp17_ = g_strdup_printf ("%s:%u:%s:%u:%s:%s:%u:%s:%u", _tmp1_, _tmp3_, _tmp5_, _tmp6_ * 1000, _tmp8_, _tmp10_, _tmp12_, _tmp14_, _tmp16_); + _tmp18_ = _tmp17_; + _g_free0 (_tmp14_); + result = _tmp18_; return result; } -DVBCableChannel* dvb_cable_channel_construct (GType object_type) { - DVBCableChannel * self = NULL; - self = (DVBCableChannel*) dvb_channel_construct (object_type); - return self; -} - - -DVBCableChannel* dvb_cable_channel_new (void) { - return dvb_cable_channel_construct (DVB_TYPE_CABLE_CHANNEL); -} - - DVBDvbSrcInversion dvb_cable_channel_get_Inversion (DVBCableChannel* self) { DVBDvbSrcInversion result; + DVBDvbSrcInversion _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Inversion; + _tmp0_ = self->priv->_Inversion; + result = _tmp0_; return result; } void dvb_cable_channel_set_Inversion (DVBCableChannel* self, DVBDvbSrcInversion value) { + DVBDvbSrcInversion _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Inversion = value; + _tmp0_ = value; + self->priv->_Inversion = _tmp0_; g_object_notify ((GObject *) self, "Inversion"); } guint dvb_cable_channel_get_SymbolRate (DVBCableChannel* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_SymbolRate; + _tmp0_ = self->priv->_SymbolRate; + result = _tmp0_; return result; } void dvb_cable_channel_set_SymbolRate (DVBCableChannel* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_SymbolRate = value; + _tmp0_ = value; + self->priv->_SymbolRate = _tmp0_; g_object_notify ((GObject *) self, "SymbolRate"); } DVBDvbSrcCodeRate dvb_cable_channel_get_CodeRate (DVBCableChannel* self) { DVBDvbSrcCodeRate result; + DVBDvbSrcCodeRate _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_CodeRate; + _tmp0_ = self->priv->_CodeRate; + result = _tmp0_; return result; } void dvb_cable_channel_set_CodeRate (DVBCableChannel* self, DVBDvbSrcCodeRate value) { + DVBDvbSrcCodeRate _tmp0_; g_return_if_fail (self != NULL); - self->priv->_CodeRate = value; + _tmp0_ = value; + self->priv->_CodeRate = _tmp0_; g_object_notify ((GObject *) self, "CodeRate"); } DVBDvbSrcModulation dvb_cable_channel_get_Modulation (DVBCableChannel* self) { DVBDvbSrcModulation result; + DVBDvbSrcModulation _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Modulation; + _tmp0_ = self->priv->_Modulation; + result = _tmp0_; return result; } void dvb_cable_channel_set_Modulation (DVBCableChannel* self, DVBDvbSrcModulation value) { + DVBDvbSrcModulation _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Modulation = value; + _tmp0_ = value; + self->priv->_Modulation = _tmp0_; g_object_notify ((GObject *) self, "Modulation"); } diff -Nru gnome-dvb-daemon-0.1.23/src/Cable/CableChannel.vala gnome-dvb-daemon-0.2.7/src/Cable/CableChannel.vala --- gnome-dvb-daemon-0.1.23/src/Cable/CableChannel.vala 2010-05-26 16:23:56.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Cable/CableChannel.vala 2011-09-29 20:27:47.000000000 +0000 @@ -27,6 +27,10 @@ public DvbSrcCodeRate CodeRate {get; set;} public DvbSrcModulation Modulation {get; set;} + public CableChannel (uint group_id) { + base (group_id); + } + public CableChannel.without_schedule () { Channel.without_schedule (); } @@ -40,7 +44,7 @@ } public override string to_string () { - return "%s:%u:%s:%u:%s:%s:%u:%s:%u".printf(base.Name, base.Frequency, + return "%s:%u:%s:%u:%s:%s:%u:%s:%u".printf(this.Name, this.Frequency, Utils.get_nick_from_enum (typeof(DvbSrcInversion), this.Inversion), this.SymbolRate * 1000, @@ -48,7 +52,7 @@ this.CodeRate), Utils.get_nick_from_enum (typeof(DvbSrcModulation), this.Modulation), - base.VideoPID, base.get_audio_pids_string (), base.Sid); + this.VideoPID, this.get_audio_pids_string (), this.Sid); } } diff -Nru gnome-dvb-daemon-0.1.23/src/Cable/CableScanner.c gnome-dvb-daemon-0.2.7/src/Cable/CableScanner.c --- gnome-dvb-daemon-0.1.23/src/Cable/CableScanner.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Cable/CableScanner.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* CableScanner.c generated by valac 0.11.3, the Vala compiler +/* CableScanner.c generated by valac 0.14.0, the Vala compiler * generated from CableScanner.vala, do not modify */ /* @@ -22,29 +22,13 @@ #include #include -#include -#include +#include #include #include -#include -#include -#include -#include #include +#include -#define DVB_TYPE_ID_BUS_CABLE_SCANNER (dvb_id_bus_cable_scanner_get_type ()) -#define DVB_ID_BUS_CABLE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_CABLE_SCANNER, DVBIDBusCableScanner)) -#define DVB_IS_ID_BUS_CABLE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_CABLE_SCANNER)) -#define DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_CABLE_SCANNER, DVBIDBusCableScannerIface)) - -typedef struct _DVBIDBusCableScanner DVBIDBusCableScanner; -typedef struct _DVBIDBusCableScannerIface DVBIDBusCableScannerIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; -#define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _DVBIDBusCableScannerDBusProxy DVBIDBusCableScannerDBusProxy; -typedef DBusGProxyClass DVBIDBusCableScannerDBusProxyClass; - #define DVB_TYPE_SCANNER (dvb_scanner_get_type ()) #define DVB_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCANNER, DVBScanner)) #define DVB_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SCANNER, DVBScannerClass)) @@ -86,6 +70,16 @@ typedef struct _DVBChannelList DVBChannelList; typedef struct _DVBChannelListClass DVBChannelListClass; +#define DVB_TYPE_ID_BUS_SCANNER (dvb_id_bus_scanner_get_type ()) +#define DVB_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScanner)) +#define DVB_IS_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_SCANNER)) +#define DVB_ID_BUS_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScannerIface)) + +typedef struct _DVBIDBusScanner DVBIDBusScanner; +typedef struct _DVBIDBusScannerIface DVBIDBusScannerIface; + +#define DVB_TYPE_ID_BUS_SCANNER_PROXY (dvb_id_bus_scanner_proxy_get_type ()) + #define DVB_TYPE_CABLE_SCANNER (dvb_cable_scanner_get_type ()) #define DVB_CABLE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CABLE_SCANNER, DVBCableScanner)) #define DVB_CABLE_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CABLE_SCANNER, DVBCableScannerClass)) @@ -106,6 +100,7 @@ typedef struct _DVBDevice DVBDevice; typedef struct _DVBDeviceClass DVBDeviceClass; +#define _g_free0(var) (var = (g_free (var), NULL)) #define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) #define DVB_TYPE_DVB_SRC_MODULATION (dvb_dvb_src_modulation_get_type ()) @@ -126,25 +121,6 @@ #define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -struct _DVBIDBusCableScannerIface { - GTypeInterface parent_iface; - void (*Run) (DVBIDBusCableScanner* self, GError** error); - void (*Destroy) (DVBIDBusCableScanner* self, GError** error); - gboolean (*WriteAllChannelsToFile) (DVBIDBusCableScanner* self, const gchar* path, GError** error); - gboolean (*WriteChannelsToFile) (DVBIDBusCableScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); - void (*AddScanningData) (DVBIDBusCableScanner* self, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate, GError** error); - gboolean (*AddScanningDataFromFile) (DVBIDBusCableScanner* self, const gchar* path, GError** error); -}; - -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusCableScannerDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - struct _DVBScanner { GObject parent_instance; DVBScannerPrivate * priv; @@ -164,6 +140,16 @@ void (*add_scanning_data_from_string) (DVBScanner* self, const gchar* line); }; +struct _DVBIDBusScannerIface { + GTypeInterface parent_iface; + void (*Run) (DVBIDBusScanner* self, GError** error); + void (*Destroy) (DVBIDBusScanner* self, GError** error); + gboolean (*WriteAllChannelsToFile) (DVBIDBusScanner* self, const gchar* path, GError** error); + gboolean (*WriteChannelsToFile) (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); + gboolean (*AddScanningData) (DVBIDBusScanner* self, GHashTable* data, GError** error); + gboolean (*AddScanningDataFromFile) (DVBIDBusScanner* self, const gchar* path, GError** error); +}; + struct _DVBCableScanner { DVBScanner parent_instance; DVBCableScannerPrivate * priv; @@ -204,70 +190,23 @@ static gpointer dvb_cable_scanner_parent_class = NULL; -static DVBIDBusCableScannerIface* dvb_cable_scanner_dvb_id_bus_cable_scanner_parent_iface = NULL; +static DVBIDBusScannerIface* dvb_cable_scanner_dvb_id_bus_scanner_parent_iface = NULL; -DVBIDBusCableScanner* dvb_id_bus_cable_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -GType dvb_id_bus_cable_scanner_get_type (void) G_GNUC_CONST; -void dvb_id_bus_cable_scanner_Run (DVBIDBusCableScanner* self, GError** error); -void dvb_id_bus_cable_scanner_Destroy (DVBIDBusCableScanner* self, GError** error); -gboolean dvb_id_bus_cable_scanner_WriteAllChannelsToFile (DVBIDBusCableScanner* self, const gchar* path, GError** error); -gboolean dvb_id_bus_cable_scanner_WriteChannelsToFile (DVBIDBusCableScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); -void dvb_id_bus_cable_scanner_AddScanningData (DVBIDBusCableScanner* self, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate, GError** error); -gboolean dvb_id_bus_cable_scanner_AddScanningDataFromFile (DVBIDBusCableScanner* self, const gchar* path, GError** error); -static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_cable_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_cable_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_cable_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_introspect (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_property_get_all (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_Run (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_Destroy (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_WriteAllChannelsToFile (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_WriteChannelsToFile (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_AddScanningData (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_AddScanningDataFromFile (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_cable_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, DBusConnection* _connection); -static void _dbus_dvb_id_bus_cable_scanner_finished (GObject* _sender, DBusConnection* _connection); -static void _dbus_dvb_id_bus_cable_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, DBusConnection* _connection); -static void _dbus_dvb_id_bus_cable_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, DBusConnection* _connection); -GType dvb_id_bus_cable_scanner_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_cable_scanner_frequency_scanned (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_cable_scanner_finished (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_cable_scanner_channel_added (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_cable_scanner_frontend_stats (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_cable_scanner_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_CABLE_SCANNER_DBUS_PROXY_DUMMY_PROPERTY -}; -static void dvb_id_bus_cable_scanner_dbus_proxy_Run (DVBIDBusCableScanner* self, GError** error); -static void dvb_id_bus_cable_scanner_dbus_proxy_Destroy (DVBIDBusCableScanner* self, GError** error); -static gboolean dvb_id_bus_cable_scanner_dbus_proxy_WriteAllChannelsToFile (DVBIDBusCableScanner* self, const gchar* path, GError** error); -static gboolean dvb_id_bus_cable_scanner_dbus_proxy_WriteChannelsToFile (DVBIDBusCableScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); -static void dvb_id_bus_cable_scanner_dbus_proxy_AddScanningData (DVBIDBusCableScanner* self, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate, GError** error); -static gboolean dvb_id_bus_cable_scanner_dbus_proxy_AddScanningDataFromFile (DVBIDBusCableScanner* self, const gchar* path, GError** error); -static void dvb_id_bus_cable_scanner_dbus_proxy_dvb_id_bus_cable_scanner__interface_init (DVBIDBusCableScannerIface* iface); -static void _vala_dvb_id_bus_cable_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_cable_scanner_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); GType dvb_scanner_get_type (void) G_GNUC_CONST; GType dvb_scanned_item_get_type (void) G_GNUC_CONST; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_channel_list_get_type (void) G_GNUC_CONST; +GType dvb_id_bus_scanner_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_scanner_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_id_bus_scanner_get_type (void) G_GNUC_CONST; GType dvb_cable_scanner_get_type (void) G_GNUC_CONST; enum { DVB_CABLE_SCANNER_DUMMY_PROPERTY }; -void dvb_cable_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_cable_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_cable_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_cable_scanner_introspect (DVBCableScanner* self, DBusConnection* connection, DBusMessage* message); GType dvb_device_get_type (void) G_GNUC_CONST; DVBCableScanner* dvb_cable_scanner_new (DVBDevice* device); DVBCableScanner* dvb_cable_scanner_construct (GType object_type, DVBDevice* device); -static void dvb_cable_scanner_real_AddScanningData (DVBIDBusCableScanner* base, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate, GError** error); +static gboolean dvb_cable_scanner_real_AddScanningData (DVBIDBusScanner* base, GHashTable* data, GError** error); static inline void dvb_cable_scanner_add_scanning_data (DVBCableScanner* self, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); static void dvb_cable_scanner_real_add_scanning_data_from_string (DVBScanner* base, const gchar* line); @@ -300,2131 +239,123 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); static gint _vala_array_length (gpointer array); -static const DBusObjectPathVTable _dvb_id_bus_cable_scanner_dbus_path_vtable = {_dvb_id_bus_cable_scanner_dbus_unregister, dvb_id_bus_cable_scanner_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_cable_scanner_dbus_vtable = {dvb_id_bus_cable_scanner_dbus_register_object}; -static const DBusObjectPathVTable _dvb_cable_scanner_dbus_path_vtable = {_dvb_cable_scanner_dbus_unregister, dvb_cable_scanner_dbus_message}; -static const _DBusObjectVTable _dvb_cable_scanner_dbus_vtable = {dvb_cable_scanner_dbus_register_object}; - -void dvb_id_bus_cable_scanner_Run (DVBIDBusCableScanner* self, GError** error) { - DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->Run (self, error); -} - - -void dvb_id_bus_cable_scanner_Destroy (DVBIDBusCableScanner* self, GError** error) { - DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->Destroy (self, error); -} - - -gboolean dvb_id_bus_cable_scanner_WriteAllChannelsToFile (DVBIDBusCableScanner* self, const gchar* path, GError** error) { - return DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->WriteAllChannelsToFile (self, path, error); -} - - -gboolean dvb_id_bus_cable_scanner_WriteChannelsToFile (DVBIDBusCableScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { - return DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, error); -} - - -void dvb_id_bus_cable_scanner_AddScanningData (DVBIDBusCableScanner* self, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate, GError** error) { - DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->AddScanningData (self, frequency, modulation, symbol_rate, code_rate, error); -} - - -/** - * @path: Path to file containing scanning data - * @returns: TRUE when the file has been parsed successfully - * - * Parses initial tuning data from a file as provided by dvb-apps - */ -gboolean dvb_id_bus_cable_scanner_AddScanningDataFromFile (DVBIDBusCableScanner* self, const gchar* path, GError** error) { - return DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->AddScanningDataFromFile (self, path, error); -} - - -static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2); - register GMarshalFunc_VOID__UINT_UINT callback; - register GCClosure * cc; - register gpointer data1, data2; - cc = (GCClosure *) closure; - g_return_if_fail (n_param_values == 3); - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = param_values->data[0].v_pointer; - } else { - data1 = param_values->data[0].v_pointer; - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback); - callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), data2); -} - - -static void g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (gpointer data1, guint arg_1, guint arg_2, const char* arg_3, const char* arg_4, const char* arg_5, gboolean arg_6, gpointer data2); - register GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN callback; - register GCClosure * cc; - register gpointer data1, data2; - cc = (GCClosure *) closure; - g_return_if_fail (n_param_values == 7); - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = param_values->data[0].v_pointer; - } else { - data1 = param_values->data[0].v_pointer; - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback); - callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), g_value_get_string (param_values + 3), g_value_get_string (param_values + 4), g_value_get_string (param_values + 5), g_value_get_boolean (param_values + 6), data2); -} - -static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE) (gpointer data1, gdouble arg_1, gdouble arg_2, gpointer data2); - register GMarshalFunc_VOID__DOUBLE_DOUBLE callback; - register GCClosure * cc; - register gpointer data1, data2; - cc = (GCClosure *) closure; - g_return_if_fail (n_param_values == 3); - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = param_values->data[0].v_pointer; - } else { - data1 = param_values->data[0].v_pointer; - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__DOUBLE_DOUBLE) (marshal_data ? marshal_data : cc->callback); - callback (data1, g_value_get_double (param_values + 1), g_value_get_double (param_values + 2), data2); -} - - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_id_bus_cable_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_introspect (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_property_get_all (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.Scanner.Cable") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_Run (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dvb_id_bus_cable_scanner_Run (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_Destroy (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dvb_id_bus_cable_scanner_Destroy (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_WriteAllChannelsToFile (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* path = NULL; - const char* _tmp1_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp2_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp1_); - result = dvb_id_bus_cable_scanner_WriteAllChannelsToFile (self, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (path); - _tmp2_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp2_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +DVBCableScanner* dvb_cable_scanner_construct (GType object_type, DVBDevice* device) { + DVBCableScanner * self = NULL; + DVBDevice* _tmp0_; + g_return_val_if_fail (device != NULL, NULL); + _tmp0_ = device; + self = (DVBCableScanner*) g_object_new (object_type, "Device", _tmp0_, NULL); + return self; } -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_WriteChannelsToFile (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint* channel_sids = NULL; - int channel_sids_length1; - guint* _tmp3_; - int _tmp3__length; - int _tmp3__size; - int _tmp3__length1; - DBusMessageIter _tmp4_; - gchar* path = NULL; - const char* _tmp6_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp7_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "aus")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - channel_sids_length1 = 0; - _tmp3_ = g_new (guint, 5); - _tmp3__length = 0; - _tmp3__size = 4; - _tmp3__length1 = 0; - dbus_message_iter_recurse (&iter, &_tmp4_); - for (; dbus_message_iter_get_arg_type (&_tmp4_); _tmp3__length1++) { - dbus_uint32_t _tmp5_; - if (_tmp3__size == _tmp3__length) { - _tmp3__size = 2 * _tmp3__size; - _tmp3_ = g_renew (guint, _tmp3_, _tmp3__size + 1); - } - dbus_message_iter_get_basic (&_tmp4_, &_tmp5_); - dbus_message_iter_next (&_tmp4_); - _tmp3_[_tmp3__length++] = _tmp5_; - } - channel_sids_length1 = _tmp3__length1; - dbus_message_iter_next (&iter); - channel_sids = _tmp3_; - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp6_); - result = dvb_id_bus_cable_scanner_WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - channel_sids = (g_free (channel_sids), NULL); - _g_free0 (path); - _tmp7_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp7_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +DVBCableScanner* dvb_cable_scanner_new (DVBDevice* device) { + return dvb_cable_scanner_construct (DVB_TYPE_CABLE_SCANNER, device); } -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_AddScanningData (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static gboolean dvb_cable_scanner_real_AddScanningData (DVBIDBusScanner* base, GHashTable* data, GError** error) { + DVBCableScanner * self; + gboolean result = FALSE; guint frequency = 0U; - dbus_uint32_t _tmp8_; - gchar* modulation = NULL; - const char* _tmp9_; guint symbol_rate = 0U; - dbus_uint32_t _tmp10_; + gchar* modulation = NULL; gchar* code_rate = NULL; - const char* _tmp11_; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "usus")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp8_); - dbus_message_iter_next (&iter); - frequency = _tmp8_; - dbus_message_iter_get_basic (&iter, &_tmp9_); - dbus_message_iter_next (&iter); - modulation = g_strdup (_tmp9_); - dbus_message_iter_get_basic (&iter, &_tmp10_); - dbus_message_iter_next (&iter); - symbol_rate = _tmp10_; - dbus_message_iter_get_basic (&iter, &_tmp11_); - dbus_message_iter_next (&iter); - code_rate = g_strdup (_tmp11_); - dvb_id_bus_cable_scanner_AddScanningData (self, frequency, modulation, symbol_rate, code_rate, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (modulation); - _g_free0 (code_rate); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_cable_scanner_AddScanningDataFromFile (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* path = NULL; - const char* _tmp12_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp13_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp12_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp12_); - result = dvb_id_bus_cable_scanner_AddScanningDataFromFile (self, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (path); - _tmp13_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp13_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_cable_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_cable_scanner_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_cable_scanner_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Cable", "Run")) { - result = _dbus_dvb_id_bus_cable_scanner_Run (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Cable", "Destroy")) { - result = _dbus_dvb_id_bus_cable_scanner_Destroy (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Cable", "WriteAllChannelsToFile")) { - result = _dbus_dvb_id_bus_cable_scanner_WriteAllChannelsToFile (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Cable", "WriteChannelsToFile")) { - result = _dbus_dvb_id_bus_cable_scanner_WriteChannelsToFile (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Cable", "AddScanningData")) { - result = _dbus_dvb_id_bus_cable_scanner_AddScanningData (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Cable", "AddScanningDataFromFile")) { - result = _dbus_dvb_id_bus_cable_scanner_AddScanningDataFromFile (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { + GVariant* _var = NULL; + GHashTable* _tmp0_; + gconstpointer _tmp1_ = NULL; + GVariant* _tmp2_; + GVariant* _tmp3_; + guint32 _tmp4_ = 0U; + GHashTable* _tmp5_; + gconstpointer _tmp6_ = NULL; + GVariant* _tmp7_; + GVariant* _tmp8_; + guint32 _tmp9_ = 0U; + GHashTable* _tmp10_; + gconstpointer _tmp11_ = NULL; + GVariant* _tmp12_; + GVariant* _tmp13_; + const gchar* _tmp14_ = NULL; + gchar* _tmp15_; + GHashTable* _tmp16_; + gconstpointer _tmp17_ = NULL; + GVariant* _tmp18_; + GVariant* _tmp19_; + const gchar* _tmp20_ = NULL; + gchar* _tmp21_; + guint _tmp22_; + const gchar* _tmp23_; + guint _tmp24_; + const gchar* _tmp25_; + self = (DVBCableScanner*) base; + g_return_val_if_fail (data != NULL, FALSE); + _tmp0_ = data; + _tmp1_ = g_hash_table_lookup (_tmp0_, "frequency"); + _var = (GVariant*) _tmp1_; + _tmp2_ = _var; + if (_tmp2_ == NULL) { + result = FALSE; + _g_free0 (code_rate); + _g_free0 (modulation); return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _dbus_dvb_id_bus_cable_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp14_; - dbus_uint32_t _tmp15_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Cable", "FrequencyScanned"); - dbus_message_iter_init_append (_message, &_iter); - _tmp14_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp14_); - _tmp15_ = freq_left; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp15_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_cable_scanner_finished (GObject* _sender, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Cable", "Finished"); - dbus_message_iter_init_append (_message, &_iter); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_cable_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp16_; - dbus_uint32_t _tmp17_; - const char* _tmp18_; - const char* _tmp19_; - const char* _tmp20_; - dbus_bool_t _tmp21_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Cable", "ChannelAdded"); - dbus_message_iter_init_append (_message, &_iter); - _tmp16_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp16_); - _tmp17_ = sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp17_); - _tmp18_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp18_); - _tmp19_ = network; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp19_); - _tmp20_ = type; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp20_); - _tmp21_ = scrambled; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_BOOLEAN, &_tmp21_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_cable_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - double _tmp22_; - double _tmp23_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Cable", "FrontendStats"); - dbus_message_iter_init_append (_message, &_iter); - _tmp22_ = signal_strength; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_DOUBLE, &_tmp22_); - _tmp23_ = signal_noise_ratio; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_DOUBLE, &_tmp23_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_cable_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_cable_scanner_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "frequency-scanned", (GCallback) _dbus_dvb_id_bus_cable_scanner_frequency_scanned, connection); - g_signal_connect (object, "finished", (GCallback) _dbus_dvb_id_bus_cable_scanner_finished, connection); - g_signal_connect (object, "channel-added", (GCallback) _dbus_dvb_id_bus_cable_scanner_channel_added, connection); - g_signal_connect (object, "frontend-stats", (GCallback) _dbus_dvb_id_bus_cable_scanner_frontend_stats, connection); -} - - -static void dvb_id_bus_cable_scanner_base_init (DVBIDBusCableScannerIface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - g_signal_new ("frequency_scanned", DVB_TYPE_ID_BUS_CABLE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); - g_signal_new ("finished", DVB_TYPE_ID_BUS_CABLE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - g_signal_new ("channel_added", DVB_TYPE_ID_BUS_CABLE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN, G_TYPE_NONE, 6, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); - g_signal_new ("frontend_stats", DVB_TYPE_ID_BUS_CABLE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); - g_type_set_qdata (DVB_TYPE_ID_BUS_CABLE_SCANNER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_cable_scanner_dbus_vtable)); } -} - - -GType dvb_id_bus_cable_scanner_get_type (void) { - static volatile gsize dvb_id_bus_cable_scanner_type_id__volatile = 0; - if (g_once_init_enter (&dvb_id_bus_cable_scanner_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusCableScannerIface), (GBaseInitFunc) dvb_id_bus_cable_scanner_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType dvb_id_bus_cable_scanner_type_id; - dvb_id_bus_cable_scanner_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusCableScanner", &g_define_type_info, 0); - g_type_interface_add_prerequisite (dvb_id_bus_cable_scanner_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_cable_scanner_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_cable_scanner_dbus_proxy_get_type); - g_once_init_leave (&dvb_id_bus_cable_scanner_type_id__volatile, dvb_id_bus_cable_scanner_type_id); - } - return dvb_id_bus_cable_scanner_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (DVBIDBusCableScannerDBusProxy, dvb_id_bus_cable_scanner_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_CABLE_SCANNER, dvb_id_bus_cable_scanner_dbus_proxy_dvb_id_bus_cable_scanner__interface_init) ); -DVBIDBusCableScanner* dvb_id_bus_cable_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusCableScanner* self; - self = g_object_new (dvb_id_bus_cable_scanner_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.Scanner.Cable", NULL); - return self; -} - - -static GObject* dvb_id_bus_cable_scanner_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_cable_scanner_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_cable_scanner_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_dvb_id_bus_cable_scanner_frequency_scanned (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint frequency = 0U; - dbus_uint32_t _tmp0_; - guint freq_left = 0U; - dbus_uint32_t _tmp1_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - frequency = _tmp0_; - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - freq_left = _tmp1_; - g_signal_emit_by_name (self, "frequency-scanned", frequency, freq_left); -} - - -static void _dbus_handle_dvb_id_bus_cable_scanner_finished (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "")) { - return; - } - dbus_message_iter_init (message, &iter); - g_signal_emit_by_name (self, "finished"); -} - - -static void _dbus_handle_dvb_id_bus_cable_scanner_channel_added (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint frequency = 0U; - dbus_uint32_t _tmp2_; - guint sid = 0U; - dbus_uint32_t _tmp3_; - gchar* name = NULL; - const char* _tmp4_; - gchar* network = NULL; - const char* _tmp5_; - gchar* type = NULL; - const char* _tmp6_; - gboolean scrambled = FALSE; - dbus_bool_t _tmp7_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uusssb")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp2_); - dbus_message_iter_next (&iter); - frequency = _tmp2_; - dbus_message_iter_get_basic (&iter, &_tmp3_); - dbus_message_iter_next (&iter); - sid = _tmp3_; - dbus_message_iter_get_basic (&iter, &_tmp4_); - dbus_message_iter_next (&iter); - name = g_strdup (_tmp4_); - dbus_message_iter_get_basic (&iter, &_tmp5_); - dbus_message_iter_next (&iter); - network = g_strdup (_tmp5_); - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - type = g_strdup (_tmp6_); - dbus_message_iter_get_basic (&iter, &_tmp7_); - dbus_message_iter_next (&iter); - scrambled = _tmp7_; - g_signal_emit_by_name (self, "channel-added", frequency, sid, name, network, type, scrambled); - _g_free0 (name); - _g_free0 (network); - _g_free0 (type); -} - - -static void _dbus_handle_dvb_id_bus_cable_scanner_frontend_stats (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - gdouble signal_strength = 0.0; - double _tmp8_; - gdouble signal_noise_ratio = 0.0; - double _tmp9_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "dd")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp8_); - dbus_message_iter_next (&iter); - signal_strength = _tmp8_; - dbus_message_iter_get_basic (&iter, &_tmp9_); - dbus_message_iter_next (&iter); - signal_noise_ratio = _tmp9_; - g_signal_emit_by_name (self, "frontend-stats", signal_strength, signal_noise_ratio); -} - - -DBusHandlerResult dvb_id_bus_cable_scanner_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Cable", "FrequencyScanned")) { - _dbus_handle_dvb_id_bus_cable_scanner_frequency_scanned (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Cable", "Finished")) { - _dbus_handle_dvb_id_bus_cable_scanner_finished (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Cable", "ChannelAdded")) { - _dbus_handle_dvb_id_bus_cable_scanner_channel_added (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Cable", "FrontendStats")) { - _dbus_handle_dvb_id_bus_cable_scanner_frontend_stats (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void dvb_id_bus_cable_scanner_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - return; - } - ((DVBIDBusCableScannerDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_cable_scanner_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_cable_scanner_dbus_proxy_parent_class)->dispose (self); -} - - -static void dvb_id_bus_cable_scanner_dbus_proxy_class_init (DVBIDBusCableScannerDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_cable_scanner_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_cable_scanner_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_cable_scanner_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_cable_scanner_dbus_proxy_set_property; -} - - -static void dvb_id_bus_cable_scanner_dbus_proxy_init (DVBIDBusCableScannerDBusProxy* self) { -} - - -static void dvb_id_bus_cable_scanner_dbus_proxy_Run (DVBIDBusCableScanner* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Cable", "Run"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp10_; - _edomain = DBUS_GERROR; - _tmp10_ = _dbus_error.name + 27; - if (strcmp (_tmp10_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp10_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp10_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp10_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp10_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp10_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp10_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp10_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp10_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp10_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp10_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp10_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp10_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp10_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp10_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp10_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp10_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp10_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp10_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp10_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp10_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp10_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp10_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp10_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp10_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp10_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp10_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp10_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp10_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp10_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp10_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp10_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp10_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return; - } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); -} - - -static void dvb_id_bus_cable_scanner_dbus_proxy_Destroy (DVBIDBusCableScanner* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Cable", "Destroy"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp11_; - _edomain = DBUS_GERROR; - _tmp11_ = _dbus_error.name + 27; - if (strcmp (_tmp11_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp11_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp11_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp11_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp11_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp11_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp11_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp11_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp11_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp11_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp11_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp11_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp11_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp11_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp11_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp11_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp11_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp11_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp11_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp11_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp11_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp11_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp11_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp11_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp11_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp11_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp11_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp11_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp11_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp11_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp11_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp11_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp11_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return; - } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); -} - - -static gboolean dvb_id_bus_cable_scanner_dbus_proxy_WriteAllChannelsToFile (DVBIDBusCableScanner* self, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp12_; - gboolean _result; - dbus_bool_t _tmp13_; - if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Cable", "WriteAllChannelsToFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp12_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp12_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp14_; - _edomain = DBUS_GERROR; - _tmp14_ = _dbus_error.name + 27; - if (strcmp (_tmp14_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp14_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp14_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp14_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp14_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp14_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp14_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp14_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp14_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp14_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp14_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp14_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp14_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp14_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp14_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp14_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp14_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp14_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp14_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp14_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp14_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp14_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp14_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp14_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp14_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp14_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp14_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp14_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp14_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp14_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp14_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp14_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp14_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp13_); - dbus_message_iter_next (&_iter); - _result = _tmp13_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_cable_scanner_dbus_proxy_WriteChannelsToFile (DVBIDBusCableScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint* _tmp15_; - DBusMessageIter _tmp16_; - int _tmp17_; - const char* _tmp19_; - gboolean _result; - dbus_bool_t _tmp20_; - if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Cable", "WriteChannelsToFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp15_ = channel_sids; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "u", &_tmp16_); - for (_tmp17_ = 0; _tmp17_ < channel_sids_length1; _tmp17_++) { - dbus_uint32_t _tmp18_; - _tmp18_ = *_tmp15_; - dbus_message_iter_append_basic (&_tmp16_, DBUS_TYPE_UINT32, &_tmp18_); - _tmp15_++; - } - dbus_message_iter_close_container (&_iter, &_tmp16_); - _tmp19_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp19_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp21_; - _edomain = DBUS_GERROR; - _tmp21_ = _dbus_error.name + 27; - if (strcmp (_tmp21_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp21_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp21_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp21_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp21_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp21_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp21_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp21_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp21_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp21_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp21_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp21_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp21_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp21_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp21_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp21_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp21_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp21_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp21_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp21_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp21_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp21_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp21_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp21_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp21_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp21_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp21_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp21_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp21_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp21_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp21_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp21_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp21_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; + _tmp3_ = _var; + _tmp4_ = g_variant_get_uint32 (_tmp3_); + frequency = (guint) _tmp4_; + _tmp5_ = data; + _tmp6_ = g_hash_table_lookup (_tmp5_, "symbol-rate"); + _var = (GVariant*) _tmp6_; + _tmp7_ = _var; + if (_tmp7_ == NULL) { + result = FALSE; + _g_free0 (code_rate); + _g_free0 (modulation); + return result; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; + _tmp8_ = _var; + _tmp9_ = g_variant_get_uint32 (_tmp8_); + symbol_rate = (guint) _tmp9_; + _tmp10_ = data; + _tmp11_ = g_hash_table_lookup (_tmp10_, "inner-fec"); + _var = (GVariant*) _tmp11_; + _tmp12_ = _var; + if (_tmp12_ == NULL) { + result = FALSE; + _g_free0 (code_rate); + _g_free0 (modulation); + return result; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp20_); - dbus_message_iter_next (&_iter); - _result = _tmp20_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_cable_scanner_dbus_proxy_AddScanningData (DVBIDBusCableScanner* self, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp22_; - const char* _tmp23_; - dbus_uint32_t _tmp24_; - const char* _tmp25_; - if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; + _tmp13_ = _var; + _tmp14_ = g_variant_get_string (_tmp13_, NULL); + _tmp15_ = g_strdup (_tmp14_); + _g_free0 (code_rate); + code_rate = _tmp15_; + _tmp16_ = data; + _tmp17_ = g_hash_table_lookup (_tmp16_, "modulation"); + _var = (GVariant*) _tmp17_; + _tmp18_ = _var; + if (_tmp18_ == NULL) { + result = FALSE; + _g_free0 (code_rate); + _g_free0 (modulation); + return result; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Cable", "AddScanningData"); - dbus_message_iter_init_append (_message, &_iter); + _tmp19_ = _var; + _tmp20_ = g_variant_get_string (_tmp19_, NULL); + _tmp21_ = g_strdup (_tmp20_); + _g_free0 (modulation); + modulation = _tmp21_; _tmp22_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp22_); _tmp23_ = modulation; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp23_); _tmp24_ = symbol_rate; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp24_); _tmp25_ = code_rate; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp25_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp26_; - _edomain = DBUS_GERROR; - _tmp26_ = _dbus_error.name + 27; - if (strcmp (_tmp26_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp26_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp26_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp26_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp26_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp26_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp26_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp26_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp26_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp26_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp26_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp26_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp26_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp26_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp26_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp26_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp26_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp26_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp26_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp26_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp26_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp26_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp26_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp26_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp26_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp26_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp26_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp26_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp26_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp26_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp26_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp26_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp26_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return; - } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); -} - - -static gboolean dvb_id_bus_cable_scanner_dbus_proxy_AddScanningDataFromFile (DVBIDBusCableScanner* self, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp27_; - gboolean _result; - dbus_bool_t _tmp28_; - if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Cable", "AddScanningDataFromFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp27_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp27_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp29_; - _edomain = DBUS_GERROR; - _tmp29_ = _dbus_error.name + 27; - if (strcmp (_tmp29_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp29_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp29_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp29_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp29_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp29_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp29_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp29_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp29_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp29_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp29_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp29_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp29_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp29_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp29_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp29_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp29_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp29_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp29_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp29_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp29_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp29_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp29_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp29_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp29_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp29_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp29_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp29_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp29_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp29_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp29_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp29_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp29_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp28_); - dbus_message_iter_next (&_iter); - _result = _tmp28_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_cable_scanner_dbus_proxy_dvb_id_bus_cable_scanner__interface_init (DVBIDBusCableScannerIface* iface) { - iface->Run = dvb_id_bus_cable_scanner_dbus_proxy_Run; - iface->Destroy = dvb_id_bus_cable_scanner_dbus_proxy_Destroy; - iface->WriteAllChannelsToFile = dvb_id_bus_cable_scanner_dbus_proxy_WriteAllChannelsToFile; - iface->WriteChannelsToFile = dvb_id_bus_cable_scanner_dbus_proxy_WriteChannelsToFile; - iface->AddScanningData = dvb_id_bus_cable_scanner_dbus_proxy_AddScanningData; - iface->AddScanningDataFromFile = dvb_id_bus_cable_scanner_dbus_proxy_AddScanningDataFromFile; -} - - -static void _vala_dvb_id_bus_cable_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { -} - - -static void _vala_dvb_id_bus_cable_scanner_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { -} - - -void _dvb_cable_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_cable_scanner_introspect (DVBCableScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_cable_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_cable_scanner_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_cable_scanner_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_cable_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_cable_scanner_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - dvb_id_bus_cable_scanner_dbus_register_object (connection, path, object); -} - - -DVBCableScanner* dvb_cable_scanner_construct (GType object_type, DVBDevice* device) { - DVBCableScanner * self = NULL; - g_return_val_if_fail (device != NULL, NULL); - self = (DVBCableScanner*) g_object_new (object_type, "Device", device, NULL); - return self; -} - - -DVBCableScanner* dvb_cable_scanner_new (DVBDevice* device) { - return dvb_cable_scanner_construct (DVB_TYPE_CABLE_SCANNER, device); -} - - -static void dvb_cable_scanner_real_AddScanningData (DVBIDBusCableScanner* base, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate, GError** error) { - DVBCableScanner * self; - self = (DVBCableScanner*) base; - g_return_if_fail (modulation != NULL); - g_return_if_fail (code_rate != NULL); - dvb_cable_scanner_add_scanning_data (self, frequency, modulation, symbol_rate, code_rate); + dvb_cable_scanner_add_scanning_data (self, _tmp22_, _tmp23_, _tmp24_, _tmp25_); + result = TRUE; + _g_free0 (code_rate); + _g_free0 (modulation); + return result; } @@ -2434,56 +365,100 @@ static inline void dvb_cable_scanner_add_scanning_data (DVBCableScanner* self, guint frequency, const gchar* modulation, guint symbol_rate, const gchar* code_rate) { - GstStructure* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; + GstStructure* _tmp4_; GstStructure* tuning_params; - GstStructure* _tmp1_; + GstStructure* _tmp5_; g_return_if_fail (self != NULL); g_return_if_fail (modulation != NULL); g_return_if_fail (code_rate != NULL); - _tmp0_ = gst_structure_new ("tuning_params", "frequency", G_TYPE_UINT, frequency, "symbol-rate", G_TYPE_UINT, symbol_rate, "inner-fec", G_TYPE_STRING, code_rate, "modulation", G_TYPE_STRING, modulation, NULL); - tuning_params = _tmp0_; - _tmp1_ = _gst_structure_copy0 (tuning_params); - dvb_scanner_add_structure_to_scan (DVB_SCANNER (self), _tmp1_); + _tmp0_ = frequency; + _tmp1_ = symbol_rate; + _tmp2_ = code_rate; + _tmp3_ = modulation; + _tmp4_ = gst_structure_new ("tuning_params", "frequency", G_TYPE_UINT, _tmp0_, "symbol-rate", G_TYPE_UINT, _tmp1_, "inner-fec", G_TYPE_STRING, _tmp2_, "modulation", G_TYPE_STRING, _tmp3_, NULL); + tuning_params = _tmp4_; + _tmp5_ = _gst_structure_copy0 (tuning_params); + dvb_scanner_add_structure_to_scan (DVB_SCANNER (self), _tmp5_); _gst_structure_free0 (tuning_params); } static void dvb_cable_scanner_real_add_scanning_data_from_string (DVBScanner* base, const gchar* line) { DVBCableScanner * self; - gchar** _tmp0_; - gchar** _tmp1_ = NULL; + const gchar* _tmp0_; + gchar** _tmp1_; + gchar** _tmp2_ = NULL; + gchar** cols; gint cols_length1; gint _cols_size_; - gchar** _tmp2_; - gchar** cols; - gint _tmp3_; + gchar** _tmp3_; + gint _tmp3__length1; + gchar** _tmp4_; + gint _tmp4__length1; + const gchar* _tmp5_; + gint _tmp6_ = 0; guint freq; - gchar* _tmp4_; + gchar** _tmp7_; + gint _tmp7__length1; + const gchar* _tmp8_; + gchar* _tmp9_; gchar* modulation; - gint _tmp5_; + gchar** _tmp10_; + gint _tmp10__length1; + const gchar* _tmp11_; + gint _tmp12_ = 0; guint symbol_rate; - gchar* _tmp6_; + gchar** _tmp13_; + gint _tmp13__length1; + const gchar* _tmp14_; + gchar* _tmp15_; gchar* code_rate; + guint _tmp16_; + const gchar* _tmp17_; + guint _tmp18_; + const gchar* _tmp19_; self = (DVBCableScanner*) base; g_return_if_fail (line != NULL); - _tmp1_ = _tmp0_ = g_regex_split_simple ("\\s+", line, 0, 0); - _tmp2_ = _tmp1_; - cols_length1 = _vala_array_length (_tmp0_); - _cols_size_ = cols_length1; + _tmp0_ = line; + _tmp2_ = _tmp1_ = g_regex_split_simple ("\\s+", _tmp0_, 0, 0); cols = _tmp2_; - if (cols_length1 < 5) { + cols_length1 = _vala_array_length (_tmp1_); + _cols_size_ = cols_length1; + _tmp3_ = cols; + _tmp3__length1 = cols_length1; + if (_tmp3__length1 < 5) { cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); return; } - _tmp3_ = atoi (cols[1]); - freq = (guint) _tmp3_; - _tmp4_ = g_strdup (cols[4]); - modulation = _tmp4_; - _tmp5_ = atoi (cols[2]); - symbol_rate = (guint) (_tmp5_ / 1000); - _tmp6_ = g_strdup (cols[3]); - code_rate = _tmp6_; - dvb_cable_scanner_add_scanning_data (self, freq, modulation, symbol_rate, code_rate); + _tmp4_ = cols; + _tmp4__length1 = cols_length1; + _tmp5_ = _tmp4_[1]; + _tmp6_ = atoi (_tmp5_); + freq = (guint) _tmp6_; + _tmp7_ = cols; + _tmp7__length1 = cols_length1; + _tmp8_ = _tmp7_[4]; + _tmp9_ = g_strdup (_tmp8_); + modulation = _tmp9_; + _tmp10_ = cols; + _tmp10__length1 = cols_length1; + _tmp11_ = _tmp10_[2]; + _tmp12_ = atoi (_tmp11_); + symbol_rate = (guint) (_tmp12_ / 1000); + _tmp13_ = cols; + _tmp13__length1 = cols_length1; + _tmp14_ = _tmp13_[3]; + _tmp15_ = g_strdup (_tmp14_); + code_rate = _tmp15_; + _tmp16_ = freq; + _tmp17_ = modulation; + _tmp18_ = symbol_rate; + _tmp19_ = code_rate; + dvb_cable_scanner_add_scanning_data (self, _tmp16_, _tmp17_, _tmp18_, _tmp19_); _g_free0 (code_rate); _g_free0 (modulation); cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); @@ -2492,55 +467,74 @@ static void dvb_cable_scanner_real_prepare (DVBScanner* base) { DVBCableScanner * self; - GstElement* _tmp0_ = NULL; + GstElement* _tmp0_; + GstElement* _tmp1_ = NULL; GstElement* dvbsrc; - gchar* _tmp1_; gchar* _tmp2_; - gchar** _tmp3_ = NULL; + gchar* _tmp3_; + gchar** _tmp4_ = NULL; + gchar** keys; gint keys_length1; gint _keys_size_; - gchar** _tmp4_; - gchar** keys; - const gchar* _tmp6_ = NULL; - DVBDvbSrcModulation _tmp7_; - const gchar* _tmp8_ = NULL; - DVBDvbSrcCodeRate _tmp9_; + gchar** _tmp5_; + gint _tmp5__length1; + GstElement* _tmp10_; + const GstStructure* _tmp11_; + const gchar* _tmp12_ = NULL; + DVBDvbSrcModulation _tmp13_ = 0; + GstElement* _tmp14_; + const GstStructure* _tmp15_; + const gchar* _tmp16_ = NULL; + DVBDvbSrcCodeRate _tmp17_ = 0; self = (DVBCableScanner*) base; - g_debug ("CableScanner.vala:90: Setting up pipeline for DVB-C scan"); - _tmp0_ = gst_bin_get_by_name (GST_BIN (((DVBScanner*) self)->pipeline), "dvbsrc"); - dvbsrc = _tmp0_; - _tmp1_ = g_strdup ("frequency"); - _tmp2_ = g_strdup ("symbol-rate"); - _tmp3_ = g_new0 (gchar*, 2 + 1); - _tmp3_[0] = _tmp1_; - _tmp3_[1] = _tmp2_; - _tmp4_ = _tmp3_; + g_debug ("CableScanner.vala:87: Setting up pipeline for DVB-C scan"); + _tmp0_ = ((DVBScanner*) self)->pipeline; + _tmp1_ = gst_bin_get_by_name (GST_BIN (_tmp0_), "dvbsrc"); + dvbsrc = _tmp1_; + _tmp2_ = g_strdup ("frequency"); + _tmp3_ = g_strdup ("symbol-rate"); + _tmp4_ = g_new0 (gchar*, 2 + 1); + _tmp4_[0] = _tmp2_; + _tmp4_[1] = _tmp3_; + keys = _tmp4_; keys_length1 = 2; _keys_size_ = keys_length1; - keys = _tmp4_; + _tmp5_ = keys; + _tmp5__length1 = keys_length1; { - gchar** key_collection; - int key_collection_length1; - int key_it; - key_collection = keys; - key_collection_length1 = keys_length1; - for (key_it = 0; key_it < keys_length1; key_it = key_it + 1) { - gchar* _tmp5_; - gchar* key; - _tmp5_ = g_strdup (key_collection[key_it]); - key = _tmp5_; + gchar** key_collection = NULL; + gint key_collection_length1 = 0; + gint _key_collection_size_ = 0; + gint key_it = 0; + key_collection = _tmp5_; + key_collection_length1 = _tmp5__length1; + for (key_it = 0; key_it < _tmp5__length1; key_it = key_it + 1) { + gchar* _tmp6_; + gchar* key = NULL; + _tmp6_ = g_strdup (key_collection[key_it]); + key = _tmp6_; { - dvb_scanner_set_uint_property (dvbsrc, ((DVBScanner*) self)->current_tuning_params, key); + GstElement* _tmp7_; + const GstStructure* _tmp8_; + const gchar* _tmp9_; + _tmp7_ = dvbsrc; + _tmp8_ = ((DVBScanner*) self)->current_tuning_params; + _tmp9_ = key; + dvb_scanner_set_uint_property (_tmp7_, _tmp8_, _tmp9_); _g_free0 (key); } } } - _tmp6_ = gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "modulation"); - _tmp7_ = dvb_get_modulation_val (_tmp6_); - g_object_set ((GObject*) dvbsrc, "modulation", _tmp7_, NULL); - _tmp8_ = gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "inner-fec"); - _tmp9_ = dvb_get_code_rate_val (_tmp8_); - g_object_set ((GObject*) dvbsrc, "code-rate-hp", _tmp9_, NULL); + _tmp10_ = dvbsrc; + _tmp11_ = ((DVBScanner*) self)->current_tuning_params; + _tmp12_ = gst_structure_get_string (_tmp11_, "modulation"); + _tmp13_ = dvb_get_modulation_val (_tmp12_); + g_object_set ((GObject*) _tmp10_, "modulation", _tmp13_, NULL); + _tmp14_ = dvbsrc; + _tmp15_ = ((DVBScanner*) self)->current_tuning_params; + _tmp16_ = gst_structure_get_string (_tmp15_, "inner-fec"); + _tmp17_ = dvb_get_code_rate_val (_tmp16_); + g_object_set ((GObject*) _tmp14_, "code-rate-hp", _tmp17_, NULL); keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL); _gst_object_unref0 (dvbsrc); } @@ -2550,14 +544,16 @@ DVBCableScanner * self; DVBScannedItem* result = NULL; guint freq = 0U; - guint _tmp0_; - DVBScannedItem* _tmp1_ = NULL; + const GstStructure* _tmp0_; + guint _tmp1_ = 0U; + DVBScannedItem* _tmp2_; self = (DVBCableScanner*) base; g_return_val_if_fail (structure != NULL, NULL); - gst_structure_get_uint (structure, "frequency", &_tmp0_); - freq = _tmp0_; - _tmp1_ = dvb_scanned_item_new (freq); - result = _tmp1_; + _tmp0_ = structure; + gst_structure_get_uint (_tmp0_, "frequency", &_tmp1_); + freq = _tmp1_; + _tmp2_ = dvb_scanned_item_new (freq); + result = _tmp2_; return result; } @@ -2565,7 +561,7 @@ static DVBChannel* dvb_cable_scanner_real_get_new_channel (DVBScanner* base) { DVBCableScanner * self; DVBChannel* result = NULL; - DVBCableChannel* _tmp0_ = NULL; + DVBCableChannel* _tmp0_; self = (DVBCableScanner*) base; _tmp0_ = dvb_cable_channel_new_without_schedule (); result = (DVBChannel*) _tmp0_; @@ -2580,37 +576,63 @@ static void dvb_cable_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel) { DVBCableScanner * self; - DVBCableChannel* _tmp0_; + DVBChannel* _tmp0_; + DVBChannel* _tmp1_; + DVBCableChannel* _tmp2_; DVBCableChannel* cc; - const gchar* _tmp1_ = NULL; - DVBDvbSrcModulation _tmp2_; + DVBCableChannel* _tmp3_; + DVBCableChannel* _tmp4_; + const GstStructure* _tmp5_; + const gchar* _tmp6_ = NULL; + DVBDvbSrcModulation _tmp7_ = 0; guint freq = 0U; - guint _tmp3_; + const GstStructure* _tmp8_; + guint _tmp9_ = 0U; + DVBCableChannel* _tmp10_; + guint _tmp11_; guint symbol_rate = 0U; - guint _tmp4_; - const gchar* _tmp5_ = NULL; - DVBDvbSrcCodeRate _tmp6_; + const GstStructure* _tmp12_; + guint _tmp13_ = 0U; + DVBCableChannel* _tmp14_; + guint _tmp15_; + DVBCableChannel* _tmp16_; + const GstStructure* _tmp17_; + const gchar* _tmp18_ = NULL; + DVBDvbSrcCodeRate _tmp19_ = 0; self = (DVBCableScanner*) base; g_return_if_fail (delivery != NULL); g_return_if_fail (channel != NULL); - if (!DVB_IS_CABLE_CHANNEL (channel)) { + _tmp0_ = channel; + if (!DVB_IS_CABLE_CHANNEL (_tmp0_)) { return; } - _tmp0_ = _g_object_ref0 (DVB_CABLE_CHANNEL (channel)); - cc = _tmp0_; - dvb_cable_channel_set_Inversion (cc, DVB_DVB_SRC_INVERSION_INVERSION_AUTO); - _tmp1_ = gst_structure_get_string (delivery, "modulation"); - _tmp2_ = dvb_get_modulation_val (_tmp1_); - dvb_cable_channel_set_Modulation (cc, _tmp2_); - gst_structure_get_uint (delivery, "frequency", &_tmp3_); - freq = _tmp3_; - dvb_channel_set_Frequency ((DVBChannel*) cc, freq); - gst_structure_get_uint (delivery, "symbol-rate", &_tmp4_); - symbol_rate = _tmp4_; - dvb_cable_channel_set_SymbolRate (cc, symbol_rate); - _tmp5_ = gst_structure_get_string (delivery, "inner-fec"); - _tmp6_ = dvb_get_code_rate_val (_tmp5_); - dvb_cable_channel_set_CodeRate (cc, _tmp6_); + _tmp1_ = channel; + _tmp2_ = _g_object_ref0 (DVB_CABLE_CHANNEL (_tmp1_)); + cc = _tmp2_; + _tmp3_ = cc; + dvb_cable_channel_set_Inversion (_tmp3_, DVB_DVB_SRC_INVERSION_INVERSION_AUTO); + _tmp4_ = cc; + _tmp5_ = delivery; + _tmp6_ = gst_structure_get_string (_tmp5_, "modulation"); + _tmp7_ = dvb_get_modulation_val (_tmp6_); + dvb_cable_channel_set_Modulation (_tmp4_, _tmp7_); + _tmp8_ = delivery; + gst_structure_get_uint (_tmp8_, "frequency", &_tmp9_); + freq = _tmp9_; + _tmp10_ = cc; + _tmp11_ = freq; + dvb_channel_set_Frequency ((DVBChannel*) _tmp10_, _tmp11_); + _tmp12_ = delivery; + gst_structure_get_uint (_tmp12_, "symbol-rate", &_tmp13_); + symbol_rate = _tmp13_; + _tmp14_ = cc; + _tmp15_ = symbol_rate; + dvb_cable_channel_set_SymbolRate (_tmp14_, _tmp15_); + _tmp16_ = cc; + _tmp17_ = delivery; + _tmp18_ = gst_structure_get_string (_tmp17_, "inner-fec"); + _tmp19_ = dvb_get_code_rate_val (_tmp18_); + dvb_cable_channel_set_CodeRate (_tmp16_, _tmp19_); _g_object_unref0 (cc); } @@ -2622,18 +644,17 @@ DVB_SCANNER_CLASS (klass)->get_scanned_item = dvb_cable_scanner_real_get_scanned_item; DVB_SCANNER_CLASS (klass)->get_new_channel = dvb_cable_scanner_real_get_new_channel; DVB_SCANNER_CLASS (klass)->add_values_from_structure_to_channel = dvb_cable_scanner_real_add_values_from_structure_to_channel; - g_type_set_qdata (DVB_TYPE_CABLE_SCANNER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_cable_scanner_dbus_vtable)); } -static void dvb_cable_scanner_dvb_id_bus_cable_scanner_interface_init (DVBIDBusCableScannerIface * iface) { - dvb_cable_scanner_dvb_id_bus_cable_scanner_parent_iface = g_type_interface_peek_parent (iface); - iface->AddScanningData = (void (*)(DVBIDBusCableScanner* ,guint ,const gchar* ,guint ,const gchar* ,GError**)) dvb_cable_scanner_real_AddScanningData; - iface->Run = (void (*)(DVBIDBusCableScanner* ,GError**)) dvb_scanner_Run; - iface->Destroy = (void (*)(DVBIDBusCableScanner* ,GError**)) dvb_scanner_Destroy; - iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusCableScanner* ,const gchar* ,GError**)) dvb_scanner_WriteAllChannelsToFile; - iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusCableScanner* ,guint* ,int ,const gchar* ,GError**)) dvb_scanner_WriteChannelsToFile; - iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusCableScanner* ,const gchar* ,GError**)) dvb_scanner_AddScanningDataFromFile; +static void dvb_cable_scanner_dvb_id_bus_scanner_interface_init (DVBIDBusScannerIface * iface) { + dvb_cable_scanner_dvb_id_bus_scanner_parent_iface = g_type_interface_peek_parent (iface); + iface->AddScanningData = (gboolean (*)(DVBIDBusScanner*, GHashTable*, GError**)) dvb_cable_scanner_real_AddScanningData; + iface->Run = (void (*)(DVBIDBusScanner*, GError**)) dvb_scanner_Run; + iface->Destroy = (void (*)(DVBIDBusScanner*, GError**)) dvb_scanner_Destroy; + iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusScanner*, const gchar*, GError**)) dvb_scanner_WriteAllChannelsToFile; + iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusScanner*, guint*, int, const gchar*, GError**)) dvb_scanner_WriteChannelsToFile; + iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusScanner*, const gchar*, GError**)) dvb_scanner_AddScanningDataFromFile; } @@ -2645,10 +666,10 @@ static volatile gsize dvb_cable_scanner_type_id__volatile = 0; if (g_once_init_enter (&dvb_cable_scanner_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBCableScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_cable_scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBCableScanner), 0, (GInstanceInitFunc) dvb_cable_scanner_instance_init, NULL }; - static const GInterfaceInfo dvb_id_bus_cable_scanner_info = { (GInterfaceInitFunc) dvb_cable_scanner_dvb_id_bus_cable_scanner_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo dvb_id_bus_scanner_info = { (GInterfaceInitFunc) dvb_cable_scanner_dvb_id_bus_scanner_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; GType dvb_cable_scanner_type_id; dvb_cable_scanner_type_id = g_type_register_static (DVB_TYPE_SCANNER, "DVBCableScanner", &g_define_type_info, 0); - g_type_add_interface_static (dvb_cable_scanner_type_id, DVB_TYPE_ID_BUS_CABLE_SCANNER, &dvb_id_bus_cable_scanner_info); + g_type_add_interface_static (dvb_cable_scanner_type_id, DVB_TYPE_ID_BUS_SCANNER, &dvb_id_bus_scanner_info); g_once_init_leave (&dvb_cable_scanner_type_id__volatile, dvb_cable_scanner_type_id); } return dvb_cable_scanner_type_id__volatile; diff -Nru gnome-dvb-daemon-0.1.23/src/Cable/CableScanner.vala gnome-dvb-daemon-0.2.7/src/Cable/CableScanner.vala --- gnome-dvb-daemon-0.1.23/src/Cable/CableScanner.vala 2010-12-05 12:04:12.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Cable/CableScanner.vala 2011-04-19 20:46:24.000000000 +0000 @@ -20,44 +20,41 @@ using GLib; namespace DVB { - - [DBus (name = "org.gnome.DVB.Scanner.Cable")] - public interface IDBusCableScanner : GLib.Object { - - public abstract signal void frequency_scanned (uint frequency, uint freq_left); - public abstract signal void finished (); - public abstract signal void channel_added (uint frequency, uint sid, - string name, string network, string type, bool scrambled); - public abstract signal void frontend_stats (double signal_strength, - double signal_noise_ratio); - - public abstract void Run () throws DBus.Error; - public abstract void Destroy () throws DBus.Error; - public abstract bool WriteAllChannelsToFile (string path) throws DBus.Error; - public abstract bool WriteChannelsToFile (uint[] channel_sids, string path) throws DBus.Error; - - public abstract void AddScanningData (uint frequency, string modulation, - uint symbol_rate, string code_rate) throws DBus.Error; - - /** - * @path: Path to file containing scanning data - * @returns: TRUE when the file has been parsed successfully - * - * Parses initial tuning data from a file as provided by dvb-apps - */ - public abstract bool AddScanningDataFromFile (string path) throws DBus.Error; - } - - public class CableScanner : Scanner, IDBusCableScanner { - + + public class CableScanner : Scanner, IDBusScanner { + public CableScanner (DVB.Device device) { Object (Device: device); } - - public void AddScanningData (uint frequency, string modulation, - uint symbol_rate, string code_rate) throws DBus.Error { - this.add_scanning_data (frequency, modulation, - symbol_rate, code_rate); + + public bool AddScanningData (GLib.HashTable data) throws DBusError { + uint frequency, symbol_rate; + string modulation, code_rate; + + unowned Variant _var; + + _var = data.lookup ("frequency"); + if (_var == null) + return false; + frequency = _var.get_uint32 (); + + _var = data.lookup ("symbol-rate"); + if (_var == null) + return false; + symbol_rate = _var.get_uint32 (); + + _var = data.lookup ("inner-fec"); + if (_var == null) + return false; + code_rate = _var.get_string (); + + _var = data.lookup ("modulation"); + if (_var == null) + return false; + modulation = _var.get_string (); + + this.add_scanning_data (frequency, modulation, symbol_rate, code_rate); + return true; } private inline void add_scanning_data (uint frequency, string modulation, @@ -78,9 +75,9 @@ if (cols.length < 5) return; - uint freq = (uint)cols[1].to_int (); + uint freq = (uint)int.parse (cols[1]); string modulation = cols[4]; - uint symbol_rate = (uint)(cols[2].to_int () / 1000); + uint symbol_rate = (uint)(int.parse (cols[2]) / 1000); string code_rate = cols[3]; this.add_scanning_data (freq, modulation, symbol_rate, code_rate); diff -Nru gnome-dvb-daemon-0.1.23/src/ChangeType.c gnome-dvb-daemon-0.2.7/src/ChangeType.c --- gnome-dvb-daemon-0.1.23/src/ChangeType.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ChangeType.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChangeType.c generated by valac 0.11.3, the Vala compiler +/* ChangeType.c generated by valac 0.14.0, the Vala compiler * generated from ChangeType.vala, do not modify */ /* diff -Nru gnome-dvb-daemon-0.1.23/src/Channel.c gnome-dvb-daemon-0.2.7/src/Channel.c --- gnome-dvb-daemon-0.1.23/src/Channel.c 2011-01-14 17:06:32.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Channel.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Channel.c generated by valac 0.11.3, the Vala compiler +/* Channel.c generated by valac 0.14.0, the Vala compiler * generated from Channel.vala, do not modify */ /* @@ -26,6 +26,7 @@ #include #include #include +#include #define DVB_TYPE_CHANNEL (dvb_channel_get_type ()) @@ -101,7 +102,7 @@ DVB_CHANNEL_SCHEDULE, DVB_CHANNEL_URL }; -DVBChannel* dvb_channel_construct (GType object_type); +DVBChannel* dvb_channel_construct (GType object_type, guint group_id); DVBChannel* dvb_channel_construct_without_schedule (GType object_type); gchar* dvb_channel_get_audio_pids_string (DVBChannel* self); GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self); @@ -123,8 +124,10 @@ void dvb_channel_set_Sid (DVBChannel* self, guint value); DVBSchedule* dvb_schedule_new (DVBChannel* channel); DVBSchedule* dvb_schedule_construct (GType object_type, DVBChannel* channel); +void dvb_schedule_restore (DVBSchedule* self, GAsyncReadyCallback _callback_, gpointer _user_data_); +void dvb_schedule_restore_finish (DVBSchedule* self, GAsyncResult* _res_); guint dvb_channel_get_GroupId (DVBChannel* self); -void dvb_channel_set_GroupId (DVBChannel* self, guint value); +static void dvb_channel_set_GroupId (DVBChannel* self, guint value); void dvb_channel_set_Name (DVBChannel* self, const gchar* value); guint dvb_channel_get_TransportStreamId (DVBChannel* self); void dvb_channel_set_TransportStreamId (DVBChannel* self, guint value); @@ -148,9 +151,11 @@ static void _vala_dvb_channel_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -DVBChannel* dvb_channel_construct (GType object_type) { +DVBChannel* dvb_channel_construct (GType object_type, guint group_id) { DVBChannel * self = NULL; - self = (DVBChannel*) g_object_new (object_type, NULL); + guint _tmp0_; + _tmp0_ = group_id; + self = (DVBChannel*) g_object_new (object_type, "GroupId", _tmp0_, NULL); self->priv->has_schedule = TRUE; return self; } @@ -171,57 +176,93 @@ gchar* dvb_channel_get_audio_pids_string (DVBChannel* self) { gchar* result = NULL; - GString* _tmp0_ = NULL; + GString* _tmp0_; GString* apids; gint i; - gchar* _tmp9_; + GString* _tmp25_; + const gchar* _tmp26_; + gchar* _tmp27_; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = g_string_new (""); apids = _tmp0_; i = 1; { GeeList* _tmp1_; + GeeList* _tmp2_; GeeList* _pid_list; - gint _tmp2_; + GeeList* _tmp3_; + gint _tmp4_; + gint _tmp5_; gint _pid_size; gint _pid_index; - _tmp1_ = _g_object_ref0 (self->priv->_AudioPIDs); - _pid_list = _tmp1_; - _tmp2_ = gee_collection_get_size ((GeeCollection*) _pid_list); - _pid_size = _tmp2_; + _tmp1_ = self->priv->_AudioPIDs; + _tmp2_ = _g_object_ref0 (_tmp1_); + _pid_list = _tmp2_; + _tmp3_ = _pid_list; + _tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_); + _tmp5_ = _tmp4_; + _pid_size = _tmp5_; _pid_index = -1; while (TRUE) { - gpointer _tmp3_ = NULL; + gint _tmp6_; + gint _tmp7_; + gint _tmp8_; + GeeList* _tmp9_; + gint _tmp10_; + gpointer _tmp11_ = NULL; guint pid; - gint _tmp4_; - _pid_index = _pid_index + 1; - if (!(_pid_index < _pid_size)) { + gint _tmp12_; + GeeList* _tmp13_; + gint _tmp14_; + gint _tmp15_; + gint _tmp24_; + _tmp6_ = _pid_index; + _pid_index = _tmp6_ + 1; + _tmp7_ = _pid_index; + _tmp8_ = _pid_size; + if (!(_tmp7_ < _tmp8_)) { break; } - _tmp3_ = gee_list_get (_pid_list, _pid_index); - pid = GPOINTER_TO_UINT (_tmp3_); - _tmp4_ = gee_collection_get_size ((GeeCollection*) self->priv->_AudioPIDs); - if (i == _tmp4_) { - gchar* _tmp5_ = NULL; - gchar* _tmp6_; - _tmp5_ = g_strdup_printf ("%u", pid); - _tmp6_ = _tmp5_; - g_string_append (apids, _tmp6_); - _g_free0 (_tmp6_); + _tmp9_ = _pid_list; + _tmp10_ = _pid_index; + _tmp11_ = gee_list_get (_tmp9_, _tmp10_); + pid = GPOINTER_TO_UINT (_tmp11_); + _tmp12_ = i; + _tmp13_ = self->priv->_AudioPIDs; + _tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_); + _tmp15_ = _tmp14_; + if (_tmp12_ == _tmp15_) { + GString* _tmp16_; + guint _tmp17_; + gchar* _tmp18_ = NULL; + gchar* _tmp19_; + _tmp16_ = apids; + _tmp17_ = pid; + _tmp18_ = g_strdup_printf ("%u", _tmp17_); + _tmp19_ = _tmp18_; + g_string_append (_tmp16_, _tmp19_); + _g_free0 (_tmp19_); } else { - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - _tmp7_ = g_strdup_printf ("%u,", pid); - _tmp8_ = _tmp7_; - g_string_append (apids, _tmp8_); - _g_free0 (_tmp8_); + GString* _tmp20_; + guint _tmp21_; + gchar* _tmp22_ = NULL; + gchar* _tmp23_; + _tmp20_ = apids; + _tmp21_ = pid; + _tmp22_ = g_strdup_printf ("%u,", _tmp21_); + _tmp23_ = _tmp22_; + g_string_append (_tmp20_, _tmp23_); + _g_free0 (_tmp23_); } - i++; + _tmp24_ = i; + i = _tmp24_ + 1; } _g_object_unref0 (_pid_list); } - _tmp9_ = g_strdup (apids->str); - result = _tmp9_; + _tmp25_ = apids; + _tmp26_ = _tmp25_->str; + _tmp27_ = g_strdup (_tmp26_); + result = _tmp27_; _g_string_free0 (apids); return result; } @@ -229,8 +270,10 @@ gboolean dvb_channel_is_radio (DVBChannel* self) { gboolean result = FALSE; + guint _tmp0_; g_return_val_if_fail (self != NULL, FALSE); - result = self->priv->_VideoPID == 0; + _tmp0_ = self->priv->_VideoPID; + result = _tmp0_ == ((guint) 0); return result; } @@ -240,38 +283,58 @@ gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; - g_return_val_if_fail (self != NULL, FALSE); - if (self->priv->_Name != NULL) { - _tmp2_ = self->priv->_Frequency != 0; + const gchar* _tmp3_; + gboolean _tmp5_; + gboolean _tmp8_; + gboolean _tmp15_; + _tmp3_ = self->priv->_Name; + if (_tmp3_ != NULL) { + guint _tmp4_; + _tmp4_ = self->priv->_Frequency; + _tmp2_ = _tmp4_ != ((guint) 0); } else { _tmp2_ = FALSE; } - if (_tmp2_) { - guint _tmp3_; - _tmp3_ = dvb_channel_get_Sid (self); - _tmp1_ = _tmp3_ != 0; + _tmp5_ = _tmp2_; + if (_tmp5_) { + guint _tmp6_; + guint _tmp7_; + _tmp6_ = dvb_channel_get_Sid (self); + _tmp7_ = _tmp6_; + _tmp1_ = _tmp7_ != ((guint) 0); } else { _tmp1_ = FALSE; } - if (_tmp1_) { - gboolean _tmp4_ = FALSE; - if (self->priv->_VideoPID != 0) { - _tmp4_ = TRUE; + _tmp8_ = _tmp1_; + if (_tmp8_) { + gboolean _tmp9_ = FALSE; + guint _tmp10_; + gboolean _tmp14_; + _tmp10_ = self->priv->_VideoPID; + if (_tmp10_ != ((guint) 0)) { + _tmp9_ = TRUE; } else { - gint _tmp5_; - _tmp5_ = gee_collection_get_size ((GeeCollection*) self->priv->_AudioPIDs); - _tmp4_ = _tmp5_ != 0; + GeeList* _tmp11_; + gint _tmp12_; + gint _tmp13_; + _tmp11_ = self->priv->_AudioPIDs; + _tmp12_ = gee_collection_get_size ((GeeCollection*) _tmp11_); + _tmp13_ = _tmp12_; + _tmp9_ = _tmp13_ != 0; } - _tmp0_ = _tmp4_; + _tmp14_ = _tmp9_; + _tmp0_ = _tmp14_; } else { _tmp0_ = FALSE; } - result = _tmp0_; + _tmp15_ = _tmp0_; + result = _tmp15_; return result; } gboolean dvb_channel_is_valid (DVBChannel* self) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_CHANNEL_GET_CLASS (self)->is_valid (self); } @@ -285,14 +348,20 @@ */ static gboolean dvb_channel_real_on_same_transport_stream (DVBChannel* self, DVBChannel* channel) { gboolean result = FALSE; - g_return_val_if_fail (self != NULL, FALSE); + guint _tmp0_; + DVBChannel* _tmp1_; + guint _tmp2_; g_return_val_if_fail (channel != NULL, FALSE); - result = self->priv->_Frequency == channel->priv->_Frequency; + _tmp0_ = self->priv->_Frequency; + _tmp1_ = channel; + _tmp2_ = _tmp1_->priv->_Frequency; + result = _tmp0_ == _tmp2_; return result; } gboolean dvb_channel_on_same_transport_stream (DVBChannel* self, DVBChannel* channel) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_CHANNEL_GET_CLASS (self)->on_same_transport_stream (self, channel); } @@ -303,15 +372,21 @@ static gboolean dvb_channel_real_equals (DVBChannel* self, DVBChannel* channel) { gboolean result = FALSE; guint _tmp0_; - g_return_val_if_fail (self != NULL, FALSE); + DVBChannel* _tmp1_; + guint _tmp2_; + guint _tmp3_; g_return_val_if_fail (channel != NULL, FALSE); - _tmp0_ = dvb_channel_get_Sid (channel); - result = self->priv->sid == _tmp0_; + _tmp0_ = self->priv->sid; + _tmp1_ = channel; + _tmp2_ = dvb_channel_get_Sid (_tmp1_); + _tmp3_ = _tmp2_; + result = _tmp0_ == _tmp3_; return result; } gboolean dvb_channel_equals (DVBChannel* self, DVBChannel* channel) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_CHANNEL_GET_CLASS (self)->equals (self, channel); } @@ -322,47 +397,54 @@ * Set properties of source so that the channel can be watched */ static void dvb_channel_real_setup_dvb_source (DVBChannel* self, GstElement* source) { - g_return_if_fail (self != NULL); g_critical ("Type `%s' does not implement abstract method `dvb_channel_setup_dvb_source'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return; } void dvb_channel_setup_dvb_source (DVBChannel* self, GstElement* source) { + g_return_if_fail (self != NULL); DVB_CHANNEL_GET_CLASS (self)->setup_dvb_source (self, source); } static gchar* dvb_channel_real_to_string (DVBChannel* self) { - g_return_val_if_fail (self != NULL, NULL); g_critical ("Type `%s' does not implement abstract method `dvb_channel_to_string'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return NULL; } gchar* dvb_channel_to_string (DVBChannel* self) { + g_return_val_if_fail (self != NULL, NULL); return DVB_CHANNEL_GET_CLASS (self)->to_string (self); } guint dvb_channel_get_Sid (DVBChannel* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->sid; + _tmp0_ = self->priv->sid; + result = _tmp0_; return result; } void dvb_channel_set_Sid (DVBChannel* self, guint value) { + guint _tmp0_; + gboolean _tmp1_; g_return_if_fail (self != NULL); - self->priv->sid = value; - if (self->priv->has_schedule) { - DVBSchedule* _tmp0_ = NULL; - DVBSchedule* _tmp1_; - _tmp0_ = dvb_schedule_new (self); - _tmp1_ = _tmp0_; + _tmp0_ = value; + self->priv->sid = _tmp0_; + _tmp1_ = self->priv->has_schedule; + if (_tmp1_) { + DVBSchedule* _tmp2_; + DVBSchedule* _tmp3_; + _tmp2_ = dvb_schedule_new (self); _g_object_unref0 (self->priv->schedule); - self->priv->schedule = _tmp1_; + self->priv->schedule = _tmp2_; + _tmp3_ = self->priv->schedule; + dvb_schedule_restore (_tmp3_, NULL, NULL); } g_object_notify ((GObject *) self, "Sid"); } @@ -370,33 +452,39 @@ guint dvb_channel_get_GroupId (DVBChannel* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_GroupId; + _tmp0_ = self->priv->_GroupId; + result = _tmp0_; return result; } -void dvb_channel_set_GroupId (DVBChannel* self, guint value) { +static void dvb_channel_set_GroupId (DVBChannel* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_GroupId = value; + _tmp0_ = value; + self->priv->_GroupId = _tmp0_; g_object_notify ((GObject *) self, "GroupId"); } const gchar* dvb_channel_get_Name (DVBChannel* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Name; + _tmp0_ = self->priv->_Name; + result = _tmp0_; return result; } void dvb_channel_set_Name (DVBChannel* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_Name); self->priv->_Name = _tmp1_; g_object_notify ((GObject *) self, "Name"); @@ -405,33 +493,39 @@ guint dvb_channel_get_TransportStreamId (DVBChannel* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_TransportStreamId; + _tmp0_ = self->priv->_TransportStreamId; + result = _tmp0_; return result; } void dvb_channel_set_TransportStreamId (DVBChannel* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_TransportStreamId = value; + _tmp0_ = value; + self->priv->_TransportStreamId = _tmp0_; g_object_notify ((GObject *) self, "TransportStreamId"); } const gchar* dvb_channel_get_Network (DVBChannel* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Network; + _tmp0_ = self->priv->_Network; + result = _tmp0_; return result; } void dvb_channel_set_Network (DVBChannel* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_Network); self->priv->_Network = _tmp1_; g_object_notify ((GObject *) self, "Network"); @@ -440,8 +534,10 @@ guint* dvb_channel_get_LogicalChannelNumber (DVBChannel* self) { guint* result; - g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_LogicalChannelNumber; + guint* _tmp0_; + g_return_val_if_fail (self != NULL, 0U); + _tmp0_ = self->priv->_LogicalChannelNumber; + result = _tmp0_; return result; } @@ -463,8 +559,8 @@ guint* _tmp0_; guint* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = __uint_dup0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = __uint_dup0 (_tmp0_); _g_free0 (self->priv->_LogicalChannelNumber); self->priv->_LogicalChannelNumber = _tmp1_; } @@ -472,23 +568,29 @@ guint dvb_channel_get_VideoPID (DVBChannel* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_VideoPID; + _tmp0_ = self->priv->_VideoPID; + result = _tmp0_; return result; } void dvb_channel_set_VideoPID (DVBChannel* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_VideoPID = value; + _tmp0_ = value; + self->priv->_VideoPID = _tmp0_; g_object_notify ((GObject *) self, "VideoPID"); } GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self) { GeeList* result; + GeeList* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_AudioPIDs; + _tmp0_ = self->priv->_AudioPIDs; + result = _tmp0_; return result; } @@ -497,8 +599,8 @@ GeeList* _tmp0_; GeeList* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_AudioPIDs); self->priv->_AudioPIDs = _tmp1_; g_object_notify ((GObject *) self, "AudioPIDs"); @@ -507,38 +609,48 @@ guint dvb_channel_get_Frequency (DVBChannel* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Frequency; + _tmp0_ = self->priv->_Frequency; + result = _tmp0_; return result; } void dvb_channel_set_Frequency (DVBChannel* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Frequency = value; + _tmp0_ = value; + self->priv->_Frequency = _tmp0_; g_object_notify ((GObject *) self, "Frequency"); } gboolean dvb_channel_get_Scrambled (DVBChannel* self) { gboolean result; + gboolean _tmp0_; g_return_val_if_fail (self != NULL, FALSE); - result = self->priv->_Scrambled; + _tmp0_ = self->priv->_Scrambled; + result = _tmp0_; return result; } void dvb_channel_set_Scrambled (DVBChannel* self, gboolean value) { + gboolean _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Scrambled = value; + _tmp0_ = value; + self->priv->_Scrambled = _tmp0_; g_object_notify ((GObject *) self, "Scrambled"); } DVBSchedule* dvb_channel_get_Schedule (DVBChannel* self) { DVBSchedule* result; + DVBSchedule* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->schedule; + _tmp0_ = self->priv->schedule; + result = _tmp0_; return result; } @@ -548,18 +660,27 @@ gchar* _tmp0_ = NULL; gchar* _tmp1_; guint _tmp2_; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - gchar* _tmp5_ = NULL; - gchar* _tmp6_; + guint _tmp3_; + guint _tmp4_; + const gchar* _tmp5_; + gchar* _tmp6_ = NULL; + gchar* _tmp7_; + gchar* _tmp8_ = NULL; + gchar* _tmp9_; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = dvb_rtsp_server_get_address (); _tmp1_ = _tmp0_; - _tmp2_ = dvb_channel_get_Sid (self); - _tmp3_ = dvb_utils_remove_nonalphanums (self->priv->_Name); + _tmp2_ = self->priv->_GroupId; + _tmp3_ = dvb_channel_get_Sid (self); _tmp4_ = _tmp3_; - _tmp5_ = g_strdup_printf ("rtsp://%s:8554/%u/%u/%s", _tmp1_, self->priv->_GroupId, _tmp2_, _tmp4_); - result = (_tmp6_ = _tmp5_, _g_free0 (_tmp4_), _g_free0 (_tmp1_), _tmp6_); + _tmp5_ = self->priv->_Name; + _tmp6_ = dvb_utils_remove_nonalphanums (_tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = g_strdup_printf ("rtsp://%s:8554/%u/%u/%s", _tmp1_, _tmp2_, _tmp4_, _tmp7_); + _tmp9_ = _tmp8_; + _g_free0 (_tmp7_); + _g_free0 (_tmp1_); + result = _tmp9_; return result; } @@ -568,7 +689,7 @@ GObject * obj; GObjectClass * parent_class; DVBChannel * self; - GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp0_; GeeArrayList* _tmp1_; parent_class = G_OBJECT_CLASS (dvb_channel_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); @@ -594,7 +715,7 @@ G_OBJECT_CLASS (klass)->constructor = dvb_channel_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_channel_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_SID, g_param_spec_uint ("Sid", "Sid", "Sid", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_GROUP_ID, g_param_spec_uint ("GroupId", "GroupId", "GroupId", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_GROUP_ID, g_param_spec_uint ("GroupId", "GroupId", "GroupId", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_NAME, g_param_spec_string ("Name", "Name", "Name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_TRANSPORT_STREAM_ID, g_param_spec_uint ("TransportStreamId", "TransportStreamId", "TransportStreamId", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_NETWORK, g_param_spec_string ("Network", "Network", "Network", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); diff -Nru gnome-dvb-daemon-0.1.23/src/ChannelFactory.c gnome-dvb-daemon-0.2.7/src/ChannelFactory.c --- gnome-dvb-daemon-0.1.23/src/ChannelFactory.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ChannelFactory.c 2011-09-29 18:32:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelFactory.c generated by valac 0.11.3, the Vala compiler +/* ChannelFactory.c generated by valac 0.14.0, the Vala compiler * generated from ChannelFactory.vala, do not modify */ /* @@ -80,6 +80,26 @@ typedef struct _DVBEPGScanner DVBEPGScanner; typedef struct _DVBEPGScannerClass DVBEPGScannerClass; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -155,7 +175,6 @@ gboolean forced; DVBForcedStopNotify notify_func; gpointer notify_func_target; - GDestroyNotify notify_func_target_destroy_notify; }; struct _DVBPlayerThreadChannelElementsClass { @@ -185,8 +204,12 @@ static gpointer dvb_player_thread_parent_class = NULL; +static DVBLoggingLogger* dvb_player_thread_log; +static DVBLoggingLogger* dvb_player_thread_log = NULL; static gpointer dvb_player_thread_channel_elements_parent_class = NULL; static gpointer dvb_channel_factory_parent_class = NULL; +static DVBLoggingLogger* dvb_channel_factory_log; +static DVBLoggingLogger* dvb_channel_factory_log = NULL; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_player_thread_get_type (void) G_GNUC_CONST; @@ -206,14 +229,20 @@ DVB_PLAYER_THREAD_DEVICE, DVB_PLAYER_THREAD_FORCED }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBPlayerThread* dvb_player_thread_new (DVBDevice* device, DVBEPGScanner* epgscanner); DVBPlayerThread* dvb_player_thread_construct (GType object_type, DVBDevice* device, DVBEPGScanner* epgscanner); GstElement* dvb_player_thread_get_pipeline (DVBPlayerThread* self); GstElement* dvb_player_thread_get_dvbbasebin (DVBPlayerThread* self); GstElement* dvb_player_thread_get_element (DVBPlayerThread* self, DVBChannel* channel, GstElement* sink_element, gboolean forced, DVBForcedStopNotify notify_func, void* notify_func_target); guint dvb_channel_get_Sid (DVBChannel* self); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); static void dvb_player_thread_bus_watch_func (DVBPlayerThread* self, GstBus* bus, GstMessage* message); static void _dvb_player_thread_bus_watch_func_gst_bus_message (GstBus* _sender, GstMessage* message, gpointer self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); static void dvb_player_thread_on_dvbbasebin_pad_added (DVBPlayerThread* self, GstElement* elem, GstPad* pad); static void _dvb_player_thread_on_dvbbasebin_pad_added_gst_element_pad_added (GstElement* _sender, GstPad* pad, gpointer self); void dvb_channel_setup_dvb_source (DVBChannel* self, GstElement* source); @@ -265,6 +294,7 @@ DVBDeviceGroup* dvb_channel_factory_get_device_group (DVBChannelFactory* self); void dvb_device_group_stop_epg_scanner (DVBDeviceGroup* self); DVBDevice* dvb_device_group_get_next_free_device (DVBDeviceGroup* self); +void dvb_logging_logger_info (DVBLoggingLogger* self, const gchar* format, ...); DVBPlayerThread* dvb_channel_factory_create_player (DVBChannelFactory* self, DVBDevice* device); gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink); void dvb_device_group_start_epg_scanner (DVBDeviceGroup* self); @@ -290,14 +320,16 @@ DVBPlayerThread* dvb_player_thread_construct (GType object_type, DVBDevice* device, DVBEPGScanner* epgscanner) { DVBPlayerThread * self = NULL; - DVBEPGScanner* _tmp0_; + DVBDevice* _tmp0_; DVBEPGScanner* _tmp1_; + DVBEPGScanner* _tmp2_; g_return_val_if_fail (device != NULL, NULL); - self = (DVBPlayerThread*) g_object_new (object_type, "device", device, NULL); - _tmp0_ = _g_object_ref0 (epgscanner); - _tmp1_ = _tmp0_; + _tmp0_ = device; + self = (DVBPlayerThread*) g_object_new (object_type, "device", _tmp0_, NULL); + _tmp1_ = epgscanner; + _tmp2_ = _g_object_ref0 (_tmp1_); _g_object_unref0 (self->priv->epgscanner); - self->priv->epgscanner = _tmp1_; + self->priv->epgscanner = _tmp2_; return self; } @@ -315,9 +347,11 @@ GstElement* dvb_player_thread_get_pipeline (DVBPlayerThread* self) { GstElement* result = NULL; GstElement* _tmp0_; + GstElement* _tmp1_; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = _gst_object_ref0 (self->priv->pipeline); - result = _tmp0_; + _tmp0_ = self->priv->pipeline; + _tmp1_ = _gst_object_ref0 (_tmp0_); + result = _tmp1_; return result; } @@ -325,15 +359,17 @@ GstElement* dvb_player_thread_get_dvbbasebin (DVBPlayerThread* self) { GstElement* result = NULL; GstElement* _tmp0_; + GstElement* _tmp1_; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = _gst_object_ref0 (self->priv->dvbbasebin); - result = _tmp0_; + _tmp0_ = self->priv->dvbbasebin; + _tmp1_ = _gst_object_ref0 (_tmp0_); + result = _tmp1_; return result; } /** - * @returns: GstBin containing queue and @sink_element + * @returns: GstBin containing queue and @sink_element * * Start watching @channel and link it with @sink_element */ @@ -349,209 +385,439 @@ GstElement* dvb_player_thread_get_element (DVBPlayerThread* self, DVBChannel* channel, GstElement* sink_element, gboolean forced, DVBForcedStopNotify notify_func, void* notify_func_target) { GstElement* result = NULL; - guint _tmp0_; + DVBChannel* _tmp0_; + guint _tmp1_; + guint _tmp2_; guint channel_sid; - gchar* _tmp1_ = NULL; + guint _tmp3_; + gchar* _tmp4_ = NULL; gchar* channel_sid_str; gboolean create_channel = FALSE; - GstElement* bin; + GstElement* bin = NULL; GstElement* tee; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (channel != NULL, NULL); g_return_val_if_fail (sink_element != NULL, NULL); - _tmp0_ = dvb_channel_get_Sid (channel); - channel_sid = _tmp0_; - _tmp1_ = g_strdup_printf ("%u", channel_sid); - channel_sid_str = _tmp1_; - bin = NULL; + _tmp0_ = channel; + _tmp1_ = dvb_channel_get_Sid (_tmp0_); + _tmp2_ = _tmp1_; + channel_sid = _tmp2_; + _tmp3_ = channel_sid; + _tmp4_ = g_strdup_printf ("%u", _tmp3_); + channel_sid_str = _tmp4_; tee = NULL; { - GstElement* _tmp42_; + GstElement* _tmp5_; + _tmp5_ = self->priv->pipeline; g_static_rec_mutex_lock (&self->priv->__lock_pipeline); - if (self->priv->pipeline == NULL) { - GstPipeline* _tmp2_ = NULL; - GstElement* _tmp3_; - GstBus* _tmp4_ = NULL; - GstBus* bus; - GstElement* _tmp5_ = NULL; + { GstElement* _tmp6_; - guint _tmp7_; - guint _tmp8_; - GstElement* _tmp9_; - GstElement* _tmp10_ = NULL; - GstElement* _tmp11_; - GstElement* _tmp12_; - GstElement* _tmp13_ = NULL; - GstElement* _tmp14_; - gboolean _tmp15_; - g_debug ("ChannelFactory.vala:115: Creating new pipeline"); - _tmp2_ = (GstPipeline*) gst_pipeline_new ("recording"); - _tmp3_ = (GstElement*) _tmp2_; - _gst_object_unref0 (self->priv->pipeline); - self->priv->pipeline = _tmp3_; - _tmp4_ = gst_element_get_bus (self->priv->pipeline); - bus = _tmp4_; - gst_bus_add_signal_watch (bus); - g_signal_connect_object (bus, "message", (GCallback) _dvb_player_thread_bus_watch_func_gst_bus_message, self, 0); - _tmp5_ = gst_element_factory_make ("dvbbasebin", NULL); - _tmp6_ = _tmp5_; - _gst_object_unref0 (self->priv->dvbbasebin); - self->priv->dvbbasebin = _tmp6_; - if (self->priv->dvbbasebin == NULL) { - g_critical ("ChannelFactory.vala:126: Could not create dvbbasebin element"); - result = NULL; - _gst_object_unref0 (bus); - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _gst_object_unref0 (tee); - _gst_object_unref0 (bin); - _g_free0 (channel_sid_str); - _gst_object_unref0 (sink_element); - return result; - } - g_signal_connect_object (self->priv->dvbbasebin, "pad-added", (GCallback) _dvb_player_thread_on_dvbbasebin_pad_added_gst_element_pad_added, self, 0); - dvb_channel_setup_dvb_source (channel, self->priv->dvbbasebin); - g_object_set ((GObject*) self->priv->dvbbasebin, "program-numbers", channel_sid_str, NULL); - _tmp7_ = dvb_device_get_Adapter (self->priv->_device); - g_object_set ((GObject*) self->priv->dvbbasebin, "adapter", _tmp7_, NULL); - _tmp8_ = dvb_device_get_Frontend (self->priv->_device); - g_object_set ((GObject*) self->priv->dvbbasebin, "frontend", _tmp8_, NULL); - _tmp9_ = _gst_object_ref0 (self->priv->dvbbasebin); - gst_bin_add (GST_BIN (self->priv->pipeline), _tmp9_); - _tmp10_ = gst_element_factory_make ("tee", NULL); - _tmp11_ = _tmp10_; - _gst_object_unref0 (tee); - tee = _tmp11_; - _tmp12_ = _gst_object_ref0 (tee); - dvb_player_thread_add_element (self, _tmp12_); - _tmp13_ = dvb_player_thread_add_sink_bin (self, sink_element); - _tmp14_ = _tmp13_; - _gst_object_unref0 (bin); - bin = _tmp14_; - _tmp15_ = gst_element_link (tee, bin); - if (!_tmp15_) { - g_critical ("ChannelFactory.vala:145: Could not link tee and bin"); - result = NULL; - _gst_object_unref0 (bus); - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _gst_object_unref0 (tee); - _gst_object_unref0 (bin); - _g_free0 (channel_sid_str); - _gst_object_unref0 (sink_element); - return result; - } - create_channel = TRUE; - _gst_object_unref0 (bus); - } else { - gboolean _tmp16_; - g_debug ("ChannelFactory.vala:153: Reusing existing pipeline"); - if (self->priv->dvbbasebin == NULL) { - g_critical ("ChannelFactory.vala:155: No dvbbasebin element"); - result = NULL; - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _gst_object_unref0 (tee); - _gst_object_unref0 (bin); - _g_free0 (channel_sid_str); - _gst_object_unref0 (sink_element); - return result; - } - gst_element_set_state (self->priv->pipeline, GST_STATE_PAUSED); - _tmp16_ = gee_abstract_collection_contains ((GeeAbstractCollection*) self->priv->_active_channels, channel); - if (!_tmp16_) { - GstElement* _tmp17_ = NULL; - GstElement* _tmp18_; + gboolean _tmp97_; + GstElement* _tmp121_; + GstElement* _tmp122_; + _tmp6_ = self->priv->pipeline; + if (_tmp6_ == NULL) { + DVBLoggingLogger* _tmp7_; + GstPipeline* _tmp8_; + GstElement* _tmp9_; + GstBus* _tmp10_ = NULL; + GstBus* bus; + GstBus* _tmp11_; + GstBus* _tmp12_; + GstElement* _tmp13_ = NULL; + GstElement* _tmp14_; + GstElement* _tmp17_; + DVBChannel* _tmp18_; GstElement* _tmp19_; - GstElement* _tmp20_ = NULL; - GstElement* _tmp21_; - gboolean _tmp22_; - gchar* programs; - gchar* _tmp23_ = NULL; - gchar* new_programs; - _tmp17_ = gst_element_factory_make ("tee", NULL); - _tmp18_ = _tmp17_; + GstElement* _tmp20_; + const gchar* _tmp21_; + GstElement* _tmp22_; + DVBDevice* _tmp23_; + guint _tmp24_; + guint _tmp25_; + GstElement* _tmp26_; + DVBDevice* _tmp27_; + guint _tmp28_; + guint _tmp29_; + GstElement* _tmp30_; + GstElement* _tmp31_; + GstElement* _tmp32_; + GstElement* _tmp33_ = NULL; + GstElement* _tmp34_; + GstElement* _tmp35_; + GstElement* _tmp36_; + GstElement* _tmp37_ = NULL; + GstElement* _tmp38_; + GstElement* _tmp39_; + gboolean _tmp40_ = FALSE; + _tmp7_ = dvb_player_thread_log; + dvb_logging_logger_debug (_tmp7_, "ChannelFactory.vala:118: Creating new pipeline"); + _tmp8_ = (GstPipeline*) gst_pipeline_new ("recording"); + gst_object_ref_sink (_tmp8_); + _gst_object_unref0 (self->priv->pipeline); + self->priv->pipeline = (GstElement*) _tmp8_; + _tmp9_ = self->priv->pipeline; + _tmp10_ = gst_element_get_bus (_tmp9_); + bus = _tmp10_; + _tmp11_ = bus; + gst_bus_add_signal_watch (_tmp11_); + _tmp12_ = bus; + g_signal_connect_object (_tmp12_, "message", (GCallback) _dvb_player_thread_bus_watch_func_gst_bus_message, self, 0); + _tmp13_ = gst_element_factory_make ("dvbbasebin", NULL); + _gst_object_unref0 (self->priv->dvbbasebin); + self->priv->dvbbasebin = _tmp13_; + _tmp14_ = self->priv->dvbbasebin; + if (_tmp14_ == NULL) { + DVBLoggingLogger* _tmp15_; + _tmp15_ = dvb_player_thread_log; + dvb_logging_logger_error (_tmp15_, "ChannelFactory.vala:129: Could not create dvbbasebin element"); + result = NULL; + _gst_object_unref0 (bus); + { + GstElement* _tmp16_; + _tmp16_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _gst_object_unref0 (tee); + _gst_object_unref0 (bin); + _g_free0 (channel_sid_str); + _gst_object_unref0 (sink_element); + return result; + } + _tmp17_ = self->priv->dvbbasebin; + g_signal_connect_object (_tmp17_, "pad-added", (GCallback) _dvb_player_thread_on_dvbbasebin_pad_added_gst_element_pad_added, self, 0); + _tmp18_ = channel; + _tmp19_ = self->priv->dvbbasebin; + dvb_channel_setup_dvb_source (_tmp18_, _tmp19_); + _tmp20_ = self->priv->dvbbasebin; + _tmp21_ = channel_sid_str; + g_object_set ((GObject*) _tmp20_, "program-numbers", _tmp21_, NULL); + _tmp22_ = self->priv->dvbbasebin; + _tmp23_ = self->priv->_device; + _tmp24_ = dvb_device_get_Adapter (_tmp23_); + _tmp25_ = _tmp24_; + g_object_set ((GObject*) _tmp22_, "adapter", _tmp25_, NULL); + _tmp26_ = self->priv->dvbbasebin; + _tmp27_ = self->priv->_device; + _tmp28_ = dvb_device_get_Frontend (_tmp27_); + _tmp29_ = _tmp28_; + g_object_set ((GObject*) _tmp26_, "frontend", _tmp29_, NULL); + _tmp30_ = self->priv->pipeline; + _tmp31_ = self->priv->dvbbasebin; + _tmp32_ = _gst_object_ref0 (_tmp31_); + gst_bin_add (GST_BIN (_tmp30_), _tmp32_); + _tmp33_ = gst_element_factory_make ("tee", NULL); _gst_object_unref0 (tee); - tee = _tmp18_; - _tmp19_ = _gst_object_ref0 (tee); - dvb_player_thread_add_element (self, _tmp19_); - _tmp20_ = dvb_player_thread_add_sink_bin (self, sink_element); - _tmp21_ = _tmp20_; + tee = _tmp33_; + _tmp34_ = tee; + _tmp35_ = _gst_object_ref0 (_tmp34_); + dvb_player_thread_add_element (self, _tmp35_); + _tmp36_ = sink_element; + _tmp37_ = dvb_player_thread_add_sink_bin (self, _tmp36_); _gst_object_unref0 (bin); - bin = _tmp21_; - _tmp22_ = gst_element_link (tee, bin); - if (!_tmp22_) { - g_critical ("ChannelFactory.vala:169: Could not link tee and bin"); + bin = _tmp37_; + _tmp38_ = tee; + _tmp39_ = bin; + _tmp40_ = gst_element_link (_tmp38_, _tmp39_); + if (!_tmp40_) { + DVBLoggingLogger* _tmp41_; + _tmp41_ = dvb_player_thread_log; + dvb_logging_logger_error (_tmp41_, "ChannelFactory.vala:148: Could not link tee and bin"); result = NULL; - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + _gst_object_unref0 (bus); + { + GstElement* _tmp42_; + _tmp42_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } _gst_object_unref0 (tee); _gst_object_unref0 (bin); _g_free0 (channel_sid_str); _gst_object_unref0 (sink_element); return result; } - programs = NULL; - g_object_get ((GObject*) self->priv->dvbbasebin, "program-numbers", &programs, NULL); - _tmp23_ = g_strdup_printf ("%s:%s", programs, channel_sid_str); - new_programs = _tmp23_; - g_debug ("ChannelFactory.vala:178: Changing program-numbers from %s to %s", programs, new_programs); - g_object_set ((GObject*) self->priv->dvbbasebin, "program-numbers", new_programs, NULL); create_channel = TRUE; - _g_free0 (new_programs); - _g_free0 (programs); + _gst_object_unref0 (bus); } else { - DVBPlayerThreadChannelElements* c_element; - c_element = NULL; - { - gpointer _tmp24_ = NULL; - DVBPlayerThreadChannelElements* _tmp25_; - GstElement* _tmp26_; - GstElement* _tmp27_; - GstElement* _tmp28_ = NULL; - GstElement* _tmp29_; - gchar* _tmp30_ = NULL; - gchar* _tmp31_; - gchar* _tmp32_ = NULL; - gchar* _tmp33_; - gboolean _tmp34_; - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - _tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)); - _tmp25_ = (DVBPlayerThreadChannelElements*) _tmp24_; - _dvb_player_thread_channel_elements_unref0 (c_element); - c_element = _tmp25_; - _tmp26_ = _gst_object_ref0 (c_element->tee); - _tmp27_ = _tmp26_; + DVBLoggingLogger* _tmp43_; + GstElement* _tmp44_; + GstElement* _tmp47_; + GeeHashSet* _tmp48_; + DVBChannel* _tmp49_; + gboolean _tmp50_ = FALSE; + _tmp43_ = dvb_player_thread_log; + dvb_logging_logger_debug (_tmp43_, "ChannelFactory.vala:156: Reusing existing pipeline"); + _tmp44_ = self->priv->dvbbasebin; + if (_tmp44_ == NULL) { + DVBLoggingLogger* _tmp45_; + _tmp45_ = dvb_player_thread_log; + dvb_logging_logger_error (_tmp45_, "ChannelFactory.vala:158: No dvbbasebin element"); + result = NULL; + { + GstElement* _tmp46_; + _tmp46_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } _gst_object_unref0 (tee); - tee = _tmp27_; - _tmp28_ = dvb_player_thread_add_sink_bin (self, sink_element); - _tmp29_ = _tmp28_; _gst_object_unref0 (bin); - bin = _tmp29_; - _tmp30_ = gst_object_get_name ((GstObject*) tee); - _tmp31_ = _tmp30_; - _tmp32_ = gst_object_get_name ((GstObject*) bin); - _tmp33_ = _tmp32_; - g_debug ("ChannelFactory.vala:193: Linking %s with %s", _tmp31_, _tmp33_); - _g_free0 (_tmp33_); - _g_free0 (_tmp31_); - _tmp34_ = gst_element_link (tee, bin); - if (!_tmp34_) { - g_critical ("ChannelFactory.vala:195: Could not link tee and bin"); + _g_free0 (channel_sid_str); + _gst_object_unref0 (sink_element); + return result; + } + _tmp47_ = self->priv->pipeline; + gst_element_set_state (_tmp47_, GST_STATE_PAUSED); + _tmp48_ = self->priv->_active_channels; + _tmp49_ = channel; + _tmp50_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp48_, _tmp49_); + if (!_tmp50_) { + GstElement* _tmp51_ = NULL; + GstElement* _tmp52_; + GstElement* _tmp53_; + GstElement* _tmp54_; + GstElement* _tmp55_ = NULL; + GstElement* _tmp56_; + GstElement* _tmp57_; + gboolean _tmp58_ = FALSE; + gchar* programs = NULL; + GstElement* _tmp61_; + const gchar* _tmp62_; + const gchar* _tmp63_; + gchar* _tmp64_ = NULL; + gchar* new_programs; + DVBLoggingLogger* _tmp65_; + const gchar* _tmp66_; + const gchar* _tmp67_; + GstElement* _tmp68_; + const gchar* _tmp69_; + _tmp51_ = gst_element_factory_make ("tee", NULL); + _gst_object_unref0 (tee); + tee = _tmp51_; + _tmp52_ = tee; + _tmp53_ = _gst_object_ref0 (_tmp52_); + dvb_player_thread_add_element (self, _tmp53_); + _tmp54_ = sink_element; + _tmp55_ = dvb_player_thread_add_sink_bin (self, _tmp54_); + _gst_object_unref0 (bin); + bin = _tmp55_; + _tmp56_ = tee; + _tmp57_ = bin; + _tmp58_ = gst_element_link (_tmp56_, _tmp57_); + if (!_tmp58_) { + DVBLoggingLogger* _tmp59_; + _tmp59_ = dvb_player_thread_log; + dvb_logging_logger_error (_tmp59_, "ChannelFactory.vala:172: Could not link tee and bin"); result = NULL; - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - _dvb_player_thread_channel_elements_unref0 (c_element); - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + { + GstElement* _tmp60_; + _tmp60_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } _gst_object_unref0 (tee); _gst_object_unref0 (bin); _g_free0 (channel_sid_str); _gst_object_unref0 (sink_element); return result; } - gee_abstract_collection_add ((GeeAbstractCollection*) c_element->sinks, bin); - __finally15: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + _tmp61_ = self->priv->dvbbasebin; + g_object_get ((GObject*) _tmp61_, "program-numbers", &programs, NULL); + _tmp62_ = programs; + _tmp63_ = channel_sid_str; + _tmp64_ = g_strdup_printf ("%s:%s", _tmp62_, _tmp63_); + new_programs = _tmp64_; + _tmp65_ = dvb_player_thread_log; + _tmp66_ = programs; + _tmp67_ = new_programs; + dvb_logging_logger_debug (_tmp65_, "ChannelFactory.vala:181: Changing program-numbers from %s to %s", _tmp66_, _tmp67_); + _tmp68_ = self->priv->dvbbasebin; + _tmp69_ = new_programs; + g_object_set ((GObject*) _tmp68_, "program-numbers", _tmp69_, NULL); + create_channel = TRUE; + _g_free0 (new_programs); + _g_free0 (programs); + } else { + DVBPlayerThreadChannelElements* c_element = NULL; + { + GeeHashMap* _tmp70_; + _tmp70_ = self->priv->elements_map; + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp71_; + guint _tmp72_; + gpointer _tmp73_ = NULL; + DVBPlayerThreadChannelElements* _tmp74_; + GstElement* _tmp75_; + GstElement* _tmp76_; + GstElement* _tmp77_; + GstElement* _tmp78_ = NULL; + DVBLoggingLogger* _tmp79_; + GstElement* _tmp80_; + gchar* _tmp81_ = NULL; + gchar* _tmp82_; + GstElement* _tmp83_; + gchar* _tmp84_ = NULL; + gchar* _tmp85_; + GstElement* _tmp86_; + GstElement* _tmp87_; + gboolean _tmp88_ = FALSE; + DVBPlayerThreadChannelElements* _tmp92_; + GeeArrayList* _tmp93_; + GstElement* _tmp94_; + _tmp71_ = self->priv->elements_map; + _tmp72_ = channel_sid; + _tmp73_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp71_, GUINT_TO_POINTER (_tmp72_)); + _dvb_player_thread_channel_elements_unref0 (c_element); + c_element = (DVBPlayerThreadChannelElements*) _tmp73_; + _tmp74_ = c_element; + _tmp75_ = _tmp74_->tee; + _tmp76_ = _gst_object_ref0 (_tmp75_); + _gst_object_unref0 (tee); + tee = _tmp76_; + _tmp77_ = sink_element; + _tmp78_ = dvb_player_thread_add_sink_bin (self, _tmp77_); + _gst_object_unref0 (bin); + bin = _tmp78_; + _tmp79_ = dvb_player_thread_log; + _tmp80_ = tee; + _tmp81_ = gst_object_get_name ((GstObject*) _tmp80_); + _tmp82_ = _tmp81_; + _tmp83_ = bin; + _tmp84_ = gst_object_get_name ((GstObject*) _tmp83_); + _tmp85_ = _tmp84_; + dvb_logging_logger_debug (_tmp79_, "ChannelFactory.vala:196: Linking %s with %s", _tmp82_, _tmp85_); + _g_free0 (_tmp85_); + _g_free0 (_tmp82_); + _tmp86_ = tee; + _tmp87_ = bin; + _tmp88_ = gst_element_link (_tmp86_, _tmp87_); + if (!_tmp88_) { + DVBLoggingLogger* _tmp89_; + _tmp89_ = dvb_player_thread_log; + dvb_logging_logger_error (_tmp89_, "ChannelFactory.vala:198: Could not link tee and bin"); + result = NULL; + { + GeeHashMap* _tmp90_; + _tmp90_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + _dvb_player_thread_channel_elements_unref0 (c_element); + { + GstElement* _tmp91_; + _tmp91_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _gst_object_unref0 (tee); + _gst_object_unref0 (bin); + _g_free0 (channel_sid_str); + _gst_object_unref0 (sink_element); + return result; + } + _tmp92_ = c_element; + _tmp93_ = _tmp92_->sinks; + _tmp94_ = bin; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp93_, _tmp94_); + } + __finally15: + { + GeeHashMap* _tmp95_; + _tmp95_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + if (_inner_error_ != NULL) { + _dvb_player_thread_channel_elements_unref0 (c_element); + _dvb_player_thread_channel_elements_unref0 (c_element); + { + GstElement* _tmp96_; + _tmp96_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _gst_object_unref0 (tee); + _gst_object_unref0 (bin); + _g_free0 (channel_sid_str); + _gst_object_unref0 (sink_element); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + create_channel = FALSE; + _dvb_player_thread_channel_elements_unref0 (c_element); + } + } + _tmp97_ = create_channel; + if (_tmp97_) { + DVBPlayerThreadChannelElements* _tmp98_; + DVBPlayerThreadChannelElements* celems; + DVBPlayerThreadChannelElements* _tmp99_; + guint _tmp100_; + DVBPlayerThreadChannelElements* _tmp101_; + GeeArrayList* _tmp102_; + DVBPlayerThreadChannelElements* _tmp103_; + GeeArrayList* _tmp104_; + GstElement* _tmp105_; + DVBPlayerThreadChannelElements* _tmp106_; + GstElement* _tmp107_; + GstElement* _tmp108_; + DVBPlayerThreadChannelElements* _tmp109_; + gboolean _tmp110_; + DVBPlayerThreadChannelElements* _tmp111_; + DVBForcedStopNotify _tmp112_; + void* _tmp112__target; + GeeHashSet* _tmp119_; + DVBChannel* _tmp120_; + _tmp98_ = dvb_player_thread_channel_elements_new (); + celems = _tmp98_; + _tmp99_ = celems; + _tmp100_ = channel_sid; + _tmp99_->sid = _tmp100_; + _tmp101_ = celems; + _tmp102_ = gee_array_list_new (GST_TYPE_ELEMENT, (GBoxedCopyFunc) gst_object_ref, gst_object_unref, NULL); + _g_object_unref0 (_tmp101_->sinks); + _tmp101_->sinks = _tmp102_; + _tmp103_ = celems; + _tmp104_ = _tmp103_->sinks; + _tmp105_ = bin; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp104_, _tmp105_); + _tmp106_ = celems; + _tmp107_ = tee; + _tmp108_ = _gst_object_ref0 (_tmp107_); + _gst_object_unref0 (_tmp106_->tee); + _tmp106_->tee = _tmp108_; + _tmp109_ = celems; + _tmp110_ = forced; + _tmp109_->forced = _tmp110_; + _tmp111_ = celems; + _tmp112_ = notify_func; + _tmp112__target = notify_func_target; + _tmp111_->notify_func = _tmp112_; + _tmp111_->notify_func_target = _tmp112__target; + { + GeeHashMap* _tmp113_; + _tmp113_ = self->priv->elements_map; + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp114_; + guint _tmp115_; + DVBPlayerThreadChannelElements* _tmp116_; + _tmp114_ = self->priv->elements_map; + _tmp115_ = channel_sid; + _tmp116_ = celems; + gee_abstract_map_set ((GeeAbstractMap*) _tmp114_, GUINT_TO_POINTER (_tmp115_), _tmp116_); + } + __finally16: + { + GeeHashMap* _tmp117_; + _tmp117_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } if (_inner_error_ != NULL) { - _dvb_player_thread_channel_elements_unref0 (c_element); - _dvb_player_thread_channel_elements_unref0 (c_element); - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + _dvb_player_thread_channel_elements_unref0 (celems); + _dvb_player_thread_channel_elements_unref0 (celems); + { + GstElement* _tmp118_; + _tmp118_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } _gst_object_unref0 (tee); _gst_object_unref0 (bin); _g_free0 (channel_sid_str); @@ -561,72 +827,31 @@ return NULL; } } - create_channel = FALSE; - _dvb_player_thread_channel_elements_unref0 (c_element); - } - } - if (create_channel) { - DVBPlayerThreadChannelElements* _tmp35_ = NULL; - DVBPlayerThreadChannelElements* celems; - GeeArrayList* _tmp36_ = NULL; - GeeArrayList* _tmp37_; - GstElement* _tmp38_; - GstElement* _tmp39_; - DVBForcedStopNotify _tmp40_; - DVBForcedStopNotify _tmp41_; - _tmp35_ = dvb_player_thread_channel_elements_new (); - celems = _tmp35_; - celems->sid = channel_sid; - _tmp36_ = gee_array_list_new (GST_TYPE_ELEMENT, (GBoxedCopyFunc) gst_object_ref, gst_object_unref, NULL); - _tmp37_ = _tmp36_; - _g_object_unref0 (celems->sinks); - celems->sinks = _tmp37_; - gee_abstract_collection_add ((GeeAbstractCollection*) celems->sinks, bin); - _tmp38_ = _gst_object_ref0 (tee); - _tmp39_ = _tmp38_; - _gst_object_unref0 (celems->tee); - celems->tee = _tmp39_; - celems->forced = forced; - _tmp40_ = notify_func; - _tmp41_ = _tmp40_; - (celems->notify_func_target_destroy_notify == NULL) ? NULL : (celems->notify_func_target_destroy_notify (celems->notify_func_target), NULL); - celems->notify_func = NULL; - celems->notify_func_target = NULL; - celems->notify_func_target_destroy_notify = NULL; - celems->notify_func_target = notify_func_target; - celems->notify_func_target_destroy_notify = NULL; - celems->notify_func = _tmp41_; + _tmp119_ = self->priv->_active_channels; + _tmp120_ = channel; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp119_, _tmp120_); + _dvb_player_thread_channel_elements_unref0 (celems); + } + _tmp121_ = bin; + _tmp122_ = _gst_object_ref0 (_tmp121_); + result = _tmp122_; { - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid), celems); - __finally16: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - if (_inner_error_ != NULL) { - _dvb_player_thread_channel_elements_unref0 (celems); - _dvb_player_thread_channel_elements_unref0 (celems); - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _gst_object_unref0 (tee); - _gst_object_unref0 (bin); - _g_free0 (channel_sid_str); - _gst_object_unref0 (sink_element); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; - } + GstElement* _tmp123_; + _tmp123_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); } - gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->_active_channels, channel); - _dvb_player_thread_channel_elements_unref0 (celems); + _gst_object_unref0 (tee); + _gst_object_unref0 (bin); + _g_free0 (channel_sid_str); + _gst_object_unref0 (sink_element); + return result; } - _tmp42_ = _gst_object_ref0 (bin); - result = _tmp42_; - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _gst_object_unref0 (tee); - _gst_object_unref0 (bin); - _g_free0 (channel_sid_str); - _gst_object_unref0 (sink_element); - return result; __finally14: - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + { + GstElement* _tmp124_; + _tmp124_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } _gst_object_unref0 (tee); _gst_object_unref0 (bin); _g_free0 (channel_sid_str); @@ -646,50 +871,76 @@ GstElement* result = NULL; GstElement* _tmp0_ = NULL; GstElement* queue; - GstBin* _tmp1_ = NULL; + GstElement* _tmp1_; + GstBin* _tmp2_; GstElement* bin; - GstElement* _tmp2_; GstElement* _tmp3_; - gboolean _tmp4_; - GstPad* _tmp9_ = NULL; + GstElement* _tmp4_; + GstElement* _tmp5_; + GstElement* _tmp6_; + GstElement* _tmp7_; + GstElement* _tmp8_; + GstElement* _tmp9_; + gboolean _tmp10_ = FALSE; + GstElement* _tmp18_; + GstPad* _tmp19_ = NULL; GstPad* pad; - GstGhostPad* _tmp10_ = NULL; + GstGhostPad* _tmp20_; GstGhostPad* ghost; - GstPad* _tmp11_; - GstElement* _tmp12_; + GstElement* _tmp21_; + GstPad* _tmp22_; + GstElement* _tmp23_; + GstElement* _tmp24_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (sink_element != NULL, NULL); _tmp0_ = gst_element_factory_make ("queue", NULL); queue = _tmp0_; - g_object_set ((GObject*) queue, "max-size-buffers", 0, NULL); - _tmp1_ = (GstBin*) gst_bin_new (NULL); - bin = (GstElement*) _tmp1_; - _tmp2_ = _gst_object_ref0 (queue); - _tmp3_ = _gst_object_ref0 (sink_element); - gst_bin_add_many (GST_BIN (bin), _tmp2_, _tmp3_, NULL); - _tmp4_ = gst_element_link (queue, sink_element); - if (!_tmp4_) { - gchar* _tmp5_ = NULL; - gchar* _tmp6_; - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - _tmp5_ = gst_object_get_name ((GstObject*) queue); - _tmp6_ = _tmp5_; - _tmp7_ = gst_object_get_name ((GstObject*) sink_element); - _tmp8_ = _tmp7_; - g_critical ("ChannelFactory.vala:231: Could not link elements %s and %s", _tmp6_, _tmp8_); - _g_free0 (_tmp8_); - _g_free0 (_tmp6_); - } - _tmp9_ = gst_element_get_static_pad (queue, "sink"); - pad = _tmp9_; - _tmp10_ = (GstGhostPad*) gst_ghost_pad_new ("sink", pad); - ghost = _tmp10_; + _tmp1_ = queue; + g_object_set ((GObject*) _tmp1_, "max-size-buffers", 0, NULL); + _tmp2_ = (GstBin*) gst_bin_new (NULL); + gst_object_ref_sink (_tmp2_); + bin = (GstElement*) _tmp2_; + _tmp3_ = bin; + _tmp4_ = queue; + _tmp5_ = _gst_object_ref0 (_tmp4_); + _tmp6_ = sink_element; + _tmp7_ = _gst_object_ref0 (_tmp6_); + gst_bin_add_many (GST_BIN (_tmp3_), _tmp5_, _tmp7_, NULL); + _tmp8_ = queue; + _tmp9_ = sink_element; + _tmp10_ = gst_element_link (_tmp8_, _tmp9_); + if (!_tmp10_) { + DVBLoggingLogger* _tmp11_; + GstElement* _tmp12_; + gchar* _tmp13_ = NULL; + gchar* _tmp14_; + GstElement* _tmp15_; + gchar* _tmp16_ = NULL; + gchar* _tmp17_; + _tmp11_ = dvb_player_thread_log; + _tmp12_ = queue; + _tmp13_ = gst_object_get_name ((GstObject*) _tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = sink_element; + _tmp16_ = gst_object_get_name ((GstObject*) _tmp15_); + _tmp17_ = _tmp16_; + dvb_logging_logger_error (_tmp11_, "ChannelFactory.vala:234: Could not link elements %s and %s", _tmp14_, _tmp17_); + _g_free0 (_tmp17_); + _g_free0 (_tmp14_); + } + _tmp18_ = queue; + _tmp19_ = gst_element_get_static_pad (_tmp18_, "sink"); + pad = _tmp19_; + _tmp20_ = (GstGhostPad*) gst_ghost_pad_new ("sink", pad); + gst_object_ref_sink (_tmp20_); + ghost = _tmp20_; gst_pad_set_active ((GstPad*) ghost, TRUE); - _tmp11_ = _gst_object_ref0 ((GstPad*) ghost); - gst_element_add_pad (bin, _tmp11_); - _tmp12_ = _gst_object_ref0 (bin); - dvb_player_thread_add_element (self, _tmp12_); + _tmp21_ = bin; + _tmp22_ = _gst_object_ref0 ((GstPad*) ghost); + gst_element_add_pad (_tmp21_, _tmp22_); + _tmp23_ = bin; + _tmp24_ = _gst_object_ref0 (_tmp23_); + dvb_player_thread_add_element (self, _tmp24_); result = bin; _gst_object_unref0 (ghost); _gst_object_unref0 (pad); @@ -700,15 +951,23 @@ static gint dvb_player_thread_find_element (void* av, void* bv) { gint result = 0; - GstElement* _tmp0_; - GstElement* a; + void* _tmp0_; GstElement* _tmp1_; + GstElement* a; + void* _tmp2_; + GstElement* _tmp3_; GstElement* b; - _tmp0_ = _gst_object_ref0 (GST_ELEMENT (av)); - a = _tmp0_; - _tmp1_ = _gst_object_ref0 (GST_ELEMENT (bv)); - b = _tmp1_; - if (a == b) { + GstElement* _tmp4_; + GstElement* _tmp5_; + _tmp0_ = av; + _tmp1_ = _gst_object_ref0 (GST_ELEMENT (_tmp0_)); + a = _tmp1_; + _tmp2_ = bv; + _tmp3_ = _gst_object_ref0 (GST_ELEMENT (_tmp2_)); + b = _tmp3_; + _tmp4_ = a; + _tmp5_ = b; + if (_tmp4_ == _tmp5_) { result = 0; _gst_object_unref0 (b); _gst_object_unref0 (a); @@ -739,75 +998,126 @@ GstElement* dvb_player_thread_get_sink_bin (DVBPlayerThread* self, guint sid, GstElement* sink) { GstElement* result = NULL; GstElement* _result_; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; + DVBLoggingLogger* _tmp0_; + GstElement* _tmp1_; + gchar* _tmp2_ = NULL; + gchar* _tmp3_; + GstElement* _tmp4_; + guint _tmp5_; + GstElement* _tmp33_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (sink != NULL, NULL); _result_ = NULL; - _tmp0_ = gst_object_get_name ((GstObject*) sink); - _tmp1_ = _tmp0_; - g_debug ("ChannelFactory.vala:261: Searching for sink %s (%p) of channel %u", _tmp1_, sink, sid); - _g_free0 (_tmp1_); + _tmp0_ = dvb_player_thread_log; + _tmp1_ = sink; + _tmp2_ = gst_object_get_name ((GstObject*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = sink; + _tmp5_ = sid; + dvb_logging_logger_debug (_tmp0_, "ChannelFactory.vala:264: Searching for sink %s (%p) of channel %u", _tmp3_, _tmp4_, _tmp5_); + _g_free0 (_tmp3_); { - gpointer _tmp2_ = NULL; - DVBPlayerThreadChannelElements* celems; + GeeHashMap* _tmp6_; + _tmp6_ = self->priv->elements_map; g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - _tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid)); - celems = (DVBPlayerThreadChannelElements*) _tmp2_; - if (celems != NULL) { - { - GeeArrayList* _tmp3_; - GeeArrayList* _sink_bin_list; - gint _tmp4_; - gint _sink_bin_size; - gint _sink_bin_index; - _tmp3_ = _g_object_ref0 (celems->sinks); - _sink_bin_list = _tmp3_; - _tmp4_ = gee_collection_get_size ((GeeCollection*) _sink_bin_list); - _sink_bin_size = _tmp4_; - _sink_bin_index = -1; - while (TRUE) { - gpointer _tmp5_ = NULL; - GstElement* sink_bin; - GstIterator* _tmp6_ = NULL; - GstIterator* it; - gpointer _tmp7_ = NULL; - GstElement* element; - _sink_bin_index = _sink_bin_index + 1; - if (!(_sink_bin_index < _sink_bin_size)) { - break; - } - _tmp5_ = gee_abstract_list_get ((GeeAbstractList*) _sink_bin_list, _sink_bin_index); - sink_bin = (GstElement*) _tmp5_; - _tmp6_ = gst_bin_iterate_elements (GST_BIN (sink_bin)); - it = _tmp6_; - _tmp7_ = gst_iterator_find_custom (it, _dvb_player_thread_find_element_gcompare_func, sink); - element = (GstElement*) _tmp7_; - if (element != NULL) { - GstElement* _tmp8_; - GstElement* _tmp9_; - _tmp8_ = _gst_object_ref0 (sink_bin); - _tmp9_ = _tmp8_; - _gst_object_unref0 (_result_); - _result_ = _tmp9_; + { + GeeHashMap* _tmp7_; + guint _tmp8_; + gpointer _tmp9_ = NULL; + DVBPlayerThreadChannelElements* celems; + DVBPlayerThreadChannelElements* _tmp10_; + _tmp7_ = self->priv->elements_map; + _tmp8_ = sid; + _tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, GUINT_TO_POINTER (_tmp8_)); + celems = (DVBPlayerThreadChannelElements*) _tmp9_; + _tmp10_ = celems; + if (_tmp10_ != NULL) { + { + DVBPlayerThreadChannelElements* _tmp11_; + GeeArrayList* _tmp12_; + GeeArrayList* _tmp13_; + GeeArrayList* _sink_bin_list; + GeeArrayList* _tmp14_; + gint _tmp15_; + gint _tmp16_; + gint _sink_bin_size; + gint _sink_bin_index; + _tmp11_ = celems; + _tmp12_ = _tmp11_->sinks; + _tmp13_ = _g_object_ref0 (_tmp12_); + _sink_bin_list = _tmp13_; + _tmp14_ = _sink_bin_list; + _tmp15_ = gee_collection_get_size ((GeeCollection*) _tmp14_); + _tmp16_ = _tmp15_; + _sink_bin_size = _tmp16_; + _sink_bin_index = -1; + while (TRUE) { + gint _tmp17_; + gint _tmp18_; + gint _tmp19_; + GeeArrayList* _tmp20_; + gint _tmp21_; + gpointer _tmp22_ = NULL; + GstElement* sink_bin; + GstElement* _tmp23_; + GstIterator* _tmp24_ = NULL; + GstIterator* it; + GstIterator* _tmp25_; + GstElement* _tmp26_; + gpointer _tmp27_ = NULL; + GstElement* element; + GstElement* _tmp28_; + _tmp17_ = _sink_bin_index; + _sink_bin_index = _tmp17_ + 1; + _tmp18_ = _sink_bin_index; + _tmp19_ = _sink_bin_size; + if (!(_tmp18_ < _tmp19_)) { + break; + } + _tmp20_ = _sink_bin_list; + _tmp21_ = _sink_bin_index; + _tmp22_ = gee_abstract_list_get ((GeeAbstractList*) _tmp20_, _tmp21_); + sink_bin = (GstElement*) _tmp22_; + _tmp23_ = sink_bin; + _tmp24_ = gst_bin_iterate_elements (GST_BIN (_tmp23_)); + it = _tmp24_; + _tmp25_ = it; + _tmp26_ = sink; + _tmp27_ = gst_iterator_find_custom (_tmp25_, _dvb_player_thread_find_element_gcompare_func, _tmp26_); + element = (GstElement*) _tmp27_; + _tmp28_ = element; + if (_tmp28_ != NULL) { + GstElement* _tmp29_; + GstElement* _tmp30_; + _tmp29_ = sink_bin; + _tmp30_ = _gst_object_ref0 (_tmp29_); + _gst_object_unref0 (_result_); + _result_ = _tmp30_; + _gst_object_unref0 (element); + _gst_iterator_free0 (it); + _gst_object_unref0 (sink_bin); + break; + } _gst_object_unref0 (element); _gst_iterator_free0 (it); _gst_object_unref0 (sink_bin); - break; } - _gst_object_unref0 (element); - _gst_iterator_free0 (it); - _gst_object_unref0 (sink_bin); + _g_object_unref0 (_sink_bin_list); } - _g_object_unref0 (_sink_bin_list); + } else { + guint _tmp31_; + _tmp31_ = sid; + g_warning ("ChannelFactory.vala:277: Could not find any sinks of channel %u", _tmp31_); } - } else { - g_warning ("ChannelFactory.vala:274: Could not find any sinks of channel %u", sid); + _dvb_player_thread_channel_elements_unref0 (celems); } - _dvb_player_thread_channel_elements_unref0 (celems); __finally17: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp32_; + _tmp32_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } if (_inner_error_ != NULL) { _gst_object_unref0 (_result_); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -815,10 +1125,15 @@ return NULL; } } - if (_result_ == NULL) { - g_debug ("ChannelFactory.vala:278: Found NO sink"); + _tmp33_ = _result_; + if (_tmp33_ == NULL) { + DVBLoggingLogger* _tmp34_; + _tmp34_ = dvb_player_thread_log; + dvb_logging_logger_debug (_tmp34_, "ChannelFactory.vala:281: Found NO sink"); } else { - g_debug ("ChannelFactory.vala:280: Found sink"); + DVBLoggingLogger* _tmp35_; + _tmp35_ = dvb_player_thread_log; + dvb_logging_logger_debug (_tmp35_, "ChannelFactory.vala:283: Found sink"); } result = _result_; return result; @@ -830,37 +1145,64 @@ */ gboolean dvb_player_thread_remove_channel (DVBPlayerThread* self, DVBChannel* channel, GstElement* sink) { gboolean result = FALSE; - guint _tmp0_; + DVBChannel* _tmp0_; + guint _tmp1_; + guint _tmp2_; guint channel_sid; - gboolean _tmp1_; - DVBPlayerThreadChannelElements* celements; + GeeHashSet* _tmp3_; + DVBChannel* _tmp4_; + gboolean _tmp5_ = FALSE; + DVBPlayerThreadChannelElements* celements = NULL; gboolean stop_channel = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (channel != NULL, FALSE); g_return_val_if_fail (sink != NULL, FALSE); - _tmp0_ = dvb_channel_get_Sid (channel); - channel_sid = _tmp0_; - _tmp1_ = gee_abstract_collection_contains ((GeeAbstractCollection*) self->priv->_active_channels, channel); - if (!_tmp1_) { - g_critical ("ChannelFactory.vala:291: Could not find channel with SID %u", channel_sid); + _tmp0_ = channel; + _tmp1_ = dvb_channel_get_Sid (_tmp0_); + _tmp2_ = _tmp1_; + channel_sid = _tmp2_; + _tmp3_ = self->priv->_active_channels; + _tmp4_ = channel; + _tmp5_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp3_, _tmp4_); + if (!_tmp5_) { + DVBLoggingLogger* _tmp6_; + guint _tmp7_; + _tmp6_ = dvb_player_thread_log; + _tmp7_ = channel_sid; + dvb_logging_logger_error (_tmp6_, "ChannelFactory.vala:294: Could not find channel with SID %u", _tmp7_); result = FALSE; return result; } - celements = NULL; { - gpointer _tmp2_ = NULL; - DVBPlayerThreadChannelElements* _tmp3_; - gint _tmp4_; + GeeHashMap* _tmp8_; + _tmp8_ = self->priv->elements_map; g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - _tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)); - _tmp3_ = (DVBPlayerThreadChannelElements*) _tmp2_; - _dvb_player_thread_channel_elements_unref0 (celements); - celements = _tmp3_; - _tmp4_ = gee_collection_get_size ((GeeCollection*) celements->sinks); - stop_channel = _tmp4_ == 1; + { + GeeHashMap* _tmp9_; + guint _tmp10_; + gpointer _tmp11_ = NULL; + DVBPlayerThreadChannelElements* _tmp12_; + GeeArrayList* _tmp13_; + gint _tmp14_; + gint _tmp15_; + _tmp9_ = self->priv->elements_map; + _tmp10_ = channel_sid; + _tmp11_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, GUINT_TO_POINTER (_tmp10_)); + _dvb_player_thread_channel_elements_unref0 (celements); + celements = (DVBPlayerThreadChannelElements*) _tmp11_; + _tmp12_ = celements; + _tmp13_ = _tmp12_->sinks; + _tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_); + _tmp15_ = _tmp14_; + stop_channel = _tmp15_ == 1; + } __finally18: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp16_; + _tmp16_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } if (_inner_error_ != NULL) { _dvb_player_thread_channel_elements_unref0 (celements); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -869,154 +1211,295 @@ } } { - gint _tmp5_; + GstElement* _tmp17_; + _tmp17_ = self->priv->pipeline; g_static_rec_mutex_lock (&self->priv->__lock_pipeline); - _tmp5_ = gee_collection_get_size ((GeeCollection*) self->priv->_active_channels); - if (_tmp5_ > 1) { - if (stop_channel) { - gchar* _tmp6_ = NULL; - gchar* channel_sid_string; - gchar* programs; - gchar** _tmp7_; - gchar** _tmp8_ = NULL; - gint programs_arr_length1; - gint _programs_arr_size_; - gchar** _tmp9_; - gchar** programs_arr; - GeeArrayList* _tmp10_ = NULL; - GeeArrayList* new_programs_list; - gpointer _tmp12_ = NULL; - gchar* _tmp13_; - GString* _tmp14_ = NULL; - GString* _tmp15_; - GString* new_programs; + { + GeeHashSet* _tmp18_; + gint _tmp19_; + gint _tmp20_; + _tmp18_ = self->priv->_active_channels; + _tmp19_ = gee_collection_get_size ((GeeCollection*) _tmp18_); + _tmp20_ = _tmp19_; + if (_tmp20_ > 1) { gboolean _tmp21_; - _tmp6_ = g_strdup_printf ("%u", channel_sid); - channel_sid_string = _tmp6_; - programs = NULL; - g_object_get ((GObject*) self->priv->dvbbasebin, "program-numbers", &programs, NULL); - _tmp8_ = _tmp7_ = g_strsplit (programs, ":", 0); - _tmp9_ = _tmp8_; - programs_arr_length1 = _vala_array_length (_tmp7_); - _programs_arr_size_ = programs_arr_length1; - programs_arr = _tmp9_; - _tmp10_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL); - new_programs_list = _tmp10_; - { - gint i; - i = 0; + guint _tmp73_; + GstElement* _tmp74_; + gboolean _tmp75_; + _tmp21_ = stop_channel; + if (_tmp21_) { + guint _tmp22_; + gchar* _tmp23_ = NULL; + gchar* channel_sid_string; + gchar* programs = NULL; + GstElement* _tmp24_; + const gchar* _tmp25_; + gchar** _tmp26_; + gchar** _tmp27_ = NULL; + gchar** programs_arr; + gint programs_arr_length1; + gint _programs_arr_size_; + GeeArrayList* _tmp28_; + GeeArrayList* new_programs_list; + GeeArrayList* _tmp42_; + gpointer _tmp43_ = NULL; + gchar* _tmp44_; + GString* _tmp45_; + GString* _tmp46_; + GString* new_programs; + DVBLoggingLogger* _tmp61_; + const gchar* _tmp62_; + GString* _tmp63_; + const gchar* _tmp64_; + GstElement* _tmp65_; + GstElement* _tmp66_; + GString* _tmp67_; + const gchar* _tmp68_; + gboolean _tmp69_ = FALSE; + GeeHashSet* _tmp71_; + DVBChannel* _tmp72_; + _tmp22_ = channel_sid; + _tmp23_ = g_strdup_printf ("%u", _tmp22_); + channel_sid_string = _tmp23_; + _tmp24_ = self->priv->dvbbasebin; + g_object_get ((GObject*) _tmp24_, "program-numbers", &programs, NULL); + _tmp25_ = programs; + _tmp27_ = _tmp26_ = g_strsplit (_tmp25_, ":", 0); + programs_arr = _tmp27_; + programs_arr_length1 = _vala_array_length (_tmp26_); + _programs_arr_size_ = programs_arr_length1; + _tmp28_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL); + new_programs_list = _tmp28_; { - gboolean _tmp11_; - _tmp11_ = TRUE; - while (TRUE) { - if (!_tmp11_) { - i++; - } - _tmp11_ = FALSE; - if (!(i < programs_arr_length1)) { - break; - } - if (g_strcmp0 (programs_arr[i], channel_sid_string) != 0) { - gee_abstract_collection_add ((GeeAbstractCollection*) new_programs_list, programs_arr[i]); + gint i; + i = 0; + { + gboolean _tmp29_; + _tmp29_ = TRUE; + while (TRUE) { + gboolean _tmp30_; + gint _tmp32_; + gchar** _tmp33_; + gint _tmp33__length1; + gchar** _tmp34_; + gint _tmp34__length1; + gint _tmp35_; + const gchar* _tmp36_; + const gchar* _tmp37_; + _tmp30_ = _tmp29_; + if (!_tmp30_) { + gint _tmp31_; + _tmp31_ = i; + i = _tmp31_ + 1; + } + _tmp29_ = FALSE; + _tmp32_ = i; + _tmp33_ = programs_arr; + _tmp33__length1 = programs_arr_length1; + if (!(_tmp32_ < _tmp33__length1)) { + break; + } + _tmp34_ = programs_arr; + _tmp34__length1 = programs_arr_length1; + _tmp35_ = i; + _tmp36_ = _tmp34_[_tmp35_]; + _tmp37_ = channel_sid_string; + if (g_strcmp0 (_tmp36_, _tmp37_) != 0) { + GeeArrayList* _tmp38_; + gchar** _tmp39_; + gint _tmp39__length1; + gint _tmp40_; + const gchar* _tmp41_; + _tmp38_ = new_programs_list; + _tmp39_ = programs_arr; + _tmp39__length1 = programs_arr_length1; + _tmp40_ = i; + _tmp41_ = _tmp39_[_tmp40_]; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp38_, _tmp41_); + } } } } - } - _tmp12_ = gee_abstract_list_get ((GeeAbstractList*) new_programs_list, 0); - _tmp13_ = (gchar*) _tmp12_; - _tmp14_ = g_string_new (_tmp13_); - new_programs = (_tmp15_ = _tmp14_, _g_free0 (_tmp13_), _tmp15_); - { - gint i; - i = 1; + _tmp42_ = new_programs_list; + _tmp43_ = gee_abstract_list_get ((GeeAbstractList*) _tmp42_, 0); + _tmp44_ = (gchar*) _tmp43_; + _tmp45_ = g_string_new (_tmp44_); + _tmp46_ = _tmp45_; + _g_free0 (_tmp44_); + new_programs = _tmp46_; { - gboolean _tmp16_; - _tmp16_ = TRUE; - while (TRUE) { - gint _tmp17_; - gpointer _tmp18_ = NULL; - gchar* _tmp19_; - gchar* _tmp20_; - if (!_tmp16_) { - i++; - } - _tmp16_ = FALSE; - _tmp17_ = gee_collection_get_size ((GeeCollection*) new_programs_list); - if (!(i < _tmp17_)) { - break; + gint i; + i = 1; + { + gboolean _tmp47_; + _tmp47_ = TRUE; + while (TRUE) { + gboolean _tmp48_; + gint _tmp50_; + GeeArrayList* _tmp51_; + gint _tmp52_; + gint _tmp53_; + GString* _tmp54_; + GeeArrayList* _tmp55_; + gint _tmp56_; + gpointer _tmp57_ = NULL; + gchar* _tmp58_; + gchar* _tmp59_; + gchar* _tmp60_; + _tmp48_ = _tmp47_; + if (!_tmp48_) { + gint _tmp49_; + _tmp49_ = i; + i = _tmp49_ + 1; + } + _tmp47_ = FALSE; + _tmp50_ = i; + _tmp51_ = new_programs_list; + _tmp52_ = gee_collection_get_size ((GeeCollection*) _tmp51_); + _tmp53_ = _tmp52_; + if (!(_tmp50_ < _tmp53_)) { + break; + } + _tmp54_ = new_programs; + _tmp55_ = new_programs_list; + _tmp56_ = i; + _tmp57_ = gee_abstract_list_get ((GeeAbstractList*) _tmp55_, _tmp56_); + _tmp58_ = (gchar*) _tmp57_; + _tmp59_ = g_strconcat (":", _tmp58_, NULL); + _tmp60_ = _tmp59_; + g_string_append (_tmp54_, _tmp60_); + _g_free0 (_tmp60_); + _g_free0 (_tmp58_); } - _tmp18_ = gee_abstract_list_get ((GeeAbstractList*) new_programs_list, i); - _tmp19_ = (gchar*) _tmp18_; - _tmp20_ = g_strconcat (":", _tmp19_, NULL); - g_string_append (new_programs, _tmp20_); - _g_free0 (_tmp20_); - _g_free0 (_tmp19_); } } - } - g_debug ("ChannelFactory.vala:330: Changing program-numbers from %s to %s", programs, new_programs->str); - gst_element_set_state (self->priv->pipeline, GST_STATE_PAUSED); - g_object_set ((GObject*) self->priv->dvbbasebin, "program-numbers", new_programs->str, NULL); - _tmp21_ = dvb_player_thread_set_playing_or_destroy (self); - if (!_tmp21_) { - result = FALSE; + _tmp61_ = dvb_player_thread_log; + _tmp62_ = programs; + _tmp63_ = new_programs; + _tmp64_ = _tmp63_->str; + dvb_logging_logger_debug (_tmp61_, "ChannelFactory.vala:333: Changing program-numbers from %s to %s", _tmp62_, _tmp64_); + _tmp65_ = self->priv->pipeline; + gst_element_set_state (_tmp65_, GST_STATE_PAUSED); + _tmp66_ = self->priv->dvbbasebin; + _tmp67_ = new_programs; + _tmp68_ = _tmp67_->str; + g_object_set ((GObject*) _tmp66_, "program-numbers", _tmp68_, NULL); + _tmp69_ = dvb_player_thread_set_playing_or_destroy (self); + if (!_tmp69_) { + result = FALSE; + _g_string_free0 (new_programs); + _g_object_unref0 (new_programs_list); + programs_arr = (_vala_array_free (programs_arr, programs_arr_length1, (GDestroyNotify) g_free), NULL); + _g_free0 (programs); + _g_free0 (channel_sid_string); + { + GstElement* _tmp70_; + _tmp70_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _dvb_player_thread_channel_elements_unref0 (celements); + return result; + } + _tmp71_ = self->priv->_active_channels; + _tmp72_ = channel; + gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp71_, _tmp72_); _g_string_free0 (new_programs); _g_object_unref0 (new_programs_list); programs_arr = (_vala_array_free (programs_arr, programs_arr_length1, (GDestroyNotify) g_free), NULL); _g_free0 (programs); _g_free0 (channel_sid_string); - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _dvb_player_thread_channel_elements_unref0 (celements); - return result; } - gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->_active_channels, channel); - _g_string_free0 (new_programs); - _g_object_unref0 (new_programs_list); - programs_arr = (_vala_array_free (programs_arr, programs_arr_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (programs); - _g_free0 (channel_sid_string); - } - dvb_player_thread_remove_sink_bin (self, channel_sid, sink); - if (stop_channel) { - gchar* _tmp22_ = NULL; - gchar* _tmp23_; - _tmp22_ = gst_object_get_name ((GstObject*) celements->tee); - _tmp23_ = _tmp22_; - g_debug ("ChannelFactory.vala:345: Removing tee %s from pipeline", _tmp23_); - _g_free0 (_tmp23_); - gst_element_set_state (celements->tee, GST_STATE_NULL); - gst_bin_remove (GST_BIN (self->priv->pipeline), celements->tee); - { - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - gee_abstract_map_unset ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid), NULL); - __finally20: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - if (_inner_error_ != NULL) { - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _dvb_player_thread_channel_elements_unref0 (celements); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + _tmp73_ = channel_sid; + _tmp74_ = sink; + dvb_player_thread_remove_sink_bin (self, _tmp73_, _tmp74_); + _tmp75_ = stop_channel; + if (_tmp75_) { + DVBLoggingLogger* _tmp76_; + DVBPlayerThreadChannelElements* _tmp77_; + GstElement* _tmp78_; + gchar* _tmp79_ = NULL; + gchar* _tmp80_; + DVBPlayerThreadChannelElements* _tmp81_; + GstElement* _tmp82_; + GstElement* _tmp83_; + DVBPlayerThreadChannelElements* _tmp84_; + GstElement* _tmp85_; + _tmp76_ = dvb_player_thread_log; + _tmp77_ = celements; + _tmp78_ = _tmp77_->tee; + _tmp79_ = gst_object_get_name ((GstObject*) _tmp78_); + _tmp80_ = _tmp79_; + dvb_logging_logger_debug (_tmp76_, "ChannelFactory.vala:348: Removing tee %s from pipeline", _tmp80_); + _g_free0 (_tmp80_); + _tmp81_ = celements; + _tmp82_ = _tmp81_->tee; + gst_element_set_state (_tmp82_, GST_STATE_NULL); + _tmp83_ = self->priv->pipeline; + _tmp84_ = celements; + _tmp85_ = _tmp84_->tee; + gst_bin_remove (GST_BIN (_tmp83_), _tmp85_); + { + GeeHashMap* _tmp86_; + _tmp86_ = self->priv->elements_map; + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp87_; + guint _tmp88_; + _tmp87_ = self->priv->elements_map; + _tmp88_ = channel_sid; + gee_abstract_map_unset ((GeeAbstractMap*) _tmp87_, GUINT_TO_POINTER (_tmp88_), NULL); + } + __finally20: + { + GeeHashMap* _tmp89_; + _tmp89_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + if (_inner_error_ != NULL) { + { + GstElement* _tmp90_; + _tmp90_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _dvb_player_thread_channel_elements_unref0 (celements); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } } } - } - } else { - if (stop_channel) { - dvb_player_thread_destroy (self, FALSE); } else { - gboolean _tmp24_; - dvb_player_thread_remove_sink_bin (self, channel_sid, sink); - _tmp24_ = dvb_player_thread_set_playing_or_destroy (self); - if (!_tmp24_) { - result = FALSE; - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _dvb_player_thread_channel_elements_unref0 (celements); - return result; + gboolean _tmp91_; + _tmp91_ = stop_channel; + if (_tmp91_) { + dvb_player_thread_destroy (self, FALSE); + } else { + guint _tmp92_; + GstElement* _tmp93_; + gboolean _tmp94_ = FALSE; + _tmp92_ = channel_sid; + _tmp93_ = sink; + dvb_player_thread_remove_sink_bin (self, _tmp92_, _tmp93_); + _tmp94_ = dvb_player_thread_set_playing_or_destroy (self); + if (!_tmp94_) { + result = FALSE; + { + GstElement* _tmp95_; + _tmp95_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _dvb_player_thread_channel_elements_unref0 (celements); + return result; + } } } } __finally19: - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + { + GstElement* _tmp96_; + _tmp96_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } if (_inner_error_ != NULL) { _dvb_player_thread_channel_elements_unref0 (celements); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1032,13 +1515,19 @@ static gboolean dvb_player_thread_set_playing_or_destroy (DVBPlayerThread* self) { gboolean result = FALSE; - GstStateChangeReturn _tmp0_; + GstElement* _tmp0_; + GstStateChangeReturn _tmp1_ = 0; GstStateChangeReturn ret; + GstStateChangeReturn _tmp2_; g_return_val_if_fail (self != NULL, FALSE); - _tmp0_ = gst_element_set_state (self->priv->pipeline, GST_STATE_PLAYING); - ret = _tmp0_; - if (ret == GST_STATE_CHANGE_FAILURE) { - g_critical ("ChannelFactory.vala:376: Failed setting pipeline to playing"); + _tmp0_ = self->priv->pipeline; + _tmp1_ = gst_element_set_state (_tmp0_, GST_STATE_PLAYING); + ret = _tmp1_; + _tmp2_ = ret; + if (_tmp2_ == GST_STATE_CHANGE_FAILURE) { + DVBLoggingLogger* _tmp3_; + _tmp3_ = dvb_player_thread_log; + dvb_logging_logger_error (_tmp3_, "ChannelFactory.vala:379: Failed setting pipeline to playing"); dvb_player_thread_destroy (self, FALSE); result = FALSE; return result; @@ -1049,59 +1538,122 @@ static void dvb_player_thread_remove_sink_bin (DVBPlayerThread* self, guint channel_sid, GstElement* sink) { - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - GstElement* _tmp2_ = NULL; + DVBLoggingLogger* _tmp0_; + GstElement* _tmp1_; + gchar* _tmp2_ = NULL; + gchar* _tmp3_; + GstElement* _tmp4_; + guint _tmp5_; + guint _tmp6_; + GstElement* _tmp7_; + GstElement* _tmp8_ = NULL; GstElement* sink_bin; + GstElement* _tmp9_; + DVBLoggingLogger* _tmp39_; + GstElement* _tmp40_; + GstElement* _tmp41_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (sink != NULL); - _tmp0_ = gst_object_get_name ((GstObject*) sink); - _tmp1_ = _tmp0_; - g_debug ("ChannelFactory.vala:384: Removing sink bin of sink %s (%p) of channel " \ -"%u", _tmp1_, sink, channel_sid); - _g_free0 (_tmp1_); - _tmp2_ = dvb_player_thread_get_sink_bin (self, channel_sid, sink); - sink_bin = _tmp2_; - if (sink_bin == NULL) { - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - _tmp3_ = gst_object_get_name ((GstObject*) sink); - _tmp4_ = _tmp3_; - g_critical ("ChannelFactory.vala:390: Could not find sink bin for channel %u and si" \ -"nk %s (%p)", channel_sid, _tmp4_, sink); - _g_free0 (_tmp4_); + _tmp0_ = dvb_player_thread_log; + _tmp1_ = sink; + _tmp2_ = gst_object_get_name ((GstObject*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = sink; + _tmp5_ = channel_sid; + dvb_logging_logger_debug (_tmp0_, "ChannelFactory.vala:387: Removing sink bin of sink %s (%p) of channel " \ +"%u", _tmp3_, _tmp4_, _tmp5_); + _g_free0 (_tmp3_); + _tmp6_ = channel_sid; + _tmp7_ = sink; + _tmp8_ = dvb_player_thread_get_sink_bin (self, _tmp6_, _tmp7_); + sink_bin = _tmp8_; + _tmp9_ = sink_bin; + if (_tmp9_ == NULL) { + DVBLoggingLogger* _tmp10_; + guint _tmp11_; + GstElement* _tmp12_; + gchar* _tmp13_ = NULL; + gchar* _tmp14_; + GstElement* _tmp15_; + _tmp10_ = dvb_player_thread_log; + _tmp11_ = channel_sid; + _tmp12_ = sink; + _tmp13_ = gst_object_get_name ((GstObject*) _tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = sink; + dvb_logging_logger_error (_tmp10_, "ChannelFactory.vala:393: Could not find sink bin for channel %u and si" \ +"nk %s (%p)", _tmp11_, _tmp14_, _tmp15_); + _g_free0 (_tmp14_); _gst_object_unref0 (sink_bin); return; } { - gpointer _tmp5_ = NULL; - DVBPlayerThreadChannelElements* celems; - gchar* _tmp6_ = NULL; - gchar* _tmp7_; - gboolean _tmp8_; + GeeHashMap* _tmp16_; + _tmp16_ = self->priv->elements_map; g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - _tmp5_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)); - celems = (DVBPlayerThreadChannelElements*) _tmp5_; - _tmp6_ = gst_object_get_name ((GstObject*) sink); - _tmp7_ = _tmp6_; - g_debug ("ChannelFactory.vala:398: Setting state of queue and sink %s (%p) to NU" \ -"LL", _tmp7_, sink); - _g_free0 (_tmp7_); - gst_element_unlink (celems->tee, sink_bin); - gst_element_set_state (sink_bin, GST_STATE_NULL); - _tmp8_ = gee_abstract_collection_remove ((GeeAbstractCollection*) celems->sinks, sink_bin); - if (!_tmp8_) { - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - _tmp9_ = gst_object_get_name ((GstObject*) sink_bin); - _tmp10_ = _tmp9_; - g_critical ("ChannelFactory.vala:404: Could not find sink bin %s (%p)", _tmp10_, sink_bin); - _g_free0 (_tmp10_); + { + GeeHashMap* _tmp17_; + guint _tmp18_; + gpointer _tmp19_ = NULL; + DVBPlayerThreadChannelElements* celems; + DVBLoggingLogger* _tmp20_; + GstElement* _tmp21_; + gchar* _tmp22_ = NULL; + gchar* _tmp23_; + GstElement* _tmp24_; + DVBPlayerThreadChannelElements* _tmp25_; + GstElement* _tmp26_; + GstElement* _tmp27_; + GstElement* _tmp28_; + DVBPlayerThreadChannelElements* _tmp29_; + GeeArrayList* _tmp30_; + GstElement* _tmp31_; + gboolean _tmp32_ = FALSE; + _tmp17_ = self->priv->elements_map; + _tmp18_ = channel_sid; + _tmp19_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp17_, GUINT_TO_POINTER (_tmp18_)); + celems = (DVBPlayerThreadChannelElements*) _tmp19_; + _tmp20_ = dvb_player_thread_log; + _tmp21_ = sink; + _tmp22_ = gst_object_get_name ((GstObject*) _tmp21_); + _tmp23_ = _tmp22_; + _tmp24_ = sink; + dvb_logging_logger_debug (_tmp20_, "ChannelFactory.vala:401: Setting state of queue and sink %s (%p) to NU" \ +"LL", _tmp23_, _tmp24_); + _g_free0 (_tmp23_); + _tmp25_ = celems; + _tmp26_ = _tmp25_->tee; + _tmp27_ = sink_bin; + gst_element_unlink (_tmp26_, _tmp27_); + _tmp28_ = sink_bin; + gst_element_set_state (_tmp28_, GST_STATE_NULL); + _tmp29_ = celems; + _tmp30_ = _tmp29_->sinks; + _tmp31_ = sink_bin; + _tmp32_ = gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp30_, _tmp31_); + if (!_tmp32_) { + DVBLoggingLogger* _tmp33_; + GstElement* _tmp34_; + gchar* _tmp35_ = NULL; + gchar* _tmp36_; + GstElement* _tmp37_; + _tmp33_ = dvb_player_thread_log; + _tmp34_ = sink_bin; + _tmp35_ = gst_object_get_name ((GstObject*) _tmp34_); + _tmp36_ = _tmp35_; + _tmp37_ = sink_bin; + dvb_logging_logger_error (_tmp33_, "ChannelFactory.vala:407: Could not find sink bin %s (%p)", _tmp36_, _tmp37_); + _g_free0 (_tmp36_); + } + _dvb_player_thread_channel_elements_unref0 (celems); } - _dvb_player_thread_channel_elements_unref0 (celems); __finally21: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp38_; + _tmp38_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } if (_inner_error_ != NULL) { _gst_object_unref0 (sink_bin); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1109,8 +1661,11 @@ return; } } - g_debug ("ChannelFactory.vala:409: Removing queue and sink from pipeline"); - gst_bin_remove (GST_BIN (self->priv->pipeline), sink_bin); + _tmp39_ = dvb_player_thread_log; + dvb_logging_logger_debug (_tmp39_, "ChannelFactory.vala:412: Removing queue and sink from pipeline"); + _tmp40_ = self->priv->pipeline; + _tmp41_ = sink_bin; + gst_bin_remove (GST_BIN (_tmp40_), _tmp41_); _gst_object_unref0 (sink_bin); } @@ -1119,101 +1674,192 @@ * Stop pipeline and clean up everything else */ static void dvb_player_thread_real_destroy (DVBPlayerThread* self, gboolean forced) { + gboolean _tmp0_; GError * _inner_error_ = NULL; - g_return_if_fail (self != NULL); - if (self->priv->destroyed) { + _tmp0_ = self->priv->destroyed; + if (_tmp0_) { return; } { + gboolean _tmp1_; + _tmp1_ = self->priv->destroyed; g_static_rec_mutex_lock (&self->priv->__lock_destroyed); - self->priv->destroyed = TRUE; - if (forced) { - { - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + gboolean _tmp2_; + GeeHashSet* _tmp40_; + self->priv->destroyed = TRUE; + _tmp2_ = forced; + if (_tmp2_) { { - GeeCollection* _tmp0_ = NULL; - GeeCollection* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _celems_it; - _tmp0_ = gee_map_get_values ((GeeMap*) self->priv->elements_map); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _celems_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - DVBPlayerThreadChannelElements* celems; - _tmp4_ = gee_iterator_next (_celems_it); - if (!_tmp4_) { - break; + GeeHashMap* _tmp3_; + _tmp3_ = self->priv->elements_map; + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + { + GeeHashMap* _tmp4_; + GeeCollection* _tmp5_; + GeeCollection* _tmp6_; + GeeCollection* _tmp7_; + GeeIterator* _tmp8_ = NULL; + GeeIterator* _tmp9_; + GeeIterator* _celems_it; + _tmp4_ = self->priv->elements_map; + _tmp5_ = gee_map_get_values ((GeeMap*) _tmp4_); + _tmp6_ = _tmp5_; + _tmp7_ = _tmp6_; + _tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_); + _tmp9_ = _tmp8_; + _g_object_unref0 (_tmp7_); + _celems_it = _tmp9_; + while (TRUE) { + GeeIterator* _tmp10_; + gboolean _tmp11_ = FALSE; + GeeIterator* _tmp12_; + gpointer _tmp13_ = NULL; + DVBPlayerThreadChannelElements* celems; + DVBPlayerThreadChannelElements* _tmp14_; + DVBForcedStopNotify _tmp15_; + void* _tmp15__target; + _tmp10_ = _celems_it; + _tmp11_ = gee_iterator_next (_tmp10_); + if (!_tmp11_) { + break; + } + _tmp12_ = _celems_it; + _tmp13_ = gee_iterator_get (_tmp12_); + celems = (DVBPlayerThreadChannelElements*) _tmp13_; + _tmp14_ = celems; + _tmp15_ = _tmp14_->notify_func; + _tmp15__target = _tmp14_->notify_func_target; + if (_tmp15_ != NULL) { + DVBDevice* _tmp16_; + DVBChannelList* _tmp17_; + DVBChannelList* _tmp18_; + DVBPlayerThreadChannelElements* _tmp19_; + guint _tmp20_; + DVBChannel* _tmp21_ = NULL; + DVBChannel* channel; + DVBPlayerThreadChannelElements* _tmp22_; + DVBForcedStopNotify _tmp23_; + void* _tmp23__target; + DVBChannel* _tmp24_; + _tmp16_ = self->priv->_device; + _tmp17_ = dvb_device_get_Channels (_tmp16_); + _tmp18_ = _tmp17_; + _tmp19_ = celems; + _tmp20_ = _tmp19_->sid; + _tmp21_ = dvb_channel_list_get_channel (_tmp18_, _tmp20_); + channel = _tmp21_; + _tmp22_ = celems; + _tmp23_ = _tmp22_->notify_func; + _tmp23__target = _tmp22_->notify_func_target; + _tmp24_ = channel; + _tmp23_ (_tmp24_, _tmp23__target); + _g_object_unref0 (channel); + } + _dvb_player_thread_channel_elements_unref0 (celems); + } + _g_object_unref0 (_celems_it); } - _tmp5_ = gee_iterator_get (_celems_it); - celems = (DVBPlayerThreadChannelElements*) _tmp5_; - if (celems->notify_func != NULL) { - DVBChannelList* _tmp6_ = NULL; - DVBChannel* _tmp7_ = NULL; - DVBChannel* channel; - _tmp6_ = dvb_device_get_Channels (self->priv->_device); - _tmp7_ = dvb_channel_list_get_channel (_tmp6_, celems->sid); - channel = _tmp7_; - celems->notify_func (channel, celems->notify_func_target); - _g_object_unref0 (channel); + } + __finally23: + { + GeeHashMap* _tmp25_; + _tmp25_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + if (_inner_error_ != NULL) { + { + gboolean _tmp26_; + _tmp26_ = self->priv->destroyed; + g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); } - _dvb_player_thread_channel_elements_unref0 (celems); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } + } + { + GstElement* _tmp27_; + _tmp27_ = self->priv->pipeline; + g_static_rec_mutex_lock (&self->priv->__lock_pipeline); + { + GstElement* _tmp28_; + _tmp28_ = self->priv->pipeline; + if (_tmp28_ != NULL) { + DVBLoggingLogger* _tmp29_; + GstElement* _tmp30_; + GstBus* _tmp31_ = NULL; + GstBus* bus; + GstBus* _tmp32_; + GstElement* _tmp33_; + _tmp29_ = dvb_player_thread_log; + dvb_logging_logger_debug (_tmp29_, "ChannelFactory.vala:437: Stopping pipeline"); + _tmp30_ = self->priv->pipeline; + _tmp31_ = gst_element_get_bus (_tmp30_); + bus = _tmp31_; + _tmp32_ = bus; + gst_bus_remove_signal_watch (_tmp32_); + _tmp33_ = self->priv->pipeline; + gst_element_set_state (_tmp33_, GST_STATE_NULL); + _gst_object_unref0 (bus); } - _g_object_unref0 (_celems_it); + _gst_object_unref0 (self->priv->pipeline); + self->priv->pipeline = NULL; + } + __finally24: + { + GstElement* _tmp34_; + _tmp34_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); } - __finally23: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); if (_inner_error_ != NULL) { - g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); + { + gboolean _tmp35_; + _tmp35_ = self->priv->destroyed; + g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); + } g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return; } } - } - { - GstElement* _tmp9_; - g_static_rec_mutex_lock (&self->priv->__lock_pipeline); - if (self->priv->pipeline != NULL) { - GstBus* _tmp8_ = NULL; - GstBus* bus; - g_debug ("ChannelFactory.vala:434: Stopping pipeline"); - _tmp8_ = gst_element_get_bus (self->priv->pipeline); - bus = _tmp8_; - gst_bus_remove_signal_watch (bus); - gst_element_set_state (self->priv->pipeline, GST_STATE_NULL); - _gst_object_unref0 (bus); - } - _tmp9_ = NULL; - _gst_object_unref0 (self->priv->pipeline); - self->priv->pipeline = _tmp9_; - __finally24: - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - if (_inner_error_ != NULL) { - g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + { + GeeHashMap* _tmp36_; + _tmp36_ = self->priv->elements_map; + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp37_; + _tmp37_ = self->priv->elements_map; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp37_); + } + __finally25: + { + GeeHashMap* _tmp38_; + _tmp38_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + if (_inner_error_ != NULL) { + { + gboolean _tmp39_; + _tmp39_ = self->priv->destroyed; + g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } } + _tmp40_ = self->priv->_active_channels; + gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp40_); } + __finally22: { - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - gee_abstract_map_clear ((GeeAbstractMap*) self->priv->elements_map); - __finally25: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - if (_inner_error_ != NULL) { - g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; - } + gboolean _tmp41_; + _tmp41_ = self->priv->destroyed; + g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); } - gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->_active_channels); - __finally22: - g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1224,30 +1870,47 @@ void dvb_player_thread_destroy (DVBPlayerThread* self, gboolean forced) { + g_return_if_fail (self != NULL); DVB_PLAYER_THREAD_GET_CLASS (self)->destroy (self, forced); } static gboolean dvb_player_thread_add_element (DVBPlayerThread* self, GstElement* elem) { gboolean result = FALSE; - gchar* _tmp0_ = NULL; + GstElement* _tmp0_; + gchar* _tmp1_ = NULL; gchar* elem_name; - GstElement* _tmp1_; - gboolean _tmp2_; + GstElement* _tmp2_; + GstElement* _tmp3_; + GstElement* _tmp4_; + gboolean _tmp5_ = FALSE; + DVBLoggingLogger* _tmp8_; + const gchar* _tmp9_; + GstElement* _tmp10_; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (elem != NULL, FALSE); - _tmp0_ = gst_object_get_name ((GstObject*) elem); - elem_name = _tmp0_; - _tmp1_ = _gst_object_ref0 (elem); - _tmp2_ = gst_bin_add (GST_BIN (self->priv->pipeline), _tmp1_); - if (!_tmp2_) { - g_critical ("ChannelFactory.vala:451: Could not add element %s", elem_name); + _tmp0_ = elem; + _tmp1_ = gst_object_get_name ((GstObject*) _tmp0_); + elem_name = _tmp1_; + _tmp2_ = self->priv->pipeline; + _tmp3_ = elem; + _tmp4_ = _gst_object_ref0 (_tmp3_); + _tmp5_ = gst_bin_add (GST_BIN (_tmp2_), _tmp4_); + if (!_tmp5_) { + DVBLoggingLogger* _tmp6_; + const gchar* _tmp7_; + _tmp6_ = dvb_player_thread_log; + _tmp7_ = elem_name; + dvb_logging_logger_error (_tmp6_, "ChannelFactory.vala:454: Could not add element %s", _tmp7_); result = FALSE; _g_free0 (elem_name); _gst_object_unref0 (elem); return result; } - g_debug ("ChannelFactory.vala:454: Element %s (%p) added to pipeline", elem_name, elem); + _tmp8_ = dvb_player_thread_log; + _tmp9_ = elem_name; + _tmp10_ = elem; + dvb_logging_logger_debug (_tmp8_, "ChannelFactory.vala:457: Element %s (%p) added to pipeline", _tmp9_, _tmp10_); result = TRUE; _g_free0 (elem_name); _gst_object_unref0 (elem); @@ -1259,94 +1922,164 @@ * Link program_%d pad with tee */ static void dvb_player_thread_on_dvbbasebin_pad_added (DVBPlayerThread* self, GstElement* elem, GstPad* pad) { - gchar* _tmp0_ = NULL; + GstPad* _tmp0_; + gchar* _tmp1_ = NULL; gchar* pad_name; - gboolean _tmp1_; + DVBLoggingLogger* _tmp2_; + const gchar* _tmp3_; + const gchar* _tmp4_; + gboolean _tmp5_ = FALSE; guint sid = 0U; + const gchar* _tmp6_; + DVBLoggingLogger* _tmp7_; + guint _tmp8_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (elem != NULL); g_return_if_fail (pad != NULL); - _tmp0_ = gst_object_get_name ((GstObject*) pad); - pad_name = _tmp0_; - g_debug ("ChannelFactory.vala:463: Pad %s added", pad_name); - _tmp1_ = g_str_has_prefix (pad_name, "program_"); - if (!_tmp1_) { + _tmp0_ = pad; + _tmp1_ = gst_object_get_name ((GstObject*) _tmp0_); + pad_name = _tmp1_; + _tmp2_ = dvb_player_thread_log; + _tmp3_ = pad_name; + dvb_logging_logger_debug (_tmp2_, "ChannelFactory.vala:466: Pad %s added", _tmp3_); + _tmp4_ = pad_name; + _tmp5_ = g_str_has_prefix (_tmp4_, "program_"); + if (!_tmp5_) { _g_free0 (pad_name); return; } - sscanf (pad_name, "program_%u", &sid); - g_debug ("ChannelFactory.vala:471: SID is '%u'", sid); + _tmp6_ = pad_name; + sscanf (_tmp6_, "program_%u", &sid); + _tmp7_ = dvb_player_thread_log; + _tmp8_ = sid; + dvb_logging_logger_debug (_tmp7_, "ChannelFactory.vala:474: SID is '%u'", _tmp8_); { - gboolean _tmp2_; + GeeHashMap* _tmp9_; + _tmp9_ = self->priv->elements_map; g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - _tmp2_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid)); - if (_tmp2_) { - gpointer _tmp3_ = NULL; - DVBPlayerThreadChannelElements* _tmp4_; - GstElement* _tmp5_; - GstElement* _tmp6_; - GstElement* sink; - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - GstPad* _tmp11_ = NULL; - GstPad* sinkpad; - GstPadLinkReturn _tmp12_; - GstPadLinkReturn rc; - _tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid)); - _tmp4_ = (DVBPlayerThreadChannelElements*) _tmp3_; - _tmp5_ = _gst_object_ref0 (_tmp4_->tee); - sink = (_tmp6_ = _tmp5_, _dvb_player_thread_channel_elements_unref0 (_tmp4_), _tmp6_); - if (sink == NULL) { - g_critical ("ChannelFactory.vala:477: Could not find sink for SID %u", sid); + { + GeeHashMap* _tmp10_; + guint _tmp11_; + gboolean _tmp12_ = FALSE; + _tmp10_ = self->priv->elements_map; + _tmp11_ = sid; + _tmp12_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp10_, GUINT_TO_POINTER (_tmp11_)); + if (_tmp12_) { + GeeHashMap* _tmp13_; + guint _tmp14_; + gpointer _tmp15_ = NULL; + DVBPlayerThreadChannelElements* _tmp16_; + GstElement* _tmp17_; + GstElement* _tmp18_; + GstElement* _tmp19_; + GstElement* sink; + GstElement* _tmp20_; + DVBLoggingLogger* _tmp24_; + GstElement* _tmp25_; + gchar* _tmp26_ = NULL; + gchar* _tmp27_; + GstElement* _tmp28_; + gchar* _tmp29_ = NULL; + gchar* _tmp30_; + GstElement* _tmp31_; + GstPad* _tmp32_ = NULL; + GstPad* sinkpad; + GstPad* _tmp33_; + GstPad* _tmp34_; + GstPadLinkReturn _tmp35_ = 0; + GstPadLinkReturn rc; + GstPadLinkReturn _tmp36_; + _tmp13_ = self->priv->elements_map; + _tmp14_ = sid; + _tmp15_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp13_, GUINT_TO_POINTER (_tmp14_)); + _tmp16_ = (DVBPlayerThreadChannelElements*) _tmp15_; + _tmp17_ = _tmp16_->tee; + _tmp18_ = _gst_object_ref0 (_tmp17_); + _tmp19_ = _tmp18_; + _dvb_player_thread_channel_elements_unref0 (_tmp16_); + sink = _tmp19_; + _tmp20_ = sink; + if (_tmp20_ == NULL) { + DVBLoggingLogger* _tmp21_; + guint _tmp22_; + _tmp21_ = dvb_player_thread_log; + _tmp22_ = sid; + dvb_logging_logger_error (_tmp21_, "ChannelFactory.vala:480: Could not find sink for SID %u", _tmp22_); + _gst_object_unref0 (sink); + { + GeeHashMap* _tmp23_; + _tmp23_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + _g_free0 (pad_name); + return; + } + _tmp24_ = dvb_player_thread_log; + _tmp25_ = elem; + _tmp26_ = gst_object_get_name ((GstObject*) _tmp25_); + _tmp27_ = _tmp26_; + _tmp28_ = sink; + _tmp29_ = gst_object_get_name ((GstObject*) _tmp28_); + _tmp30_ = _tmp29_; + dvb_logging_logger_debug (_tmp24_, "ChannelFactory.vala:484: Linking elements %s and %s", _tmp27_, _tmp30_); + _g_free0 (_tmp30_); + _g_free0 (_tmp27_); + _tmp31_ = sink; + _tmp32_ = gst_element_get_static_pad (_tmp31_, "sink"); + sinkpad = _tmp32_; + _tmp33_ = pad; + _tmp34_ = sinkpad; + _tmp35_ = gst_pad_link (_tmp33_, _tmp34_); + rc = _tmp35_; + _tmp36_ = rc; + if (_tmp36_ != GST_PAD_LINK_OK) { + DVBLoggingLogger* _tmp37_; + GstPad* _tmp38_; + gchar* _tmp39_ = NULL; + gchar* _tmp40_; + GstPad* _tmp41_; + gchar* _tmp42_ = NULL; + gchar* _tmp43_; + _tmp37_ = dvb_player_thread_log; + _tmp38_ = pad; + _tmp39_ = gst_object_get_name ((GstObject*) _tmp38_); + _tmp40_ = _tmp39_; + _tmp41_ = sinkpad; + _tmp42_ = gst_object_get_name ((GstObject*) _tmp41_); + _tmp43_ = _tmp42_; + dvb_logging_logger_error (_tmp37_, "ChannelFactory.vala:489: Could not link pads %s and %s", _tmp40_, _tmp43_); + _g_free0 (_tmp43_); + _g_free0 (_tmp40_); + } else { + DVBLoggingLogger* _tmp44_; + GstPad* _tmp45_; + gchar* _tmp46_ = NULL; + gchar* _tmp47_; + GstPad* _tmp48_; + gchar* _tmp49_ = NULL; + gchar* _tmp50_; + _tmp44_ = dvb_player_thread_log; + _tmp45_ = pad; + _tmp46_ = gst_object_get_name ((GstObject*) _tmp45_); + _tmp47_ = _tmp46_; + _tmp48_ = sinkpad; + _tmp49_ = gst_object_get_name ((GstObject*) _tmp48_); + _tmp50_ = _tmp49_; + dvb_logging_logger_debug (_tmp44_, "ChannelFactory.vala:492: Src pad %s linked with sink pad %s", _tmp47_, _tmp50_); + _g_free0 (_tmp50_); + _g_free0 (_tmp47_); + } + _gst_object_unref0 (sinkpad); _gst_object_unref0 (sink); - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - _g_free0 (pad_name); - return; } - _tmp7_ = gst_object_get_name ((GstObject*) elem); - _tmp8_ = _tmp7_; - _tmp9_ = gst_object_get_name ((GstObject*) sink); - _tmp10_ = _tmp9_; - g_debug ("ChannelFactory.vala:481: Linking elements %s and %s", _tmp8_, _tmp10_); - _g_free0 (_tmp10_); - _g_free0 (_tmp8_); - _tmp11_ = gst_element_get_static_pad (sink, "sink"); - sinkpad = _tmp11_; - _tmp12_ = gst_pad_link (pad, sinkpad); - rc = _tmp12_; - if (rc != GST_PAD_LINK_OK) { - gchar* _tmp13_ = NULL; - gchar* _tmp14_; - gchar* _tmp15_ = NULL; - gchar* _tmp16_; - _tmp13_ = gst_object_get_name ((GstObject*) pad); - _tmp14_ = _tmp13_; - _tmp15_ = gst_object_get_name ((GstObject*) sinkpad); - _tmp16_ = _tmp15_; - g_critical ("ChannelFactory.vala:486: Could not link pads %s and %s", _tmp14_, _tmp16_); - _g_free0 (_tmp16_); - _g_free0 (_tmp14_); - } else { - gchar* _tmp17_ = NULL; - gchar* _tmp18_; - gchar* _tmp19_ = NULL; - gchar* _tmp20_; - _tmp17_ = gst_object_get_name ((GstObject*) pad); - _tmp18_ = _tmp17_; - _tmp19_ = gst_object_get_name ((GstObject*) sinkpad); - _tmp20_ = _tmp19_; - g_debug ("ChannelFactory.vala:489: Src pad %s linked with sink pad %s", _tmp18_, _tmp20_); - _g_free0 (_tmp20_); - _g_free0 (_tmp18_); - } - _gst_object_unref0 (sinkpad); - _gst_object_unref0 (sink); } __finally26: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp51_; + _tmp51_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } if (_inner_error_ != NULL) { _g_free0 (pad_name); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1367,51 +2100,75 @@ static void dvb_player_thread_bus_watch_func (DVBPlayerThread* self, GstBus* bus, GstMessage* message) { - const GstStructure* _tmp0_ = NULL; - GstStructure* _tmp1_; + GstMessage* _tmp0_; + const GstStructure* _tmp1_ = NULL; + GstStructure* _tmp2_; GstStructure* structure; + GstMessage* _tmp3_; + GstMessageType _tmp4_; g_return_if_fail (self != NULL); g_return_if_fail (bus != NULL); g_return_if_fail (message != NULL); - _tmp0_ = gst_message_get_structure (message); - _tmp1_ = _gst_structure_copy0 (_tmp0_); - structure = _tmp1_; - switch (message->type) { + _tmp0_ = message; + _tmp1_ = gst_message_get_structure (_tmp0_); + _tmp2_ = _gst_structure_copy0 (_tmp1_); + structure = _tmp2_; + _tmp3_ = message; + _tmp4_ = _tmp3_->type; + switch (_tmp4_) { case GST_MESSAGE_ELEMENT: { - const gchar* _tmp2_ = NULL; - gchar* _tmp3_; + const GstStructure* _tmp5_; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_; gchar* structure_name; - _tmp2_ = gst_structure_get_name (structure); - _tmp3_ = g_strdup (_tmp2_); - structure_name = _tmp3_; - if (g_strcmp0 (structure_name, "eit") == 0) { - if (self->priv->epgscanner != NULL) { - dvb_epg_scanner_on_eit_structure (self->priv->epgscanner, structure); + const gchar* _tmp8_; + _tmp5_ = structure; + _tmp6_ = gst_structure_get_name (_tmp5_); + _tmp7_ = g_strdup (_tmp6_); + structure_name = _tmp7_; + _tmp8_ = structure_name; + if (g_strcmp0 (_tmp8_, "eit") == 0) { + DVBEPGScanner* _tmp9_; + const GstStructure* _tmp12_; + _tmp9_ = self->priv->epgscanner; + if (_tmp9_ != NULL) { + DVBEPGScanner* _tmp10_; + const GstStructure* _tmp11_; + _tmp10_ = self->priv->epgscanner; + _tmp11_ = structure; + dvb_epg_scanner_on_eit_structure (_tmp10_, _tmp11_); } - g_signal_emit_by_name (self, "eit-structure", structure); + _tmp12_ = structure; + g_signal_emit_by_name (self, "eit-structure", _tmp12_); } _g_free0 (structure_name); break; } case GST_MESSAGE_WARNING: { - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - _tmp4_ = gst_structure_to_string (structure); - _tmp5_ = _tmp4_; - g_warning ("ChannelFactory.vala:511: %s", _tmp5_); - _g_free0 (_tmp5_); + const GstStructure* _tmp13_; + gchar* _tmp14_ = NULL; + gchar* _tmp15_; + _tmp13_ = structure; + _tmp14_ = gst_structure_to_string (_tmp13_); + _tmp15_ = _tmp14_; + g_warning ("ChannelFactory.vala:514: %s", _tmp15_); + _g_free0 (_tmp15_); break; } case GST_MESSAGE_ERROR: { - gchar* _tmp6_ = NULL; - gchar* _tmp7_; - _tmp6_ = gst_structure_to_string (structure); - _tmp7_ = _tmp6_; - g_critical ("ChannelFactory.vala:514: %s", _tmp7_); - _g_free0 (_tmp7_); + DVBLoggingLogger* _tmp16_; + const GstStructure* _tmp17_; + gchar* _tmp18_ = NULL; + gchar* _tmp19_; + _tmp16_ = dvb_player_thread_log; + _tmp17_ = structure; + _tmp18_ = gst_structure_to_string (_tmp17_); + _tmp19_ = _tmp18_; + dvb_logging_logger_error (_tmp16_, "ChannelFactory.vala:517: %s", _tmp19_); + _g_free0 (_tmp19_); break; } default: @@ -1425,8 +2182,10 @@ GeeHashSet* dvb_player_thread_get_active_channels (DVBPlayerThread* self) { GeeHashSet* result; + GeeHashSet* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_active_channels; + _tmp0_ = self->priv->_active_channels; + result = _tmp0_; return result; } @@ -1435,8 +2194,8 @@ GeeHashSet* _tmp0_; GeeHashSet* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_active_channels); self->priv->_active_channels = _tmp1_; g_object_notify ((GObject *) self, "active-channels"); @@ -1445,8 +2204,10 @@ DVBDevice* dvb_player_thread_get_device (DVBPlayerThread* self) { DVBDevice* result; + DVBDevice* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_device; + _tmp0_ = self->priv->_device; + result = _tmp0_; return result; } @@ -1455,8 +2216,8 @@ DVBDevice* _tmp0_; DVBDevice* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_device); self->priv->_device = _tmp1_; g_object_notify ((GObject *) self, "device"); @@ -1466,49 +2227,73 @@ gboolean dvb_player_thread_get_forced (DVBPlayerThread* self) { gboolean result; gboolean val; + gboolean _tmp14_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); val = FALSE; { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->elements_map; g_static_rec_mutex_lock (&self->priv->__lock_elements_map); { - GeeCollection* _tmp0_ = NULL; - GeeCollection* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _celem_it; - _tmp0_ = gee_map_get_values ((GeeMap*) self->priv->elements_map); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _celem_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - DVBPlayerThreadChannelElements* celem; - _tmp4_ = gee_iterator_next (_celem_it); - if (!_tmp4_) { - break; - } - _tmp5_ = gee_iterator_get (_celem_it); - celem = (DVBPlayerThreadChannelElements*) _tmp5_; - if (celem->forced) { - val = TRUE; + { + GeeHashMap* _tmp1_; + GeeCollection* _tmp2_; + GeeCollection* _tmp3_; + GeeCollection* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _celem_it; + _tmp1_ = self->priv->elements_map; + _tmp2_ = gee_map_get_values ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _celem_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + DVBPlayerThreadChannelElements* celem; + DVBPlayerThreadChannelElements* _tmp11_; + gboolean _tmp12_; + _tmp7_ = _celem_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _celem_it; + _tmp10_ = gee_iterator_get (_tmp9_); + celem = (DVBPlayerThreadChannelElements*) _tmp10_; + _tmp11_ = celem; + _tmp12_ = _tmp11_->forced; + if (_tmp12_) { + val = TRUE; + _dvb_player_thread_channel_elements_unref0 (celem); + break; + } _dvb_player_thread_channel_elements_unref0 (celem); - break; } - _dvb_player_thread_channel_elements_unref0 (celem); + _g_object_unref0 (_celem_it); } - _g_object_unref0 (_celem_it); } __finally27: - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + { + GeeHashMap* _tmp13_; + _tmp13_ = self->priv->elements_map; + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return FALSE; } } - result = val; + _tmp14_ = val; + result = _tmp14_; return result; } @@ -1517,7 +2302,8 @@ typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, gpointer arg_1, gpointer data2); register GMarshalFunc_VOID__BOXED callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 2); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -1536,21 +2322,19 @@ GObject * obj; GObjectClass * parent_class; DVBPlayerThread * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; - GeeHashSet* _tmp2_ = NULL; - GeeHashSet* _tmp3_; + GeeHashMap* _tmp0_; + GeeHashSet* _tmp1_; + GeeHashSet* _tmp2_; parent_class = G_OBJECT_CLASS (dvb_player_thread_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_PLAYER_THREAD (obj); _tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_PLAYER_THREAD_TYPE_CHANNEL_ELEMENTS, (GBoxedCopyFunc) dvb_player_thread_channel_elements_ref, dvb_player_thread_channel_elements_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; _g_object_unref0 (self->priv->elements_map); - self->priv->elements_map = _tmp1_; - _tmp2_ = gee_hash_set_new (DVB_TYPE_CHANNEL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL); - _tmp3_ = _tmp2_; - dvb_player_thread_set_active_channels (self, _tmp3_); - _g_object_unref0 (_tmp3_); + self->priv->elements_map = _tmp0_; + _tmp1_ = gee_hash_set_new (DVB_TYPE_CHANNEL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL); + _tmp2_ = _tmp1_; + dvb_player_thread_set_active_channels (self, _tmp2_); + _g_object_unref0 (_tmp2_); self->priv->destroyed = FALSE; return obj; } @@ -1694,10 +2478,6 @@ self = DVB_PLAYER_THREAD_CHANNEL_ELEMENTS (obj); _g_object_unref0 (self->sinks); _gst_object_unref0 (self->tee); - (self->notify_func_target_destroy_notify == NULL) ? NULL : (self->notify_func_target_destroy_notify (self->notify_func_target), NULL); - self->notify_func = NULL; - self->notify_func_target = NULL; - self->notify_func_target_destroy_notify = NULL; } @@ -1734,6 +2514,8 @@ static void dvb_player_thread_class_init (DVBPlayerThreadClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_player_thread_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBPlayerThreadPrivate)); DVB_PLAYER_THREAD_CLASS (klass)->destroy = dvb_player_thread_real_destroy; @@ -1744,10 +2526,13 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_PLAYER_THREAD_ACTIVE_CHANNELS, g_param_spec_object ("active-channels", "active-channels", "active-channels", GEE_TYPE_HASH_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_PLAYER_THREAD_DEVICE, g_param_spec_object ("device", "device", "device", DVB_TYPE_DEVICE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_PLAYER_THREAD_FORCED, g_param_spec_boolean ("forced", "forced", "forced", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - /** + /** * Emitted when we came across EIT table */ g_signal_new ("eit_structure", DVB_TYPE_PLAYER_THREAD, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_STRUCTURE); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_player_thread_log = _tmp1_; } @@ -1777,7 +2562,7 @@ /** * This class handles watching channels one physical device. - * + * * It's possible to watch multiple channels at the same time * if they are all on the same transport stream. * @@ -1835,12 +2620,12 @@ DVBChannelFactory* dvb_channel_factory_construct (GType object_type, DVBDeviceGroup* devgroup) { DVBChannelFactory * self = NULL; - GeeHashSet* _tmp0_ = NULL; + DVBDeviceGroup* _tmp0_; GeeHashSet* _tmp1_; g_return_val_if_fail (devgroup != NULL, NULL); - self = (DVBChannelFactory*) g_object_new (object_type, "device-group", devgroup, NULL); - _tmp0_ = gee_hash_set_new (DVB_TYPE_PLAYER_THREAD, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL); - _tmp1_ = _tmp0_; + _tmp0_ = devgroup; + self = (DVBChannelFactory*) g_object_new (object_type, "device-group", _tmp0_, NULL); + _tmp1_ = gee_hash_set_new (DVB_TYPE_PLAYER_THREAD, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL); _g_object_unref0 (self->priv->active_players); self->priv->active_players = _tmp1_; return self; @@ -1859,30 +2644,48 @@ GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); { + GeeHashSet* _tmp0_; + _tmp0_ = self->priv->active_players; g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _tmp0_ = NULL; - GeeIterator* _active_player_it; - _tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - _active_player_it = _tmp0_; - while (TRUE) { - gboolean _tmp1_; - gpointer _tmp2_ = NULL; - DVBPlayerThread* active_player; - _tmp1_ = gee_iterator_next (_active_player_it); - if (!_tmp1_) { - break; - } - _tmp2_ = gee_iterator_get (_active_player_it); - active_player = (DVBPlayerThread*) _tmp2_; - dvb_player_thread_destroy (active_player, FALSE); - _g_object_unref0 (active_player); + GeeHashSet* _tmp8_; + { + GeeHashSet* _tmp1_; + GeeIterator* _tmp2_ = NULL; + GeeIterator* _active_player_it; + _tmp1_ = self->priv->active_players; + _tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_); + _active_player_it = _tmp2_; + while (TRUE) { + GeeIterator* _tmp3_; + gboolean _tmp4_ = FALSE; + GeeIterator* _tmp5_; + gpointer _tmp6_ = NULL; + DVBPlayerThread* active_player; + DVBPlayerThread* _tmp7_; + _tmp3_ = _active_player_it; + _tmp4_ = gee_iterator_next (_tmp3_); + if (!_tmp4_) { + break; + } + _tmp5_ = _active_player_it; + _tmp6_ = gee_iterator_get (_tmp5_); + active_player = (DVBPlayerThread*) _tmp6_; + _tmp7_ = active_player; + dvb_player_thread_destroy (_tmp7_, FALSE); + _g_object_unref0 (active_player); + } + _g_object_unref0 (_active_player_it); } - _g_object_unref0 (_active_player_it); + _tmp8_ = self->priv->active_players; + gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp8_); } - gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->active_players); __finally28: - g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + { + GeeHashSet* _tmp9_; + _tmp9_ = self->priv->active_players; + g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1921,83 +2724,128 @@ DVBPlayerThread* dvb_channel_factory_watch_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink_element, gboolean force, DVBForcedStopNotify notify_func, void* notify_func_target) { DVBPlayerThread* result = NULL; - const gchar* _tmp0_ = NULL; - guint _tmp1_; + DVBLoggingLogger* _tmp0_; + DVBChannel* _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; + DVBChannel* _tmp4_; + guint _tmp5_; + guint _tmp6_; gboolean create_new; DVBPlayerThread* player; DVBDevice* free_device; - gchar* _tmp12_ = NULL; - gchar* _tmp13_; - GstElement* _tmp25_; - GstElement* _tmp26_ = NULL; - GstElement* _tmp27_; + DVBLoggingLogger* _tmp28_; + gboolean _tmp29_; + gchar* _tmp30_ = NULL; + gchar* _tmp31_; + gboolean _tmp32_; + DVBPlayerThread* _tmp59_; + DVBChannel* _tmp60_; + GstElement* _tmp61_; + GstElement* _tmp62_; + gboolean _tmp63_; + DVBForcedStopNotify _tmp64_; + void* _tmp64__target; + GstElement* _tmp65_ = NULL; + GstElement* _tmp66_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (channel != NULL, NULL); g_return_val_if_fail (sink_element != NULL, NULL); - _tmp0_ = dvb_channel_get_Name (channel); - _tmp1_ = dvb_channel_get_Sid (channel); - g_debug ("ChannelFactory.vala:563: Watching channel %s (%u)", _tmp0_, _tmp1_); + _tmp0_ = dvb_channel_factory_log; + _tmp1_ = channel; + _tmp2_ = dvb_channel_get_Name (_tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = channel; + _tmp5_ = dvb_channel_get_Sid (_tmp4_); + _tmp6_ = _tmp5_; + dvb_logging_logger_debug (_tmp0_, "ChannelFactory.vala:568: Watching channel %s (%u)", _tmp3_, _tmp6_); create_new = TRUE; player = NULL; free_device = NULL; { + GeeHashSet* _tmp7_; + _tmp7_ = self->priv->active_players; g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _tmp2_ = NULL; - GeeIterator* _active_player_it; - _tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - _active_player_it = _tmp2_; - while (TRUE) { - gboolean _tmp3_; - gpointer _tmp4_ = NULL; - DVBPlayerThread* active_player; - _tmp3_ = gee_iterator_next (_active_player_it); - if (!_tmp3_) { - break; - } - _tmp4_ = gee_iterator_get (_active_player_it); - active_player = (DVBPlayerThread*) _tmp4_; - { - GeeHashSet* _tmp5_ = NULL; - GeeIterator* _tmp6_ = NULL; - GeeIterator* _other_channel_it; - _tmp5_ = dvb_player_thread_get_active_channels (active_player); - _tmp6_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp5_); - _other_channel_it = _tmp6_; - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - DVBChannel* other_channel; - gboolean _tmp9_; - _tmp7_ = gee_iterator_next (_other_channel_it); - if (!_tmp7_) { - break; - } - _tmp8_ = gee_iterator_get (_other_channel_it); - other_channel = (DVBChannel*) _tmp8_; - _tmp9_ = dvb_channel_on_same_transport_stream (channel, other_channel); - if (_tmp9_) { - DVBPlayerThread* _tmp10_; - DVBPlayerThread* _tmp11_; - create_new = FALSE; - _tmp10_ = _g_object_ref0 (active_player); - _tmp11_ = _tmp10_; - _g_object_unref0 (player); - player = _tmp11_; + { + GeeHashSet* _tmp8_; + GeeIterator* _tmp9_ = NULL; + GeeIterator* _active_player_it; + _tmp8_ = self->priv->active_players; + _tmp9_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp8_); + _active_player_it = _tmp9_; + while (TRUE) { + GeeIterator* _tmp10_; + gboolean _tmp11_ = FALSE; + GeeIterator* _tmp12_; + gpointer _tmp13_ = NULL; + DVBPlayerThread* active_player; + _tmp10_ = _active_player_it; + _tmp11_ = gee_iterator_next (_tmp10_); + if (!_tmp11_) { + break; + } + _tmp12_ = _active_player_it; + _tmp13_ = gee_iterator_get (_tmp12_); + active_player = (DVBPlayerThread*) _tmp13_; + { + DVBPlayerThread* _tmp14_; + GeeHashSet* _tmp15_; + GeeHashSet* _tmp16_; + GeeIterator* _tmp17_ = NULL; + GeeIterator* _other_channel_it; + _tmp14_ = active_player; + _tmp15_ = dvb_player_thread_get_active_channels (_tmp14_); + _tmp16_ = _tmp15_; + _tmp17_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp16_); + _other_channel_it = _tmp17_; + while (TRUE) { + GeeIterator* _tmp18_; + gboolean _tmp19_ = FALSE; + GeeIterator* _tmp20_; + gpointer _tmp21_ = NULL; + DVBChannel* other_channel; + DVBChannel* _tmp22_; + DVBChannel* _tmp23_; + gboolean _tmp24_ = FALSE; + _tmp18_ = _other_channel_it; + _tmp19_ = gee_iterator_next (_tmp18_); + if (!_tmp19_) { + break; + } + _tmp20_ = _other_channel_it; + _tmp21_ = gee_iterator_get (_tmp20_); + other_channel = (DVBChannel*) _tmp21_; + _tmp22_ = channel; + _tmp23_ = other_channel; + _tmp24_ = dvb_channel_on_same_transport_stream (_tmp22_, _tmp23_); + if (_tmp24_) { + DVBPlayerThread* _tmp25_; + DVBPlayerThread* _tmp26_; + create_new = FALSE; + _tmp25_ = active_player; + _tmp26_ = _g_object_ref0 (_tmp25_); + _g_object_unref0 (player); + player = _tmp26_; + _g_object_unref0 (other_channel); + break; + } _g_object_unref0 (other_channel); - break; } - _g_object_unref0 (other_channel); + _g_object_unref0 (_other_channel_it); } - _g_object_unref0 (_other_channel_it); + _g_object_unref0 (active_player); } - _g_object_unref0 (active_player); + _g_object_unref0 (_active_player_it); } - _g_object_unref0 (_active_player_it); } __finally29: - g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + { + GeeHashSet* _tmp27_; + _tmp27_ = self->priv->active_players; + g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + } if (_inner_error_ != NULL) { _g_object_unref0 (free_device); _g_object_unref0 (player); @@ -2007,61 +2855,95 @@ return NULL; } } - _tmp12_ = bool_to_string (create_new); - _tmp13_ = _tmp12_; - g_debug ("ChannelFactory.vala:580: Creating new PlayerThread: %s", _tmp13_); - _g_free0 (_tmp13_); - if (create_new) { - DVBDevice* _tmp14_ = NULL; - DVBDevice* _tmp15_; - gboolean _tmp16_ = FALSE; - DVBPlayerThread* _tmp23_ = NULL; - DVBPlayerThread* _tmp24_; - dvb_device_group_stop_epg_scanner (self->priv->_device_group); - _tmp14_ = dvb_device_group_get_next_free_device (self->priv->_device_group); - _tmp15_ = _tmp14_; + _tmp28_ = dvb_channel_factory_log; + _tmp29_ = create_new; + _tmp30_ = bool_to_string (_tmp29_); + _tmp31_ = _tmp30_; + dvb_logging_logger_debug (_tmp28_, "ChannelFactory.vala:585: Creating new PlayerThread: %s", _tmp31_); + _g_free0 (_tmp31_); + _tmp32_ = create_new; + if (_tmp32_) { + DVBDeviceGroup* _tmp33_; + DVBDeviceGroup* _tmp34_; + DVBDevice* _tmp35_ = NULL; + gboolean _tmp36_ = FALSE; + DVBDevice* _tmp37_; + gboolean _tmp39_; + DVBDevice* _tmp55_; + DVBDevice* _tmp57_; + DVBPlayerThread* _tmp58_ = NULL; + _tmp33_ = self->priv->_device_group; + dvb_device_group_stop_epg_scanner (_tmp33_); + _tmp34_ = self->priv->_device_group; + _tmp35_ = dvb_device_group_get_next_free_device (_tmp34_); _g_object_unref0 (free_device); - free_device = _tmp15_; - if (free_device == NULL) { - _tmp16_ = force; + free_device = _tmp35_; + _tmp37_ = free_device; + if (_tmp37_ == NULL) { + gboolean _tmp38_; + _tmp38_ = force; + _tmp36_ = _tmp38_; } else { - _tmp16_ = FALSE; + _tmp36_ = FALSE; } - if (_tmp16_) { - DVBDevice* _tmp21_ = NULL; - DVBDevice* _tmp22_; + _tmp39_ = _tmp36_; + if (_tmp39_) { + DVBDeviceGroup* _tmp53_; + DVBDevice* _tmp54_ = NULL; { + GeeHashSet* _tmp40_; + _tmp40_ = self->priv->active_players; g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _tmp17_ = NULL; - GeeIterator* _active_player_it; - _tmp17_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - _active_player_it = _tmp17_; - while (TRUE) { - gboolean _tmp18_; - gpointer _tmp19_ = NULL; - DVBPlayerThread* active_player; - gboolean _tmp20_; - _tmp18_ = gee_iterator_next (_active_player_it); - if (!_tmp18_) { - break; - } - _tmp19_ = gee_iterator_get (_active_player_it); - active_player = (DVBPlayerThread*) _tmp19_; - _tmp20_ = dvb_player_thread_get_forced (active_player); - if (!_tmp20_) { - dvb_player_thread_destroy (active_player, TRUE); + { + GeeHashSet* _tmp41_; + GeeIterator* _tmp42_ = NULL; + GeeIterator* _active_player_it; + _tmp41_ = self->priv->active_players; + _tmp42_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp41_); + _active_player_it = _tmp42_; + while (TRUE) { + GeeIterator* _tmp43_; + gboolean _tmp44_ = FALSE; + GeeIterator* _tmp45_; + gpointer _tmp46_ = NULL; + DVBPlayerThread* active_player; + DVBPlayerThread* _tmp47_; + gboolean _tmp48_; + gboolean _tmp49_; + _tmp43_ = _active_player_it; + _tmp44_ = gee_iterator_next (_tmp43_); + if (!_tmp44_) { + break; + } + _tmp45_ = _active_player_it; + _tmp46_ = gee_iterator_get (_tmp45_); + active_player = (DVBPlayerThread*) _tmp46_; + _tmp47_ = active_player; + _tmp48_ = dvb_player_thread_get_forced (_tmp47_); + _tmp49_ = _tmp48_; + if (!_tmp49_) { + DVBPlayerThread* _tmp50_; + _tmp50_ = active_player; + dvb_player_thread_destroy (_tmp50_, TRUE); + _g_object_unref0 (active_player); + break; + } else { + DVBLoggingLogger* _tmp51_; + _tmp51_ = dvb_channel_factory_log; + dvb_logging_logger_error (_tmp51_, "ChannelFactory.vala:599: No active players that are not forced"); + } _g_object_unref0 (active_player); - break; - } else { - g_critical ("ChannelFactory.vala:594: No active players that are not forced"); } - _g_object_unref0 (active_player); + _g_object_unref0 (_active_player_it); } - _g_object_unref0 (_active_player_it); } __finally30: - g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + { + GeeHashSet* _tmp52_; + _tmp52_ = self->priv->active_players; + g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + } if (_inner_error_ != NULL) { _g_object_unref0 (free_device); _g_object_unref0 (player); @@ -2071,33 +2953,54 @@ return NULL; } } - _tmp21_ = dvb_device_group_get_next_free_device (self->priv->_device_group); - _tmp22_ = _tmp21_; + _tmp53_ = self->priv->_device_group; + _tmp54_ = dvb_device_group_get_next_free_device (_tmp53_); _g_object_unref0 (free_device); - free_device = _tmp22_; + free_device = _tmp54_; } - if (free_device == NULL) { - g_message ("ChannelFactory.vala:601: All devices are busy"); + _tmp55_ = free_device; + if (_tmp55_ == NULL) { + DVBLoggingLogger* _tmp56_; + _tmp56_ = dvb_channel_factory_log; + dvb_logging_logger_info (_tmp56_, "ChannelFactory.vala:606: All devices are busy"); result = NULL; _g_object_unref0 (free_device); _g_object_unref0 (player); _gst_object_unref0 (sink_element); return result; } - _tmp23_ = dvb_channel_factory_create_player (self, free_device); - _tmp24_ = _tmp23_; + _tmp57_ = free_device; + _tmp58_ = dvb_channel_factory_create_player (self, _tmp57_); _g_object_unref0 (player); - player = _tmp24_; + player = _tmp58_; } - _tmp25_ = _gst_object_ref0 (sink_element); - _tmp26_ = dvb_player_thread_get_element (player, channel, _tmp25_, force, notify_func, notify_func_target); - _tmp27_ = _tmp26_; - _gst_object_unref0 (_tmp27_); + _tmp59_ = player; + _tmp60_ = channel; + _tmp61_ = sink_element; + _tmp62_ = _gst_object_ref0 (_tmp61_); + _tmp63_ = force; + _tmp64_ = notify_func; + _tmp64__target = notify_func_target; + _tmp65_ = dvb_player_thread_get_element (_tmp59_, _tmp60_, _tmp62_, _tmp63_, _tmp64_, _tmp64__target); + _tmp66_ = _tmp65_; + _gst_object_unref0 (_tmp66_); { + GeeHashSet* _tmp67_; + _tmp67_ = self->priv->active_players; g_static_rec_mutex_lock (&self->priv->__lock_active_players); - gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->active_players, player); + { + GeeHashSet* _tmp68_; + DVBPlayerThread* _tmp69_; + _tmp68_ = self->priv->active_players; + _tmp69_ = player; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp68_, _tmp69_); + } __finally31: - g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + { + GeeHashSet* _tmp70_; + _tmp70_ = self->priv->active_players; + g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + } if (_inner_error_ != NULL) { _g_object_unref0 (free_device); _g_object_unref0 (player); @@ -2121,77 +3024,133 @@ */ gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink) { gboolean result = FALSE; - const gchar* _tmp0_ = NULL; - guint _tmp1_; + DVBLoggingLogger* _tmp0_; + DVBChannel* _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; + DVBChannel* _tmp4_; + guint _tmp5_; + guint _tmp6_; gboolean success; DVBPlayerThread* player; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (channel != NULL, FALSE); g_return_val_if_fail (sink != NULL, FALSE); - _tmp0_ = dvb_channel_get_Name (channel); - _tmp1_ = dvb_channel_get_Sid (channel); - g_debug ("ChannelFactory.vala:622: Stopping channel %s (%u)", _tmp0_, _tmp1_); + _tmp0_ = dvb_channel_factory_log; + _tmp1_ = channel; + _tmp2_ = dvb_channel_get_Name (_tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = channel; + _tmp5_ = dvb_channel_get_Sid (_tmp4_); + _tmp6_ = _tmp5_; + dvb_logging_logger_debug (_tmp0_, "ChannelFactory.vala:627: Stopping channel %s (%u)", _tmp3_, _tmp6_); success = FALSE; player = NULL; { - gboolean _tmp10_ = FALSE; - gint _tmp13_; + GeeHashSet* _tmp7_; + _tmp7_ = self->priv->active_players; g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _tmp2_ = NULL; - GeeIterator* _active_player_it; - _tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - _active_player_it = _tmp2_; - while (TRUE) { - gboolean _tmp3_; - gpointer _tmp4_ = NULL; - DVBPlayerThread* active_player; - GeeHashSet* _tmp5_ = NULL; - gboolean _tmp6_; - _tmp3_ = gee_iterator_next (_active_player_it); - if (!_tmp3_) { - break; - } - _tmp4_ = gee_iterator_get (_active_player_it); - active_player = (DVBPlayerThread*) _tmp4_; - _tmp5_ = dvb_player_thread_get_active_channels (active_player); - _tmp6_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp5_, channel); - if (_tmp6_) { - gboolean _tmp7_; - DVBPlayerThread* _tmp8_; - DVBPlayerThread* _tmp9_; - _tmp7_ = dvb_player_thread_remove_channel (active_player, channel, sink); - success = _tmp7_; - _tmp8_ = _g_object_ref0 (active_player); - _tmp9_ = _tmp8_; - _g_object_unref0 (player); - player = _tmp9_; + gboolean _tmp25_ = FALSE; + gboolean _tmp26_; + gboolean _tmp32_; + GeeHashSet* _tmp35_; + gint _tmp36_; + gint _tmp37_; + { + GeeHashSet* _tmp8_; + GeeIterator* _tmp9_ = NULL; + GeeIterator* _active_player_it; + _tmp8_ = self->priv->active_players; + _tmp9_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp8_); + _active_player_it = _tmp9_; + while (TRUE) { + GeeIterator* _tmp10_; + gboolean _tmp11_ = FALSE; + GeeIterator* _tmp12_; + gpointer _tmp13_ = NULL; + DVBPlayerThread* active_player; + DVBPlayerThread* _tmp14_; + GeeHashSet* _tmp15_; + GeeHashSet* _tmp16_; + DVBChannel* _tmp17_; + gboolean _tmp18_ = FALSE; + _tmp10_ = _active_player_it; + _tmp11_ = gee_iterator_next (_tmp10_); + if (!_tmp11_) { + break; + } + _tmp12_ = _active_player_it; + _tmp13_ = gee_iterator_get (_tmp12_); + active_player = (DVBPlayerThread*) _tmp13_; + _tmp14_ = active_player; + _tmp15_ = dvb_player_thread_get_active_channels (_tmp14_); + _tmp16_ = _tmp15_; + _tmp17_ = channel; + _tmp18_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp16_, _tmp17_); + if (_tmp18_) { + DVBPlayerThread* _tmp19_; + DVBChannel* _tmp20_; + GstElement* _tmp21_; + gboolean _tmp22_ = FALSE; + DVBPlayerThread* _tmp23_; + DVBPlayerThread* _tmp24_; + _tmp19_ = active_player; + _tmp20_ = channel; + _tmp21_ = sink; + _tmp22_ = dvb_player_thread_remove_channel (_tmp19_, _tmp20_, _tmp21_); + success = _tmp22_; + _tmp23_ = active_player; + _tmp24_ = _g_object_ref0 (_tmp23_); + _g_object_unref0 (player); + player = _tmp24_; + _g_object_unref0 (active_player); + break; + } _g_object_unref0 (active_player); - break; } - _g_object_unref0 (active_player); + _g_object_unref0 (_active_player_it); + } + _tmp26_ = success; + if (_tmp26_) { + DVBPlayerThread* _tmp27_; + GeeHashSet* _tmp28_; + GeeHashSet* _tmp29_; + gint _tmp30_; + gint _tmp31_; + _tmp27_ = player; + _tmp28_ = dvb_player_thread_get_active_channels (_tmp27_); + _tmp29_ = _tmp28_; + _tmp30_ = gee_collection_get_size ((GeeCollection*) _tmp29_); + _tmp31_ = _tmp30_; + _tmp25_ = _tmp31_ == 0; + } else { + _tmp25_ = FALSE; + } + _tmp32_ = _tmp25_; + if (_tmp32_) { + GeeHashSet* _tmp33_; + DVBPlayerThread* _tmp34_; + _tmp33_ = self->priv->active_players; + _tmp34_ = player; + gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp33_, _tmp34_); + } + _tmp35_ = self->priv->active_players; + _tmp36_ = gee_collection_get_size ((GeeCollection*) _tmp35_); + _tmp37_ = _tmp36_; + if (_tmp37_ == 0) { + DVBDeviceGroup* _tmp38_; + _tmp38_ = self->priv->_device_group; + dvb_device_group_start_epg_scanner (_tmp38_); } - _g_object_unref0 (_active_player_it); - } - if (success) { - GeeHashSet* _tmp11_ = NULL; - gint _tmp12_; - _tmp11_ = dvb_player_thread_get_active_channels (player); - _tmp12_ = gee_collection_get_size ((GeeCollection*) _tmp11_); - _tmp10_ = _tmp12_ == 0; - } else { - _tmp10_ = FALSE; - } - if (_tmp10_) { - gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->active_players, player); - } - _tmp13_ = gee_collection_get_size ((GeeCollection*) self->priv->active_players); - if (_tmp13_ == 0) { - dvb_device_group_start_epg_scanner (self->priv->_device_group); } __finally32: - g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + { + GeeHashSet* _tmp39_; + _tmp39_ = self->priv->active_players; + g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + } if (_inner_error_ != NULL) { _g_object_unref0 (player); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2210,38 +3169,50 @@ */ static DVBPlayerThread* dvb_channel_factory_real_create_player (DVBChannelFactory* self, DVBDevice* device) { DVBPlayerThread* result = NULL; - DVBEPGScanner* _tmp0_ = NULL; - DVBPlayerThread* _tmp1_ = NULL; - g_return_val_if_fail (self != NULL, NULL); + DVBDevice* _tmp0_; + DVBDeviceGroup* _tmp1_; + DVBEPGScanner* _tmp2_; + DVBEPGScanner* _tmp3_; + DVBPlayerThread* _tmp4_; g_return_val_if_fail (device != NULL, NULL); - _tmp0_ = dvb_device_group_get_epgscanner (self->priv->_device_group); - _tmp1_ = dvb_player_thread_new (device, _tmp0_); - result = _tmp1_; + _tmp0_ = device; + _tmp1_ = self->priv->_device_group; + _tmp2_ = dvb_device_group_get_epgscanner (_tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = dvb_player_thread_new (_tmp0_, _tmp3_); + result = _tmp4_; return result; } DVBPlayerThread* dvb_channel_factory_create_player (DVBChannelFactory* self, DVBDevice* device) { + g_return_val_if_fail (self != NULL, NULL); return DVB_CHANNEL_FACTORY_GET_CLASS (self)->create_player (self, device); } DVBDeviceGroup* dvb_channel_factory_get_device_group (DVBChannelFactory* self) { DVBDeviceGroup* result; + DVBDeviceGroup* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_device_group; + _tmp0_ = self->priv->_device_group; + result = _tmp0_; return result; } static void dvb_channel_factory_set_device_group (DVBChannelFactory* self, DVBDeviceGroup* value) { + DVBDeviceGroup* _tmp0_; g_return_if_fail (self != NULL); - self->priv->_device_group = value; + _tmp0_ = value; + self->priv->_device_group = _tmp0_; g_object_notify ((GObject *) self, "device-group"); } static void dvb_channel_factory_class_init (DVBChannelFactoryClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_channel_factory_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBChannelFactoryPrivate)); DVB_CHANNEL_FACTORY_CLASS (klass)->create_player = dvb_channel_factory_real_create_player; @@ -2249,6 +3220,9 @@ G_OBJECT_CLASS (klass)->set_property = _vala_dvb_channel_factory_set_property; G_OBJECT_CLASS (klass)->finalize = dvb_channel_factory_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_FACTORY_DEVICE_GROUP, g_param_spec_object ("device-group", "device-group", "device-group", DVB_TYPE_DEVICE_GROUP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_channel_factory_log = _tmp1_; } diff -Nru gnome-dvb-daemon-0.1.23/src/ChannelFactory.vala gnome-dvb-daemon-0.2.7/src/ChannelFactory.vala --- gnome-dvb-daemon-0.1.23/src/ChannelFactory.vala 2011-01-12 17:15:16.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ChannelFactory.vala 2011-09-29 20:27:47.000000000 +0000 @@ -19,6 +19,7 @@ using GLib; using Gee; using Gst; +using DVB.Logging; namespace DVB { @@ -26,7 +27,7 @@ /** * This class handles watching channels one physical device. - * + * * It's possible to watch multiple channels at the same time * if they are all on the same transport stream. * @@ -34,20 +35,22 @@ * and forward EPG data to #EPGScanner. */ public class PlayerThread : GLib.Object { - + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + private class ChannelElements { public uint sid; public ArrayList sinks; public Gst.Element tee; public bool forced; - public ForcedStopNotify notify_func; + public unowned ForcedStopNotify notify_func; } - /** + /** * Emitted when we came across EIT table */ public signal void eit_structure (Gst.Structure structure); - + // List of channels that are currently in use public HashSet active_channels {get; construct;} // The device in use @@ -67,19 +70,19 @@ return val; } } - + private Element? pipeline; private HashMap elements_map; private EPGScanner? epgscanner; private Element? dvbbasebin; private bool destroyed; - + construct { this.elements_map = new HashMap (); this.active_channels = new HashSet (); this.destroyed = false; } - + /** * @device: The device to use * @epgscanner: #EPGScanner to forward EIT to @@ -88,17 +91,17 @@ base (device: device); this.epgscanner = epgscanner; } - + public Gst.Element? get_pipeline () { return this.pipeline; } - + public Gst.Element? get_dvbbasebin () { return this.dvbbasebin; } - + /** - * @returns: GstBin containing queue and @sink_element + * @returns: GstBin containing queue and @sink_element * * Start watching @channel and link it with @sink_element */ @@ -112,47 +115,47 @@ lock (this.pipeline) { if (this.pipeline == null) { // New channel and new pipeline - debug ("Creating new pipeline"); + log.debug ("Creating new pipeline"); // Setup new pipeline this.pipeline = new Pipeline ("recording"); - + Gst.Bus bus = this.pipeline.get_bus(); bus.add_signal_watch(); bus.message.connect (this.bus_watch_func); - + this.dvbbasebin = ElementFactory.make ("dvbbasebin", null); if (this.dvbbasebin == null) { - critical ("Could not create dvbbasebin element"); + log.error ("Could not create dvbbasebin element"); return null; } this.dvbbasebin.pad_added.connect (this.on_dvbbasebin_pad_added); - + channel.setup_dvb_source (this.dvbbasebin); - + this.dvbbasebin.set ("program-numbers", channel_sid_str); this.dvbbasebin.set ("adapter", this.device.Adapter); this.dvbbasebin.set ("frontend", this.device.Frontend); - - // don't use add_many because of problems with ownership transfer + + // don't use add_many because of problems with ownership transfer ((Bin) this.pipeline).add (this.dvbbasebin); - + tee = ElementFactory.make ("tee", null); this.add_element (tee); - + bin = this.add_sink_bin (sink_element); if (!tee.link (bin)) { - critical ("Could not link tee and bin"); + log.error ("Could not link tee and bin"); return null; } - + create_channel = true; - + } else { // Use current pipeline and add new sink - debug ("Reusing existing pipeline"); + log.debug ("Reusing existing pipeline"); if (this.dvbbasebin == null) { - critical ("No dvbbasebin element"); + log.error ("No dvbbasebin element"); return null; } @@ -160,25 +163,25 @@ if (!this.active_channels.contains (channel)) { // existing pipeline and new channel - + tee = ElementFactory.make ("tee", null); this.add_element (tee); - + bin = this.add_sink_bin (sink_element); if (!tee.link (bin)) { - critical ("Could not link tee and bin"); + log.error ("Could not link tee and bin"); return null; } string programs; dvbbasebin.get ("program-numbers", out programs); - + string new_programs = "%s:%s".printf (programs, channel_sid_str); - debug ("Changing program-numbers from %s to %s", programs, + log.debug ("Changing program-numbers from %s to %s", programs, new_programs); this.dvbbasebin.set ("program-numbers", new_programs); - + create_channel = true; } else { // existing pipeline and existing channel @@ -188,11 +191,11 @@ tee = c_element.tee; - bin = this.add_sink_bin (sink_element); + bin = this.add_sink_bin (sink_element); - debug ("Linking %s with %s", tee.get_name (), bin.get_name ()); + log.debug ("Linking %s with %s", tee.get_name (), bin.get_name ()); if (!tee.link (bin)) { - critical ("Could not link tee and bin"); + log.error ("Could not link tee and bin"); return null; } @@ -201,7 +204,7 @@ create_channel = false; } } - + if (create_channel) { ChannelElements celems = new ChannelElements (); celems.sid = channel_sid; @@ -216,33 +219,33 @@ } this.active_channels.add (channel); } - + return bin; } } - + private Gst.Element add_sink_bin (Gst.Element sink_element) { Element queue = ElementFactory.make ("queue", null); queue.set ("max-size-buffers", 0); - + Gst.Element bin = new Gst.Bin (null); ((Gst.Bin)bin).add_many (queue, sink_element); if (!queue.link (sink_element)) { - critical ("Could not link elements %s and %s", queue.get_name (), + log.error ("Could not link elements %s and %s", queue.get_name (), sink_element.get_name ()); } - + var pad = queue.get_static_pad ("sink"); var ghost = new Gst.GhostPad ("sink", pad); ghost.set_active (true); bin.add_pad (ghost); /* src pad is ghosted by gst-rtsp-server */ - + this.add_element (bin); return bin; } - + private static int find_element (void* av, void *bv) { Gst.Element a = (Gst.Element)av; Gst.Element b = (Gst.Element)bv; @@ -258,7 +261,7 @@ public Gst.Element? get_sink_bin (uint sid, Gst.Element sink) { Gst.Element? result = null; - debug ("Searching for sink %s (%p) of channel %u", sink.get_name (), sink, sid); + log.debug ("Searching for sink %s (%p) of channel %u", sink.get_name (), sink, sid); lock (this.elements_map) { ChannelElements? celems = this.elements_map.get (sid); if (celems != null) { @@ -275,12 +278,12 @@ } } if (result == null) - debug ("Found NO sink"); + log.debug ("Found NO sink"); else - debug ("Found sink"); + log.debug ("Found sink"); return result; } - + /** * Stop watching @channel */ @@ -288,7 +291,7 @@ uint channel_sid = channel.Sid; if (!this.active_channels.contains (channel)) { - critical ("Could not find channel with SID %u", channel_sid); + log.error ("Could not find channel with SID %u", channel_sid); return false; } @@ -307,10 +310,10 @@ lock (this.pipeline) { // Check if that's the only channel in use if (this.active_channels.size > 1) { - + if (stop_channel) { string channel_sid_string = channel_sid.to_string (); - + string programs; dvbbasebin.get ("program-numbers", out programs); string[] programs_arr = programs.split (":"); @@ -327,7 +330,7 @@ new_programs.append (":" + new_programs_list.get (i)); } - debug ("Changing program-numbers from %s to %s", programs, + log.debug ("Changing program-numbers from %s to %s", programs, new_programs.str); this.pipeline.set_state (State.PAUSED); @@ -340,9 +343,9 @@ this.remove_sink_bin (channel_sid, sink); - if (stop_channel) { + if (stop_channel) { /* No one watches the channel anymore */ - debug ("Removing tee %s from pipeline", + log.debug ("Removing tee %s from pipeline", celements.tee.get_name ()); celements.tee.set_state (State.NULL); ((Bin)this.pipeline).remove (celements.tee); @@ -373,21 +376,21 @@ private bool set_playing_or_destroy () { Gst.StateChangeReturn ret = this.pipeline.set_state (State.PLAYING); if (ret == Gst.StateChangeReturn.FAILURE) { - critical ("Failed setting pipeline to playing"); + log.error ("Failed setting pipeline to playing"); this.destroy (); return false; } return true; } - + private void remove_sink_bin (uint channel_sid, Gst.Element sink) { - debug ("Removing sink bin of sink %s (%p) of channel %u", + log.debug ("Removing sink bin of sink %s (%p) of channel %u", sink.get_name (), sink, channel_sid); - + Gst.Element? sink_bin = this.get_sink_bin (channel_sid, sink); if (sink_bin == null) { - critical ("Could not find sink bin for channel %u and sink %s (%p)", + log.error ("Could not find sink bin for channel %u and sink %s (%p)", channel_sid, sink.get_name (), sink); return; } @@ -395,21 +398,21 @@ lock (this.elements_map) { ChannelElements celems = this.elements_map.get (channel_sid); - debug ("Setting state of queue and sink %s (%p) to NULL", + log.debug ("Setting state of queue and sink %s (%p) to NULL", sink.get_name (), sink); celems.tee.unlink (sink_bin); sink_bin.set_state (State.NULL); - + if (!celems.sinks.remove (sink_bin)) { - critical ("Could not find sink bin %s (%p)", + log.error ("Could not find sink bin %s (%p)", sink_bin.get_name (), sink_bin); } } - debug ("Removing queue and sink from pipeline"); + log.debug ("Removing queue and sink from pipeline"); ((Bin)this.pipeline).remove (sink_bin); } - + /** * Stop pipeline and clean up everything else */ @@ -431,7 +434,7 @@ lock (this.pipeline) { if (this.pipeline != null) { - debug ("Stopping pipeline"); + log.debug ("Stopping pipeline"); Gst.Bus bus = this.pipeline.get_bus (); bus.remove_signal_watch (); this.pipeline.set_state (State.NULL); @@ -448,51 +451,51 @@ private bool add_element (owned Gst.Element elem) { string elem_name = elem.get_name (); if (!((Bin) this.pipeline).add (elem)) { - critical ("Could not add element %s", elem_name); + log.error ("Could not add element %s", elem_name); return false; } - debug ("Element %s (%p) added to pipeline", elem_name, elem); + log.debug ("Element %s (%p) added to pipeline", elem_name, elem); return true; } - + /** * Link program_%d pad with tee */ private void on_dvbbasebin_pad_added (Gst.Element elem, Gst.Pad pad) { string pad_name = pad.get_name(); - debug ("Pad %s added", pad_name); - + log.debug ("Pad %s added", pad_name); + if (!pad_name.has_prefix ("program_")) return; - + uint sid; pad_name.scanf("program_%u", out sid); - - debug ("SID is '%u'", sid); + + log.debug ("SID is '%u'", sid); // Check if we're interested in the pad lock (this.elements_map) { if (this.elements_map.has_key (sid)) { Element? sink = this.elements_map.get (sid).tee; if (sink == null) { - critical ("Could not find sink for SID %u", sid); + log.error ("Could not find sink for SID %u", sid); return; } - - debug ("Linking elements %s and %s", elem.get_name(), sink.get_name ()); + + log.debug ("Linking elements %s and %s", elem.get_name(), sink.get_name ()); Pad sinkpad = sink.get_static_pad ("sink"); - + PadLinkReturn rc = pad.link (sinkpad); if (rc != PadLinkReturn.OK) { - critical ("Could not link pads %s and %s", pad.get_name (), + log.error ("Could not link pads %s and %s", pad.get_name (), sinkpad.get_name ()); } else { - debug ("Src pad %s linked with sink pad %s", + log.debug ("Src pad %s linked with sink pad %s", pad.get_name (), sinkpad.get_name ()); } } } } - + /** * Forward EIT structure */ @@ -511,7 +514,7 @@ warning ("%s", structure.to_string ()); break; case Gst.MessageType.ERROR: - critical ("%s", structure.to_string ()); + log.error ("%s", structure.to_string ()); break; default: break; @@ -523,18 +526,20 @@ * This class handles watching channels for a single #DeviceGroup */ public class ChannelFactory : GLib.Object { - + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + // The device group the factory belongs to public unowned DeviceGroup device_group {get; construct;} - + // List of players that are currently in use private HashSet active_players; - + public ChannelFactory (DeviceGroup devgroup) { base (device_group: devgroup); this.active_players = new HashSet (); } - + /** * Stop all currently active players */ @@ -560,8 +565,8 @@ */ public PlayerThread? watch_channel (Channel channel, owned Gst.Element sink_element, bool force=false, ForcedStopNotify? notify_func = null) { - debug ("Watching channel %s (%u)", channel.Name, channel.Sid); - + log.debug ("Watching channel %s (%u)", channel.Name, channel.Sid); + bool create_new = true; PlayerThread? player = null; DVB.Device? free_device = null; @@ -576,8 +581,8 @@ } } } - - debug ("Creating new PlayerThread: %s", create_new.to_string ()); + + log.debug ("Creating new PlayerThread: %s", create_new.to_string ()); if (create_new) { // Stop epgscanner before starting recording this.device_group.stop_epg_scanner (); @@ -591,14 +596,14 @@ active_player.destroy (true); break; } else { - critical ("No active players that are not forced"); + log.error ("No active players that are not forced"); } } } free_device = this.device_group.get_next_free_device (); } if (free_device == null) { - message ("All devices are busy"); + log.info ("All devices are busy"); return null; } @@ -612,14 +617,14 @@ return player; } - + /** * @returns: TRUE on success * * Stop watching @channel */ public bool stop_channel (Channel channel, Gst.Element sink) { - debug ("Stopping channel %s (%u)", channel.Name, channel.Sid); + log.debug ("Stopping channel %s (%u)", channel.Name, channel.Sid); bool success = false; PlayerThread? player = null; @@ -631,10 +636,10 @@ break; } } - + if (success && player.active_channels.size == 0) this.active_players.remove (player); - + if (this.active_players.size == 0) { // Start EPG scanner again this.device_group.start_epg_scanner (); @@ -643,14 +648,14 @@ return success; } - + /** * @returns: a new #PlayerThread instance for @device */ public virtual PlayerThread create_player (Device device) { return new PlayerThread (device, this.device_group.epgscanner); } - + } } diff -Nru gnome-dvb-daemon-0.1.23/src/ChannelGroup.c gnome-dvb-daemon-0.2.7/src/ChannelGroup.c --- gnome-dvb-daemon-0.1.23/src/ChannelGroup.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ChannelGroup.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelGroup.c generated by valac 0.11.3, the Vala compiler +/* ChannelGroup.c generated by valac 0.14.0, the Vala compiler * generated from ChannelGroup.vala, do not modify */ /* @@ -75,10 +75,14 @@ DVBChannelGroup* dvb_channel_group_construct (GType object_type, gint id, const gchar* name) { DVBChannelGroup * self = NULL; + gint _tmp0_; + const gchar* _tmp1_; g_return_val_if_fail (name != NULL, NULL); self = (DVBChannelGroup*) g_object_new (object_type, NULL); - dvb_channel_group_set_id (self, id); - dvb_channel_group_set_name (self, name); + _tmp0_ = id; + dvb_channel_group_set_id (self, _tmp0_); + _tmp1_ = name; + dvb_channel_group_set_name (self, _tmp1_); return self; } @@ -90,33 +94,39 @@ gint dvb_channel_group_get_id (DVBChannelGroup* self) { gint result; + gint _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_id; + _tmp0_ = self->priv->_id; + result = _tmp0_; return result; } void dvb_channel_group_set_id (DVBChannelGroup* self, gint value) { + gint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_id = value; + _tmp0_ = value; + self->priv->_id = _tmp0_; g_object_notify ((GObject *) self, "id"); } const gchar* dvb_channel_group_get_name (DVBChannelGroup* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_name; + _tmp0_ = self->priv->_name; + result = _tmp0_; return result; } void dvb_channel_group_set_name (DVBChannelGroup* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_name); self->priv->_name = _tmp1_; g_object_notify ((GObject *) self, "name"); diff -Nru gnome-dvb-daemon-0.1.23/src/ChannelList.c gnome-dvb-daemon-0.2.7/src/ChannelList.c --- gnome-dvb-daemon-0.1.23/src/ChannelList.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ChannelList.c 2011-09-29 19:59:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelList.c generated by valac 0.11.3, the Vala compiler +/* ChannelList.c generated by valac 0.14.0, the Vala compiler * generated from ChannelList.vala, do not modify */ /* @@ -23,12 +23,9 @@ #include #include #include -#include -#include +#include #include #include -#include -#include #define DVB_TYPE_ID_BUS_CHANNEL_LIST (dvb_id_bus_channel_list_get_type ()) @@ -39,6 +36,8 @@ typedef struct _DVBIDBusChannelList DVBIDBusChannelList; typedef struct _DVBIDBusChannelListIface DVBIDBusChannelListIface; +#define DVB_TYPE_ID_BUS_CHANNEL_LIST_PROXY (dvb_id_bus_channel_list_proxy_get_type ()) + #define DVB_TYPE_CHANNEL_INFO (dvb_channel_info_get_type ()) typedef struct _DVBChannelInfo DVBChannelInfo; @@ -62,7 +61,26 @@ typedef struct _DVBChannel DVBChannel; typedef struct _DVBChannelClass DVBChannelClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) @@ -79,6 +97,16 @@ #define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + #define DVB_DATABASE_TYPE_CONFIG_STORE (dvb_database_config_store_get_type ()) #define DVB_DATABASE_CONFIG_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_CONFIG_STORE, DVBdatabaseConfigStore)) #define DVB_DATABASE_IS_CONFIG_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_TYPE_CONFIG_STORE)) @@ -155,10 +183,6 @@ GStaticRecMutex __lock_channels; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - typedef enum { DVB_ADAPTER_TYPE_UNKNOWN, DVB_ADAPTER_TYPE_DVB_T, @@ -214,10 +238,13 @@ static gpointer dvb_channel_list_parent_class = NULL; +static DVBLoggingLogger* dvb_channel_list_log; +static DVBLoggingLogger* dvb_channel_list_log = NULL; static GeeIterableIface* dvb_channel_list_gee_iterable_parent_iface = NULL; static DVBIDBusChannelListIface* dvb_channel_list_dvb_id_bus_channel_list_parent_iface = NULL; -DVBIDBusChannelList* dvb_id_bus_channel_list_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_channel_list_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_channel_list_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_channel_info_get_type (void) G_GNUC_CONST; DVBChannelInfo* dvb_channel_info_dup (const DVBChannelInfo* self); void dvb_channel_info_free (DVBChannelInfo* self); @@ -234,12 +261,10 @@ DVB_CHANNEL_LIST_SIZE, DVB_CHANNEL_LIST_ELEMENT_TYPE }; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_channel_list_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_channel_list_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_channel_list_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_channel_list_introspect (DVBChannelList* self, DBusConnection* connection, DBusMessage* message); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBChannelList* dvb_channel_list_new (GFile* channels); DVBChannelList* dvb_channel_list_construct (GType object_type, GFile* channels); DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); @@ -271,14 +296,18 @@ static DVBChannelInfo* dvb_channel_list_real_GetChannelInfos (DVBIDBusChannelList* base, int* result_length1, GError** error); static void _vala_DVBChannelInfo_array_free (DVBChannelInfo* array, gint array_length); static gboolean dvb_channel_list_real_GetChannelsOfGroup (DVBIDBusChannelList* base, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; GType dvb_device_group_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); GType dvb_device_get_type (void) G_GNUC_CONST; GType dvb_channel_group_get_type (void) G_GNUC_CONST; GType dvb_database_config_store_get_type (void) G_GNUC_CONST; -DVBdatabaseConfigStore* dvb_factory_get_config_store (void); +DVBdatabaseConfigStore* dvb_factory_get_config_store (DVBFactory* self); GeeList* dvb_database_config_store_get_channels_of_group (DVBdatabaseConfigStore* self, guint dev_group_id, gint channel_group_id, GError** error); guint dvb_channel_list_get_GroupId (DVBChannelList* self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); static gboolean dvb_channel_list_real_AddChannelToGroup (DVBIDBusChannelList* base, guint channel_id, gint channel_group_id, GError** error); gboolean dvb_database_config_store_add_channel_to_group (DVBdatabaseConfigStore* self, DVBChannel* channel, gint group_id, GError** error); static gboolean dvb_channel_list_real_RemoveChannelFromGroup (DVBIDBusChannelList* base, guint channel_id, gint channel_group_id, GError** error); @@ -291,89 +320,12 @@ static void _vala_dvb_channel_list_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void _vala_dvb_channel_list_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static const DBusObjectPathVTable _dvb_channel_list_dbus_path_vtable = {_dvb_channel_list_dbus_unregister, dvb_channel_list_dbus_message}; -static const _DBusObjectVTable _dvb_channel_list_dbus_vtable = {dvb_channel_list_dbus_register_object}; - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_channel_list_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_channel_list_introspect (DVBChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_channel_list_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_channel_list_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_channel_list_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_channel_list_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_channel_list_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - dvb_id_bus_channel_list_dbus_register_object (connection, path, object); -} - DVBChannelList* dvb_channel_list_construct (GType object_type, GFile* channels) { DVBChannelList * self = NULL; - self = (DVBChannelList*) g_object_new (object_type, "channels-file", channels, NULL); + GFile* _tmp0_; + _tmp0_ = channels; + self = (DVBChannelList*) g_object_new (object_type, "channels-file", _tmp0_, NULL); return self; } @@ -390,19 +342,33 @@ g_return_val_if_fail (self != NULL, NULL); val = NULL; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBChannel* _tmp2_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid)); - _tmp2_ = (DVBChannel*) _tmp1_; - _g_object_unref0 (val); - val = _tmp2_; + { + GeeHashMap* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->channels; + _tmp2_ = sid; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint _tmp5_; + gpointer _tmp6_ = NULL; + _tmp4_ = self->channels; + _tmp5_ = sid; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _g_object_unref0 (val); + val = (DVBChannel*) _tmp6_; + } } __finally33: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp7_; + _tmp7_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { _g_object_unref0 (val); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -420,12 +386,28 @@ g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); { - guint _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - _tmp0_ = dvb_channel_get_Sid (channel); - gee_abstract_map_set ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (_tmp0_), channel); + { + GeeHashMap* _tmp1_; + DVBChannel* _tmp2_; + guint _tmp3_; + guint _tmp4_; + DVBChannel* _tmp5_; + _tmp1_ = self->channels; + _tmp2_ = channel; + _tmp3_ = dvb_channel_get_Sid (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = channel; + gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp4_), _tmp5_); + } __finally34: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp6_; + _tmp6_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -439,10 +421,22 @@ GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); { + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - gee_abstract_map_unset ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid), NULL); + { + GeeHashMap* _tmp1_; + guint _tmp2_; + _tmp1_ = self->channels; + _tmp2_ = sid; + gee_abstract_map_unset ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_), NULL); + } __finally35: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp3_; + _tmp3_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -458,12 +452,24 @@ GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid)); - val = _tmp0_; + { + GeeHashMap* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->channels; + _tmp2_ = sid; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + val = _tmp3_; + } __finally36: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp4_; + _tmp4_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -479,10 +485,20 @@ GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); { + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - gee_abstract_map_clear ((GeeAbstractMap*) self->channels); + { + GeeHashMap* _tmp1_; + _tmp1_ = self->channels; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp1_); + } __finally37: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp2_; + _tmp2_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -495,26 +511,34 @@ static GeeIterator* dvb_channel_list_real_iterator (GeeIterable* base) { DVBChannelList * self; GeeIterator* result = NULL; - GeeCollection* _tmp0_ = NULL; + GeeHashMap* _tmp0_; GeeCollection* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; + GeeCollection* _tmp2_; + GeeCollection* _tmp3_; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_; self = (DVBChannelList*) base; - _tmp0_ = gee_map_get_values ((GeeMap*) self->channels); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - result = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); + _tmp0_ = self->channels; + _tmp1_ = gee_map_get_values ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = _tmp2_; + _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_); + _tmp5_ = _tmp4_; + _g_object_unref0 (_tmp3_); + result = _tmp5_; return result; } void dvb_channel_list_load (DVBChannelList* self, DVBAdapterType type, GError** error) { - DVBioChannelListReader* _tmp0_ = NULL; + DVBAdapterType _tmp0_; + DVBioChannelListReader* _tmp1_; DVBioChannelListReader* reader; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _tmp0_ = dvb_io_channel_list_reader_new (self, type); - reader = _tmp0_; + _tmp0_ = type; + _tmp1_ = dvb_io_channel_list_reader_new (self, _tmp0_); + reader = _tmp1_; dvb_io_channel_list_reader_read_into (reader, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); @@ -532,53 +556,84 @@ DVBChannelList * self; guint* result = NULL; gint _tmp0_; - guint* _tmp1_ = NULL; + gint _tmp1_; + guint* _tmp2_ = NULL; + guint* ids; gint ids_length1; gint _ids_size_; - guint* _tmp2_; - guint* ids; gint i; - guint* _tmp9_; + guint* _tmp20_; + gint _tmp20__length1; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; _tmp0_ = dvb_channel_list_get_size (self); - _tmp1_ = g_new0 (guint, _tmp0_); - _tmp2_ = _tmp1_; - ids_length1 = _tmp0_; - _ids_size_ = ids_length1; + _tmp1_ = _tmp0_; + _tmp2_ = g_new0 (guint, _tmp1_); ids = _tmp2_; + ids_length1 = _tmp1_; + _ids_size_ = ids_length1; i = 0; { + GeeHashMap* _tmp3_; + _tmp3_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp3_ = NULL; - GeeSet* _tmp4_; - GeeIterator* _tmp5_ = NULL; - GeeIterator* _tmp6_; - GeeIterator* _id_it; - _tmp3_ = gee_map_get_keys ((GeeMap*) self->channels); - _tmp4_ = _tmp3_; - _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); - _id_it = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - guint id; - _tmp7_ = gee_iterator_next (_id_it); - if (!_tmp7_) { - break; + { + GeeHashMap* _tmp4_; + GeeSet* _tmp5_; + GeeSet* _tmp6_; + GeeSet* _tmp7_; + GeeIterator* _tmp8_ = NULL; + GeeIterator* _tmp9_; + GeeIterator* _id_it; + _tmp4_ = self->channels; + _tmp5_ = gee_map_get_keys ((GeeMap*) _tmp4_); + _tmp6_ = _tmp5_; + _tmp7_ = _tmp6_; + _tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_); + _tmp9_ = _tmp8_; + _g_object_unref0 (_tmp7_); + _id_it = _tmp9_; + while (TRUE) { + GeeIterator* _tmp10_; + gboolean _tmp11_ = FALSE; + GeeIterator* _tmp12_; + gpointer _tmp13_ = NULL; + guint id; + guint* _tmp14_; + gint _tmp14__length1; + gint _tmp15_; + guint _tmp16_; + guint _tmp17_; + gint _tmp18_; + _tmp10_ = _id_it; + _tmp11_ = gee_iterator_next (_tmp10_); + if (!_tmp11_) { + break; + } + _tmp12_ = _id_it; + _tmp13_ = gee_iterator_get (_tmp12_); + id = GPOINTER_TO_UINT (_tmp13_); + _tmp14_ = ids; + _tmp14__length1 = ids_length1; + _tmp15_ = i; + _tmp16_ = id; + _tmp14_[_tmp15_] = _tmp16_; + _tmp17_ = _tmp14_[_tmp15_]; + _tmp18_ = i; + i = _tmp18_ + 1; } - _tmp8_ = gee_iterator_get (_id_it); - id = GPOINTER_TO_UINT (_tmp8_); - ids[i] = id; - i++; + _g_object_unref0 (_id_it); } - _g_object_unref0 (_id_it); } __finally38: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp19_; + _tmp19_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); ids = (g_free (ids), NULL); return NULL; @@ -590,9 +645,12 @@ } } } - _tmp9_ = ids; - *result_length1 = ids_length1; - result = _tmp9_; + _tmp20_ = ids; + _tmp20__length1 = ids_length1; + if (result_length1) { + *result_length1 = _tmp20__length1; + } + result = _tmp20_; return result; } @@ -604,55 +662,84 @@ DVBChannelList * self; guint* result = NULL; GSList* radio_channels; - guint _tmp8_; - guint* _tmp9_ = NULL; + GSList* _tmp19_; + guint _tmp20_ = 0U; + guint* _tmp21_ = NULL; + guint* ids; gint ids_length1; gint _ids_size_; - guint* _tmp10_; - guint* ids; - guint* _tmp14_; + guint* _tmp34_; + gint _tmp34__length1; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; radio_channels = NULL; { + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _id_it; - _tmp0_ = gee_map_get_keys ((GeeMap*) self->channels); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _id_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - guint id; - gpointer _tmp6_ = NULL; - DVBChannel* chan; - guint _tmp7_; - _tmp4_ = gee_iterator_next (_id_it); - if (!_tmp4_) { - break; - } - _tmp5_ = gee_iterator_get (_id_it); - id = GPOINTER_TO_UINT (_tmp5_); - _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); - chan = (DVBChannel*) _tmp6_; - _tmp7_ = dvb_channel_get_VideoPID (chan); - if (_tmp7_ == 0) { - radio_channels = g_slist_prepend (radio_channels, GUINT_TO_POINTER (id)); + { + GeeHashMap* _tmp1_; + GeeSet* _tmp2_; + GeeSet* _tmp3_; + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _id_it; + _tmp1_ = self->channels; + _tmp2_ = gee_map_get_keys ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _id_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + guint id; + GeeHashMap* _tmp11_; + guint _tmp12_; + gpointer _tmp13_ = NULL; + DVBChannel* chan; + DVBChannel* _tmp14_; + guint _tmp15_; + guint _tmp16_; + _tmp7_ = _id_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _id_it; + _tmp10_ = gee_iterator_get (_tmp9_); + id = GPOINTER_TO_UINT (_tmp10_); + _tmp11_ = self->channels; + _tmp12_ = id; + _tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, GUINT_TO_POINTER (_tmp12_)); + chan = (DVBChannel*) _tmp13_; + _tmp14_ = chan; + _tmp15_ = dvb_channel_get_VideoPID (_tmp14_); + _tmp16_ = _tmp15_; + if (_tmp16_ == ((guint) 0)) { + guint _tmp17_; + _tmp17_ = id; + radio_channels = g_slist_prepend (radio_channels, GUINT_TO_POINTER (_tmp17_)); + } + _g_object_unref0 (chan); } - _g_object_unref0 (chan); + _g_object_unref0 (_id_it); } - _g_object_unref0 (_id_it); } __finally39: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp18_; + _tmp18_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_slist_free0 (radio_channels); return NULL; @@ -665,37 +752,60 @@ } } radio_channels = g_slist_reverse (radio_channels); - _tmp8_ = g_slist_length (radio_channels); - _tmp9_ = g_new0 (guint, _tmp8_); - _tmp10_ = _tmp9_; - ids_length1 = _tmp8_; + _tmp19_ = radio_channels; + _tmp20_ = g_slist_length (_tmp19_); + _tmp21_ = g_new0 (guint, _tmp20_); + ids = _tmp21_; + ids_length1 = _tmp20_; _ids_size_ = ids_length1; - ids = _tmp10_; { gint i; i = 0; { - gboolean _tmp11_; - _tmp11_ = TRUE; + gboolean _tmp22_; + _tmp22_ = TRUE; while (TRUE) { - guint _tmp12_; - gconstpointer _tmp13_ = NULL; - if (!_tmp11_) { - i++; + gboolean _tmp23_; + gint _tmp25_; + GSList* _tmp26_; + guint _tmp27_ = 0U; + guint* _tmp28_; + gint _tmp28__length1; + gint _tmp29_; + GSList* _tmp30_; + gint _tmp31_; + gconstpointer _tmp32_ = NULL; + guint _tmp33_; + _tmp23_ = _tmp22_; + if (!_tmp23_) { + gint _tmp24_; + _tmp24_ = i; + i = _tmp24_ + 1; } - _tmp11_ = FALSE; - _tmp12_ = g_slist_length (radio_channels); - if (!(i < _tmp12_)) { + _tmp22_ = FALSE; + _tmp25_ = i; + _tmp26_ = radio_channels; + _tmp27_ = g_slist_length (_tmp26_); + if (!(((guint) _tmp25_) < _tmp27_)) { break; } - _tmp13_ = g_slist_nth_data (radio_channels, (guint) i); - ids[i] = GPOINTER_TO_UINT (_tmp13_); + _tmp28_ = ids; + _tmp28__length1 = ids_length1; + _tmp29_ = i; + _tmp30_ = radio_channels; + _tmp31_ = i; + _tmp32_ = g_slist_nth_data (_tmp30_, (guint) _tmp31_); + _tmp28_[_tmp29_] = GPOINTER_TO_UINT (_tmp32_); + _tmp33_ = _tmp28_[_tmp29_]; } } } - _tmp14_ = ids; - *result_length1 = ids_length1; - result = _tmp14_; + _tmp34_ = ids; + _tmp34__length1 = ids_length1; + if (result_length1) { + *result_length1 = _tmp34__length1; + } + result = _tmp34_; _g_slist_free0 (radio_channels); return result; } @@ -708,55 +818,82 @@ DVBChannelList * self; guint* result = NULL; GSList* video_channels; - guint _tmp8_; - guint* _tmp9_ = NULL; + GSList* _tmp18_; + guint _tmp19_ = 0U; + guint* _tmp20_ = NULL; + guint* ids; gint ids_length1; gint _ids_size_; - guint* _tmp10_; - guint* ids; - guint* _tmp14_; + guint* _tmp33_; + gint _tmp33__length1; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; video_channels = NULL; { + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _id_it; - _tmp0_ = gee_map_get_keys ((GeeMap*) self->channels); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _id_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - guint id; - gpointer _tmp6_ = NULL; - DVBChannel* chan; - gboolean _tmp7_; - _tmp4_ = gee_iterator_next (_id_it); - if (!_tmp4_) { - break; - } - _tmp5_ = gee_iterator_get (_id_it); - id = GPOINTER_TO_UINT (_tmp5_); - _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); - chan = (DVBChannel*) _tmp6_; - _tmp7_ = dvb_channel_is_radio (chan); - if (!_tmp7_) { - video_channels = g_slist_prepend (video_channels, GUINT_TO_POINTER (id)); + { + GeeHashMap* _tmp1_; + GeeSet* _tmp2_; + GeeSet* _tmp3_; + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _id_it; + _tmp1_ = self->channels; + _tmp2_ = gee_map_get_keys ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _id_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + guint id; + GeeHashMap* _tmp11_; + guint _tmp12_; + gpointer _tmp13_ = NULL; + DVBChannel* chan; + DVBChannel* _tmp14_; + gboolean _tmp15_ = FALSE; + _tmp7_ = _id_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _id_it; + _tmp10_ = gee_iterator_get (_tmp9_); + id = GPOINTER_TO_UINT (_tmp10_); + _tmp11_ = self->channels; + _tmp12_ = id; + _tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, GUINT_TO_POINTER (_tmp12_)); + chan = (DVBChannel*) _tmp13_; + _tmp14_ = chan; + _tmp15_ = dvb_channel_is_radio (_tmp14_); + if (!_tmp15_) { + guint _tmp16_; + _tmp16_ = id; + video_channels = g_slist_prepend (video_channels, GUINT_TO_POINTER (_tmp16_)); + } + _g_object_unref0 (chan); } - _g_object_unref0 (chan); + _g_object_unref0 (_id_it); } - _g_object_unref0 (_id_it); } __finally40: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp17_; + _tmp17_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_slist_free0 (video_channels); return NULL; @@ -769,37 +906,60 @@ } } video_channels = g_slist_reverse (video_channels); - _tmp8_ = g_slist_length (video_channels); - _tmp9_ = g_new0 (guint, _tmp8_); - _tmp10_ = _tmp9_; - ids_length1 = _tmp8_; + _tmp18_ = video_channels; + _tmp19_ = g_slist_length (_tmp18_); + _tmp20_ = g_new0 (guint, _tmp19_); + ids = _tmp20_; + ids_length1 = _tmp19_; _ids_size_ = ids_length1; - ids = _tmp10_; { gint i; i = 0; { - gboolean _tmp11_; - _tmp11_ = TRUE; + gboolean _tmp21_; + _tmp21_ = TRUE; while (TRUE) { - guint _tmp12_; - gconstpointer _tmp13_ = NULL; - if (!_tmp11_) { - i++; + gboolean _tmp22_; + gint _tmp24_; + GSList* _tmp25_; + guint _tmp26_ = 0U; + guint* _tmp27_; + gint _tmp27__length1; + gint _tmp28_; + GSList* _tmp29_; + gint _tmp30_; + gconstpointer _tmp31_ = NULL; + guint _tmp32_; + _tmp22_ = _tmp21_; + if (!_tmp22_) { + gint _tmp23_; + _tmp23_ = i; + i = _tmp23_ + 1; } - _tmp11_ = FALSE; - _tmp12_ = g_slist_length (video_channels); - if (!(i < _tmp12_)) { + _tmp21_ = FALSE; + _tmp24_ = i; + _tmp25_ = video_channels; + _tmp26_ = g_slist_length (_tmp25_); + if (!(((guint) _tmp24_) < _tmp26_)) { break; } - _tmp13_ = g_slist_nth_data (video_channels, (guint) i); - ids[i] = GPOINTER_TO_UINT (_tmp13_); + _tmp27_ = ids; + _tmp27__length1 = ids_length1; + _tmp28_ = i; + _tmp29_ = video_channels; + _tmp30_ = i; + _tmp31_ = g_slist_nth_data (_tmp29_, (guint) _tmp30_); + _tmp27_[_tmp28_] = GPOINTER_TO_UINT (_tmp31_); + _tmp32_ = _tmp27_[_tmp28_]; } } } - _tmp14_ = ids; - *result_length1 = ids_length1; - result = _tmp14_; + _tmp33_ = ids; + _tmp33__length1 = ids_length1; + if (result_length1) { + *result_length1 = _tmp33__length1; + } + result = _tmp33_; _g_slist_free0 (video_channels); return result; } @@ -813,54 +973,77 @@ */ static gboolean dvb_channel_list_real_GetChannelName (DVBIDBusChannelList* base, guint channel_id, gchar** channel_name, GError** error) { DVBChannelList * self; - gchar* _channel_name = NULL; + gchar* _vala_channel_name = NULL; gboolean result = FALSE; gboolean ret; gchar* _tmp0_; gchar* val; - gchar* _tmp10_; - gchar* _tmp11_; + const gchar* _tmp19_; + gchar* _tmp20_; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; ret = FALSE; _tmp0_ = g_strdup (""); val = _tmp0_; { - gboolean _tmp1_; + GeeHashMap* _tmp1_; + _tmp1_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - _tmp1_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - if (_tmp1_) { - gpointer _tmp2_ = NULL; - DVBChannel* _tmp3_; - const gchar* _tmp4_ = NULL; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* name; - const gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - _tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - _tmp3_ = (DVBChannel*) _tmp2_; - _tmp4_ = dvb_channel_get_Name (_tmp3_); - _tmp5_ = g_strdup (_tmp4_); - name = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp3_), _tmp6_); - _tmp7_ = NULL; - if (name == NULL) { - _tmp7_ = ""; - } else { - _tmp7_ = name; + { + GeeHashMap* _tmp2_; + guint _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->channels; + _tmp3_ = channel_id; + _tmp4_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, GUINT_TO_POINTER (_tmp3_)); + if (_tmp4_) { + GeeHashMap* _tmp5_; + guint _tmp6_; + gpointer _tmp7_ = NULL; + DVBChannel* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; + gchar* _tmp11_; + gchar* _tmp12_; + gchar* name; + const gchar* _tmp13_ = NULL; + const gchar* _tmp14_; + const gchar* _tmp16_; + gchar* _tmp17_; + _tmp5_ = self->channels; + _tmp6_ = channel_id; + _tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, GUINT_TO_POINTER (_tmp6_)); + _tmp8_ = (DVBChannel*) _tmp7_; + _tmp9_ = dvb_channel_get_Name (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = g_strdup (_tmp10_); + _tmp12_ = _tmp11_; + _g_object_unref0 (_tmp8_); + name = _tmp12_; + _tmp14_ = name; + if (_tmp14_ == NULL) { + _tmp13_ = ""; + } else { + const gchar* _tmp15_; + _tmp15_ = name; + _tmp13_ = _tmp15_; + } + _tmp16_ = _tmp13_; + _tmp17_ = g_strdup (_tmp16_); + _g_free0 (val); + val = _tmp17_; + ret = TRUE; + _g_free0 (name); } - _tmp8_ = g_strdup (_tmp7_); - _tmp9_ = _tmp8_; - _g_free0 (val); - val = _tmp9_; - ret = TRUE; - _g_free0 (name); } __finally41: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp18_; + _tmp18_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (val); return FALSE; @@ -872,16 +1055,16 @@ } } } - _tmp10_ = g_strdup (val); - _tmp11_ = _tmp10_; - _g_free0 (_channel_name); - _channel_name = _tmp11_; + _tmp19_ = val; + _tmp20_ = g_strdup (_tmp19_); + _g_free0 (_vala_channel_name); + _vala_channel_name = _tmp20_; result = ret; _g_free0 (val); if (channel_name) { - *channel_name = _channel_name; + *channel_name = _vala_channel_name; } else { - _g_free0 (_channel_name); + _g_free0 (_vala_channel_name); } return result; } @@ -896,54 +1079,77 @@ */ static gboolean dvb_channel_list_real_GetChannelNetwork (DVBIDBusChannelList* base, guint channel_id, gchar** network, GError** error) { DVBChannelList * self; - gchar* _network = NULL; + gchar* _vala_network = NULL; gboolean result = FALSE; gchar* _tmp0_; gchar* val; gboolean ret; - gchar* _tmp10_; - gchar* _tmp11_; + const gchar* _tmp19_; + gchar* _tmp20_; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; _tmp0_ = g_strdup (""); val = _tmp0_; ret = FALSE; { - gboolean _tmp1_; + GeeHashMap* _tmp1_; + _tmp1_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - _tmp1_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - if (_tmp1_) { - gpointer _tmp2_ = NULL; - DVBChannel* _tmp3_; - const gchar* _tmp4_ = NULL; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* tmp; - const gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - _tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - _tmp3_ = (DVBChannel*) _tmp2_; - _tmp4_ = dvb_channel_get_Network (_tmp3_); - _tmp5_ = g_strdup (_tmp4_); - tmp = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp3_), _tmp6_); - _tmp7_ = NULL; - if (tmp == NULL) { - _tmp7_ = ""; - } else { - _tmp7_ = tmp; + { + GeeHashMap* _tmp2_; + guint _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->channels; + _tmp3_ = channel_id; + _tmp4_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, GUINT_TO_POINTER (_tmp3_)); + if (_tmp4_) { + GeeHashMap* _tmp5_; + guint _tmp6_; + gpointer _tmp7_ = NULL; + DVBChannel* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; + gchar* _tmp11_; + gchar* _tmp12_; + gchar* tmp; + const gchar* _tmp13_ = NULL; + const gchar* _tmp14_; + const gchar* _tmp16_; + gchar* _tmp17_; + _tmp5_ = self->channels; + _tmp6_ = channel_id; + _tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, GUINT_TO_POINTER (_tmp6_)); + _tmp8_ = (DVBChannel*) _tmp7_; + _tmp9_ = dvb_channel_get_Network (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = g_strdup (_tmp10_); + _tmp12_ = _tmp11_; + _g_object_unref0 (_tmp8_); + tmp = _tmp12_; + _tmp14_ = tmp; + if (_tmp14_ == NULL) { + _tmp13_ = ""; + } else { + const gchar* _tmp15_; + _tmp15_ = tmp; + _tmp13_ = _tmp15_; + } + _tmp16_ = _tmp13_; + _tmp17_ = g_strdup (_tmp16_); + _g_free0 (val); + val = _tmp17_; + ret = TRUE; + _g_free0 (tmp); } - _tmp8_ = g_strdup (_tmp7_); - _tmp9_ = _tmp8_; - _g_free0 (val); - val = _tmp9_; - ret = TRUE; - _g_free0 (tmp); } __finally42: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp18_; + _tmp18_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (val); return FALSE; @@ -955,16 +1161,16 @@ } } } - _tmp10_ = g_strdup (val); - _tmp11_ = _tmp10_; - _g_free0 (_network); - _network = _tmp11_; + _tmp19_ = val; + _tmp20_ = g_strdup (_tmp19_); + _g_free0 (_vala_network); + _vala_network = _tmp20_; result = ret; _g_free0 (val); if (network) { - *network = _network; + *network = _vala_network; } else { - _g_free0 (_network); + _g_free0 (_vala_network); } return result; } @@ -977,33 +1183,50 @@ */ static gboolean dvb_channel_list_real_IsRadioChannel (DVBIDBusChannelList* base, guint channel_id, gboolean* radio, GError** error) { DVBChannelList * self; - gboolean _radio = FALSE; + gboolean _vala_radio = FALSE; gboolean result = FALSE; gboolean val; gboolean ret; + gboolean _tmp10_; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; val = FALSE; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBChannel* _tmp2_; - gboolean _tmp3_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - _tmp2_ = (DVBChannel*) _tmp1_; - _tmp3_ = dvb_channel_is_radio (_tmp2_); - val = _tmp3_; - _g_object_unref0 (_tmp2_); - ret = TRUE; + { + GeeHashMap* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->channels; + _tmp2_ = channel_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint _tmp5_; + gpointer _tmp6_ = NULL; + DVBChannel* _tmp7_; + gboolean _tmp8_ = FALSE; + _tmp4_ = self->channels; + _tmp5_ = channel_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBChannel*) _tmp6_; + _tmp8_ = dvb_channel_is_radio (_tmp7_); + val = _tmp8_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } } __finally43: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp9_; + _tmp9_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1013,10 +1236,11 @@ } } } - _radio = val; + _tmp10_ = val; + _vala_radio = _tmp10_; result = ret; if (radio) { - *radio = _radio; + *radio = _vala_radio; } return result; } @@ -1029,28 +1253,43 @@ */ static gboolean dvb_channel_list_real_GetChannelURL (DVBIDBusChannelList* base, guint channel_id, gchar** url, GError** error) { DVBChannelList * self; - gchar* _url = NULL; + gchar* _vala_url = NULL; gboolean result = FALSE; DVBChannel* channel; + DVBChannel* _tmp8_; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; channel = NULL; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBChannel* _tmp2_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)); - _tmp2_ = (DVBChannel*) _tmp1_; - _g_object_unref0 (channel); - channel = _tmp2_; + { + GeeHashMap* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->channels; + _tmp2_ = channel_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint _tmp5_; + gpointer _tmp6_ = NULL; + _tmp4_ = self->channels; + _tmp5_ = channel_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _g_object_unref0 (channel); + channel = (DVBChannel*) _tmp6_; + } } __finally44: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp7_; + _tmp7_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (channel); return FALSE; @@ -1062,42 +1301,43 @@ } } } - if (channel == NULL) { - gchar* _tmp3_; - gchar* _tmp4_; - _tmp3_ = g_strdup (""); - _tmp4_ = _tmp3_; - _g_free0 (_url); - _url = _tmp4_; + _tmp8_ = channel; + if (_tmp8_ == NULL) { + gchar* _tmp9_; + _tmp9_ = g_strdup (""); + _g_free0 (_vala_url); + _vala_url = _tmp9_; result = FALSE; _g_object_unref0 (channel); if (url) { - *url = _url; + *url = _vala_url; } else { - _g_free0 (_url); + _g_free0 (_vala_url); } return result; } else { - gchar* _tmp5_ = NULL; - gchar* _tmp6_; - _tmp5_ = dvb_channel_get_URL (channel); - _tmp6_ = _tmp5_; - _g_free0 (_url); - _url = _tmp6_; + DVBChannel* _tmp10_; + gchar* _tmp11_; + gchar* _tmp12_; + _tmp10_ = channel; + _tmp11_ = dvb_channel_get_URL (_tmp10_); + _tmp12_ = _tmp11_; + _g_free0 (_vala_url); + _vala_url = _tmp12_; result = TRUE; _g_object_unref0 (channel); if (url) { - *url = _url; + *url = _vala_url; } else { - _g_free0 (_url); + _g_free0 (_vala_url); } return result; } _g_object_unref0 (channel); if (url) { - *url = _url; + *url = _vala_url; } else { - _g_free0 (_url); + _g_free0 (_vala_url); } } @@ -1116,80 +1356,120 @@ static DVBChannelInfo* dvb_channel_list_real_GetChannelInfos (DVBIDBusChannelList* base, int* result_length1, GError** error) { DVBChannelList * self; DVBChannelInfo* result = NULL; - gint _tmp0_; - DVBChannelInfo* _tmp1_ = NULL; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; + DVBChannelInfo* _tmp3_ = NULL; + DVBChannelInfo* channels; gint channels_length1; gint _channels_size_; - DVBChannelInfo* _tmp2_; - DVBChannelInfo* channels; gint i; - DVBChannelInfo* _tmp17_; + DVBChannelInfo* _tmp32_; + gint _tmp32__length1; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->channels); - _tmp1_ = g_new0 (DVBChannelInfo, _tmp0_); + _tmp0_ = self->channels; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); _tmp2_ = _tmp1_; - channels_length1 = _tmp0_; + _tmp3_ = g_new0 (DVBChannelInfo, _tmp2_); + channels = _tmp3_; + channels_length1 = _tmp2_; _channels_size_ = channels_length1; - channels = _tmp2_; i = 0; { + GeeHashMap* _tmp4_; + _tmp4_ = self->channels; g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp3_ = NULL; - GeeSet* _tmp4_; - GeeIterator* _tmp5_ = NULL; - GeeIterator* _tmp6_; - GeeIterator* _id_it; - _tmp3_ = gee_map_get_keys ((GeeMap*) self->channels); - _tmp4_ = _tmp3_; - _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); - _id_it = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - guint id; - gpointer _tmp9_ = NULL; - DVBChannel* channel; - DVBChannelInfo chan_info = {0}; - const gchar* _tmp10_ = NULL; - gchar* _tmp11_; - gchar* _tmp12_; - gboolean _tmp13_; - DVBChannelInfo _tmp14_; - DVBChannelInfo _tmp15_ = {0}; - DVBChannelInfo _tmp16_; - _tmp7_ = gee_iterator_next (_id_it); - if (!_tmp7_) { - break; + { + GeeHashMap* _tmp5_; + GeeSet* _tmp6_; + GeeSet* _tmp7_; + GeeSet* _tmp8_; + GeeIterator* _tmp9_ = NULL; + GeeIterator* _tmp10_; + GeeIterator* _id_it; + _tmp5_ = self->channels; + _tmp6_ = gee_map_get_keys ((GeeMap*) _tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = _tmp7_; + _tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_); + _tmp10_ = _tmp9_; + _g_object_unref0 (_tmp8_); + _id_it = _tmp10_; + while (TRUE) { + GeeIterator* _tmp11_; + gboolean _tmp12_ = FALSE; + GeeIterator* _tmp13_; + gpointer _tmp14_ = NULL; + guint id; + GeeHashMap* _tmp15_; + guint _tmp16_; + gpointer _tmp17_ = NULL; + DVBChannel* channel; + DVBChannelInfo chan_info = {0}; + guint _tmp18_; + DVBChannel* _tmp19_; + const gchar* _tmp20_; + const gchar* _tmp21_; + gchar* _tmp22_; + DVBChannel* _tmp23_; + gboolean _tmp24_ = FALSE; + DVBChannelInfo* _tmp25_; + gint _tmp25__length1; + gint _tmp26_; + DVBChannelInfo _tmp27_; + DVBChannelInfo _tmp28_ = {0}; + DVBChannelInfo _tmp29_; + gint _tmp30_; + _tmp11_ = _id_it; + _tmp12_ = gee_iterator_next (_tmp11_); + if (!_tmp12_) { + break; + } + _tmp13_ = _id_it; + _tmp14_ = gee_iterator_get (_tmp13_); + id = GPOINTER_TO_UINT (_tmp14_); + _tmp15_ = self->channels; + _tmp16_ = id; + _tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp15_, GUINT_TO_POINTER (_tmp16_)); + channel = (DVBChannel*) _tmp17_; + memset (&chan_info, 0, sizeof (DVBChannelInfo)); + _tmp18_ = id; + chan_info.id = _tmp18_; + _tmp19_ = channel; + _tmp20_ = dvb_channel_get_Name (_tmp19_); + _tmp21_ = _tmp20_; + _tmp22_ = g_strdup (_tmp21_); + _g_free0 (chan_info.name); + chan_info.name = _tmp22_; + _tmp23_ = channel; + _tmp24_ = dvb_channel_is_radio (_tmp23_); + chan_info.is_radio = _tmp24_; + _tmp25_ = channels; + _tmp25__length1 = channels_length1; + _tmp26_ = i; + _tmp27_ = chan_info; + dvb_channel_info_copy (&_tmp27_, &_tmp28_); + dvb_channel_info_destroy (&_tmp25_[_tmp26_]); + _tmp25_[_tmp26_] = _tmp28_; + _tmp29_ = _tmp25_[_tmp26_]; + _tmp30_ = i; + i = _tmp30_ + 1; + dvb_channel_info_destroy (&chan_info); + _g_object_unref0 (channel); } - _tmp8_ = gee_iterator_get (_id_it); - id = GPOINTER_TO_UINT (_tmp8_); - _tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); - channel = (DVBChannel*) _tmp9_; - memset (&chan_info, 0, sizeof (DVBChannelInfo)); - chan_info.id = id; - _tmp10_ = dvb_channel_get_Name (channel); - _tmp11_ = g_strdup (_tmp10_); - _tmp12_ = _tmp11_; - _g_free0 (chan_info.name); - chan_info.name = _tmp12_; - _tmp13_ = dvb_channel_is_radio (channel); - chan_info.is_radio = _tmp13_; - _tmp14_ = (dvb_channel_info_copy (&chan_info, &_tmp15_), _tmp15_); - _tmp16_ = _tmp14_; - dvb_channel_info_destroy (&channels[i]); - channels[i] = _tmp16_; - i++; - dvb_channel_info_destroy (&chan_info); - _g_object_unref0 (channel); + _g_object_unref0 (_id_it); } - _g_object_unref0 (_id_it); } __finally45: - g_static_rec_mutex_unlock (&self->priv->__lock_channels); + { + GeeHashMap* _tmp31_; + _tmp31_ = self->channels; + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); channels = (_vala_DVBChannelInfo_array_free (channels, channels_length1), NULL); return NULL; @@ -1201,9 +1481,12 @@ } } } - _tmp17_ = channels; - *result_length1 = channels_length1; - result = _tmp17_; + _tmp32_ = channels; + _tmp32__length1 = channels_length1; + if (result_length1) { + *result_length1 = _tmp32__length1; + } + result = _tmp32_; return result; } @@ -1214,62 +1497,86 @@ */ static gboolean dvb_channel_list_real_GetChannelsOfGroup (DVBIDBusChannelList* base, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error) { DVBChannelList * self; - guint* _channel_ids = NULL; - int _channel_ids_length1 = 0; + guint* _vala_channel_ids = NULL; + int _vala_channel_ids_length1 = 0; gboolean result = FALSE; - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config; - GeeList* channels; - GeeList* _tmp1_ = NULL; - GeeList* _tmp2_; - GeeList* _tmp3_; - gint _tmp4_; - guint* _tmp5_ = NULL; - guint* _tmp6_; + GeeList* channels = NULL; + GeeList* _tmp13_; + gint _tmp14_; + gint _tmp15_; + guint* _tmp16_ = NULL; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - _tmp0_ = dvb_factory_get_config_store (); - config = _tmp0_; - channels = NULL; - _tmp1_ = dvb_database_config_store_get_channels_of_group (config, self->priv->_GroupId, channel_group_id, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch46_dvb_database_sql_error; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + config = _tmp3_; + { + DVBdatabaseConfigStore* _tmp4_; + guint _tmp5_; + gint _tmp6_; + GeeList* _tmp7_ = NULL; + GeeList* _tmp8_; + _tmp4_ = config; + _tmp5_ = self->priv->_GroupId; + _tmp6_ = channel_group_id; + _tmp7_ = dvb_database_config_store_get_channels_of_group (_tmp4_, _tmp5_, _tmp6_, &_inner_error_); + _tmp8_ = _tmp7_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch46_dvb_database_sql_error; + } + _g_object_unref0 (channels); + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } _g_object_unref0 (channels); - _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + channels = _tmp8_; } - _tmp3_ = _tmp2_; - _g_object_unref0 (channels); - channels = _tmp3_; goto __finally46; __catch46_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp9_; + GError* _tmp10_; + const gchar* _tmp11_; + guint* _tmp12_ = NULL; e = _inner_error_; _inner_error_ = NULL; - g_critical ("ChannelList.vala:275: %s", e->message); + _tmp9_ = dvb_channel_list_log; + _tmp10_ = e; + _tmp11_ = _tmp10_->message; + dvb_logging_logger_error (_tmp9_, "ChannelList.vala:279: %s", _tmp11_); + _tmp12_ = g_new0 (guint, 0); + _vala_channel_ids = (g_free (_vala_channel_ids), NULL); + _vala_channel_ids = _tmp12_; + _vala_channel_ids_length1 = 0; result = FALSE; _g_error_free0 (e); _g_object_unref0 (channels); _g_object_unref0 (config); if (channel_ids) { - *channel_ids = _channel_ids; + *channel_ids = _vala_channel_ids; } else { - _channel_ids = (g_free (_channel_ids), NULL); + _vala_channel_ids = (g_free (_vala_channel_ids), NULL); } if (channel_ids_length1) { - *channel_ids_length1 = _channel_ids_length1; + *channel_ids_length1 = _vala_channel_ids_length1; } return result; } __finally46: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (channels); _g_object_unref0 (config); @@ -1282,29 +1589,52 @@ return FALSE; } } - _tmp4_ = gee_collection_get_size ((GeeCollection*) channels); - _tmp5_ = g_new0 (guint, _tmp4_); - _tmp6_ = _tmp5_; - _channel_ids = (g_free (_channel_ids), NULL); - _channel_ids_length1 = _tmp4_; - _channel_ids = _tmp6_; + _tmp13_ = channels; + _tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_); + _tmp15_ = _tmp14_; + _tmp16_ = g_new0 (guint, _tmp15_); + _vala_channel_ids = (g_free (_vala_channel_ids), NULL); + _vala_channel_ids = _tmp16_; + _vala_channel_ids_length1 = _tmp15_; { gint i; i = 0; { - gboolean _tmp7_; - _tmp7_ = TRUE; + gboolean _tmp17_; + _tmp17_ = TRUE; while (TRUE) { - gpointer _tmp8_ = NULL; - if (!_tmp7_) { - i++; + gboolean _tmp18_; + gint _tmp20_; + guint* _tmp21_; + gint _tmp21__length1; + guint* _tmp22_; + gint _tmp22__length1; + gint _tmp23_; + GeeList* _tmp24_; + gint _tmp25_; + gpointer _tmp26_ = NULL; + guint _tmp27_; + _tmp18_ = _tmp17_; + if (!_tmp18_) { + gint _tmp19_; + _tmp19_ = i; + i = _tmp19_ + 1; } - _tmp7_ = FALSE; - if (!(i < _channel_ids_length1)) { + _tmp17_ = FALSE; + _tmp20_ = i; + _tmp21_ = _vala_channel_ids; + _tmp21__length1 = _vala_channel_ids_length1; + if (!(_tmp20_ < _tmp21__length1)) { break; } - _tmp8_ = gee_list_get (channels, i); - _channel_ids[i] = GPOINTER_TO_UINT (_tmp8_); + _tmp22_ = _vala_channel_ids; + _tmp22__length1 = _vala_channel_ids_length1; + _tmp23_ = i; + _tmp24_ = channels; + _tmp25_ = i; + _tmp26_ = gee_list_get (_tmp24_, _tmp25_); + _tmp22_[_tmp23_] = GPOINTER_TO_UINT (_tmp26_); + _tmp27_ = _tmp22_[_tmp23_]; } } } @@ -1312,12 +1642,12 @@ _g_object_unref0 (channels); _g_object_unref0 (config); if (channel_ids) { - *channel_ids = _channel_ids; + *channel_ids = _vala_channel_ids; } else { - _channel_ids = (g_free (_channel_ids), NULL); + _vala_channel_ids = (g_free (_vala_channel_ids), NULL); } if (channel_ids_length1) { - *channel_ids_length1 = _channel_ids_length1; + *channel_ids_length1 = _vala_channel_ids_length1; } return result; } @@ -1331,51 +1661,76 @@ static gboolean dvb_channel_list_real_AddChannelToGroup (DVBIDBusChannelList* base, guint channel_id, gint channel_group_id, GError** error) { DVBChannelList * self; gboolean result = FALSE; - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config; - DVBChannel* _tmp1_ = NULL; + guint _tmp4_; + DVBChannel* _tmp5_ = NULL; DVBChannel* chan; + DVBChannel* _tmp6_; gboolean ret = FALSE; - gboolean _tmp2_; - gboolean _tmp3_; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - _tmp0_ = dvb_factory_get_config_store (); - config = _tmp0_; - _tmp1_ = dvb_channel_list_get_channel (self, channel_id); - chan = _tmp1_; - if (chan == NULL) { + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + config = _tmp3_; + _tmp4_ = channel_id; + _tmp5_ = dvb_channel_list_get_channel (self, _tmp4_); + chan = _tmp5_; + _tmp6_ = chan; + if (_tmp6_ == NULL) { result = FALSE; _g_object_unref0 (chan); _g_object_unref0 (config); return result; } - _tmp2_ = dvb_database_config_store_add_channel_to_group (config, chan, channel_group_id, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch47_dvb_database_sql_error; + { + DVBdatabaseConfigStore* _tmp7_; + DVBChannel* _tmp8_; + gint _tmp9_; + gboolean _tmp10_ = FALSE; + gboolean _tmp11_; + _tmp7_ = config; + _tmp8_ = chan; + _tmp9_ = channel_group_id; + _tmp10_ = dvb_database_config_store_add_channel_to_group (_tmp7_, _tmp8_, _tmp9_, &_inner_error_); + _tmp11_ = _tmp10_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch47_dvb_database_sql_error; + } + _g_object_unref0 (chan); + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - _g_object_unref0 (chan); - _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + ret = _tmp11_; } - ret = _tmp3_; goto __finally47; __catch47_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp12_; + GError* _tmp13_; + const gchar* _tmp14_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("ChannelList.vala:304: %s", e->message); + _tmp12_ = dvb_channel_list_log; + _tmp13_ = e; + _tmp14_ = _tmp13_->message; + dvb_logging_logger_error (_tmp12_, "ChannelList.vala:309: %s", _tmp14_); ret = FALSE; _g_error_free0 (e); } __finally47: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (chan); _g_object_unref0 (config); @@ -1403,51 +1758,76 @@ static gboolean dvb_channel_list_real_RemoveChannelFromGroup (DVBIDBusChannelList* base, guint channel_id, gint channel_group_id, GError** error) { DVBChannelList * self; gboolean result = FALSE; - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config; - DVBChannel* _tmp1_ = NULL; + guint _tmp4_; + DVBChannel* _tmp5_ = NULL; DVBChannel* chan; + DVBChannel* _tmp6_; gboolean ret = FALSE; - gboolean _tmp2_; - gboolean _tmp3_; GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - _tmp0_ = dvb_factory_get_config_store (); - config = _tmp0_; - _tmp1_ = dvb_channel_list_get_channel (self, channel_id); - chan = _tmp1_; - if (chan == NULL) { + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + config = _tmp3_; + _tmp4_ = channel_id; + _tmp5_ = dvb_channel_list_get_channel (self, _tmp4_); + chan = _tmp5_; + _tmp6_ = chan; + if (_tmp6_ == NULL) { result = FALSE; _g_object_unref0 (chan); _g_object_unref0 (config); return result; } - _tmp2_ = dvb_database_config_store_remove_channel_from_group (config, chan, channel_group_id, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch48_dvb_database_sql_error; + { + DVBdatabaseConfigStore* _tmp7_; + DVBChannel* _tmp8_; + gint _tmp9_; + gboolean _tmp10_ = FALSE; + gboolean _tmp11_; + _tmp7_ = config; + _tmp8_ = chan; + _tmp9_ = channel_group_id; + _tmp10_ = dvb_database_config_store_remove_channel_from_group (_tmp7_, _tmp8_, _tmp9_, &_inner_error_); + _tmp11_ = _tmp10_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch48_dvb_database_sql_error; + } + _g_object_unref0 (chan); + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - _g_object_unref0 (chan); - _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + ret = _tmp11_; } - ret = _tmp3_; goto __finally48; __catch48_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp12_; + GError* _tmp13_; + const gchar* _tmp14_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("ChannelList.vala:327: %s", e->message); + _tmp12_ = dvb_channel_list_log; + _tmp13_ = e; + _tmp14_ = _tmp13_->message; + dvb_logging_logger_error (_tmp12_, "ChannelList.vala:332: %s", _tmp14_); ret = FALSE; _g_error_free0 (e); } __finally48: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (chan); _g_object_unref0 (config); @@ -1469,8 +1849,10 @@ GFile* dvb_channel_list_get_channels_file (DVBChannelList* self) { GFile* result; + GFile* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_channels_file; + _tmp0_ = self->priv->_channels_file; + result = _tmp0_; return result; } @@ -1484,8 +1866,8 @@ GFile* _tmp0_; GFile* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_channels_file); self->priv->_channels_file = _tmp1_; g_object_notify ((GObject *) self, "channels-file"); @@ -1494,25 +1876,33 @@ guint dvb_channel_list_get_GroupId (DVBChannelList* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_GroupId; + _tmp0_ = self->priv->_GroupId; + result = _tmp0_; return result; } void dvb_channel_list_set_GroupId (DVBChannelList* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_GroupId = value; + _tmp0_ = value; + self->priv->_GroupId = _tmp0_; g_object_notify ((GObject *) self, "GroupId"); } gint dvb_channel_list_get_size (DVBChannelList* self) { gint result; - gint _tmp0_; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; g_return_val_if_fail (self != NULL, 0); - _tmp0_ = gee_map_get_size ((GeeMap*) self->channels); - result = _tmp0_; + _tmp0_ = self->channels; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + result = _tmp2_; return result; } @@ -1530,20 +1920,20 @@ GObject * obj; GObjectClass * parent_class; DVBChannelList * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; + GeeHashMap* _tmp0_; parent_class = G_OBJECT_CLASS (dvb_channel_list_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_CHANNEL_LIST (obj); _tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_CHANNEL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; _g_object_unref0 (self->channels); - self->channels = _tmp1_; + self->channels = _tmp0_; return obj; } static void dvb_channel_list_class_init (DVBChannelListClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_channel_list_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBChannelListPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_channel_list_get_property; @@ -1554,7 +1944,9 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_LIST_GROUP_ID, g_param_spec_uint ("GroupId", "GroupId", "GroupId", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_LIST_SIZE, g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_LIST_ELEMENT_TYPE, "element-type"); - g_type_set_qdata (DVB_TYPE_CHANNEL_LIST, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_channel_list_dbus_vtable)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_channel_list_log = _tmp1_; } @@ -1567,17 +1959,17 @@ static void dvb_channel_list_dvb_id_bus_channel_list_interface_init (DVBIDBusChannelListIface * iface) { dvb_channel_list_dvb_id_bus_channel_list_parent_iface = g_type_interface_peek_parent (iface); - iface->GetChannels = (guint* (*)(DVBIDBusChannelList* ,int* ,GError**)) dvb_channel_list_real_GetChannels; - iface->GetRadioChannels = (guint* (*)(DVBIDBusChannelList* ,int* ,GError**)) dvb_channel_list_real_GetRadioChannels; - iface->GetTVChannels = (guint* (*)(DVBIDBusChannelList* ,int* ,GError**)) dvb_channel_list_real_GetTVChannels; - iface->GetChannelName = (gboolean (*)(DVBIDBusChannelList* ,guint ,gchar** ,GError**)) dvb_channel_list_real_GetChannelName; - iface->GetChannelNetwork = (gboolean (*)(DVBIDBusChannelList* ,guint ,gchar** ,GError**)) dvb_channel_list_real_GetChannelNetwork; - iface->IsRadioChannel = (gboolean (*)(DVBIDBusChannelList* ,guint ,gboolean* ,GError**)) dvb_channel_list_real_IsRadioChannel; - iface->GetChannelURL = (gboolean (*)(DVBIDBusChannelList* ,guint ,gchar** ,GError**)) dvb_channel_list_real_GetChannelURL; - iface->GetChannelInfos = (DVBChannelInfo* (*)(DVBIDBusChannelList* ,int* ,GError**)) dvb_channel_list_real_GetChannelInfos; - iface->GetChannelsOfGroup = (gboolean (*)(DVBIDBusChannelList* ,gint ,guint** ,int* ,GError**)) dvb_channel_list_real_GetChannelsOfGroup; - iface->AddChannelToGroup = (gboolean (*)(DVBIDBusChannelList* ,guint ,gint ,GError**)) dvb_channel_list_real_AddChannelToGroup; - iface->RemoveChannelFromGroup = (gboolean (*)(DVBIDBusChannelList* ,guint ,gint ,GError**)) dvb_channel_list_real_RemoveChannelFromGroup; + iface->GetChannels = (guint* (*)(DVBIDBusChannelList*, int*, GError**)) dvb_channel_list_real_GetChannels; + iface->GetRadioChannels = (guint* (*)(DVBIDBusChannelList*, int*, GError**)) dvb_channel_list_real_GetRadioChannels; + iface->GetTVChannels = (guint* (*)(DVBIDBusChannelList*, int*, GError**)) dvb_channel_list_real_GetTVChannels; + iface->GetChannelName = (gboolean (*)(DVBIDBusChannelList*, guint, gchar**, GError**)) dvb_channel_list_real_GetChannelName; + iface->GetChannelNetwork = (gboolean (*)(DVBIDBusChannelList*, guint, gchar**, GError**)) dvb_channel_list_real_GetChannelNetwork; + iface->IsRadioChannel = (gboolean (*)(DVBIDBusChannelList*, guint, gboolean*, GError**)) dvb_channel_list_real_IsRadioChannel; + iface->GetChannelURL = (gboolean (*)(DVBIDBusChannelList*, guint, gchar**, GError**)) dvb_channel_list_real_GetChannelURL; + iface->GetChannelInfos = (DVBChannelInfo* (*)(DVBIDBusChannelList*, int*, GError**)) dvb_channel_list_real_GetChannelInfos; + iface->GetChannelsOfGroup = (gboolean (*)(DVBIDBusChannelList*, gint, guint**, int*, GError**)) dvb_channel_list_real_GetChannelsOfGroup; + iface->AddChannelToGroup = (gboolean (*)(DVBIDBusChannelList*, guint, gint, GError**)) dvb_channel_list_real_AddChannelToGroup; + iface->RemoveChannelFromGroup = (gboolean (*)(DVBIDBusChannelList*, guint, gint, GError**)) dvb_channel_list_real_RemoveChannelFromGroup; } diff -Nru gnome-dvb-daemon-0.1.23/src/ChannelList.vala gnome-dvb-daemon-0.2.7/src/ChannelList.vala --- gnome-dvb-daemon-0.1.23/src/ChannelList.vala 2010-08-09 13:24:01.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ChannelList.vala 2011-09-29 20:27:47.000000000 +0000 @@ -21,10 +21,13 @@ using Gee; using DVB.database; using DVB.database.sqlite; +using DVB.Logging; namespace DVB { public class ChannelList : GLib.Object, Iterable, IDBusChannelList { + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); public File? channels_file {get; construct;} public uint GroupId {get; set;} @@ -94,7 +97,7 @@ /** * @returns: List of channel IDs aka SIDs */ - public uint[] GetChannels () throws DBus.Error { + public uint[] GetChannels () throws DBusError { uint[] ids = new uint[this.size]; int i=0; lock (this.channels) { @@ -110,7 +113,7 @@ /** * @returns: List of channel IDs aka SIDs of radio channels */ - public uint[] GetRadioChannels () throws DBus.Error { + public uint[] GetRadioChannels () throws DBusError { SList radio_channels = new SList (); lock (this.channels) { foreach (uint id in this.channels.keys) { @@ -132,7 +135,7 @@ /** * @returns: List of channel IDs aka SIDs of TV channels */ - public uint[] GetTVChannels () throws DBus.Error { + public uint[] GetTVChannels () throws DBusError { SList video_channels = new SList (); lock (this.channels) { foreach (uint id in this.channels.keys) { @@ -158,7 +161,7 @@ * @returns: TRUE on success */ public bool GetChannelName (uint channel_id, out string channel_name) - throws DBus.Error + throws DBusError { bool ret = false; string val = ""; @@ -183,7 +186,8 @@ * @returns: TRUE on success */ public bool GetChannelNetwork (uint channel_id, out string network) - throws DBus.Error { + throws DBusError + { string val = ""; bool ret = false; lock (this.channels) { @@ -203,7 +207,7 @@ * @returns: TRUE on success */ public bool IsRadioChannel (uint channel_id, out bool radio) - throws DBus.Error + throws DBusError { bool val = false; bool ret = false; @@ -223,7 +227,7 @@ * @returns: TRUE on success */ public bool GetChannelURL (uint channel_id, out string url) - throws DBus.Error + throws DBusError { Channel channel = null; @@ -242,7 +246,7 @@ } } - public ChannelInfo[] GetChannelInfos () throws DBus.Error { + public ChannelInfo[] GetChannelInfos () throws DBusError { ChannelInfo[] channels = new ChannelInfo[this.channels.size]; int i = 0; lock (this.channels) { @@ -264,15 +268,16 @@ * @returns: TRUE on success */ public bool GetChannelsOfGroup (int channel_group_id, - out uint[] channel_ids) throws DBus.Error + out uint[] channel_ids) throws DBusError { - ConfigStore config = Factory.get_config_store (); + ConfigStore config = new Factory().get_config_store (); Gee.List channels; try { channels = config.get_channels_of_group (this.GroupId, channel_group_id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); + channel_ids = new uint[0]; return false; } @@ -290,9 +295,9 @@ * @returns: TRUE on success */ public bool AddChannelToGroup (uint channel_id, int channel_group_id) - throws DBus.Error + throws DBusError { - ConfigStore config = Factory.get_config_store (); + ConfigStore config = new Factory().get_config_store (); Channel? chan = this.get_channel (channel_id); if (chan == null) return false; @@ -301,7 +306,7 @@ try { ret = config.add_channel_to_group (chan, channel_group_id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); ret = false; } return ret; @@ -313,9 +318,9 @@ * @returns: TRUE on success */ public bool RemoveChannelFromGroup (uint channel_id, - int channel_group_id) throws DBus.Error + int channel_group_id) throws DBusError { - ConfigStore config = Factory.get_config_store (); + ConfigStore config = new Factory().get_config_store (); Channel? chan = this.get_channel (channel_id); if (chan == null) return false; @@ -324,7 +329,7 @@ try { ret = config.remove_channel_from_group (chan, channel_group_id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); ret = false; } return ret; diff -Nru gnome-dvb-daemon-0.1.23/src/Channel.vala gnome-dvb-daemon-0.2.7/src/Channel.vala --- gnome-dvb-daemon-0.1.23/src/Channel.vala 2011-01-14 17:06:29.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Channel.vala 2011-05-29 11:01:03.000000000 +0000 @@ -27,11 +27,13 @@ get { return this.sid; } set { this.sid = value; - if (this.has_schedule) + if (this.has_schedule) { this.schedule = new DVB.Schedule (this); + this.schedule.restore.begin (); + } } } - public uint GroupId {get; set;} + public uint GroupId {get; construct;} public string Name {get; set;} public uint TransportStreamId {get; set;} public string Network {get; set;} @@ -59,7 +61,8 @@ this.AudioPIDs = new Gee.ArrayList (); } - public Channel () { + public Channel (uint group_id) { + Object (GroupId: group_id); this.has_schedule = true; } diff -Nru gnome-dvb-daemon-0.1.23/src/Constants.c gnome-dvb-daemon-0.2.7/src/Constants.c --- gnome-dvb-daemon-0.1.23/src/Constants.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Constants.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Constants.c generated by valac 0.11.3, the Vala compiler +/* Constants.c generated by valac 0.14.0, the Vala compiler * generated from Constants.vala, do not modify */ /* diff -Nru gnome-dvb-daemon-0.1.23/src/database/ConfigStore.c gnome-dvb-daemon-0.2.7/src/database/ConfigStore.c --- gnome-dvb-daemon-0.1.23/src/database/ConfigStore.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/ConfigStore.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* ConfigStore.c generated by valac 0.11.3, the Vala compiler +/* ConfigStore.c generated by valac 0.14.0, the Vala compiler * generated from ConfigStore.vala, do not modify */ /* @@ -145,66 +145,79 @@ GeeList* dvb_database_config_store_get_all_device_groups (DVBdatabaseConfigStore* self, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->get_all_device_groups (self, error); } gboolean dvb_database_config_store_add_device_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* dev_group, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->add_device_group (self, dev_group, error); } gboolean dvb_database_config_store_remove_device_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->remove_device_group (self, devgroup, error); } gboolean dvb_database_config_store_add_device_to_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->add_device_to_group (self, dev, devgroup, error); } gboolean dvb_database_config_store_remove_device_from_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->remove_device_from_group (self, dev, devgroup, error); } gboolean dvb_database_config_store_update_from_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->update_from_group (self, devgroup, error); } gboolean dvb_database_config_store_get_parent_group (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->get_parent_group (self, adapter, frontend, group_id, error); } gboolean dvb_database_config_store_add_channel_group (DVBdatabaseConfigStore* self, const gchar* name, gint* channel_group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->add_channel_group (self, name, channel_group_id, error); } gboolean dvb_database_config_store_remove_channel_group (DVBdatabaseConfigStore* self, gint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->remove_channel_group (self, group_id, error); } GeeList* dvb_database_config_store_get_channel_groups (DVBdatabaseConfigStore* self, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->get_channel_groups (self, error); } GeeList* dvb_database_config_store_get_channels_of_group (DVBdatabaseConfigStore* self, guint dev_group_id, gint channel_group_id, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->get_channels_of_group (self, dev_group_id, channel_group_id, error); } gboolean dvb_database_config_store_add_channel_to_group (DVBdatabaseConfigStore* self, DVBChannel* channel, gint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->add_channel_to_group (self, channel, group_id, error); } gboolean dvb_database_config_store_remove_channel_from_group (DVBdatabaseConfigStore* self, DVBChannel* channel, gint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->remove_channel_from_group (self, channel, group_id, error); } diff -Nru gnome-dvb-daemon-0.1.23/src/database/EPGStore.c gnome-dvb-daemon-0.2.7/src/database/EPGStore.c --- gnome-dvb-daemon-0.1.23/src/database/EPGStore.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/EPGStore.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* EPGStore.c generated by valac 0.11.3, the Vala compiler +/* EPGStore.c generated by valac 0.14.0, the Vala compiler * generated from EPGStore.vala, do not modify */ /* @@ -104,36 +104,43 @@ gboolean dvb_database_epg_store_add_or_update_event (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->add_or_update_event (self, event, channel_sid, group_id, error); } DVBEvent* dvb_database_epg_store_get_event (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->get_event (self, event_id, channel_sid, group_id, error); } gboolean dvb_database_epg_store_remove_event (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->remove_event (self, event_id, channel_sid, group_id, error); } gboolean dvb_database_epg_store_remove_events_older_than (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->remove_events_older_than (self, event, channel_sid, group_id, error); } gboolean dvb_database_epg_store_contains_event (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->contains_event (self, event, channel_sid, group_id, error); } GeeList* dvb_database_epg_store_get_events (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->get_events (self, channel_sid, group_id, error); } gboolean dvb_database_epg_store_remove_events_of_group (DVBdatabaseEPGStore* self, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->remove_events_of_group (self, group_id, error); } diff -Nru gnome-dvb-daemon-0.1.23/src/database/SqlError.c gnome-dvb-daemon-0.2.7/src/database/SqlError.c --- gnome-dvb-daemon-0.1.23/src/database/SqlError.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/SqlError.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqlError.c generated by valac 0.11.3, the Vala compiler +/* SqlError.c generated by valac 0.14.0, the Vala compiler * generated from SqlError.vala, do not modify */ /* diff -Nru gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteConfigTimersStore.c gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteConfigTimersStore.c --- gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteConfigTimersStore.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteConfigTimersStore.c 2011-09-29 18:32:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqliteConfigTimersStore.c generated by valac 0.11.3, the Vala compiler +/* SqliteConfigTimersStore.c generated by valac 0.14.0, the Vala compiler * generated from SqliteConfigTimersStore.vala, do not modify */ /* @@ -116,6 +116,26 @@ typedef struct _DVBdatabasesqliteSqliteConfigTimersStore DVBdatabasesqliteSqliteConfigTimersStore; typedef struct _DVBdatabasesqliteSqliteConfigTimersStoreClass DVBdatabasesqliteSqliteConfigTimersStoreClass; typedef struct _DVBdatabasesqliteSqliteConfigTimersStorePrivate DVBdatabasesqliteSqliteConfigTimersStorePrivate; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) @@ -246,6 +266,8 @@ static gpointer dvb_database_sqlite_sqlite_config_timers_store_parent_class = NULL; +static DVBLoggingLogger* dvb_database_sqlite_sqlite_config_timers_store_log; +static DVBLoggingLogger* dvb_database_sqlite_sqlite_config_timers_store_log = NULL; static DVBdatabaseConfigStoreIface* dvb_database_sqlite_sqlite_config_timers_store_dvb_database_config_store_parent_iface = NULL; static DVBdatabaseTimersStoreIface* dvb_database_sqlite_sqlite_config_timers_store_dvb_database_timers_store_parent_iface = NULL; @@ -263,6 +285,10 @@ enum { DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DUMMY_PROPERTY }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_VERSION 1 #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CREATE_DEVICE_GROUPS "CREATE TABLE device_groups (\n" \ " group_id INTEGER,\n" \ @@ -329,8 +355,10 @@ static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_all_device_groups (DVBdatabaseConfigStore* base, GError** error); void dvb_database_sqlite_sqlite_database_throw_last_error (DVBdatabasesqliteSqliteDatabase* self, const gchar* errmsg, GError** error); GQuark dvb_device_error_quark (void); -DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, guint group_id, GError** error); +DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, GError** error); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); DVBDevice* dvb_device_new_with_type (guint adapter, guint frontend); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); gboolean main_get_disable_epg_scanner (void); DVBDeviceGroup* dvb_device_group_new (guint id, DVBDevice* reference_device, gboolean with_epg_scanner); DVBDeviceGroup* dvb_device_group_construct (GType object_type, guint id, DVBDevice* reference_device, gboolean with_epg_scanner); @@ -483,111 +511,154 @@ static void dvb_database_sqlite_sqlite_config_timers_store_real_on_open (DVBdatabasesqliteSqliteDatabase* base) { DVBdatabasesqliteSqliteConfigTimersStore * self; - sqlite3_stmt* _tmp0_ = NULL; + sqlite3* _tmp0_; sqlite3_stmt* _tmp1_ = NULL; - sqlite3_stmt* _tmp2_ = NULL; + sqlite3* _tmp2_; sqlite3_stmt* _tmp3_ = NULL; - sqlite3_stmt* _tmp4_ = NULL; + sqlite3* _tmp4_; sqlite3_stmt* _tmp5_ = NULL; - sqlite3_stmt* _tmp6_ = NULL; + sqlite3* _tmp6_; sqlite3_stmt* _tmp7_ = NULL; - sqlite3_stmt* _tmp8_ = NULL; + sqlite3* _tmp8_; sqlite3_stmt* _tmp9_ = NULL; - sqlite3_stmt* _tmp10_ = NULL; + sqlite3* _tmp10_; sqlite3_stmt* _tmp11_ = NULL; - sqlite3_stmt* _tmp12_ = NULL; + sqlite3* _tmp12_; sqlite3_stmt* _tmp13_ = NULL; - sqlite3_stmt* _tmp14_ = NULL; + sqlite3* _tmp14_; sqlite3_stmt* _tmp15_ = NULL; - sqlite3_stmt* _tmp16_ = NULL; + sqlite3* _tmp16_; sqlite3_stmt* _tmp17_ = NULL; - sqlite3_stmt* _tmp18_ = NULL; + sqlite3* _tmp18_; sqlite3_stmt* _tmp19_ = NULL; - sqlite3_stmt* _tmp20_ = NULL; + sqlite3* _tmp20_; + sqlite3_stmt* _tmp21_ = NULL; + sqlite3* _tmp22_; + sqlite3_stmt* _tmp23_ = NULL; + sqlite3* _tmp24_; + sqlite3_stmt* _tmp25_ = NULL; + sqlite3* _tmp26_; + sqlite3_stmt* _tmp27_ = NULL; + sqlite3* _tmp28_; + sqlite3_stmt* _tmp29_ = NULL; + sqlite3* _tmp30_; + sqlite3_stmt* _tmp31_ = NULL; + sqlite3* _tmp32_; + sqlite3_stmt* _tmp33_ = NULL; + sqlite3* _tmp34_; + sqlite3_stmt* _tmp35_ = NULL; + sqlite3* _tmp36_; + sqlite3_stmt* _tmp37_ = NULL; + sqlite3* _tmp38_; + sqlite3_stmt* _tmp39_ = NULL; + sqlite3* _tmp40_; + sqlite3_stmt* _tmp41_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_DEVICES, -1, &_tmp0_, NULL); + _tmp0_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp0_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_DEVICES, -1, &_tmp1_, NULL); _sqlite3_finalize0 (self->priv->select_devices_statement); - self->priv->select_devices_statement = _tmp0_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP, -1, &_tmp1_, NULL); + self->priv->select_devices_statement = _tmp1_; + _tmp2_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp2_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP, -1, &_tmp3_, NULL); _sqlite3_finalize0 (self->priv->delete_group_statement); - self->priv->delete_group_statement = _tmp1_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_GROUP, -1, &_tmp2_, NULL); + self->priv->delete_group_statement = _tmp3_; + _tmp4_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp4_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_GROUP, -1, &_tmp5_, NULL); _sqlite3_finalize0 (self->priv->insert_group_statement); - self->priv->insert_group_statement = _tmp2_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_UPDATE_GROUP, -1, &_tmp3_, NULL); + self->priv->insert_group_statement = _tmp5_; + _tmp6_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp6_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_UPDATE_GROUP, -1, &_tmp7_, NULL); _sqlite3_finalize0 (self->priv->update_group_statement); - self->priv->update_group_statement = _tmp3_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_DEVICE, -1, &_tmp4_, NULL); + self->priv->update_group_statement = _tmp7_; + _tmp8_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp8_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_DEVICE, -1, &_tmp9_, NULL); _sqlite3_finalize0 (self->priv->delete_device_statement); - self->priv->delete_device_statement = _tmp4_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_DEVICES, -1, &_tmp5_, NULL); + self->priv->delete_device_statement = _tmp9_; + _tmp10_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp10_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_DEVICES, -1, &_tmp11_, NULL); _sqlite3_finalize0 (self->priv->delete_group_devices_statement); - self->priv->delete_group_devices_statement = _tmp5_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_DEVICE, -1, &_tmp6_, NULL); + self->priv->delete_group_devices_statement = _tmp11_; + _tmp12_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp12_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_DEVICE, -1, &_tmp13_, NULL); _sqlite3_finalize0 (self->priv->insert_device_statement); - self->priv->insert_device_statement = _tmp6_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_GROUP_OF_DEVICE, -1, &_tmp7_, NULL); + self->priv->insert_device_statement = _tmp13_; + _tmp14_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp14_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_GROUP_OF_DEVICE, -1, &_tmp15_, NULL); _sqlite3_finalize0 (self->priv->select_group_of_device_statement); - self->priv->select_group_of_device_statement = _tmp7_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_TIMERS, -1, &_tmp8_, NULL); + self->priv->select_group_of_device_statement = _tmp15_; + _tmp16_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp16_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_TIMERS, -1, &_tmp17_, NULL); _sqlite3_finalize0 (self->priv->select_timers_statement); - self->priv->select_timers_statement = _tmp8_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_TIMER, -1, &_tmp9_, NULL); + self->priv->select_timers_statement = _tmp17_; + _tmp18_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp18_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_TIMER, -1, &_tmp19_, NULL); _sqlite3_finalize0 (self->priv->delete_timer_statement); - self->priv->delete_timer_statement = _tmp9_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_TIMERS, -1, &_tmp10_, NULL); + self->priv->delete_timer_statement = _tmp19_; + _tmp20_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp20_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_TIMERS, -1, &_tmp21_, NULL); _sqlite3_finalize0 (self->priv->delete_group_timers_statement); - self->priv->delete_group_timers_statement = _tmp10_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_TIMER, -1, &_tmp11_, NULL); + self->priv->delete_group_timers_statement = _tmp21_; + _tmp22_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp22_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_TIMER, -1, &_tmp23_, NULL); _sqlite3_finalize0 (self->priv->insert_timer_statement); - self->priv->insert_timer_statement = _tmp11_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_GROUP, -1, &_tmp12_, NULL); + self->priv->insert_timer_statement = _tmp23_; + _tmp24_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp24_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_GROUP, -1, &_tmp25_, NULL); _sqlite3_finalize0 (self->priv->contains_group_statement); - self->priv->contains_group_statement = _tmp12_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_TIMER, -1, &_tmp13_, NULL); + self->priv->contains_group_statement = _tmp25_; + _tmp26_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp26_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_TIMER, -1, &_tmp27_, NULL); _sqlite3_finalize0 (self->priv->contains_timer_statement); - self->priv->contains_timer_statement = _tmp13_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_CHANNEL_GROUP, -1, &_tmp14_, NULL); + self->priv->contains_timer_statement = _tmp27_; + _tmp28_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp28_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_CHANNEL_GROUP, -1, &_tmp29_, NULL); _sqlite3_finalize0 (self->priv->insert_channel_group_statement); - self->priv->insert_channel_group_statement = _tmp14_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_CHANNEL_GROUP, -1, &_tmp15_, NULL); + self->priv->insert_channel_group_statement = _tmp29_; + _tmp30_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp30_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_CHANNEL_GROUP, -1, &_tmp31_, NULL); _sqlite3_finalize0 (self->priv->delete_channel_group_statement); - self->priv->delete_channel_group_statement = _tmp15_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_ALL_CHANNEL_GROUP, -1, &_tmp16_, NULL); + self->priv->delete_channel_group_statement = _tmp31_; + _tmp32_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp32_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_ALL_CHANNEL_GROUP, -1, &_tmp33_, NULL); _sqlite3_finalize0 (self->priv->remove_all_channel_group_statement); - self->priv->remove_all_channel_group_statement = _tmp16_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNEL_GROUPS, -1, &_tmp17_, NULL); + self->priv->remove_all_channel_group_statement = _tmp33_; + _tmp34_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp34_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNEL_GROUPS, -1, &_tmp35_, NULL); _sqlite3_finalize0 (self->priv->select_channel_groups_statement); - self->priv->select_channel_groups_statement = _tmp17_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_ADD_CHANNEL_GROUP, -1, &_tmp18_, NULL); + self->priv->select_channel_groups_statement = _tmp35_; + _tmp36_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp36_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_ADD_CHANNEL_GROUP, -1, &_tmp37_, NULL); _sqlite3_finalize0 (self->priv->add_channel_group_statement); - self->priv->add_channel_group_statement = _tmp18_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_CHANNEL_GROUP, -1, &_tmp19_, NULL); + self->priv->add_channel_group_statement = _tmp37_; + _tmp38_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp38_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_CHANNEL_GROUP, -1, &_tmp39_, NULL); _sqlite3_finalize0 (self->priv->remove_channel_group_statement); - self->priv->remove_channel_group_statement = _tmp19_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNELS, -1, &_tmp20_, NULL); + self->priv->remove_channel_group_statement = _tmp39_; + _tmp40_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp40_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNELS, -1, &_tmp41_, NULL); _sqlite3_finalize0 (self->priv->select_channels_statement); - self->priv->select_channels_statement = _tmp20_; + self->priv->select_channels_statement = _tmp41_; } static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_all_device_groups (DVBdatabaseConfigStore* base, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; GeeList* result = NULL; - GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp0_; GeeList* groups; - sqlite3_stmt* statement; - sqlite3_stmt* _tmp1_ = NULL; - gint _tmp2_; + sqlite3_stmt* statement = NULL; + sqlite3* _tmp1_; + sqlite3_stmt* _tmp2_ = NULL; + gint _tmp3_ = 0; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; _tmp0_ = gee_array_list_new (DVB_TYPE_DEVICE_GROUP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); groups = (GeeList*) _tmp0_; - statement = NULL; - _tmp2_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_ALL_GROUPS, -1, &_tmp1_, NULL); + _tmp1_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + _tmp3_ = sqlite3_prepare (_tmp1_, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_ALL_GROUPS, -1, &_tmp2_, NULL); _sqlite3_finalize0 (statement); - statement = _tmp1_; - if (_tmp2_ != SQLITE_OK) { + statement = _tmp2_; + if (_tmp3_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -608,31 +679,49 @@ return result; } while (TRUE) { - gint _tmp3_; - gint _tmp4_; + sqlite3_stmt* _tmp4_; + gint _tmp5_ = 0; + sqlite3_stmt* _tmp6_; + gint _tmp7_ = 0; gint group_id; - gint _tmp5_; - const gchar* _tmp6_ = NULL; - GFile* _tmp7_ = NULL; + sqlite3_stmt* _tmp8_; + gint _tmp9_; + gint _tmp10_ = 0; + sqlite3_stmt* _tmp11_; + const gchar* _tmp12_ = NULL; + GFile* _tmp13_ = NULL; GFile* channels_file; - const gchar* _tmp8_ = NULL; - GFile* _tmp9_ = NULL; + sqlite3_stmt* _tmp14_; + const gchar* _tmp15_ = NULL; + GFile* _tmp16_ = NULL; GFile* rec_dir; - GeeArrayList* _tmp10_ = NULL; + GeeArrayList* _tmp17_; GeeList* devs; DVBDevice* ref_dev; - gboolean _tmp19_; - DVBDeviceGroup* _tmp20_ = NULL; + sqlite3_stmt* _tmp39_; + DVBDevice* _tmp40_; + gint _tmp43_; + DVBDevice* _tmp44_; + gboolean _tmp45_ = FALSE; + DVBDeviceGroup* _tmp46_; DVBDeviceGroup* group; - const gchar* _tmp21_ = NULL; - _tmp3_ = sqlite3_step (statement); - if (!(_tmp3_ == SQLITE_ROW)) { + DVBDeviceGroup* _tmp47_; + sqlite3_stmt* _tmp48_; + const gchar* _tmp49_ = NULL; + GeeList* _tmp62_; + DVBDeviceGroup* _tmp63_; + _tmp4_ = statement; + _tmp5_ = sqlite3_step (_tmp4_); + if (!(_tmp5_ == SQLITE_ROW)) { break; } - _tmp4_ = sqlite3_column_int (statement, 0); - group_id = _tmp4_; - _tmp5_ = sqlite3_bind_int (self->priv->select_devices_statement, 1, group_id); - if (_tmp5_ != SQLITE_OK) { + _tmp6_ = statement; + _tmp7_ = sqlite3_column_int (_tmp6_, 0); + group_id = _tmp7_; + _tmp8_ = self->priv->select_devices_statement; + _tmp9_ = group_id; + _tmp10_ = sqlite3_bind_int (_tmp8_, 1, _tmp9_); + if (_tmp10_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -650,59 +739,83 @@ } continue; } - _tmp6_ = sqlite3_column_text (statement, 2); - _tmp7_ = g_file_new_for_path (_tmp6_); - channels_file = _tmp7_; - _tmp8_ = sqlite3_column_text (statement, 3); - _tmp9_ = g_file_new_for_path (_tmp8_); - rec_dir = _tmp9_; - _tmp10_ = gee_array_list_new (DVB_TYPE_DEVICE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); - devs = (GeeList*) _tmp10_; + _tmp11_ = statement; + _tmp12_ = sqlite3_column_text (_tmp11_, 2); + _tmp13_ = g_file_new_for_path (_tmp12_); + channels_file = _tmp13_; + _tmp14_ = statement; + _tmp15_ = sqlite3_column_text (_tmp14_, 3); + _tmp16_ = g_file_new_for_path (_tmp15_); + rec_dir = _tmp16_; + _tmp17_ = gee_array_list_new (DVB_TYPE_DEVICE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); + devs = (GeeList*) _tmp17_; ref_dev = NULL; while (TRUE) { - gint _tmp11_; - gint _tmp12_; + sqlite3_stmt* _tmp18_; + gint _tmp19_ = 0; + sqlite3_stmt* _tmp20_; + gint _tmp21_ = 0; guint adapter; - gint _tmp13_; + sqlite3_stmt* _tmp22_; + gint _tmp23_ = 0; guint frontend; - _tmp11_ = sqlite3_step (self->priv->select_devices_statement); - if (!(_tmp11_ == SQLITE_ROW)) { + DVBDevice* _tmp24_; + _tmp18_ = self->priv->select_devices_statement; + _tmp19_ = sqlite3_step (_tmp18_); + if (!(_tmp19_ == SQLITE_ROW)) { break; } - _tmp12_ = sqlite3_column_int (self->priv->select_devices_statement, 1); - adapter = (guint) _tmp12_; - _tmp13_ = sqlite3_column_int (self->priv->select_devices_statement, 2); - frontend = (guint) _tmp13_; - if (ref_dev == NULL) { - DVBDevice* _tmp14_ = NULL; - DVBDevice* _tmp15_; - DVBDevice* _tmp16_; - _tmp14_ = dvb_device_new_full (adapter, frontend, channels_file, rec_dir, (guint) group_id, &_inner_error_); - _tmp15_ = _tmp14_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DEVICE_ERROR) { - goto __catch8_dvb_device_error; + _tmp20_ = self->priv->select_devices_statement; + _tmp21_ = sqlite3_column_int (_tmp20_, 1); + adapter = (guint) _tmp21_; + _tmp22_ = self->priv->select_devices_statement; + _tmp23_ = sqlite3_column_int (_tmp22_, 2); + frontend = (guint) _tmp23_; + _tmp24_ = ref_dev; + if (_tmp24_ == NULL) { + { + guint _tmp25_; + guint _tmp26_; + GFile* _tmp27_; + GFile* _tmp28_; + DVBDevice* _tmp29_ = NULL; + DVBDevice* _tmp30_; + _tmp25_ = adapter; + _tmp26_ = frontend; + _tmp27_ = channels_file; + _tmp28_ = rec_dir; + _tmp29_ = dvb_device_new_full (_tmp25_, _tmp26_, _tmp27_, _tmp28_, &_inner_error_); + _tmp30_ = _tmp29_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DEVICE_ERROR) { + goto __catch8_dvb_device_error; + } + _g_object_unref0 (ref_dev); + _g_object_unref0 (devs); + _g_object_unref0 (rec_dir); + _g_object_unref0 (channels_file); + _sqlite3_finalize0 (statement); + _g_object_unref0 (groups); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_object_unref0 (ref_dev); - _g_object_unref0 (devs); - _g_object_unref0 (rec_dir); - _g_object_unref0 (channels_file); - _sqlite3_finalize0 (statement); - _g_object_unref0 (groups); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + ref_dev = _tmp30_; } - _tmp16_ = _tmp15_; - _g_object_unref0 (ref_dev); - ref_dev = _tmp16_; goto __finally8; __catch8_dvb_device_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp31_; + GError* _tmp32_; + const gchar* _tmp33_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("SqliteConfigTimersStore.vala:265: Could not create device: %s", e->message); + _tmp31_ = dvb_database_sqlite_sqlite_config_timers_store_log; + _tmp32_ = e; + _tmp33_ = _tmp32_->message; + dvb_logging_logger_error (_tmp31_, "SqliteConfigTimersStore.vala:268: Could not create device: %s", _tmp33_); _g_error_free0 (e); } __finally8: @@ -729,54 +842,88 @@ } } } else { - DVBDevice* _tmp17_ = NULL; - DVBDevice* _tmp18_; - _tmp17_ = dvb_device_new_with_type (adapter, frontend); - _tmp18_ = _tmp17_; - gee_collection_add ((GeeCollection*) devs, _tmp18_); - _g_object_unref0 (_tmp18_); - } - } - sqlite3_reset (self->priv->select_devices_statement); - if (ref_dev == NULL) { - g_debug ("SqliteConfigTimersStore.vala:275: Group %d has no devices", group_id); + GeeList* _tmp34_; + guint _tmp35_; + guint _tmp36_; + DVBDevice* _tmp37_ = NULL; + DVBDevice* _tmp38_; + _tmp34_ = devs; + _tmp35_ = adapter; + _tmp36_ = frontend; + _tmp37_ = dvb_device_new_with_type (_tmp35_, _tmp36_); + _tmp38_ = _tmp37_; + gee_collection_add ((GeeCollection*) _tmp34_, _tmp38_); + _g_object_unref0 (_tmp38_); + } + } + _tmp39_ = self->priv->select_devices_statement; + sqlite3_reset (_tmp39_); + _tmp40_ = ref_dev; + if (_tmp40_ == NULL) { + DVBLoggingLogger* _tmp41_; + gint _tmp42_; + _tmp41_ = dvb_database_sqlite_sqlite_config_timers_store_log; + _tmp42_ = group_id; + dvb_logging_logger_debug (_tmp41_, "SqliteConfigTimersStore.vala:278: Group %d has no devices", _tmp42_); _g_object_unref0 (ref_dev); _g_object_unref0 (devs); _g_object_unref0 (rec_dir); _g_object_unref0 (channels_file); continue; } - _tmp19_ = main_get_disable_epg_scanner (); - _tmp20_ = dvb_device_group_new ((guint) group_id, ref_dev, !_tmp19_); - group = _tmp20_; - _tmp21_ = sqlite3_column_text (statement, 4); - dvb_device_group_set_Name (group, _tmp21_); + _tmp43_ = group_id; + _tmp44_ = ref_dev; + _tmp45_ = main_get_disable_epg_scanner (); + _tmp46_ = dvb_device_group_new ((guint) _tmp43_, _tmp44_, !_tmp45_); + group = _tmp46_; + _tmp47_ = group; + _tmp48_ = statement; + _tmp49_ = sqlite3_column_text (_tmp48_, 4); + dvb_device_group_set_Name (_tmp47_, _tmp49_); { gint i; i = 0; { - gboolean _tmp22_; - _tmp22_ = TRUE; + gboolean _tmp50_; + _tmp50_ = TRUE; while (TRUE) { - gint _tmp23_; - gpointer _tmp24_ = NULL; - DVBDevice* _tmp25_; - if (!_tmp22_) { - i++; + gboolean _tmp51_; + gint _tmp53_; + GeeList* _tmp54_; + gint _tmp55_; + gint _tmp56_; + DVBDeviceGroup* _tmp57_; + GeeList* _tmp58_; + gint _tmp59_; + gpointer _tmp60_ = NULL; + DVBDevice* _tmp61_; + _tmp51_ = _tmp50_; + if (!_tmp51_) { + gint _tmp52_; + _tmp52_ = i; + i = _tmp52_ + 1; } - _tmp22_ = FALSE; - _tmp23_ = gee_collection_get_size ((GeeCollection*) devs); - if (!(i < _tmp23_)) { + _tmp50_ = FALSE; + _tmp53_ = i; + _tmp54_ = devs; + _tmp55_ = gee_collection_get_size ((GeeCollection*) _tmp54_); + _tmp56_ = _tmp55_; + if (!(_tmp53_ < _tmp56_)) { break; } - _tmp24_ = gee_list_get (devs, i); - _tmp25_ = (DVBDevice*) _tmp24_; - dvb_device_group_add (group, _tmp25_); - _g_object_unref0 (_tmp25_); + _tmp57_ = group; + _tmp58_ = devs; + _tmp59_ = i; + _tmp60_ = gee_list_get (_tmp58_, _tmp59_); + _tmp61_ = (DVBDevice*) _tmp60_; + dvb_device_group_add (_tmp57_, _tmp61_); + _g_object_unref0 (_tmp61_); } } } - gee_collection_add ((GeeCollection*) groups, group); + _tmp62_ = groups; + _tmp63_ = group; + gee_collection_add ((GeeCollection*) _tmp62_, _tmp63_); _g_object_unref0 (group); _g_object_unref0 (ref_dev); _g_object_unref0 (devs); @@ -792,29 +939,47 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_device_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* dev_group, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; gboolean result = FALSE; - guint _tmp0_; - gboolean _tmp1_; - gboolean _tmp2_; - DVBChannelList* _tmp3_ = NULL; - GFile* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; + DVBDeviceGroup* _tmp0_; + guint _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_; + DVBDeviceGroup* _tmp5_; + DVBChannelList* _tmp6_; + DVBChannelList* _tmp7_; + GFile* _tmp8_; + GFile* _tmp9_; + gchar* _tmp10_ = NULL; gchar* channels; - GFile* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; + DVBDeviceGroup* _tmp11_; + GFile* _tmp12_; + GFile* _tmp13_; + gchar* _tmp14_ = NULL; gchar* recdir; - gboolean _tmp8_ = FALSE; - gboolean _tmp9_ = FALSE; - gboolean _tmp10_ = FALSE; - gboolean _tmp11_ = FALSE; - guint _tmp12_; - gint _tmp13_; - gint _tmp23_; + gboolean _tmp15_ = FALSE; + gboolean _tmp16_ = FALSE; + gboolean _tmp17_ = FALSE; + gboolean _tmp18_ = FALSE; + sqlite3_stmt* _tmp19_; + DVBDeviceGroup* _tmp20_; + guint _tmp21_; + guint _tmp22_; + gint _tmp23_ = 0; + gboolean _tmp29_; + gboolean _tmp35_; + gboolean _tmp41_; + gboolean _tmp49_; + sqlite3_stmt* _tmp50_; + gint _tmp51_ = 0; + sqlite3_stmt* _tmp53_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev_group != NULL, FALSE); - _tmp0_ = dvb_device_group_get_Id (dev_group); - _tmp1_ = dvb_database_sqlite_sqlite_config_timers_store_contains_group (self, _tmp0_, &_inner_error_); + _tmp0_ = dev_group; + _tmp1_ = dvb_device_group_get_Id (_tmp0_); _tmp2_ = _tmp1_; + _tmp3_ = dvb_database_sqlite_sqlite_config_timers_store_contains_group (self, _tmp2_, &_inner_error_); + _tmp4_ = _tmp3_; if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -825,58 +990,96 @@ return FALSE; } } - if (_tmp2_) { + if (_tmp4_) { result = FALSE; return result; } - _tmp3_ = dvb_device_group_get_Channels (dev_group); - _tmp4_ = dvb_channel_list_get_channels_file (_tmp3_); - _tmp5_ = g_file_get_path (_tmp4_); - channels = _tmp5_; - _tmp6_ = dvb_device_group_get_RecordingsDirectory (dev_group); - _tmp7_ = g_file_get_path (_tmp6_); - recdir = _tmp7_; - _tmp12_ = dvb_device_group_get_Id (dev_group); - _tmp13_ = sqlite3_bind_int (self->priv->insert_group_statement, 1, (gint) _tmp12_); - if (_tmp13_ != SQLITE_OK) { - _tmp11_ = TRUE; - } else { - DVBAdapterType _tmp14_; - gint _tmp15_; - _tmp14_ = dvb_device_group_get_Type (dev_group); - _tmp15_ = sqlite3_bind_int (self->priv->insert_group_statement, 2, (gint) _tmp14_); - _tmp11_ = _tmp15_ != SQLITE_OK; - } - if (_tmp11_) { - _tmp10_ = TRUE; - } else { - gchar* _tmp16_; - gint _tmp17_; - _tmp16_ = g_strdup (channels); - _tmp17_ = sqlite3_bind_text (self->priv->insert_group_statement, 3, _tmp16_, -1, g_free); - _tmp10_ = _tmp17_ != SQLITE_OK; - } - if (_tmp10_) { - _tmp9_ = TRUE; - } else { - gchar* _tmp18_; - gint _tmp19_; - _tmp18_ = g_strdup (recdir); - _tmp19_ = sqlite3_bind_text (self->priv->insert_group_statement, 4, _tmp18_, -1, g_free); - _tmp9_ = _tmp19_ != SQLITE_OK; - } - if (_tmp9_) { - _tmp8_ = TRUE; - } else { - const gchar* _tmp20_ = NULL; - gchar* _tmp21_; - gint _tmp22_; - _tmp20_ = dvb_device_group_get_Name (dev_group); - _tmp21_ = g_strdup (_tmp20_); - _tmp22_ = sqlite3_bind_text (self->priv->insert_group_statement, 5, _tmp21_, -1, g_free); - _tmp8_ = _tmp22_ != SQLITE_OK; + _tmp5_ = dev_group; + _tmp6_ = dvb_device_group_get_Channels (_tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = dvb_channel_list_get_channels_file (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = g_file_get_path (_tmp9_); + channels = _tmp10_; + _tmp11_ = dev_group; + _tmp12_ = dvb_device_group_get_RecordingsDirectory (_tmp11_); + _tmp13_ = _tmp12_; + _tmp14_ = g_file_get_path (_tmp13_); + recdir = _tmp14_; + _tmp19_ = self->priv->insert_group_statement; + _tmp20_ = dev_group; + _tmp21_ = dvb_device_group_get_Id (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = sqlite3_bind_int (_tmp19_, 1, (gint) _tmp22_); + if (_tmp23_ != SQLITE_OK) { + _tmp18_ = TRUE; + } else { + sqlite3_stmt* _tmp24_; + DVBDeviceGroup* _tmp25_; + DVBAdapterType _tmp26_; + DVBAdapterType _tmp27_; + gint _tmp28_ = 0; + _tmp24_ = self->priv->insert_group_statement; + _tmp25_ = dev_group; + _tmp26_ = dvb_device_group_get_Type (_tmp25_); + _tmp27_ = _tmp26_; + _tmp28_ = sqlite3_bind_int (_tmp24_, 2, (gint) _tmp27_); + _tmp18_ = _tmp28_ != SQLITE_OK; + } + _tmp29_ = _tmp18_; + if (_tmp29_) { + _tmp17_ = TRUE; + } else { + sqlite3_stmt* _tmp30_; + const gchar* _tmp31_; + gchar* _tmp32_; + GDestroyNotify _tmp33_; + gint _tmp34_ = 0; + _tmp30_ = self->priv->insert_group_statement; + _tmp31_ = channels; + _tmp32_ = g_strdup (_tmp31_); + _tmp33_ = g_free; + _tmp34_ = sqlite3_bind_text (_tmp30_, 3, _tmp32_, -1, _tmp33_); + _tmp17_ = _tmp34_ != SQLITE_OK; + } + _tmp35_ = _tmp17_; + if (_tmp35_) { + _tmp16_ = TRUE; + } else { + sqlite3_stmt* _tmp36_; + const gchar* _tmp37_; + gchar* _tmp38_; + GDestroyNotify _tmp39_; + gint _tmp40_ = 0; + _tmp36_ = self->priv->insert_group_statement; + _tmp37_ = recdir; + _tmp38_ = g_strdup (_tmp37_); + _tmp39_ = g_free; + _tmp40_ = sqlite3_bind_text (_tmp36_, 4, _tmp38_, -1, _tmp39_); + _tmp16_ = _tmp40_ != SQLITE_OK; + } + _tmp41_ = _tmp16_; + if (_tmp41_) { + _tmp15_ = TRUE; + } else { + sqlite3_stmt* _tmp42_; + DVBDeviceGroup* _tmp43_; + const gchar* _tmp44_; + const gchar* _tmp45_; + gchar* _tmp46_; + GDestroyNotify _tmp47_; + gint _tmp48_ = 0; + _tmp42_ = self->priv->insert_group_statement; + _tmp43_ = dev_group; + _tmp44_ = dvb_device_group_get_Name (_tmp43_); + _tmp45_ = _tmp44_; + _tmp46_ = g_strdup (_tmp45_); + _tmp47_ = g_free; + _tmp48_ = sqlite3_bind_text (_tmp42_, 5, _tmp46_, -1, _tmp47_); + _tmp15_ = _tmp48_ != SQLITE_OK; } - if (_tmp8_) { + _tmp49_ = _tmp15_; + if (_tmp49_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -912,9 +1115,12 @@ return FALSE; } } - _tmp23_ = sqlite3_step (self->priv->insert_group_statement); - if (_tmp23_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->insert_group_statement, &_inner_error_); + _tmp50_ = self->priv->insert_group_statement; + _tmp51_ = sqlite3_step (_tmp50_); + if (_tmp51_ != SQLITE_DONE) { + sqlite3_stmt* _tmp52_; + _tmp52_ = self->priv->insert_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp52_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -934,23 +1140,34 @@ _g_free0 (channels); return result; } - sqlite3_reset (self->priv->insert_group_statement); + _tmp53_ = self->priv->insert_group_statement; + sqlite3_reset (_tmp53_); { - GeeIterator* _tmp24_ = NULL; + DVBDeviceGroup* _tmp54_; + GeeIterator* _tmp55_ = NULL; GeeIterator* _dev_it; - _tmp24_ = gee_iterable_iterator ((GeeIterable*) dev_group); - _dev_it = _tmp24_; + _tmp54_ = dev_group; + _tmp55_ = gee_iterable_iterator ((GeeIterable*) _tmp54_); + _dev_it = _tmp55_; while (TRUE) { - gboolean _tmp25_; - gpointer _tmp26_ = NULL; + GeeIterator* _tmp56_; + gboolean _tmp57_ = FALSE; + GeeIterator* _tmp58_; + gpointer _tmp59_ = NULL; DVBDevice* dev; - _tmp25_ = gee_iterator_next (_dev_it); - if (!_tmp25_) { + DVBDevice* _tmp60_; + DVBDeviceGroup* _tmp61_; + _tmp56_ = _dev_it; + _tmp57_ = gee_iterator_next (_tmp56_); + if (!_tmp57_) { break; } - _tmp26_ = gee_iterator_get (_dev_it); - dev = (DVBDevice*) _tmp26_; - dvb_database_config_store_add_device_to_group ((DVBdatabaseConfigStore*) self, dev, dev_group, &_inner_error_); + _tmp58_ = _dev_it; + _tmp59_ = gee_iterator_get (_tmp58_); + dev = (DVBDevice*) _tmp59_; + _tmp60_ = dev; + _tmp61_ = dev_group; + dvb_database_config_store_add_device_to_group ((DVBdatabaseConfigStore*) self, _tmp60_, _tmp61_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -998,18 +1215,31 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* devgroup, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; gboolean result = FALSE; - guint _tmp0_; - gint _tmp1_; + sqlite3_stmt* _tmp0_; + DVBDeviceGroup* _tmp1_; guint _tmp2_; - gint _tmp3_; - gint _tmp4_; - gint _tmp5_; + guint _tmp3_; + gint _tmp4_ = 0; + sqlite3_stmt* _tmp5_; + DVBDeviceGroup* _tmp6_; + guint _tmp7_; + guint _tmp8_; + gint _tmp9_ = 0; + sqlite3_stmt* _tmp10_; + gint _tmp11_ = 0; + sqlite3_stmt* _tmp13_; + sqlite3_stmt* _tmp14_; + gint _tmp15_ = 0; + sqlite3_stmt* _tmp17_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (devgroup != NULL, FALSE); - _tmp0_ = dvb_device_group_get_Id (devgroup); - _tmp1_ = sqlite3_bind_int (self->priv->delete_group_statement, 1, (gint) _tmp0_); - if (_tmp1_ != SQLITE_OK) { + _tmp0_ = self->priv->delete_group_statement; + _tmp1_ = devgroup; + _tmp2_ = dvb_device_group_get_Id (_tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = sqlite3_bind_int (_tmp0_, 1, (gint) _tmp3_); + if (_tmp4_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1024,9 +1254,12 @@ result = FALSE; return result; } - _tmp2_ = dvb_device_group_get_Id (devgroup); - _tmp3_ = sqlite3_bind_int (self->priv->delete_group_devices_statement, 1, (gint) _tmp2_); - if (_tmp3_ != SQLITE_OK) { + _tmp5_ = self->priv->delete_group_devices_statement; + _tmp6_ = devgroup; + _tmp7_ = dvb_device_group_get_Id (_tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = sqlite3_bind_int (_tmp5_, 1, (gint) _tmp8_); + if (_tmp9_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1052,9 +1285,12 @@ return FALSE; } } - _tmp4_ = sqlite3_step (self->priv->delete_group_statement); - if (_tmp4_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_group_statement, &_inner_error_); + _tmp10_ = self->priv->delete_group_statement; + _tmp11_ = sqlite3_step (_tmp10_); + if (_tmp11_ != SQLITE_DONE) { + sqlite3_stmt* _tmp12_; + _tmp12_ = self->priv->delete_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp12_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1068,10 +1304,14 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_group_statement); - _tmp5_ = sqlite3_step (self->priv->delete_group_devices_statement); - if (_tmp5_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_group_devices_statement, &_inner_error_); + _tmp13_ = self->priv->delete_group_statement; + sqlite3_reset (_tmp13_); + _tmp14_ = self->priv->delete_group_devices_statement; + _tmp15_ = sqlite3_step (_tmp14_); + if (_tmp15_ != SQLITE_DONE) { + sqlite3_stmt* _tmp16_; + _tmp16_ = self->priv->delete_group_devices_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp16_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1085,7 +1325,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_group_devices_statement); + _tmp17_ = self->priv->delete_group_devices_statement; + sqlite3_reset (_tmp17_); dvb_database_sqlite_sqlite_database_end_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1104,22 +1345,34 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_get_parent_group (DVBdatabaseConfigStore* base, guint adapter, guint frontend, guint* group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - guint _group_id = 0U; + guint _vala_group_id = 0U; gboolean result = FALSE; gboolean _tmp0_ = FALSE; - gint _tmp1_; + sqlite3_stmt* _tmp1_; + guint _tmp2_; + gint _tmp3_ = 0; + gboolean _tmp7_; gboolean ret; + sqlite3_stmt* _tmp12_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _tmp1_ = sqlite3_bind_int (self->priv->select_group_of_device_statement, 1, (gint) adapter); - if (_tmp1_ != SQLITE_OK) { + _vala_group_id = (guint) 0; + _tmp1_ = self->priv->select_group_of_device_statement; + _tmp2_ = adapter; + _tmp3_ = sqlite3_bind_int (_tmp1_, 1, (gint) _tmp2_); + if (_tmp3_ != SQLITE_OK) { _tmp0_ = TRUE; } else { - gint _tmp2_; - _tmp2_ = sqlite3_bind_int (self->priv->select_group_of_device_statement, 2, (gint) frontend); - _tmp0_ = _tmp2_ != SQLITE_OK; + sqlite3_stmt* _tmp4_; + guint _tmp5_; + gint _tmp6_ = 0; + _tmp4_ = self->priv->select_group_of_device_statement; + _tmp5_ = frontend; + _tmp6_ = sqlite3_bind_int (_tmp4_, 2, (gint) _tmp5_); + _tmp0_ = _tmp6_ != SQLITE_OK; } - if (_tmp0_) { + _tmp7_ = _tmp0_; + if (_tmp7_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1133,26 +1386,31 @@ } result = FALSE; if (group_id) { - *group_id = _group_id; + *group_id = _vala_group_id; } return result; } ret = FALSE; while (TRUE) { - gint _tmp3_; - gint _tmp4_; - _tmp3_ = sqlite3_step (self->priv->select_group_of_device_statement); - if (!(_tmp3_ == SQLITE_ROW)) { + sqlite3_stmt* _tmp8_; + gint _tmp9_ = 0; + sqlite3_stmt* _tmp10_; + gint _tmp11_ = 0; + _tmp8_ = self->priv->select_group_of_device_statement; + _tmp9_ = sqlite3_step (_tmp8_); + if (!(_tmp9_ == SQLITE_ROW)) { break; } - _tmp4_ = sqlite3_column_int (self->priv->select_group_of_device_statement, 0); - _group_id = (guint) _tmp4_; + _tmp10_ = self->priv->select_group_of_device_statement; + _tmp11_ = sqlite3_column_int (_tmp10_, 0); + _vala_group_id = (guint) _tmp11_; ret = TRUE; } - sqlite3_reset (self->priv->select_group_of_device_statement); + _tmp12_ = self->priv->select_group_of_device_statement; + sqlite3_reset (_tmp12_); result = ret; if (group_id) { - *group_id = _group_id; + *group_id = _vala_group_id; } return result; } @@ -1160,12 +1418,18 @@ gboolean dvb_database_sqlite_sqlite_config_timers_store_contains_group (DVBdatabasesqliteSqliteConfigTimersStore* self, guint group_id, GError** error) { gboolean result = FALSE; - gint _tmp0_; + sqlite3_stmt* _tmp0_; + guint _tmp1_; + gint _tmp2_ = 0; gint c; + sqlite3_stmt* _tmp7_; + gint _tmp8_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _tmp0_ = sqlite3_bind_int (self->priv->contains_group_statement, 1, (gint) group_id); - if (_tmp0_ != SQLITE_OK) { + _tmp0_ = self->priv->contains_group_statement; + _tmp1_ = group_id; + _tmp2_ = sqlite3_bind_int (_tmp0_, 1, (gint) _tmp1_); + if (_tmp2_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1182,17 +1446,23 @@ } c = 0; while (TRUE) { - gint _tmp1_; - gint _tmp2_; - _tmp1_ = sqlite3_step (self->priv->contains_group_statement); - if (!(_tmp1_ == SQLITE_ROW)) { + sqlite3_stmt* _tmp3_; + gint _tmp4_ = 0; + sqlite3_stmt* _tmp5_; + gint _tmp6_ = 0; + _tmp3_ = self->priv->contains_group_statement; + _tmp4_ = sqlite3_step (_tmp3_); + if (!(_tmp4_ == SQLITE_ROW)) { break; } - _tmp2_ = sqlite3_column_int (self->priv->contains_group_statement, 0); - c = _tmp2_; - } - sqlite3_reset (self->priv->contains_group_statement); - result = c > 0; + _tmp5_ = self->priv->contains_group_statement; + _tmp6_ = sqlite3_column_int (_tmp5_, 0); + c = _tmp6_; + } + _tmp7_ = self->priv->contains_group_statement; + sqlite3_reset (_tmp7_); + _tmp8_ = c; + result = _tmp8_ > 0; return result; } @@ -1202,34 +1472,58 @@ gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - guint _tmp2_; - gint _tmp3_; - gint _tmp8_; + sqlite3_stmt* _tmp2_; + DVBDeviceGroup* _tmp3_; + guint _tmp4_; + guint _tmp5_; + gint _tmp6_ = 0; + gboolean _tmp12_; + gboolean _tmp18_; + sqlite3_stmt* _tmp19_; + gint _tmp20_ = 0; + sqlite3_stmt* _tmp22_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, FALSE); g_return_val_if_fail (devgroup != NULL, FALSE); - _tmp2_ = dvb_device_group_get_Id (devgroup); - _tmp3_ = sqlite3_bind_int (self->priv->insert_device_statement, 1, (gint) _tmp2_); - if (_tmp3_ != SQLITE_OK) { + _tmp2_ = self->priv->insert_device_statement; + _tmp3_ = devgroup; + _tmp4_ = dvb_device_group_get_Id (_tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = sqlite3_bind_int (_tmp2_, 1, (gint) _tmp5_); + if (_tmp6_ != SQLITE_OK) { _tmp1_ = TRUE; } else { - guint _tmp4_; - gint _tmp5_; - _tmp4_ = dvb_device_get_Adapter (dev); - _tmp5_ = sqlite3_bind_int (self->priv->insert_device_statement, 2, (gint) _tmp4_); - _tmp1_ = _tmp5_ != SQLITE_OK; + sqlite3_stmt* _tmp7_; + DVBDevice* _tmp8_; + guint _tmp9_; + guint _tmp10_; + gint _tmp11_ = 0; + _tmp7_ = self->priv->insert_device_statement; + _tmp8_ = dev; + _tmp9_ = dvb_device_get_Adapter (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = sqlite3_bind_int (_tmp7_, 2, (gint) _tmp10_); + _tmp1_ = _tmp11_ != SQLITE_OK; } - if (_tmp1_) { + _tmp12_ = _tmp1_; + if (_tmp12_) { _tmp0_ = TRUE; } else { - guint _tmp6_; - gint _tmp7_; - _tmp6_ = dvb_device_get_Frontend (dev); - _tmp7_ = sqlite3_bind_int (self->priv->insert_device_statement, 3, (gint) _tmp6_); - _tmp0_ = _tmp7_ != SQLITE_OK; + sqlite3_stmt* _tmp13_; + DVBDevice* _tmp14_; + guint _tmp15_; + guint _tmp16_; + gint _tmp17_ = 0; + _tmp13_ = self->priv->insert_device_statement; + _tmp14_ = dev; + _tmp15_ = dvb_device_get_Frontend (_tmp14_); + _tmp16_ = _tmp15_; + _tmp17_ = sqlite3_bind_int (_tmp13_, 3, (gint) _tmp16_); + _tmp0_ = _tmp17_ != SQLITE_OK; } - if (_tmp0_) { + _tmp18_ = _tmp0_; + if (_tmp18_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1244,9 +1538,12 @@ result = FALSE; return result; } - _tmp8_ = sqlite3_step (self->priv->insert_device_statement); - if (_tmp8_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->insert_device_statement, &_inner_error_); + _tmp19_ = self->priv->insert_device_statement; + _tmp20_ = sqlite3_step (_tmp19_); + if (_tmp20_ != SQLITE_DONE) { + sqlite3_stmt* _tmp21_; + _tmp21_ = self->priv->insert_device_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp21_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1260,7 +1557,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->insert_device_statement); + _tmp22_ = self->priv->insert_device_statement; + sqlite3_reset (_tmp22_); result = TRUE; return result; } @@ -1270,25 +1568,41 @@ DVBdatabasesqliteSqliteConfigTimersStore * self; gboolean result = FALSE; gboolean _tmp0_ = FALSE; - guint _tmp1_; - gint _tmp2_; - gint _tmp5_; + sqlite3_stmt* _tmp1_; + DVBDevice* _tmp2_; + guint _tmp3_; + guint _tmp4_; + gint _tmp5_ = 0; + gboolean _tmp11_; + sqlite3_stmt* _tmp12_; + gint _tmp13_ = 0; + sqlite3_stmt* _tmp15_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, FALSE); g_return_val_if_fail (devgroup != NULL, FALSE); - _tmp1_ = dvb_device_get_Adapter (dev); - _tmp2_ = sqlite3_bind_int (self->priv->delete_device_statement, 1, (gint) _tmp1_); - if (_tmp2_ != SQLITE_OK) { + _tmp1_ = self->priv->delete_device_statement; + _tmp2_ = dev; + _tmp3_ = dvb_device_get_Adapter (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = sqlite3_bind_int (_tmp1_, 1, (gint) _tmp4_); + if (_tmp5_ != SQLITE_OK) { _tmp0_ = TRUE; } else { - guint _tmp3_; - gint _tmp4_; - _tmp3_ = dvb_device_get_Frontend (dev); - _tmp4_ = sqlite3_bind_int (self->priv->delete_device_statement, 2, (gint) _tmp3_); - _tmp0_ = _tmp4_ != SQLITE_OK; + sqlite3_stmt* _tmp6_; + DVBDevice* _tmp7_; + guint _tmp8_; + guint _tmp9_; + gint _tmp10_ = 0; + _tmp6_ = self->priv->delete_device_statement; + _tmp7_ = dev; + _tmp8_ = dvb_device_get_Frontend (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = sqlite3_bind_int (_tmp6_, 2, (gint) _tmp9_); + _tmp0_ = _tmp10_ != SQLITE_OK; } - if (_tmp0_) { + _tmp11_ = _tmp0_; + if (_tmp11_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1303,9 +1617,12 @@ result = FALSE; return result; } - _tmp5_ = sqlite3_step (self->priv->delete_device_statement); - if (_tmp5_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_device_statement, &_inner_error_); + _tmp12_ = self->priv->delete_device_statement; + _tmp13_ = sqlite3_step (_tmp12_); + if (_tmp13_ != SQLITE_DONE) { + sqlite3_stmt* _tmp14_; + _tmp14_ = self->priv->delete_device_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp14_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1319,7 +1636,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_device_statement); + _tmp15_ = self->priv->delete_device_statement; + sqlite3_reset (_tmp15_); result = TRUE; return result; } @@ -1328,18 +1646,25 @@ static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_all_timers_of_device_group (DVBdatabaseTimersStore* base, DVBDeviceGroup* dev, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; GeeList* result = NULL; - GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp0_; GeeList* timers; - guint _tmp1_; - gint _tmp2_; + sqlite3_stmt* _tmp1_; + DVBDeviceGroup* _tmp2_; + guint _tmp3_; + guint _tmp4_; + gint _tmp5_ = 0; + sqlite3_stmt* _tmp44_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, NULL); _tmp0_ = gee_array_list_new (DVB_TYPE_TIMER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); timers = (GeeList*) _tmp0_; - _tmp1_ = dvb_device_group_get_Id (dev); - _tmp2_ = sqlite3_bind_int (self->priv->select_timers_statement, 1, (gint) _tmp1_); - if (_tmp2_ != SQLITE_OK) { + _tmp1_ = self->priv->select_timers_statement; + _tmp2_ = dev; + _tmp3_ = dvb_device_group_get_Id (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = sqlite3_bind_int (_tmp1_, 1, (gint) _tmp4_); + if (_tmp5_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1357,7 +1682,8 @@ return result; } while (TRUE) { - gint _tmp3_; + sqlite3_stmt* _tmp6_; + gint _tmp7_ = 0; guint tid = 0U; guint sid = 0U; guint duration = 0U; @@ -1367,53 +1693,103 @@ gint day = 0; gint hour = 0; gint minute = 0; - gint _tmp4_; - gint _tmp5_; - gint _tmp6_; - gint _tmp7_; - gint _tmp8_; - gint _tmp9_; - gint _tmp10_; - gint _tmp11_; - gint _tmp12_; - DVBChannelList* _tmp13_ = NULL; - DVBChannel* _tmp14_ = NULL; + sqlite3_stmt* _tmp8_; + gint _tmp9_ = 0; + sqlite3_stmt* _tmp10_; + gint _tmp11_ = 0; + sqlite3_stmt* _tmp12_; + gint _tmp13_ = 0; + sqlite3_stmt* _tmp14_; + gint _tmp15_ = 0; + sqlite3_stmt* _tmp16_; + gint _tmp17_ = 0; + sqlite3_stmt* _tmp18_; + gint _tmp19_ = 0; + sqlite3_stmt* _tmp20_; + gint _tmp21_ = 0; + sqlite3_stmt* _tmp22_; + gint _tmp23_ = 0; + sqlite3_stmt* _tmp24_; + gint _tmp25_ = 0; + DVBDeviceGroup* _tmp26_; + DVBChannelList* _tmp27_; + DVBChannelList* _tmp28_; + guint _tmp29_; + DVBChannel* _tmp30_ = NULL; DVBChannel* channel; - DVBTimer* _tmp15_ = NULL; + guint _tmp31_; + DVBChannel* _tmp32_; + gint _tmp33_; + gint _tmp34_; + gint _tmp35_; + gint _tmp36_; + gint _tmp37_; + guint _tmp38_; + DVBTimer* _tmp39_; DVBTimer* timer; - _tmp3_ = sqlite3_step (self->priv->select_timers_statement); - if (!(_tmp3_ == SQLITE_ROW)) { + DVBTimer* _tmp40_; + guint _tmp41_; + GeeList* _tmp42_; + DVBTimer* _tmp43_; + _tmp6_ = self->priv->select_timers_statement; + _tmp7_ = sqlite3_step (_tmp6_); + if (!(_tmp7_ == SQLITE_ROW)) { break; } - _tmp4_ = sqlite3_column_int (self->priv->select_timers_statement, 0); - tid = (guint) _tmp4_; - _tmp5_ = sqlite3_column_int (self->priv->select_timers_statement, 2); - sid = (guint) _tmp5_; - _tmp6_ = sqlite3_column_int (self->priv->select_timers_statement, 3); - year = _tmp6_; - _tmp7_ = sqlite3_column_int (self->priv->select_timers_statement, 4); - month = _tmp7_; - _tmp8_ = sqlite3_column_int (self->priv->select_timers_statement, 5); - day = _tmp8_; - _tmp9_ = sqlite3_column_int (self->priv->select_timers_statement, 6); - hour = _tmp9_; - _tmp10_ = sqlite3_column_int (self->priv->select_timers_statement, 7); - minute = _tmp10_; - _tmp11_ = sqlite3_column_int (self->priv->select_timers_statement, 8); - duration = (guint) _tmp11_; - _tmp12_ = sqlite3_column_int (self->priv->select_timers_statement, 9); - event_id = (guint) _tmp12_; - _tmp13_ = dvb_device_group_get_Channels (dev); - _tmp14_ = dvb_channel_list_get_channel (_tmp13_, sid); - channel = _tmp14_; - _tmp15_ = dvb_timer_new ((guint32) tid, channel, year, month, day, hour, minute, duration); - timer = _tmp15_; - dvb_timer_set_EventID (timer, event_id); - gee_collection_add ((GeeCollection*) timers, timer); + _tmp8_ = self->priv->select_timers_statement; + _tmp9_ = sqlite3_column_int (_tmp8_, 0); + tid = (guint) _tmp9_; + _tmp10_ = self->priv->select_timers_statement; + _tmp11_ = sqlite3_column_int (_tmp10_, 2); + sid = (guint) _tmp11_; + _tmp12_ = self->priv->select_timers_statement; + _tmp13_ = sqlite3_column_int (_tmp12_, 3); + year = _tmp13_; + _tmp14_ = self->priv->select_timers_statement; + _tmp15_ = sqlite3_column_int (_tmp14_, 4); + month = _tmp15_; + _tmp16_ = self->priv->select_timers_statement; + _tmp17_ = sqlite3_column_int (_tmp16_, 5); + day = _tmp17_; + _tmp18_ = self->priv->select_timers_statement; + _tmp19_ = sqlite3_column_int (_tmp18_, 6); + hour = _tmp19_; + _tmp20_ = self->priv->select_timers_statement; + _tmp21_ = sqlite3_column_int (_tmp20_, 7); + minute = _tmp21_; + _tmp22_ = self->priv->select_timers_statement; + _tmp23_ = sqlite3_column_int (_tmp22_, 8); + duration = (guint) _tmp23_; + _tmp24_ = self->priv->select_timers_statement; + _tmp25_ = sqlite3_column_int (_tmp24_, 9); + event_id = (guint) _tmp25_; + _tmp26_ = dev; + _tmp27_ = dvb_device_group_get_Channels (_tmp26_); + _tmp28_ = _tmp27_; + _tmp29_ = sid; + _tmp30_ = dvb_channel_list_get_channel (_tmp28_, _tmp29_); + channel = _tmp30_; + _tmp31_ = tid; + _tmp32_ = channel; + _tmp33_ = year; + _tmp34_ = month; + _tmp35_ = day; + _tmp36_ = hour; + _tmp37_ = minute; + _tmp38_ = duration; + _tmp39_ = dvb_timer_new ((guint32) _tmp31_, _tmp32_, _tmp33_, _tmp34_, _tmp35_, _tmp36_, _tmp37_, _tmp38_); + timer = _tmp39_; + _tmp40_ = timer; + _tmp41_ = event_id; + dvb_timer_set_EventID (_tmp40_, _tmp41_); + _tmp42_ = timers; + _tmp43_ = timer; + gee_collection_add ((GeeCollection*) _tmp42_, _tmp43_); _g_object_unref0 (timer); _g_object_unref0 (channel); } - sqlite3_reset (self->priv->select_timers_statement); + _tmp44_ = self->priv->select_timers_statement; + sqlite3_reset (_tmp44_); result = timers; return result; } @@ -1422,17 +1798,17 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_timer_to_device_group (DVBdatabaseTimersStore* base, DVBTimer* timer, DVBDeviceGroup* dev, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; gboolean result = FALSE; - guint32 _tmp0_; - gboolean _tmp1_; - gboolean _tmp2_; - gint _tmp3_; - guint* _tmp4_ = NULL; + DVBTimer* _tmp0_; + guint32 _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_; + DVBTimer* _tmp5_; + gint _tmp6_ = 0; + guint* _tmp7_ = NULL; + guint* start; gint start_length1; gint _start_size_; - guint* _tmp5_; - guint* start; - gboolean _tmp6_ = FALSE; - gboolean _tmp7_ = FALSE; gboolean _tmp8_ = FALSE; gboolean _tmp9_ = FALSE; gboolean _tmp10_ = FALSE; @@ -1440,16 +1816,34 @@ gboolean _tmp12_ = FALSE; gboolean _tmp13_ = FALSE; gboolean _tmp14_ = FALSE; - guint32 _tmp15_; - gint _tmp16_; - gint _tmp31_; + gboolean _tmp15_ = FALSE; + gboolean _tmp16_ = FALSE; + sqlite3_stmt* _tmp17_; + DVBTimer* _tmp18_; + guint32 _tmp19_; + guint32 _tmp20_; + gint _tmp21_ = 0; + gboolean _tmp27_; + gboolean _tmp35_; + gboolean _tmp40_; + gboolean _tmp45_; + gboolean _tmp50_; + gboolean _tmp55_; + gboolean _tmp60_; + gboolean _tmp66_; + gboolean _tmp72_; + sqlite3_stmt* _tmp73_; + gint _tmp74_ = 0; + sqlite3_stmt* _tmp76_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (timer != NULL, FALSE); g_return_val_if_fail (dev != NULL, FALSE); - _tmp0_ = dvb_timer_get_Id (timer); - _tmp1_ = dvb_database_sqlite_sqlite_config_timers_store_contains_timer (self, (guint) _tmp0_, &_inner_error_); + _tmp0_ = timer; + _tmp1_ = dvb_timer_get_Id (_tmp0_); _tmp2_ = _tmp1_; + _tmp3_ = dvb_database_sqlite_sqlite_config_timers_store_contains_timer (self, (guint) _tmp2_, &_inner_error_); + _tmp4_ = _tmp3_; if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1460,91 +1854,169 @@ return FALSE; } } - if (_tmp2_) { + if (_tmp4_) { result = FALSE; return result; } - _tmp4_ = dvb_timer_get_start_time (timer, &_tmp3_); - _tmp5_ = _tmp4_; - start_length1 = _tmp3_; + _tmp5_ = timer; + _tmp7_ = dvb_timer_get_start_time (_tmp5_, &_tmp6_); + start = _tmp7_; + start_length1 = _tmp6_; _start_size_ = start_length1; - start = _tmp5_; - _tmp15_ = dvb_timer_get_Id (timer); - _tmp16_ = sqlite3_bind_int (self->priv->insert_timer_statement, 1, (gint) _tmp15_); - if (_tmp16_ != SQLITE_OK) { + _tmp17_ = self->priv->insert_timer_statement; + _tmp18_ = timer; + _tmp19_ = dvb_timer_get_Id (_tmp18_); + _tmp20_ = _tmp19_; + _tmp21_ = sqlite3_bind_int (_tmp17_, 1, (gint) _tmp20_); + if (_tmp21_ != SQLITE_OK) { + _tmp16_ = TRUE; + } else { + sqlite3_stmt* _tmp22_; + DVBDeviceGroup* _tmp23_; + guint _tmp24_; + guint _tmp25_; + gint _tmp26_ = 0; + _tmp22_ = self->priv->insert_timer_statement; + _tmp23_ = dev; + _tmp24_ = dvb_device_group_get_Id (_tmp23_); + _tmp25_ = _tmp24_; + _tmp26_ = sqlite3_bind_int (_tmp22_, 2, (gint) _tmp25_); + _tmp16_ = _tmp26_ != SQLITE_OK; + } + _tmp27_ = _tmp16_; + if (_tmp27_) { + _tmp15_ = TRUE; + } else { + sqlite3_stmt* _tmp28_; + DVBTimer* _tmp29_; + DVBChannel* _tmp30_; + DVBChannel* _tmp31_; + guint _tmp32_; + guint _tmp33_; + gint _tmp34_ = 0; + _tmp28_ = self->priv->insert_timer_statement; + _tmp29_ = timer; + _tmp30_ = dvb_timer_get_Channel (_tmp29_); + _tmp31_ = _tmp30_; + _tmp32_ = dvb_channel_get_Sid (_tmp31_); + _tmp33_ = _tmp32_; + _tmp34_ = sqlite3_bind_int (_tmp28_, 3, (gint) _tmp33_); + _tmp15_ = _tmp34_ != SQLITE_OK; + } + _tmp35_ = _tmp15_; + if (_tmp35_) { _tmp14_ = TRUE; } else { - guint _tmp17_; - gint _tmp18_; - _tmp17_ = dvb_device_group_get_Id (dev); - _tmp18_ = sqlite3_bind_int (self->priv->insert_timer_statement, 2, (gint) _tmp17_); - _tmp14_ = _tmp18_ != SQLITE_OK; + sqlite3_stmt* _tmp36_; + guint* _tmp37_; + gint _tmp37__length1; + guint _tmp38_; + gint _tmp39_ = 0; + _tmp36_ = self->priv->insert_timer_statement; + _tmp37_ = start; + _tmp37__length1 = start_length1; + _tmp38_ = _tmp37_[0]; + _tmp39_ = sqlite3_bind_int (_tmp36_, 4, (gint) _tmp38_); + _tmp14_ = _tmp39_ != SQLITE_OK; } - if (_tmp14_) { + _tmp40_ = _tmp14_; + if (_tmp40_) { _tmp13_ = TRUE; } else { - DVBChannel* _tmp19_ = NULL; - guint _tmp20_; - gint _tmp21_; - _tmp19_ = dvb_timer_get_Channel (timer); - _tmp20_ = dvb_channel_get_Sid (_tmp19_); - _tmp21_ = sqlite3_bind_int (self->priv->insert_timer_statement, 3, (gint) _tmp20_); - _tmp13_ = _tmp21_ != SQLITE_OK; + sqlite3_stmt* _tmp41_; + guint* _tmp42_; + gint _tmp42__length1; + guint _tmp43_; + gint _tmp44_ = 0; + _tmp41_ = self->priv->insert_timer_statement; + _tmp42_ = start; + _tmp42__length1 = start_length1; + _tmp43_ = _tmp42_[1]; + _tmp44_ = sqlite3_bind_int (_tmp41_, 5, (gint) _tmp43_); + _tmp13_ = _tmp44_ != SQLITE_OK; } - if (_tmp13_) { + _tmp45_ = _tmp13_; + if (_tmp45_) { _tmp12_ = TRUE; } else { - gint _tmp22_; - _tmp22_ = sqlite3_bind_int (self->priv->insert_timer_statement, 4, (gint) start[0]); - _tmp12_ = _tmp22_ != SQLITE_OK; + sqlite3_stmt* _tmp46_; + guint* _tmp47_; + gint _tmp47__length1; + guint _tmp48_; + gint _tmp49_ = 0; + _tmp46_ = self->priv->insert_timer_statement; + _tmp47_ = start; + _tmp47__length1 = start_length1; + _tmp48_ = _tmp47_[2]; + _tmp49_ = sqlite3_bind_int (_tmp46_, 6, (gint) _tmp48_); + _tmp12_ = _tmp49_ != SQLITE_OK; } - if (_tmp12_) { + _tmp50_ = _tmp12_; + if (_tmp50_) { _tmp11_ = TRUE; } else { - gint _tmp23_; - _tmp23_ = sqlite3_bind_int (self->priv->insert_timer_statement, 5, (gint) start[1]); - _tmp11_ = _tmp23_ != SQLITE_OK; + sqlite3_stmt* _tmp51_; + guint* _tmp52_; + gint _tmp52__length1; + guint _tmp53_; + gint _tmp54_ = 0; + _tmp51_ = self->priv->insert_timer_statement; + _tmp52_ = start; + _tmp52__length1 = start_length1; + _tmp53_ = _tmp52_[3]; + _tmp54_ = sqlite3_bind_int (_tmp51_, 7, (gint) _tmp53_); + _tmp11_ = _tmp54_ != SQLITE_OK; } - if (_tmp11_) { + _tmp55_ = _tmp11_; + if (_tmp55_) { _tmp10_ = TRUE; } else { - gint _tmp24_; - _tmp24_ = sqlite3_bind_int (self->priv->insert_timer_statement, 6, (gint) start[2]); - _tmp10_ = _tmp24_ != SQLITE_OK; + sqlite3_stmt* _tmp56_; + guint* _tmp57_; + gint _tmp57__length1; + guint _tmp58_; + gint _tmp59_ = 0; + _tmp56_ = self->priv->insert_timer_statement; + _tmp57_ = start; + _tmp57__length1 = start_length1; + _tmp58_ = _tmp57_[4]; + _tmp59_ = sqlite3_bind_int (_tmp56_, 8, (gint) _tmp58_); + _tmp10_ = _tmp59_ != SQLITE_OK; } - if (_tmp10_) { + _tmp60_ = _tmp10_; + if (_tmp60_) { _tmp9_ = TRUE; } else { - gint _tmp25_; - _tmp25_ = sqlite3_bind_int (self->priv->insert_timer_statement, 7, (gint) start[3]); - _tmp9_ = _tmp25_ != SQLITE_OK; + sqlite3_stmt* _tmp61_; + DVBTimer* _tmp62_; + guint _tmp63_; + guint _tmp64_; + gint _tmp65_ = 0; + _tmp61_ = self->priv->insert_timer_statement; + _tmp62_ = timer; + _tmp63_ = dvb_timer_get_Duration (_tmp62_); + _tmp64_ = _tmp63_; + _tmp65_ = sqlite3_bind_int (_tmp61_, 9, (gint) _tmp64_); + _tmp9_ = _tmp65_ != SQLITE_OK; } - if (_tmp9_) { + _tmp66_ = _tmp9_; + if (_tmp66_) { _tmp8_ = TRUE; } else { - gint _tmp26_; - _tmp26_ = sqlite3_bind_int (self->priv->insert_timer_statement, 8, (gint) start[4]); - _tmp8_ = _tmp26_ != SQLITE_OK; - } - if (_tmp8_) { - _tmp7_ = TRUE; - } else { - guint _tmp27_; - gint _tmp28_; - _tmp27_ = dvb_timer_get_Duration (timer); - _tmp28_ = sqlite3_bind_int (self->priv->insert_timer_statement, 9, (gint) _tmp27_); - _tmp7_ = _tmp28_ != SQLITE_OK; + sqlite3_stmt* _tmp67_; + DVBTimer* _tmp68_; + guint _tmp69_; + guint _tmp70_; + gint _tmp71_ = 0; + _tmp67_ = self->priv->insert_timer_statement; + _tmp68_ = timer; + _tmp69_ = dvb_timer_get_EventID (_tmp68_); + _tmp70_ = _tmp69_; + _tmp71_ = sqlite3_bind_int (_tmp67_, 10, (gint) _tmp70_); + _tmp8_ = _tmp71_ != SQLITE_OK; } - if (_tmp7_) { - _tmp6_ = TRUE; - } else { - guint _tmp29_; - gint _tmp30_; - _tmp29_ = dvb_timer_get_EventID (timer); - _tmp30_ = sqlite3_bind_int (self->priv->insert_timer_statement, 10, (gint) _tmp29_); - _tmp6_ = _tmp30_ != SQLITE_OK; - } - if (_tmp6_) { + _tmp72_ = _tmp8_; + if (_tmp72_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1562,9 +2034,12 @@ start = (g_free (start), NULL); return result; } - _tmp31_ = sqlite3_step (self->priv->insert_timer_statement); - if (_tmp31_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->insert_timer_statement, &_inner_error_); + _tmp73_ = self->priv->insert_timer_statement; + _tmp74_ = sqlite3_step (_tmp73_); + if (_tmp74_ != SQLITE_DONE) { + sqlite3_stmt* _tmp75_; + _tmp75_ = self->priv->insert_timer_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp75_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1581,7 +2056,8 @@ start = (g_free (start), NULL); return result; } - sqlite3_reset (self->priv->insert_timer_statement); + _tmp76_ = self->priv->insert_timer_statement; + sqlite3_reset (_tmp76_); result = TRUE; start = (g_free (start), NULL); return result; @@ -1591,13 +2067,19 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_timer_from_device_group (DVBdatabaseTimersStore* base, guint timer_id, DVBDeviceGroup* dev, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; gboolean result = FALSE; - gint _tmp0_; - gint _tmp1_; + sqlite3_stmt* _tmp0_; + guint _tmp1_; + gint _tmp2_ = 0; + sqlite3_stmt* _tmp3_; + gint _tmp4_ = 0; + sqlite3_stmt* _tmp6_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, FALSE); - _tmp0_ = sqlite3_bind_int (self->priv->delete_timer_statement, 1, (gint) timer_id); - if (_tmp0_ != SQLITE_OK) { + _tmp0_ = self->priv->delete_timer_statement; + _tmp1_ = timer_id; + _tmp2_ = sqlite3_bind_int (_tmp0_, 1, (gint) _tmp1_); + if (_tmp2_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1612,9 +2094,12 @@ result = FALSE; return result; } - _tmp1_ = sqlite3_step (self->priv->delete_timer_statement); - if (_tmp1_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_timer_statement, &_inner_error_); + _tmp3_ = self->priv->delete_timer_statement; + _tmp4_ = sqlite3_step (_tmp3_); + if (_tmp4_ != SQLITE_DONE) { + sqlite3_stmt* _tmp5_; + _tmp5_ = self->priv->delete_timer_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp5_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1628,7 +2113,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_timer_statement); + _tmp6_ = self->priv->delete_timer_statement; + sqlite3_reset (_tmp6_); result = TRUE; return result; } @@ -1637,12 +2123,18 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_all_timers_from_device_group (DVBdatabaseTimersStore* base, guint group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; gboolean result = FALSE; - gint _tmp0_; - gint _tmp1_; + sqlite3_stmt* _tmp0_; + guint _tmp1_; + gint _tmp2_ = 0; + sqlite3_stmt* _tmp3_; + gint _tmp4_ = 0; + sqlite3_stmt* _tmp6_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _tmp0_ = sqlite3_bind_int (self->priv->delete_group_timers_statement, 1, (gint) group_id); - if (_tmp0_ != SQLITE_OK) { + _tmp0_ = self->priv->delete_group_timers_statement; + _tmp1_ = group_id; + _tmp2_ = sqlite3_bind_int (_tmp0_, 1, (gint) _tmp1_); + if (_tmp2_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1657,9 +2149,12 @@ result = FALSE; return result; } - _tmp1_ = sqlite3_step (self->priv->delete_group_timers_statement); - if (_tmp1_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_group_timers_statement, &_inner_error_); + _tmp3_ = self->priv->delete_group_timers_statement; + _tmp4_ = sqlite3_step (_tmp3_); + if (_tmp4_ != SQLITE_DONE) { + sqlite3_stmt* _tmp5_; + _tmp5_ = self->priv->delete_group_timers_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp5_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1673,7 +2168,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_group_timers_statement); + _tmp6_ = self->priv->delete_group_timers_statement; + sqlite3_reset (_tmp6_); result = TRUE; return result; } @@ -1681,12 +2177,18 @@ gboolean dvb_database_sqlite_sqlite_config_timers_store_contains_timer (DVBdatabasesqliteSqliteConfigTimersStore* self, guint timer_id, GError** error) { gboolean result = FALSE; - gint _tmp0_; + sqlite3_stmt* _tmp0_; + guint _tmp1_; + gint _tmp2_ = 0; gint c; + sqlite3_stmt* _tmp7_; + gint _tmp8_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _tmp0_ = sqlite3_bind_int (self->priv->contains_timer_statement, 1, (gint) timer_id); - if (_tmp0_ != SQLITE_OK) { + _tmp0_ = self->priv->contains_timer_statement; + _tmp1_ = timer_id; + _tmp2_ = sqlite3_bind_int (_tmp0_, 1, (gint) _tmp1_); + if (_tmp2_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1703,17 +2205,23 @@ } c = 0; while (TRUE) { - gint _tmp1_; - gint _tmp2_; - _tmp1_ = sqlite3_step (self->priv->contains_timer_statement); - if (!(_tmp1_ == SQLITE_ROW)) { + sqlite3_stmt* _tmp3_; + gint _tmp4_ = 0; + sqlite3_stmt* _tmp5_; + gint _tmp6_ = 0; + _tmp3_ = self->priv->contains_timer_statement; + _tmp4_ = sqlite3_step (_tmp3_); + if (!(_tmp4_ == SQLITE_ROW)) { break; } - _tmp2_ = sqlite3_column_int (self->priv->contains_timer_statement, 0); - c = _tmp2_; - } - sqlite3_reset (self->priv->contains_timer_statement); - result = c > 0; + _tmp5_ = self->priv->contains_timer_statement; + _tmp6_ = sqlite3_column_int (_tmp5_, 0); + c = _tmp6_; + } + _tmp7_ = self->priv->contains_timer_statement; + sqlite3_reset (_tmp7_); + _tmp8_ = c; + result = _tmp8_ > 0; return result; } @@ -1725,59 +2233,107 @@ gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; gboolean _tmp3_ = FALSE; - DVBAdapterType _tmp4_; - gint _tmp5_; - gint _tmp18_; + sqlite3_stmt* _tmp4_; + DVBDeviceGroup* _tmp5_; + DVBAdapterType _tmp6_; + DVBAdapterType _tmp7_; + gint _tmp8_ = 0; + gboolean _tmp18_; + gboolean _tmp26_; + gboolean _tmp34_; + gboolean _tmp40_; + sqlite3_stmt* _tmp41_; + gint _tmp42_ = 0; + sqlite3_stmt* _tmp44_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (devgroup != NULL, FALSE); - _tmp4_ = dvb_device_group_get_Type (devgroup); - _tmp5_ = sqlite3_bind_int (self->priv->update_group_statement, 1, (gint) _tmp4_); - if (_tmp5_ != SQLITE_OK) { + _tmp4_ = self->priv->update_group_statement; + _tmp5_ = devgroup; + _tmp6_ = dvb_device_group_get_Type (_tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = sqlite3_bind_int (_tmp4_, 1, (gint) _tmp7_); + if (_tmp8_ != SQLITE_OK) { _tmp3_ = TRUE; } else { - DVBChannelList* _tmp6_ = NULL; - GFile* _tmp7_ = NULL; - gchar* _tmp8_ = NULL; - gint _tmp9_; - _tmp6_ = dvb_device_group_get_Channels (devgroup); - _tmp7_ = dvb_channel_list_get_channels_file (_tmp6_); - _tmp8_ = g_file_get_path (_tmp7_); - _tmp9_ = sqlite3_bind_text (self->priv->update_group_statement, 2, _tmp8_, -1, g_free); - _tmp3_ = _tmp9_ != SQLITE_OK; + sqlite3_stmt* _tmp9_; + DVBDeviceGroup* _tmp10_; + DVBChannelList* _tmp11_; + DVBChannelList* _tmp12_; + GFile* _tmp13_; + GFile* _tmp14_; + gchar* _tmp15_ = NULL; + GDestroyNotify _tmp16_; + gint _tmp17_ = 0; + _tmp9_ = self->priv->update_group_statement; + _tmp10_ = devgroup; + _tmp11_ = dvb_device_group_get_Channels (_tmp10_); + _tmp12_ = _tmp11_; + _tmp13_ = dvb_channel_list_get_channels_file (_tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = g_file_get_path (_tmp14_); + _tmp16_ = g_free; + _tmp17_ = sqlite3_bind_text (_tmp9_, 2, _tmp15_, -1, _tmp16_); + _tmp3_ = _tmp17_ != SQLITE_OK; } - if (_tmp3_) { + _tmp18_ = _tmp3_; + if (_tmp18_) { _tmp2_ = TRUE; } else { - GFile* _tmp10_ = NULL; - gchar* _tmp11_ = NULL; - gint _tmp12_; - _tmp10_ = dvb_device_group_get_RecordingsDirectory (devgroup); - _tmp11_ = g_file_get_path (_tmp10_); - _tmp12_ = sqlite3_bind_text (self->priv->update_group_statement, 3, _tmp11_, -1, g_free); - _tmp2_ = _tmp12_ != SQLITE_OK; + sqlite3_stmt* _tmp19_; + DVBDeviceGroup* _tmp20_; + GFile* _tmp21_; + GFile* _tmp22_; + gchar* _tmp23_ = NULL; + GDestroyNotify _tmp24_; + gint _tmp25_ = 0; + _tmp19_ = self->priv->update_group_statement; + _tmp20_ = devgroup; + _tmp21_ = dvb_device_group_get_RecordingsDirectory (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = g_file_get_path (_tmp22_); + _tmp24_ = g_free; + _tmp25_ = sqlite3_bind_text (_tmp19_, 3, _tmp23_, -1, _tmp24_); + _tmp2_ = _tmp25_ != SQLITE_OK; } - if (_tmp2_) { + _tmp26_ = _tmp2_; + if (_tmp26_) { _tmp1_ = TRUE; } else { - const gchar* _tmp13_ = NULL; - gchar* _tmp14_; - gint _tmp15_; - _tmp13_ = dvb_device_group_get_Name (devgroup); - _tmp14_ = g_strdup (_tmp13_); - _tmp15_ = sqlite3_bind_text (self->priv->update_group_statement, 4, _tmp14_, -1, g_free); - _tmp1_ = _tmp15_ != SQLITE_OK; + sqlite3_stmt* _tmp27_; + DVBDeviceGroup* _tmp28_; + const gchar* _tmp29_; + const gchar* _tmp30_; + gchar* _tmp31_; + GDestroyNotify _tmp32_; + gint _tmp33_ = 0; + _tmp27_ = self->priv->update_group_statement; + _tmp28_ = devgroup; + _tmp29_ = dvb_device_group_get_Name (_tmp28_); + _tmp30_ = _tmp29_; + _tmp31_ = g_strdup (_tmp30_); + _tmp32_ = g_free; + _tmp33_ = sqlite3_bind_text (_tmp27_, 4, _tmp31_, -1, _tmp32_); + _tmp1_ = _tmp33_ != SQLITE_OK; } - if (_tmp1_) { + _tmp34_ = _tmp1_; + if (_tmp34_) { _tmp0_ = TRUE; } else { - guint _tmp16_; - gint _tmp17_; - _tmp16_ = dvb_device_group_get_Id (devgroup); - _tmp17_ = sqlite3_bind_int (self->priv->update_group_statement, 5, (gint) _tmp16_); - _tmp0_ = _tmp17_ != SQLITE_OK; + sqlite3_stmt* _tmp35_; + DVBDeviceGroup* _tmp36_; + guint _tmp37_; + guint _tmp38_; + gint _tmp39_ = 0; + _tmp35_ = self->priv->update_group_statement; + _tmp36_ = devgroup; + _tmp37_ = dvb_device_group_get_Id (_tmp36_); + _tmp38_ = _tmp37_; + _tmp39_ = sqlite3_bind_int (_tmp35_, 5, (gint) _tmp38_); + _tmp0_ = _tmp39_ != SQLITE_OK; } - if (_tmp0_) { + _tmp40_ = _tmp0_; + if (_tmp40_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1792,9 +2348,12 @@ result = FALSE; return result; } - _tmp18_ = sqlite3_step (self->priv->update_group_statement); - if (_tmp18_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->update_group_statement, &_inner_error_); + _tmp41_ = self->priv->update_group_statement; + _tmp42_ = sqlite3_step (_tmp41_); + if (_tmp42_ != SQLITE_DONE) { + sqlite3_stmt* _tmp43_; + _tmp43_ = self->priv->update_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp43_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1808,7 +2367,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->update_group_statement); + _tmp44_ = self->priv->update_group_statement; + sqlite3_reset (_tmp44_); result = TRUE; return result; } @@ -1816,18 +2376,28 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_group (DVBdatabaseConfigStore* base, const gchar* name, gint* channel_group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gint _channel_group_id = 0; + gint _vala_channel_group_id = 0; gboolean result = FALSE; - gchar* _tmp0_; - gint _tmp1_; - gint _tmp2_; - gint64 _tmp3_; + sqlite3_stmt* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; + GDestroyNotify _tmp3_; + gint _tmp4_ = 0; + sqlite3_stmt* _tmp5_; + gint _tmp6_ = 0; + sqlite3* _tmp8_; + gint64 _tmp9_ = 0LL; + sqlite3_stmt* _tmp10_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (name != NULL, FALSE); - _tmp0_ = g_strdup (name); - _tmp1_ = sqlite3_bind_text (self->priv->insert_channel_group_statement, 1, _tmp0_, -1, g_free); - if (_tmp1_ != SQLITE_OK) { + _vala_channel_group_id = -1; + _tmp0_ = self->priv->insert_channel_group_statement; + _tmp1_ = name; + _tmp2_ = g_strdup (_tmp1_); + _tmp3_ = g_free; + _tmp4_ = sqlite3_bind_text (_tmp0_, 1, _tmp2_, -1, _tmp3_); + if (_tmp4_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1841,13 +2411,16 @@ } result = FALSE; if (channel_group_id) { - *channel_group_id = _channel_group_id; + *channel_group_id = _vala_channel_group_id; } return result; } - _tmp2_ = sqlite3_step (self->priv->insert_channel_group_statement); - if (_tmp2_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->insert_channel_group_statement, &_inner_error_); + _tmp5_ = self->priv->insert_channel_group_statement; + _tmp6_ = sqlite3_step (_tmp5_); + if (_tmp6_ != SQLITE_DONE) { + sqlite3_stmt* _tmp7_; + _tmp7_ = self->priv->insert_channel_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp7_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1860,16 +2433,18 @@ } result = FALSE; if (channel_group_id) { - *channel_group_id = _channel_group_id; + *channel_group_id = _vala_channel_group_id; } return result; } - _tmp3_ = sqlite3_last_insert_rowid (((DVBdatabasesqliteSqliteDatabase*) self)->db); - _channel_group_id = (gint) _tmp3_; - sqlite3_reset (self->priv->insert_channel_group_statement); + _tmp8_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + _tmp9_ = sqlite3_last_insert_rowid (_tmp8_); + _vala_channel_group_id = (gint) _tmp9_; + _tmp10_ = self->priv->insert_channel_group_statement; + sqlite3_reset (_tmp10_); result = TRUE; if (channel_group_id) { - *channel_group_id = _channel_group_id; + *channel_group_id = _vala_channel_group_id; } return result; } @@ -1878,14 +2453,24 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_group (DVBdatabaseConfigStore* base, gint group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; gboolean result = FALSE; - gint _tmp0_; + sqlite3_stmt* _tmp0_; gint _tmp1_; - gint _tmp2_; - gint _tmp3_; + gint _tmp2_ = 0; + sqlite3_stmt* _tmp3_; + gint _tmp4_; + gint _tmp5_ = 0; + sqlite3_stmt* _tmp6_; + gint _tmp7_ = 0; + sqlite3_stmt* _tmp9_; + sqlite3_stmt* _tmp10_; + gint _tmp11_ = 0; + sqlite3_stmt* _tmp13_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _tmp0_ = sqlite3_bind_int (self->priv->delete_channel_group_statement, 1, group_id); - if (_tmp0_ != SQLITE_OK) { + _tmp0_ = self->priv->delete_channel_group_statement; + _tmp1_ = group_id; + _tmp2_ = sqlite3_bind_int (_tmp0_, 1, _tmp1_); + if (_tmp2_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1900,8 +2485,10 @@ result = FALSE; return result; } - _tmp1_ = sqlite3_bind_int (self->priv->remove_all_channel_group_statement, 1, group_id); - if (_tmp1_ != SQLITE_OK) { + _tmp3_ = self->priv->remove_all_channel_group_statement; + _tmp4_ = group_id; + _tmp5_ = sqlite3_bind_int (_tmp3_, 1, _tmp4_); + if (_tmp5_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1927,9 +2514,12 @@ return FALSE; } } - _tmp2_ = sqlite3_step (self->priv->delete_channel_group_statement); - if (_tmp2_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_channel_group_statement, &_inner_error_); + _tmp6_ = self->priv->delete_channel_group_statement; + _tmp7_ = sqlite3_step (_tmp6_); + if (_tmp7_ != SQLITE_DONE) { + sqlite3_stmt* _tmp8_; + _tmp8_ = self->priv->delete_channel_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp8_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1943,10 +2533,14 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_channel_group_statement); - _tmp3_ = sqlite3_step (self->priv->remove_all_channel_group_statement); - if (_tmp3_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->remove_all_channel_group_statement, &_inner_error_); + _tmp9_ = self->priv->delete_channel_group_statement; + sqlite3_reset (_tmp9_); + _tmp10_ = self->priv->remove_all_channel_group_statement; + _tmp11_ = sqlite3_step (_tmp10_); + if (_tmp11_ != SQLITE_DONE) { + sqlite3_stmt* _tmp12_; + _tmp12_ = self->priv->remove_all_channel_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp12_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1960,7 +2554,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->remove_all_channel_group_statement); + _tmp13_ = self->priv->remove_all_channel_group_statement; + sqlite3_reset (_tmp13_); dvb_database_sqlite_sqlite_database_end_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1980,36 +2575,52 @@ static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_channel_groups (DVBdatabaseConfigStore* base, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; GeeList* result = NULL; - GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp0_; GeeArrayList* groups; + sqlite3_stmt* _tmp13_; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; _tmp0_ = gee_array_list_new (DVB_TYPE_CHANNEL_GROUP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); groups = _tmp0_; while (TRUE) { - gint _tmp1_; - gint _tmp2_; + sqlite3_stmt* _tmp1_; + gint _tmp2_ = 0; + sqlite3_stmt* _tmp3_; + gint _tmp4_ = 0; gint group_id; - const gchar* _tmp3_ = NULL; - gchar* _tmp4_; + sqlite3_stmt* _tmp5_; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_; gchar* group_name; - DVBChannelGroup* _tmp5_ = NULL; + gint _tmp8_; + const gchar* _tmp9_; + DVBChannelGroup* _tmp10_; DVBChannelGroup* group; - _tmp1_ = sqlite3_step (self->priv->select_channel_groups_statement); - if (!(_tmp1_ == SQLITE_ROW)) { + GeeArrayList* _tmp11_; + DVBChannelGroup* _tmp12_; + _tmp1_ = self->priv->select_channel_groups_statement; + _tmp2_ = sqlite3_step (_tmp1_); + if (!(_tmp2_ == SQLITE_ROW)) { break; } - _tmp2_ = sqlite3_column_int (self->priv->select_channel_groups_statement, 0); - group_id = _tmp2_; - _tmp3_ = sqlite3_column_text (self->priv->select_channel_groups_statement, 1); - _tmp4_ = g_strdup (_tmp3_); - group_name = _tmp4_; - _tmp5_ = dvb_channel_group_new (group_id, group_name); - group = _tmp5_; - gee_abstract_collection_add ((GeeAbstractCollection*) groups, group); + _tmp3_ = self->priv->select_channel_groups_statement; + _tmp4_ = sqlite3_column_int (_tmp3_, 0); + group_id = _tmp4_; + _tmp5_ = self->priv->select_channel_groups_statement; + _tmp6_ = sqlite3_column_text (_tmp5_, 1); + _tmp7_ = g_strdup (_tmp6_); + group_name = _tmp7_; + _tmp8_ = group_id; + _tmp9_ = group_name; + _tmp10_ = dvb_channel_group_new (_tmp8_, _tmp9_); + group = _tmp10_; + _tmp11_ = groups; + _tmp12_ = group; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, _tmp12_); _g_object_unref0 (group); _g_free0 (group_name); } - sqlite3_reset (self->priv->select_channel_groups_statement); + _tmp13_ = self->priv->select_channel_groups_statement; + sqlite3_reset (_tmp13_); result = (GeeList*) groups; return result; } @@ -2019,20 +2630,31 @@ DVBdatabasesqliteSqliteConfigTimersStore * self; GeeList* result = NULL; gboolean _tmp0_ = FALSE; - gint _tmp1_; - GeeArrayList* _tmp3_ = NULL; + sqlite3_stmt* _tmp1_; + guint _tmp2_; + gint _tmp3_ = 0; + gboolean _tmp7_; + GeeArrayList* _tmp8_; GeeArrayList* channels; + sqlite3_stmt* _tmp14_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _tmp1_ = sqlite3_bind_int (self->priv->select_channels_statement, 1, (gint) dev_group_id); - if (_tmp1_ != SQLITE_OK) { + _tmp1_ = self->priv->select_channels_statement; + _tmp2_ = dev_group_id; + _tmp3_ = sqlite3_bind_int (_tmp1_, 1, (gint) _tmp2_); + if (_tmp3_ != SQLITE_OK) { _tmp0_ = TRUE; } else { - gint _tmp2_; - _tmp2_ = sqlite3_bind_int (self->priv->select_channels_statement, 2, channel_group_id); - _tmp0_ = _tmp2_ != SQLITE_OK; + sqlite3_stmt* _tmp4_; + gint _tmp5_; + gint _tmp6_ = 0; + _tmp4_ = self->priv->select_channels_statement; + _tmp5_ = channel_group_id; + _tmp6_ = sqlite3_bind_int (_tmp4_, 2, _tmp5_); + _tmp0_ = _tmp6_ != SQLITE_OK; } - if (_tmp0_) { + _tmp7_ = _tmp0_; + if (_tmp7_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -2045,19 +2667,26 @@ } } } - _tmp3_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); - channels = _tmp3_; + _tmp8_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); + channels = _tmp8_; while (TRUE) { - gint _tmp4_; - gint _tmp5_; - _tmp4_ = sqlite3_step (self->priv->select_channels_statement); - if (!(_tmp4_ == SQLITE_ROW)) { + sqlite3_stmt* _tmp9_; + gint _tmp10_ = 0; + GeeArrayList* _tmp11_; + sqlite3_stmt* _tmp12_; + gint _tmp13_ = 0; + _tmp9_ = self->priv->select_channels_statement; + _tmp10_ = sqlite3_step (_tmp9_); + if (!(_tmp10_ == SQLITE_ROW)) { break; } - _tmp5_ = sqlite3_column_int (self->priv->select_channels_statement, 0); - gee_abstract_collection_add ((GeeAbstractCollection*) channels, GUINT_TO_POINTER ((guint) _tmp5_)); + _tmp11_ = channels; + _tmp12_ = self->priv->select_channels_statement; + _tmp13_ = sqlite3_column_int (_tmp12_, 0); + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, GUINT_TO_POINTER ((guint) _tmp13_)); } - sqlite3_reset (self->priv->select_channels_statement); + _tmp14_ = self->priv->select_channels_statement; + sqlite3_reset (_tmp14_); result = (GeeList*) channels; return result; } @@ -2068,31 +2697,53 @@ gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - guint _tmp2_; - gint _tmp3_; - gint _tmp7_; + sqlite3_stmt* _tmp2_; + DVBChannel* _tmp3_; + guint _tmp4_; + guint _tmp5_; + gint _tmp6_ = 0; + gboolean _tmp12_; + gboolean _tmp16_; + sqlite3_stmt* _tmp17_; + gint _tmp18_ = 0; + sqlite3_stmt* _tmp20_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (channel != NULL, FALSE); - _tmp2_ = dvb_channel_get_Sid (channel); - _tmp3_ = sqlite3_bind_int (self->priv->add_channel_group_statement, 1, (gint) _tmp2_); - if (_tmp3_ != SQLITE_OK) { + _tmp2_ = self->priv->add_channel_group_statement; + _tmp3_ = channel; + _tmp4_ = dvb_channel_get_Sid (_tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = sqlite3_bind_int (_tmp2_, 1, (gint) _tmp5_); + if (_tmp6_ != SQLITE_OK) { _tmp1_ = TRUE; } else { - guint _tmp4_; - gint _tmp5_; - _tmp4_ = dvb_channel_get_GroupId (channel); - _tmp5_ = sqlite3_bind_int (self->priv->add_channel_group_statement, 2, (gint) _tmp4_); - _tmp1_ = _tmp5_ != SQLITE_OK; + sqlite3_stmt* _tmp7_; + DVBChannel* _tmp8_; + guint _tmp9_; + guint _tmp10_; + gint _tmp11_ = 0; + _tmp7_ = self->priv->add_channel_group_statement; + _tmp8_ = channel; + _tmp9_ = dvb_channel_get_GroupId (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = sqlite3_bind_int (_tmp7_, 2, (gint) _tmp10_); + _tmp1_ = _tmp11_ != SQLITE_OK; } - if (_tmp1_) { + _tmp12_ = _tmp1_; + if (_tmp12_) { _tmp0_ = TRUE; } else { - gint _tmp6_; - _tmp6_ = sqlite3_bind_int (self->priv->add_channel_group_statement, 3, group_id); - _tmp0_ = _tmp6_ != SQLITE_OK; + sqlite3_stmt* _tmp13_; + gint _tmp14_; + gint _tmp15_ = 0; + _tmp13_ = self->priv->add_channel_group_statement; + _tmp14_ = group_id; + _tmp15_ = sqlite3_bind_int (_tmp13_, 3, _tmp14_); + _tmp0_ = _tmp15_ != SQLITE_OK; } - if (_tmp0_) { + _tmp16_ = _tmp0_; + if (_tmp16_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -2107,9 +2758,12 @@ result = FALSE; return result; } - _tmp7_ = sqlite3_step (self->priv->add_channel_group_statement); - if (_tmp7_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->add_channel_group_statement, &_inner_error_); + _tmp17_ = self->priv->add_channel_group_statement; + _tmp18_ = sqlite3_step (_tmp17_); + if (_tmp18_ != SQLITE_DONE) { + sqlite3_stmt* _tmp19_; + _tmp19_ = self->priv->add_channel_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp19_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -2123,7 +2777,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->add_channel_group_statement); + _tmp20_ = self->priv->add_channel_group_statement; + sqlite3_reset (_tmp20_); result = TRUE; return result; } @@ -2134,31 +2789,53 @@ gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - guint _tmp2_; - gint _tmp3_; - gint _tmp7_; + sqlite3_stmt* _tmp2_; + DVBChannel* _tmp3_; + guint _tmp4_; + guint _tmp5_; + gint _tmp6_ = 0; + gboolean _tmp12_; + gboolean _tmp16_; + sqlite3_stmt* _tmp17_; + gint _tmp18_ = 0; + sqlite3_stmt* _tmp20_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (channel != NULL, FALSE); - _tmp2_ = dvb_channel_get_Sid (channel); - _tmp3_ = sqlite3_bind_int (self->priv->remove_channel_group_statement, 1, (gint) _tmp2_); - if (_tmp3_ != SQLITE_OK) { + _tmp2_ = self->priv->remove_channel_group_statement; + _tmp3_ = channel; + _tmp4_ = dvb_channel_get_Sid (_tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = sqlite3_bind_int (_tmp2_, 1, (gint) _tmp5_); + if (_tmp6_ != SQLITE_OK) { _tmp1_ = TRUE; } else { - guint _tmp4_; - gint _tmp5_; - _tmp4_ = dvb_channel_get_GroupId (channel); - _tmp5_ = sqlite3_bind_int (self->priv->remove_channel_group_statement, 2, (gint) _tmp4_); - _tmp1_ = _tmp5_ != SQLITE_OK; + sqlite3_stmt* _tmp7_; + DVBChannel* _tmp8_; + guint _tmp9_; + guint _tmp10_; + gint _tmp11_ = 0; + _tmp7_ = self->priv->remove_channel_group_statement; + _tmp8_ = channel; + _tmp9_ = dvb_channel_get_GroupId (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = sqlite3_bind_int (_tmp7_, 2, (gint) _tmp10_); + _tmp1_ = _tmp11_ != SQLITE_OK; } - if (_tmp1_) { + _tmp12_ = _tmp1_; + if (_tmp12_) { _tmp0_ = TRUE; } else { - gint _tmp6_; - _tmp6_ = sqlite3_bind_int (self->priv->remove_channel_group_statement, 3, group_id); - _tmp0_ = _tmp6_ != SQLITE_OK; + sqlite3_stmt* _tmp13_; + gint _tmp14_; + gint _tmp15_ = 0; + _tmp13_ = self->priv->remove_channel_group_statement; + _tmp14_ = group_id; + _tmp15_ = sqlite3_bind_int (_tmp13_, 3, _tmp14_); + _tmp0_ = _tmp15_ != SQLITE_OK; } - if (_tmp0_) { + _tmp16_ = _tmp0_; + if (_tmp16_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -2173,9 +2850,12 @@ result = FALSE; return result; } - _tmp7_ = sqlite3_step (self->priv->remove_channel_group_statement); - if (_tmp7_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->remove_channel_group_statement, &_inner_error_); + _tmp17_ = self->priv->remove_channel_group_statement; + _tmp18_ = sqlite3_step (_tmp17_); + if (_tmp18_ != SQLITE_DONE) { + sqlite3_stmt* _tmp19_; + _tmp19_ = self->priv->remove_channel_group_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp19_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -2189,46 +2869,52 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->remove_channel_group_statement); + _tmp20_ = self->priv->remove_channel_group_statement; + sqlite3_reset (_tmp20_); result = TRUE; return result; } static void dvb_database_sqlite_sqlite_config_timers_store_class_init (DVBdatabasesqliteSqliteConfigTimersStoreClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_database_sqlite_sqlite_config_timers_store_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBdatabasesqliteSqliteConfigTimersStorePrivate)); DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS (klass)->create = dvb_database_sqlite_sqlite_config_timers_store_real_create; DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS (klass)->upgrade = dvb_database_sqlite_sqlite_config_timers_store_real_upgrade; DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS (klass)->on_open = dvb_database_sqlite_sqlite_config_timers_store_real_on_open; G_OBJECT_CLASS (klass)->finalize = dvb_database_sqlite_sqlite_config_timers_store_finalize; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_database_sqlite_sqlite_config_timers_store_log = _tmp1_; } static void dvb_database_sqlite_sqlite_config_timers_store_dvb_database_config_store_interface_init (DVBdatabaseConfigStoreIface * iface) { dvb_database_sqlite_sqlite_config_timers_store_dvb_database_config_store_parent_iface = g_type_interface_peek_parent (iface); - iface->get_all_device_groups = (GeeList* (*)(DVBdatabaseConfigStore* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_all_device_groups; - iface->add_device_group = (gboolean (*)(DVBdatabaseConfigStore* ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_device_group; - iface->remove_device_group = (gboolean (*)(DVBdatabaseConfigStore* ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_group; - iface->get_parent_group = (gboolean (*)(DVBdatabaseConfigStore* ,guint ,guint ,guint* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_parent_group; - iface->add_device_to_group = (gboolean (*)(DVBdatabaseConfigStore* ,DVBDevice* ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_device_to_group; - iface->remove_device_from_group = (gboolean (*)(DVBdatabaseConfigStore* ,DVBDevice* ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_from_group; - iface->update_from_group = (gboolean (*)(DVBdatabaseConfigStore* ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_update_from_group; - iface->add_channel_group = (gboolean (*)(DVBdatabaseConfigStore* ,const gchar* ,gint* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_group; - iface->remove_channel_group = (gboolean (*)(DVBdatabaseConfigStore* ,gint ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_group; - iface->get_channel_groups = (GeeList* (*)(DVBdatabaseConfigStore* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_channel_groups; - iface->get_channels_of_group = (GeeList* (*)(DVBdatabaseConfigStore* ,guint ,gint ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_channels_of_group; - iface->add_channel_to_group = (gboolean (*)(DVBdatabaseConfigStore* ,DVBChannel* ,gint ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_to_group; - iface->remove_channel_from_group = (gboolean (*)(DVBdatabaseConfigStore* ,DVBChannel* ,gint ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_from_group; + iface->get_all_device_groups = (GeeList* (*)(DVBdatabaseConfigStore*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_all_device_groups; + iface->add_device_group = (gboolean (*)(DVBdatabaseConfigStore*, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_device_group; + iface->remove_device_group = (gboolean (*)(DVBdatabaseConfigStore*, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_group; + iface->get_parent_group = (gboolean (*)(DVBdatabaseConfigStore*, guint, guint, guint*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_parent_group; + iface->add_device_to_group = (gboolean (*)(DVBdatabaseConfigStore*, DVBDevice*, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_device_to_group; + iface->remove_device_from_group = (gboolean (*)(DVBdatabaseConfigStore*, DVBDevice*, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_from_group; + iface->update_from_group = (gboolean (*)(DVBdatabaseConfigStore*, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_update_from_group; + iface->add_channel_group = (gboolean (*)(DVBdatabaseConfigStore*, const gchar*, gint*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_group; + iface->remove_channel_group = (gboolean (*)(DVBdatabaseConfigStore*, gint, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_group; + iface->get_channel_groups = (GeeList* (*)(DVBdatabaseConfigStore*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_channel_groups; + iface->get_channels_of_group = (GeeList* (*)(DVBdatabaseConfigStore*, guint, gint, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_channels_of_group; + iface->add_channel_to_group = (gboolean (*)(DVBdatabaseConfigStore*, DVBChannel*, gint, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_to_group; + iface->remove_channel_from_group = (gboolean (*)(DVBdatabaseConfigStore*, DVBChannel*, gint, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_from_group; } static void dvb_database_sqlite_sqlite_config_timers_store_dvb_database_timers_store_interface_init (DVBdatabaseTimersStoreIface * iface) { dvb_database_sqlite_sqlite_config_timers_store_dvb_database_timers_store_parent_iface = g_type_interface_peek_parent (iface); - iface->get_all_timers_of_device_group = (GeeList* (*)(DVBdatabaseTimersStore* ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_all_timers_of_device_group; - iface->add_timer_to_device_group = (gboolean (*)(DVBdatabaseTimersStore* ,DVBTimer* ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_timer_to_device_group; - iface->remove_timer_from_device_group = (gboolean (*)(DVBdatabaseTimersStore* ,guint ,DVBDeviceGroup* ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_timer_from_device_group; - iface->remove_all_timers_from_device_group = (gboolean (*)(DVBdatabaseTimersStore* ,guint ,GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_all_timers_from_device_group; + iface->get_all_timers_of_device_group = (GeeList* (*)(DVBdatabaseTimersStore*, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_get_all_timers_of_device_group; + iface->add_timer_to_device_group = (gboolean (*)(DVBdatabaseTimersStore*, DVBTimer*, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_add_timer_to_device_group; + iface->remove_timer_from_device_group = (gboolean (*)(DVBdatabaseTimersStore*, guint, DVBDeviceGroup*, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_timer_from_device_group; + iface->remove_all_timers_from_device_group = (gboolean (*)(DVBdatabaseTimersStore*, guint, GError**)) dvb_database_sqlite_sqlite_config_timers_store_real_remove_all_timers_from_device_group; } diff -Nru gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteConfigTimersStore.vala gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteConfigTimersStore.vala --- gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteConfigTimersStore.vala 2010-09-29 20:17:49.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteConfigTimersStore.vala 2011-09-29 20:27:47.000000000 +0000 @@ -20,11 +20,14 @@ using GLib; using Gee; using Sqlite; +using DVB.Logging; namespace DVB.database.sqlite { public class SqliteConfigTimersStore : SqliteDatabase, ConfigStore, TimersStore { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + private static const int VERSION = 1; private static const string CREATE_DEVICE_GROUPS = @@ -35,14 +38,14 @@ recordings_dir VARCHAR(255), name VARCHAR(255), PRIMARY KEY(group_id))"""; - + private static const string CREATE_DEVICES = """CREATE TABLE devices ( group_id INTEGER, adapter INTEGER, frontend INTEGER, PRIMARY KEY(adapter, frontend))"""; - + private static const string CREATE_TIMERS = """CREATE TABLE timers ( timer_id INTEGER, @@ -61,56 +64,56 @@ """CREATE TABLE channel_groups ( channel_group_id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255))"""; - + private static const string CREATE_CHANNELS = """CREATE TABLE channels ( sid INTEGER, group_id INTEGER, channel_group_id INTEGER, PRIMARY KEY(sid, group_id, channel_group_id))"""; - + private static const string SELECT_ALL_GROUPS = "SELECT * FROM device_groups"; - + private static const string SELECT_DEVICES = "SELECT * FROM devices WHERE group_id=?"; - + private static const string DELETE_GROUP = "DELETE FROM device_groups WHERE group_id=?"; - + private static const string INSERT_GROUP = "INSERT INTO device_groups VALUES (?, ?, ?, ?, ?)"; - + private static const string CONTAINS_GROUP = "SELECT 1 FROM device_groups WHERE group_id=?"; - + private static const string UPDATE_GROUP = "UPDATE device_groups SET adapter_type=?, channels_file=?, recordings_dir=?, name=? WHERE group_id=?"; - + private static const string DELETE_DEVICE = "DELETE FROM devices WHERE adapter=? AND frontend=?"; - + private static const string DELETE_GROUP_DEVICES = "DELETE FROM devices WHERE group_id=?"; - + private static const string INSERT_DEVICE = "INSERT INTO devices VALUES (?, ?, ?)"; private static const string SELECT_GROUP_OF_DEVICE = "SELECT group_id FROM devices WHERE adapter=? AND frontend=?"; - + private static const string SELECT_TIMERS = "SELECT * FROM timers WHERE group_id=?"; - + private static const string DELETE_TIMER = "DELETE FROM timers WHERE timer_id=?"; - + private static const string DELETE_GROUP_TIMERS = "DELETE FROM timers WHERE group_id=?"; - + private static const string INSERT_TIMER = "INSERT INTO timers VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - + private static const string CONTAINS_TIMER = "SELECT 1 FROM timers WHERE timer_id=?"; @@ -134,7 +137,7 @@ private static const string SELECT_CHANNELS = "SELECT sid FROM channels WHERE group_id=? AND channel_group_id=?"; - + private Statement select_devices_statement; private Statement delete_group_statement; private Statement insert_group_statement; @@ -174,7 +177,7 @@ this.exec_sql (CREATE_CHANNELS); } - public override void upgrade (int old_version, int new_version) + public override void upgrade (int old_version, int new_version) throws SqlError { @@ -227,13 +230,13 @@ public Gee.List get_all_device_groups () throws SqlError { Gee.List groups = new ArrayList (); - + Statement statement; if (this.db.prepare (SELECT_ALL_GROUPS, -1, out statement) != Sqlite.OK) { this.throw_last_error (); return groups; } - + while (statement.step () == Sqlite.ROW) { int group_id = statement.column_int (0); @@ -260,9 +263,9 @@ if (ref_dev == null) { try { ref_dev = Device.new_full (adapter, frontend, - channels_file, rec_dir, group_id); + channels_file, rec_dir); } catch (DeviceError e) { - critical ("Could not create device: %s", e.message); + log.error ("Could not create device: %s", e.message); } } else { devs.add (Device.new_with_type (adapter, frontend)); @@ -272,7 +275,7 @@ // No devices for this group if (ref_dev == null) { - debug ("Group %d has no devices", group_id); + log.debug ("Group %d has no devices", group_id); continue; } @@ -280,19 +283,19 @@ DeviceGroup group = new DeviceGroup ((uint)group_id, ref_dev, !Main.get_disable_epg_scanner()); group.Name = statement.column_text (4); - + for (int i=0; i 0); } - + public bool add_device_to_group (Device dev, DeviceGroup devgroup) throws SqlError { @@ -393,7 +398,7 @@ this.throw_last_error (); return false; } - + if (this.insert_device_statement.step () != Sqlite.DONE) { this.throw_last_error_reset (this.insert_device_statement); return false; @@ -402,7 +407,7 @@ return true; } - + public bool remove_device_from_group (Device dev, DeviceGroup devgroup) throws SqlError { @@ -412,7 +417,7 @@ this.throw_last_error (); return false; } - + if (this.delete_device_statement.step () != Sqlite.DONE) { this.throw_last_error_reset (this.delete_device_statement); return false; @@ -421,7 +426,7 @@ return true; } - + public Gee.List get_all_timers_of_device_group (DeviceGroup dev) throws SqlError { @@ -431,11 +436,11 @@ this.throw_last_error (); return timers; } - + while (this.select_timers_statement.step () == Sqlite.ROW) { uint tid, sid, duration, event_id; int year, month, day, hour, minute; - + tid = (uint)this.select_timers_statement.column_int (0); sid = (uint)this.select_timers_statement.column_int (2); year = this.select_timers_statement.column_int (3); @@ -445,18 +450,18 @@ minute = this.select_timers_statement.column_int (7); duration = (uint)this.select_timers_statement.column_int (8); event_id = (uint)this.select_timers_statement.column_int (9); - + Channel channel = dev.Channels.get_channel (sid); Timer timer = new Timer (tid, channel, year, month, day, hour, minute, duration); timer.EventID = event_id; timers.add (timer); - } + } this.select_timers_statement.reset (); return timers; } - + public bool add_timer_to_device_group (Timer timer, DeviceGroup dev) throws SqlError { @@ -477,16 +482,16 @@ this.throw_last_error (); return false; } - + if (this.insert_timer_statement.step () != Sqlite.DONE) { this.throw_last_error_reset (this.insert_timer_statement); return false; - } + } this.insert_timer_statement.reset (); return true; } - + public bool remove_timer_from_device_group (uint timer_id, DeviceGroup dev) throws SqlError { @@ -495,7 +500,7 @@ this.throw_last_error (); return false; } - + if (this.delete_timer_statement.step () != Sqlite.DONE) { this.throw_last_error_reset (this.delete_timer_statement); return false; @@ -504,16 +509,16 @@ return true; } - + public bool remove_all_timers_from_device_group (uint group_id) - throws SqlError + throws SqlError { if (this.delete_group_timers_statement.bind_int (1, (int)group_id) != Sqlite.OK) { this.throw_last_error (); return false; } - + if (this.delete_group_timers_statement.step () != Sqlite.DONE) { this.throw_last_error_reset (this.delete_group_timers_statement); return false; @@ -522,23 +527,23 @@ return true; } - + public bool contains_timer (uint timer_id) throws SqlError { if (this.contains_timer_statement.bind_int (1, (int)timer_id) != Sqlite.OK) { this.throw_last_error (); return false; } - + int c = 0; while (this.contains_timer_statement.step () == Sqlite.ROW) { c = this.contains_timer_statement.column_int (0); } this.contains_timer_statement.reset (); - + return (c > 0); } - + public bool update_from_group (DeviceGroup devgroup) throws SqlError { if (this.update_group_statement.bind_int (1, (int)devgroup.Type) != Sqlite.OK || this.update_group_statement.bind_text (2, devgroup.Channels.channels_file.get_path ()) != Sqlite.OK @@ -549,7 +554,7 @@ this.throw_last_error (); return false; } - + if (this.update_group_statement.step () != Sqlite.DONE) { this.throw_last_error_reset (this.update_group_statement); return false; @@ -560,6 +565,8 @@ } public bool add_channel_group (string name, out int channel_group_id) throws SqlError { + channel_group_id = -1; + if (this.insert_channel_group_statement.bind_text (1, name) != Sqlite.OK) { this.throw_last_error (); @@ -603,7 +610,7 @@ return true; } - + public Gee.List get_channel_groups () throws SqlError { diff -Nru gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteDatabase.c gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteDatabase.c --- gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteDatabase.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteDatabase.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqliteDatabase.c generated by valac 0.11.3, the Vala compiler +/* SqliteDatabase.c generated by valac 0.14.0, the Vala compiler * generated from SqliteDatabase.vala, do not modify */ /* @@ -38,6 +38,26 @@ typedef struct _DVBdatabasesqliteSqliteDatabase DVBdatabasesqliteSqliteDatabase; typedef struct _DVBdatabasesqliteSqliteDatabaseClass DVBdatabasesqliteSqliteDatabaseClass; typedef struct _DVBdatabasesqliteSqliteDatabasePrivate DVBdatabasesqliteSqliteDatabasePrivate; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _sqlite3_close0(var) ((var == NULL) ? NULL : (var = (sqlite3_close (var), NULL))) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) @@ -93,6 +113,8 @@ static gpointer dvb_database_sqlite_sqlite_database_parent_class = NULL; +static DVBLoggingLogger* dvb_database_sqlite_sqlite_database_log; +static DVBLoggingLogger* dvb_database_sqlite_sqlite_database_log = NULL; GType dvb_database_sqlite_sqlite_database_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); @@ -101,12 +123,18 @@ DVB_DATABASE_SQLITE_SQLITE_DATABASE_DUMMY_PROPERTY, DVB_DATABASE_SQLITE_SQLITE_DATABASE_DATABASE_FILE }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBdatabasesqliteSqliteDatabase* dvb_database_sqlite_sqlite_database_construct (GType object_type, GFile* dbfile, gint version); void dvb_database_sqlite_sqlite_database_open (DVBdatabasesqliteSqliteDatabase* self, GError** error); GFile* dvb_database_sqlite_sqlite_database_get_database_file (DVBdatabasesqliteSqliteDatabase* self); void dvb_utils_mkdirs (GFile* directory, GError** error); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); void dvb_database_sqlite_sqlite_database_throw_last_error (DVBdatabasesqliteSqliteDatabase* self, const gchar* errmsg, GError** error); gint dvb_database_sqlite_sqlite_database_get_version (DVBdatabasesqliteSqliteDatabase* self); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); void dvb_database_sqlite_sqlite_database_create (DVBdatabasesqliteSqliteDatabase* self, GError** error); void dvb_database_sqlite_sqlite_database_upgrade (DVBdatabasesqliteSqliteDatabase* self, gint old_version, gint new_version, GError** error); void dvb_database_sqlite_sqlite_database_set_version (DVBdatabasesqliteSqliteDatabase* self, gint version); @@ -128,9 +156,13 @@ DVBdatabasesqliteSqliteDatabase* dvb_database_sqlite_sqlite_database_construct (GType object_type, GFile* dbfile, gint version) { DVBdatabasesqliteSqliteDatabase * self = NULL; + GFile* _tmp0_; + gint _tmp1_; g_return_val_if_fail (dbfile != NULL, NULL); - self = (DVBdatabasesqliteSqliteDatabase*) g_object_new (object_type, "database-file", dbfile, NULL); - self->priv->new_version = version; + _tmp0_ = dbfile; + self = (DVBdatabasesqliteSqliteDatabase*) g_object_new (object_type, "database-file", _tmp0_, NULL); + _tmp1_ = version; + self->priv->new_version = _tmp1_; return self; } @@ -144,44 +176,67 @@ void dvb_database_sqlite_sqlite_database_open (DVBdatabasesqliteSqliteDatabase* self, GError** error) { - GFile* _tmp0_; + sqlite3* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; GFile* dbfile; - gboolean _tmp1_; + GFile* _tmp3_; + gboolean _tmp4_ = FALSE; gboolean create_tables; - GFile* _tmp2_ = NULL; + GFile* _tmp5_; + GFile* _tmp6_ = NULL; GFile* dbfile_dir; - gboolean _tmp3_; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - sqlite3* _tmp6_ = NULL; - gint _tmp7_; - gboolean _tmp8_; - gint _tmp9_; + GFile* _tmp7_; + gboolean _tmp8_ = FALSE; + GFile* _tmp13_; + gchar* _tmp14_ = NULL; + gchar* _tmp15_; + sqlite3* _tmp16_ = NULL; + gint _tmp17_ = 0; + gboolean _tmp18_; + gint _tmp19_ = 0; gint version; + gboolean _tmp20_; + gint _tmp27_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - if (self->db != NULL) { + _tmp0_ = self->db; + if (_tmp0_ != NULL) { return; } - _tmp0_ = _g_object_ref0 (self->priv->_database_file); - dbfile = _tmp0_; - _tmp1_ = g_file_query_exists (dbfile, NULL); - create_tables = !_tmp1_; - _tmp2_ = g_file_get_parent (dbfile); - dbfile_dir = _tmp2_; - _tmp3_ = g_file_query_exists (dbfile_dir, NULL); - if (!_tmp3_) { - dvb_utils_mkdirs (dbfile_dir, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch0_g_error; + _tmp1_ = self->priv->_database_file; + _tmp2_ = _g_object_ref0 (_tmp1_); + dbfile = _tmp2_; + _tmp3_ = dbfile; + _tmp4_ = g_file_query_exists (_tmp3_, NULL); + create_tables = !_tmp4_; + _tmp5_ = dbfile; + _tmp6_ = g_file_get_parent (_tmp5_); + dbfile_dir = _tmp6_; + _tmp7_ = dbfile_dir; + _tmp8_ = g_file_query_exists (_tmp7_, NULL); + if (!_tmp8_) { + { + GFile* _tmp9_; + _tmp9_ = dbfile_dir; + dvb_utils_mkdirs (_tmp9_, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch0_g_error; + } } goto __finally0; __catch0_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp10_; + GError* _tmp11_; + const gchar* _tmp12_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("SqliteDatabase.vala:51: Could not create directory: %s", e->message); + _tmp10_ = dvb_database_sqlite_sqlite_database_log; + _tmp11_ = e; + _tmp12_ = _tmp11_->message; + dvb_logging_logger_error (_tmp10_, "SqliteDatabase.vala:54: Could not create directory: %s", _tmp12_); _g_error_free0 (e); _g_object_unref0 (dbfile_dir); _g_object_unref0 (dbfile); @@ -203,12 +258,15 @@ } } } - _tmp4_ = g_file_get_path (dbfile); - _tmp5_ = _tmp4_; - _tmp7_ = sqlite3_open (_tmp5_, &_tmp6_); + _tmp13_ = dbfile; + _tmp14_ = g_file_get_path (_tmp13_); + _tmp15_ = _tmp14_; + _tmp17_ = sqlite3_open (_tmp15_, &_tmp16_); _sqlite3_close0 (self->db); - self->db = _tmp6_; - if ((_tmp8_ = _tmp7_ != SQLITE_OK, _g_free0 (_tmp5_), _tmp8_)) { + self->db = _tmp16_; + _tmp18_ = _tmp17_ != SQLITE_OK; + _g_free0 (_tmp15_); + if (_tmp18_) { dvb_database_sqlite_sqlite_database_throw_last_error (self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -225,10 +283,13 @@ } } } - _tmp9_ = dvb_database_sqlite_sqlite_database_get_version (self); - version = _tmp9_; - if (create_tables) { - g_debug ("SqliteDatabase.vala:63: Creating tables"); + _tmp19_ = dvb_database_sqlite_sqlite_database_get_version (self); + version = _tmp19_; + _tmp20_ = create_tables; + if (_tmp20_) { + DVBLoggingLogger* _tmp21_; + _tmp21_ = dvb_database_sqlite_sqlite_database_log; + dvb_logging_logger_debug (_tmp21_, "SqliteDatabase.vala:66: Creating tables"); dvb_database_sqlite_sqlite_database_create (self, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -245,9 +306,19 @@ } } } else { - if (self->priv->new_version > version) { - g_debug ("SqliteDatabase.vala:66: Updating tables"); - dvb_database_sqlite_sqlite_database_upgrade (self, version, self->priv->new_version, &_inner_error_); + gint _tmp22_; + gint _tmp23_; + _tmp22_ = self->priv->new_version; + _tmp23_ = version; + if (_tmp22_ > _tmp23_) { + DVBLoggingLogger* _tmp24_; + gint _tmp25_; + gint _tmp26_; + _tmp24_ = dvb_database_sqlite_sqlite_database_log; + dvb_logging_logger_debug (_tmp24_, "SqliteDatabase.vala:69: Updating tables"); + _tmp25_ = version; + _tmp26_ = self->priv->new_version; + dvb_database_sqlite_sqlite_database_upgrade (self, _tmp25_, _tmp26_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -264,7 +335,8 @@ } } } - dvb_database_sqlite_sqlite_database_set_version (self, self->priv->new_version); + _tmp27_ = self->priv->new_version; + dvb_database_sqlite_sqlite_database_set_version (self, _tmp27_); dvb_database_sqlite_sqlite_database_set_journal_mode (self); dvb_database_sqlite_sqlite_database_on_open (self); _g_object_unref0 (dbfile_dir); @@ -276,29 +348,39 @@ * Set database version */ void dvb_database_sqlite_sqlite_database_set_version (DVBdatabasesqliteSqliteDatabase* self, gint version) { - gchar* _tmp0_ = NULL; - gchar* _tmp1_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup_printf ("PRAGMA user_version = %d", version); - _tmp1_ = _tmp0_; - dvb_database_sqlite_sqlite_database_exec_sql (self, _tmp1_, &_inner_error_); - _g_free0 (_tmp1_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch1_dvb_database_sql_error; + { + gint _tmp0_; + gchar* _tmp1_ = NULL; + gchar* _tmp2_; + _tmp0_ = version; + _tmp1_ = g_strdup_printf ("PRAGMA user_version = %d", _tmp0_); + _tmp2_ = _tmp1_; + dvb_database_sqlite_sqlite_database_exec_sql (self, _tmp2_, &_inner_error_); + _g_free0 (_tmp2_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch1_dvb_database_sql_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } goto __finally1; __catch1_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp3_; + GError* _tmp4_; + const gchar* _tmp5_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("SqliteDatabase.vala:82: %s", e->message); + _tmp3_ = dvb_database_sqlite_sqlite_database_log; + _tmp4_ = e; + _tmp5_ = _tmp4_->message; + dvb_logging_logger_error (_tmp3_, "SqliteDatabase.vala:85: %s", _tmp5_); _g_error_free0 (e); } __finally1: @@ -313,22 +395,30 @@ void dvb_database_sqlite_sqlite_database_set_journal_mode (DVBdatabasesqliteSqliteDatabase* self) { GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - dvb_database_sqlite_sqlite_database_exec_sql (self, "PRAGMA journal_mode = TRUNCATE", &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch2_dvb_database_sql_error; + { + dvb_database_sqlite_sqlite_database_exec_sql (self, "PRAGMA journal_mode = TRUNCATE", &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch2_dvb_database_sql_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } goto __finally2; __catch2_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp0_; + GError* _tmp1_; + const gchar* _tmp2_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("SqliteDatabase.vala:90: %s", e->message); + _tmp0_ = dvb_database_sqlite_sqlite_database_log; + _tmp1_ = e; + _tmp2_ = _tmp1_->message; + dvb_logging_logger_error (_tmp0_, "SqliteDatabase.vala:93: %s", _tmp2_); _g_error_free0 (e); } __finally2: @@ -346,29 +436,37 @@ gint dvb_database_sqlite_sqlite_database_get_version (DVBdatabasesqliteSqliteDatabase* self) { gint result = 0; gint version; - gint _tmp0_; - gint _tmp1_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); version = 0; - _tmp0_ = dvb_database_sqlite_sqlite_database_simple_query_int (self, "PRAGMA user_version", &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch3_dvb_database_sql_error; + { + gint _tmp0_ = 0; + gint _tmp1_; + _tmp0_ = dvb_database_sqlite_sqlite_database_simple_query_int (self, "PRAGMA user_version", &_inner_error_); + _tmp1_ = _tmp0_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch3_dvb_database_sql_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; + version = _tmp1_; } - version = _tmp1_; goto __finally3; __catch3_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp2_; + GError* _tmp3_; + const gchar* _tmp4_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("SqliteDatabase.vala:102: %s", e->message); + _tmp2_ = dvb_database_sqlite_sqlite_database_log; + _tmp3_ = e; + _tmp4_ = _tmp3_->message; + dvb_logging_logger_error (_tmp2_, "SqliteDatabase.vala:105: %s", _tmp4_); _g_error_free0 (e); } __finally3: @@ -384,23 +482,30 @@ gint dvb_database_sqlite_sqlite_database_simple_query_int (DVBdatabasesqliteSqliteDatabase* self, const gchar* sql, GError** error) { gint result = 0; - sqlite3_stmt* st; - sqlite3_stmt* _tmp0_ = NULL; + sqlite3_stmt* st = NULL; + sqlite3* _tmp0_; + const gchar* _tmp1_; + sqlite3_stmt* _tmp2_ = NULL; gint ret; - gint _tmp1_; + sqlite3_stmt* _tmp3_; + gint _tmp4_ = 0; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (sql != NULL, 0); - st = NULL; - sqlite3_prepare (self->db, sql, -1, &_tmp0_, NULL); + _tmp0_ = self->db; + _tmp1_ = sql; + sqlite3_prepare (_tmp0_, _tmp1_, -1, &_tmp2_, NULL); _sqlite3_finalize0 (st); - st = _tmp0_; + st = _tmp2_; ret = 0; - _tmp1_ = sqlite3_step (st); - if (_tmp1_ == SQLITE_ROW) { - gint _tmp2_; - _tmp2_ = sqlite3_column_int (st, 0); - ret = _tmp2_; + _tmp3_ = st; + _tmp4_ = sqlite3_step (_tmp3_); + if (_tmp4_ == SQLITE_ROW) { + sqlite3_stmt* _tmp5_; + gint _tmp6_ = 0; + _tmp5_ = st; + _tmp6_ = sqlite3_column_int (_tmp5_, 0); + ret = _tmp6_; } else { dvb_database_sqlite_sqlite_database_throw_last_error (self, NULL, &_inner_error_); if (_inner_error_ != NULL) { @@ -422,52 +527,64 @@ } -static gint _sqlite3_exec (sqlite3* self, const gchar* sql, sqlite3_callback sqlite3_callback, void* sqlite3_callback_target, gchar** errmsg) { - gchar* _errmsg = NULL; +static gint _sqlite3_exec (sqlite3* self, const gchar* sql, sqlite3_callback callback, void* callback_target, gchar** errmsg) { + gchar* _vala_errmsg = NULL; gint result = 0; - const gchar* sqlite_errmsg; - const gchar* _tmp0_ = NULL; - gint _tmp1_; + const gchar* sqlite_errmsg = NULL; + const gchar* _tmp0_; + sqlite3_callback _tmp1_; + void* _tmp1__target; + const gchar* _tmp2_ = NULL; + gint _tmp3_ = 0; gint ec; + const gchar* _tmp6_; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (sql != NULL, 0); - sqlite_errmsg = NULL; - _tmp1_ = sqlite3_exec (self, sql, sqlite3_callback, sqlite3_callback_target, (char**) (&_tmp0_)); - sqlite_errmsg = _tmp0_; - ec = _tmp1_; - if ((&_errmsg) != NULL) { - gchar* _tmp2_; - gchar* _tmp3_; - _tmp2_ = g_strdup (sqlite_errmsg); - _tmp3_ = _tmp2_; - _g_free0 (_errmsg); - _errmsg = _tmp3_; + _tmp0_ = sql; + _tmp1_ = callback; + _tmp1__target = callback_target; + _tmp3_ = sqlite3_exec (self, _tmp0_, _tmp1_, _tmp1__target, (char**) (&_tmp2_)); + sqlite_errmsg = _tmp2_; + ec = _tmp3_; + if ((&_vala_errmsg) != NULL) { + const gchar* _tmp4_; + gchar* _tmp5_; + _tmp4_ = sqlite_errmsg; + _tmp5_ = g_strdup (_tmp4_); + _g_free0 (_vala_errmsg); + _vala_errmsg = _tmp5_; } - sqlite3_free ((void*) sqlite_errmsg); + _tmp6_ = sqlite_errmsg; + sqlite3_free ((void*) _tmp6_); result = ec; if (errmsg) { - *errmsg = _errmsg; + *errmsg = _vala_errmsg; } else { - _g_free0 (_errmsg); + _g_free0 (_vala_errmsg); } return result; } void dvb_database_sqlite_sqlite_database_exec_sql (DVBdatabasesqliteSqliteDatabase* self, const gchar* sql, GError** error) { - gchar* errmsg; - gchar* _tmp0_ = NULL; - gint _tmp1_; + gchar* errmsg = NULL; + sqlite3* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_ = NULL; + gint _tmp3_ = 0; gint val; + gint _tmp4_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (sql != NULL); - errmsg = NULL; - _tmp1_ = _sqlite3_exec (self->db, sql, NULL, NULL, &_tmp0_); + _tmp0_ = self->db; + _tmp1_ = sql; + _tmp3_ = _sqlite3_exec (_tmp0_, _tmp1_, NULL, NULL, &_tmp2_); _g_free0 (errmsg); - errmsg = _tmp0_; - val = _tmp1_; - if (val != SQLITE_OK) { + errmsg = _tmp2_; + val = _tmp3_; + _tmp4_ = val; + if (_tmp4_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error (self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -521,10 +638,12 @@ void dvb_database_sqlite_sqlite_database_throw_last_error_reset (DVBdatabasesqliteSqliteDatabase* self, sqlite3_stmt* stmnt, GError** error) { + sqlite3_stmt* _tmp0_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (stmnt != NULL); - sqlite3_reset (stmnt); + _tmp0_ = stmnt; + sqlite3_reset (_tmp0_); dvb_database_sqlite_sqlite_database_throw_last_error (self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -540,37 +659,46 @@ void dvb_database_sqlite_sqlite_database_throw_last_error (DVBdatabasesqliteSqliteDatabase* self, const gchar* errmsg, GError** error) { - gint _tmp0_; + sqlite3* _tmp0_; + gint _tmp1_ = 0; gint code; - gchar* msg; + gchar* msg = NULL; + const gchar* _tmp2_; + gint _tmp9_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _tmp0_ = sqlite3_errcode (self->db); - code = _tmp0_; - msg = NULL; - if (errmsg == NULL) { - const gchar* _tmp1_ = NULL; - gchar* _tmp2_ = NULL; - gchar* _tmp3_; - _tmp1_ = sqlite3_errmsg (self->db); - _tmp2_ = g_strdup_printf ("SqlError: %d: %s", code, _tmp1_); - _tmp3_ = _tmp2_; + _tmp0_ = self->db; + _tmp1_ = sqlite3_errcode (_tmp0_); + code = _tmp1_; + _tmp2_ = errmsg; + if (_tmp2_ == NULL) { + gint _tmp3_; + sqlite3* _tmp4_; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + _tmp3_ = code; + _tmp4_ = self->db; + _tmp5_ = sqlite3_errmsg (_tmp4_); + _tmp6_ = g_strdup_printf ("SqlError: %d: %s", _tmp3_, _tmp5_); _g_free0 (msg); - msg = _tmp3_; + msg = _tmp6_; } else { - gchar* _tmp4_; - gchar* _tmp5_; - _tmp4_ = g_strdup (errmsg); - _tmp5_ = _tmp4_; + const gchar* _tmp7_; + gchar* _tmp8_; + _tmp7_ = errmsg; + _tmp8_ = g_strdup (_tmp7_); _g_free0 (msg); - msg = _tmp5_; + msg = _tmp8_; } - switch (code) { + _tmp9_ = code; + switch (_tmp9_) { case 1: { - GError* _tmp6_ = NULL; - _tmp6_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_ERROR, msg); - _inner_error_ = _tmp6_; + const gchar* _tmp10_; + GError* _tmp11_; + _tmp10_ = msg; + _tmp11_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_ERROR, _tmp10_); + _inner_error_ = _tmp11_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -584,9 +712,11 @@ } case 2: { - GError* _tmp7_ = NULL; - _tmp7_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_INTERNAL, msg); - _inner_error_ = _tmp7_; + const gchar* _tmp12_; + GError* _tmp13_; + _tmp12_ = msg; + _tmp13_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_INTERNAL, _tmp12_); + _inner_error_ = _tmp13_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -600,9 +730,11 @@ } case 3: { - GError* _tmp8_ = NULL; - _tmp8_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_PERM, msg); - _inner_error_ = _tmp8_; + const gchar* _tmp14_; + GError* _tmp15_; + _tmp14_ = msg; + _tmp15_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_PERM, _tmp14_); + _inner_error_ = _tmp15_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -616,9 +748,11 @@ } case 4: { - GError* _tmp9_ = NULL; - _tmp9_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_ABORT, msg); - _inner_error_ = _tmp9_; + const gchar* _tmp16_; + GError* _tmp17_; + _tmp16_ = msg; + _tmp17_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_ABORT, _tmp16_); + _inner_error_ = _tmp17_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -632,9 +766,11 @@ } case 5: { - GError* _tmp10_ = NULL; - _tmp10_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_BUSY, msg); - _inner_error_ = _tmp10_; + const gchar* _tmp18_; + GError* _tmp19_; + _tmp18_ = msg; + _tmp19_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_BUSY, _tmp18_); + _inner_error_ = _tmp19_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -648,9 +784,11 @@ } case 6: { - GError* _tmp11_ = NULL; - _tmp11_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_LOCKED, msg); - _inner_error_ = _tmp11_; + const gchar* _tmp20_; + GError* _tmp21_; + _tmp20_ = msg; + _tmp21_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_LOCKED, _tmp20_); + _inner_error_ = _tmp21_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -664,9 +802,11 @@ } case 7: { - GError* _tmp12_ = NULL; - _tmp12_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOMEM, msg); - _inner_error_ = _tmp12_; + const gchar* _tmp22_; + GError* _tmp23_; + _tmp22_ = msg; + _tmp23_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOMEM, _tmp22_); + _inner_error_ = _tmp23_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -680,9 +820,11 @@ } case 8: { - GError* _tmp13_ = NULL; - _tmp13_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_READONLY, msg); - _inner_error_ = _tmp13_; + const gchar* _tmp24_; + GError* _tmp25_; + _tmp24_ = msg; + _tmp25_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_READONLY, _tmp24_); + _inner_error_ = _tmp25_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -696,9 +838,11 @@ } case 9: { - GError* _tmp14_ = NULL; - _tmp14_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_INTERRUPT, msg); - _inner_error_ = _tmp14_; + const gchar* _tmp26_; + GError* _tmp27_; + _tmp26_ = msg; + _tmp27_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_INTERRUPT, _tmp26_); + _inner_error_ = _tmp27_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -712,9 +856,11 @@ } case 10: { - GError* _tmp15_ = NULL; - _tmp15_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_IOERR, msg); - _inner_error_ = _tmp15_; + const gchar* _tmp28_; + GError* _tmp29_; + _tmp28_ = msg; + _tmp29_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_IOERR, _tmp28_); + _inner_error_ = _tmp29_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -728,9 +874,11 @@ } case 11: { - GError* _tmp16_ = NULL; - _tmp16_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_CORRUPT, msg); - _inner_error_ = _tmp16_; + const gchar* _tmp30_; + GError* _tmp31_; + _tmp30_ = msg; + _tmp31_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_CORRUPT, _tmp30_); + _inner_error_ = _tmp31_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -744,9 +892,11 @@ } case 12: { - GError* _tmp17_ = NULL; - _tmp17_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOTFOUND, msg); - _inner_error_ = _tmp17_; + const gchar* _tmp32_; + GError* _tmp33_; + _tmp32_ = msg; + _tmp33_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOTFOUND, _tmp32_); + _inner_error_ = _tmp33_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -760,9 +910,11 @@ } case 13: { - GError* _tmp18_ = NULL; - _tmp18_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_FULL, msg); - _inner_error_ = _tmp18_; + const gchar* _tmp34_; + GError* _tmp35_; + _tmp34_ = msg; + _tmp35_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_FULL, _tmp34_); + _inner_error_ = _tmp35_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -776,9 +928,11 @@ } case 14: { - GError* _tmp19_ = NULL; - _tmp19_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_CANTOPEN, msg); - _inner_error_ = _tmp19_; + const gchar* _tmp36_; + GError* _tmp37_; + _tmp36_ = msg; + _tmp37_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_CANTOPEN, _tmp36_); + _inner_error_ = _tmp37_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -792,9 +946,11 @@ } case 15: { - GError* _tmp20_ = NULL; - _tmp20_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_PROTOCOL, msg); - _inner_error_ = _tmp20_; + const gchar* _tmp38_; + GError* _tmp39_; + _tmp38_ = msg; + _tmp39_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_PROTOCOL, _tmp38_); + _inner_error_ = _tmp39_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -808,9 +964,11 @@ } case 16: { - GError* _tmp21_ = NULL; - _tmp21_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_EMPTY, msg); - _inner_error_ = _tmp21_; + const gchar* _tmp40_; + GError* _tmp41_; + _tmp40_ = msg; + _tmp41_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_EMPTY, _tmp40_); + _inner_error_ = _tmp41_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -824,9 +982,11 @@ } case 17: { - GError* _tmp22_ = NULL; - _tmp22_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_SCHEMA, msg); - _inner_error_ = _tmp22_; + const gchar* _tmp42_; + GError* _tmp43_; + _tmp42_ = msg; + _tmp43_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_SCHEMA, _tmp42_); + _inner_error_ = _tmp43_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -840,9 +1000,11 @@ } case 18: { - GError* _tmp23_ = NULL; - _tmp23_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_TOOBIG, msg); - _inner_error_ = _tmp23_; + const gchar* _tmp44_; + GError* _tmp45_; + _tmp44_ = msg; + _tmp45_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_TOOBIG, _tmp44_); + _inner_error_ = _tmp45_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -856,9 +1018,11 @@ } case 19: { - GError* _tmp24_ = NULL; - _tmp24_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_CONSTRAINT, msg); - _inner_error_ = _tmp24_; + const gchar* _tmp46_; + GError* _tmp47_; + _tmp46_ = msg; + _tmp47_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_CONSTRAINT, _tmp46_); + _inner_error_ = _tmp47_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -872,9 +1036,11 @@ } case 20: { - GError* _tmp25_ = NULL; - _tmp25_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_MISMATCH, msg); - _inner_error_ = _tmp25_; + const gchar* _tmp48_; + GError* _tmp49_; + _tmp48_ = msg; + _tmp49_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_MISMATCH, _tmp48_); + _inner_error_ = _tmp49_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -888,9 +1054,11 @@ } case 21: { - GError* _tmp26_ = NULL; - _tmp26_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_MISUSE, msg); - _inner_error_ = _tmp26_; + const gchar* _tmp50_; + GError* _tmp51_; + _tmp50_ = msg; + _tmp51_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_MISUSE, _tmp50_); + _inner_error_ = _tmp51_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -904,9 +1072,11 @@ } case 22: { - GError* _tmp27_ = NULL; - _tmp27_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOLFS, msg); - _inner_error_ = _tmp27_; + const gchar* _tmp52_; + GError* _tmp53_; + _tmp52_ = msg; + _tmp53_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOLFS, _tmp52_); + _inner_error_ = _tmp53_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -920,9 +1090,11 @@ } case 23: { - GError* _tmp28_ = NULL; - _tmp28_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_AUTH, msg); - _inner_error_ = _tmp28_; + const gchar* _tmp54_; + GError* _tmp55_; + _tmp54_ = msg; + _tmp55_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_AUTH, _tmp54_); + _inner_error_ = _tmp55_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -936,9 +1108,11 @@ } case 24: { - GError* _tmp29_ = NULL; - _tmp29_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_FORMAT, msg); - _inner_error_ = _tmp29_; + const gchar* _tmp56_; + GError* _tmp57_; + _tmp56_ = msg; + _tmp57_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_FORMAT, _tmp56_); + _inner_error_ = _tmp57_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -952,9 +1126,11 @@ } case 25: { - GError* _tmp30_ = NULL; - _tmp30_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_RANGE, msg); - _inner_error_ = _tmp30_; + const gchar* _tmp58_; + GError* _tmp59_; + _tmp58_ = msg; + _tmp59_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_RANGE, _tmp58_); + _inner_error_ = _tmp59_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -968,9 +1144,11 @@ } case 26: { - GError* _tmp31_ = NULL; - _tmp31_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOTADB, msg); - _inner_error_ = _tmp31_; + const gchar* _tmp60_; + GError* _tmp61_; + _tmp60_ = msg; + _tmp61_ = g_error_new_literal (DVB_DATABASE_SQL_ERROR, DVB_DATABASE_SQL_ERROR_NOTADB, _tmp60_); + _inner_error_ = _tmp61_; if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (msg); @@ -996,13 +1174,13 @@ * Put the commands required to create all tables here. */ static void dvb_database_sqlite_sqlite_database_real_create (DVBdatabasesqliteSqliteDatabase* self, GError** error) { - g_return_if_fail (self != NULL); g_critical ("Type `%s' does not implement abstract method `dvb_database_sqlite_sqlite_database_create'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return; } void dvb_database_sqlite_sqlite_database_create (DVBdatabasesqliteSqliteDatabase* self, GError** error) { + g_return_if_fail (self != NULL); DVB_DATABASE_SQLITE_SQLITE_DATABASE_GET_CLASS (self)->create (self, error); } @@ -1011,13 +1189,13 @@ * Called when the database needs to be upgraded. */ static void dvb_database_sqlite_sqlite_database_real_upgrade (DVBdatabasesqliteSqliteDatabase* self, gint old_version, gint new_version, GError** error) { - g_return_if_fail (self != NULL); g_critical ("Type `%s' does not implement abstract method `dvb_database_sqlite_sqlite_database_upgrade'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return; } void dvb_database_sqlite_sqlite_database_upgrade (DVBdatabasesqliteSqliteDatabase* self, gint old_version, gint new_version, GError** error) { + g_return_if_fail (self != NULL); DVB_DATABASE_SQLITE_SQLITE_DATABASE_GET_CLASS (self)->upgrade (self, old_version, new_version, error); } @@ -1026,21 +1204,23 @@ * Called when the database has been opened. */ static void dvb_database_sqlite_sqlite_database_real_on_open (DVBdatabasesqliteSqliteDatabase* self) { - g_return_if_fail (self != NULL); g_critical ("Type `%s' does not implement abstract method `dvb_database_sqlite_sqlite_database_on_open'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return; } void dvb_database_sqlite_sqlite_database_on_open (DVBdatabasesqliteSqliteDatabase* self) { + g_return_if_fail (self != NULL); DVB_DATABASE_SQLITE_SQLITE_DATABASE_GET_CLASS (self)->on_open (self); } GFile* dvb_database_sqlite_sqlite_database_get_database_file (DVBdatabasesqliteSqliteDatabase* self) { GFile* result; + GFile* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_database_file; + _tmp0_ = self->priv->_database_file; + result = _tmp0_; return result; } @@ -1049,8 +1229,8 @@ GFile* _tmp0_; GFile* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_database_file); self->priv->_database_file = _tmp1_; g_object_notify ((GObject *) self, "database-file"); @@ -1058,6 +1238,8 @@ static void dvb_database_sqlite_sqlite_database_class_init (DVBdatabasesqliteSqliteDatabaseClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_database_sqlite_sqlite_database_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBdatabasesqliteSqliteDatabasePrivate)); DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS (klass)->create = dvb_database_sqlite_sqlite_database_real_create; @@ -1067,6 +1249,9 @@ G_OBJECT_CLASS (klass)->set_property = _vala_dvb_database_sqlite_sqlite_database_set_property; G_OBJECT_CLASS (klass)->finalize = dvb_database_sqlite_sqlite_database_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_DATABASE_SQLITE_SQLITE_DATABASE_DATABASE_FILE, g_param_spec_object ("database-file", "database-file", "database-file", G_TYPE_FILE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_database_sqlite_sqlite_database_log = _tmp1_; } diff -Nru gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteDatabase.vala gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteDatabase.vala --- gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteDatabase.vala 2010-09-29 20:09:35.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteDatabase.vala 2011-04-19 21:18:36.000000000 +0000 @@ -19,11 +19,14 @@ using GLib; using Sqlite; +using DVB.Logging; namespace DVB.database.sqlite { public abstract class SqliteDatabase : GLib.Object { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public File database_file {get; construct;} protected Database db; @@ -48,7 +51,7 @@ try { Utils.mkdirs (dbfile_dir); } catch (Error e) { - critical ("Could not create directory: %s", e.message); + log.error ("Could not create directory: %s", e.message); return; } } @@ -60,10 +63,10 @@ int version = this.get_version (); if (create_tables) { - debug ("Creating tables"); + log.debug ("Creating tables"); this.create (); } else if (this.new_version > version) { - debug ("Updating tables"); + log.debug ("Updating tables"); this.upgrade (version, this.new_version); } this.set_version (this.new_version); @@ -79,7 +82,7 @@ try { this.exec_sql ("PRAGMA user_version = %d".printf (version)); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } } @@ -87,7 +90,7 @@ try { this.exec_sql ("PRAGMA journal_mode = TRUNCATE"); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } } @@ -99,7 +102,7 @@ try { version = this.simple_query_int ("PRAGMA user_version"); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } return version; } diff -Nru gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteEPGStore.c gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteEPGStore.c --- gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteEPGStore.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteEPGStore.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqliteEPGStore.c generated by valac 0.11.3, the Vala compiler +/* SqliteEPGStore.c generated by valac 0.14.0, the Vala compiler * generated from SqliteEPGStore.vala, do not modify */ /* @@ -72,6 +72,26 @@ typedef struct _DVBdatabasesqliteSqliteEPGStore DVBdatabasesqliteSqliteEPGStore; typedef struct _DVBdatabasesqliteSqliteEPGStoreClass DVBdatabasesqliteSqliteEPGStoreClass; typedef struct _DVBdatabasesqliteSqliteEPGStorePrivate DVBdatabasesqliteSqliteEPGStorePrivate; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) typedef struct _DVBEventPrivate DVBEventPrivate; @@ -213,6 +233,8 @@ static gpointer dvb_database_sqlite_sqlite_epg_store_parent_class = NULL; +static DVBLoggingLogger* dvb_database_sqlite_sqlite_epg_store_log; +static DVBLoggingLogger* dvb_database_sqlite_sqlite_epg_store_log = NULL; static DVBdatabaseEPGStoreIface* dvb_database_sqlite_sqlite_epg_store_dvb_database_epg_store_parent_iface = NULL; GType dvb_database_sqlite_sqlite_database_get_type (void) G_GNUC_CONST; @@ -230,6 +252,10 @@ enum { DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DUMMY_PROPERTY }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_VERSION 2 #define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_CREATE_EVENTS_TABLE_STATEMENT "CREATE TABLE events (group_id INTEGER,\n" \ " sid INTEGER,\n" \ @@ -295,6 +321,7 @@ GType dvb_event_teletext_component_get_type (void) G_GNUC_CONST; gchar* dvb_database_sqlite_utils_escape (const gchar* text); static gdouble dvb_database_sqlite_sqlite_epg_store_to_julian (DVBdatabasesqliteSqliteEPGStore* self, guint year, guint month, guint day, guint hour, guint minute, guint second, GError** error); +void dvb_logging_logger_warning (DVBLoggingLogger* self, const gchar* format, ...); gboolean dvb_database_epg_store_contains_event (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); void dvb_database_sqlite_sqlite_database_throw_last_error (DVBdatabasesqliteSqliteDatabase* self, const gchar* errmsg, GError** error); void dvb_database_sqlite_sqlite_database_throw_last_error_reset (DVBdatabasesqliteSqliteDatabase* self, sqlite3_stmt* stmnt, GError** error); @@ -350,39 +377,55 @@ static void dvb_database_sqlite_sqlite_epg_store_real_on_open (DVBdatabasesqliteSqliteDatabase* base) { DVBdatabasesqliteSqliteEPGStore * self; - sqlite3_stmt* _tmp0_ = NULL; + sqlite3* _tmp0_; sqlite3_stmt* _tmp1_ = NULL; - sqlite3_stmt* _tmp2_ = NULL; + sqlite3* _tmp2_; sqlite3_stmt* _tmp3_ = NULL; - sqlite3_stmt* _tmp4_ = NULL; + sqlite3* _tmp4_; sqlite3_stmt* _tmp5_ = NULL; - sqlite3_stmt* _tmp6_ = NULL; + sqlite3* _tmp6_; sqlite3_stmt* _tmp7_ = NULL; + sqlite3* _tmp8_; + sqlite3_stmt* _tmp9_ = NULL; + sqlite3* _tmp10_; + sqlite3_stmt* _tmp11_ = NULL; + sqlite3* _tmp12_; + sqlite3_stmt* _tmp13_ = NULL; + sqlite3* _tmp14_; + sqlite3_stmt* _tmp15_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_TO_JULIAN_SQL, -1, &_tmp0_, NULL); + _tmp0_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp0_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_TO_JULIAN_SQL, -1, &_tmp1_, NULL); _sqlite3_finalize0 (self->priv->to_julian_statement); - self->priv->to_julian_statement = _tmp0_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_INSERT_EVENT_SQL, -1, &_tmp1_, NULL); + self->priv->to_julian_statement = _tmp1_; + _tmp2_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp2_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_INSERT_EVENT_SQL, -1, &_tmp3_, NULL); _sqlite3_finalize0 (self->priv->insert_event_statement); - self->priv->insert_event_statement = _tmp1_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_UPDATE_EVENT_SQL, -1, &_tmp2_, NULL); + self->priv->insert_event_statement = _tmp3_; + _tmp4_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp4_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_UPDATE_EVENT_SQL, -1, &_tmp5_, NULL); _sqlite3_finalize0 (self->priv->update_event_statement); - self->priv->update_event_statement = _tmp2_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENT_STATEMENT, -1, &_tmp3_, NULL); + self->priv->update_event_statement = _tmp5_; + _tmp6_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp6_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENT_STATEMENT, -1, &_tmp7_, NULL); _sqlite3_finalize0 (self->priv->delete_event_statement); - self->priv->delete_event_statement = _tmp3_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_HAS_EVENT_STATEMENT, -1, &_tmp4_, NULL); + self->priv->delete_event_statement = _tmp7_; + _tmp8_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp8_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_HAS_EVENT_STATEMENT, -1, &_tmp9_, NULL); _sqlite3_finalize0 (self->priv->has_event_statement); - self->priv->has_event_statement = _tmp4_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_EVENT_SQL, -1, &_tmp5_, NULL); + self->priv->has_event_statement = _tmp9_; + _tmp10_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp10_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_EVENT_SQL, -1, &_tmp11_, NULL); _sqlite3_finalize0 (self->priv->select_event_statement); - self->priv->select_event_statement = _tmp5_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENTS_GROUP, -1, &_tmp6_, NULL); + self->priv->select_event_statement = _tmp11_; + _tmp12_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp12_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENTS_GROUP, -1, &_tmp13_, NULL); _sqlite3_finalize0 (self->priv->delete_events_group); - self->priv->delete_events_group = _tmp6_; - sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EXPIRED_EVENTS, -1, &_tmp7_, NULL); + self->priv->delete_events_group = _tmp13_; + _tmp14_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + sqlite3_prepare (_tmp14_, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EXPIRED_EVENTS, -1, &_tmp15_, NULL); _sqlite3_finalize0 (self->priv->delete_expired_events); - self->priv->delete_expired_events = _tmp7_; + self->priv->delete_expired_events = _tmp15_; } @@ -417,9 +460,11 @@ static void dvb_database_sqlite_sqlite_epg_store_real_upgrade (DVBdatabasesqliteSqliteDatabase* base, gint old_version, gint new_version, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; + gint _tmp0_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - if (old_version == 1) { + _tmp0_ = old_version; + if (_tmp0_ == 1) { dvb_database_sqlite_sqlite_database_exec_sql ((DVBdatabasesqliteSqliteDatabase*) self, "PRAGMA synchronous=OFF", &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -439,34 +484,80 @@ DVBdatabasesqliteSqliteEPGStore * self; gboolean result = FALSE; gint _tmp0_ = 0; + DVBEvent* _tmp1_; + gboolean _tmp2_; + gint _tmp3_; gint free_ca_mode; - gchar* _tmp1_ = NULL; + DVBEvent* _tmp4_; + const gchar* _tmp5_; + gchar* _tmp6_ = NULL; gchar* name; - gchar* _tmp2_ = NULL; + DVBEvent* _tmp7_; + const gchar* _tmp8_; + gchar* _tmp9_ = NULL; gchar* desc; - gchar* _tmp3_ = NULL; + DVBEvent* _tmp10_; + const gchar* _tmp11_; + gchar* _tmp12_ = NULL; gchar* ext_desc; - gdouble _tmp4_; + DVBEvent* _tmp13_; + guint _tmp14_; + DVBEvent* _tmp15_; + guint _tmp16_; + DVBEvent* _tmp17_; + guint _tmp18_; + DVBEvent* _tmp19_; + guint _tmp20_; + DVBEvent* _tmp21_; + guint _tmp22_; + DVBEvent* _tmp23_; + guint _tmp24_; + gdouble _tmp25_ = 0.0; gdouble julian_start; - gboolean _tmp5_; - gboolean _tmp6_; + gdouble _tmp26_; + DVBEvent* _tmp28_; + guint _tmp29_; + guint _tmp30_; + gboolean _tmp31_ = FALSE; + gboolean _tmp32_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; g_return_val_if_fail (event != NULL, FALSE); - if (event->free_ca_mode) { + _tmp1_ = event; + _tmp2_ = _tmp1_->free_ca_mode; + if (_tmp2_) { _tmp0_ = 1; } else { _tmp0_ = 0; } - free_ca_mode = _tmp0_; - _tmp1_ = dvb_database_sqlite_utils_escape (event->name); - name = _tmp1_; - _tmp2_ = dvb_database_sqlite_utils_escape (event->description); - desc = _tmp2_; - _tmp3_ = dvb_database_sqlite_utils_escape (event->extended_description); - ext_desc = _tmp3_; - _tmp4_ = dvb_database_sqlite_sqlite_epg_store_to_julian (self, event->year, event->month, event->day, event->hour, event->minute, event->second, &_inner_error_); - julian_start = _tmp4_; + _tmp3_ = _tmp0_; + free_ca_mode = _tmp3_; + _tmp4_ = event; + _tmp5_ = _tmp4_->name; + _tmp6_ = dvb_database_sqlite_utils_escape (_tmp5_); + name = _tmp6_; + _tmp7_ = event; + _tmp8_ = _tmp7_->description; + _tmp9_ = dvb_database_sqlite_utils_escape (_tmp8_); + desc = _tmp9_; + _tmp10_ = event; + _tmp11_ = _tmp10_->extended_description; + _tmp12_ = dvb_database_sqlite_utils_escape (_tmp11_); + ext_desc = _tmp12_; + _tmp13_ = event; + _tmp14_ = _tmp13_->year; + _tmp15_ = event; + _tmp16_ = _tmp15_->month; + _tmp17_ = event; + _tmp18_ = _tmp17_->day; + _tmp19_ = event; + _tmp20_ = _tmp19_->hour; + _tmp21_ = event; + _tmp22_ = _tmp21_->minute; + _tmp23_ = event; + _tmp24_ = _tmp23_->second; + _tmp25_ = dvb_database_sqlite_sqlite_epg_store_to_julian (self, _tmp14_, _tmp16_, _tmp18_, _tmp20_, _tmp22_, _tmp24_, &_inner_error_); + julian_start = _tmp25_; if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -483,15 +574,22 @@ return FALSE; } } - if (julian_start <= 0) { + _tmp26_ = julian_start; + if (_tmp26_ <= ((gdouble) 0)) { + DVBLoggingLogger* _tmp27_; + _tmp27_ = dvb_database_sqlite_sqlite_epg_store_log; + dvb_logging_logger_warning (_tmp27_, "SqliteEPGStore.vala:150: Failed to convert start time"); result = FALSE; _g_free0 (ext_desc); _g_free0 (desc); _g_free0 (name); return result; } - _tmp5_ = dvb_database_epg_store_contains_event ((DVBdatabaseEPGStore*) self, event, channel_sid, group_id, &_inner_error_); - _tmp6_ = _tmp5_; + _tmp28_ = event; + _tmp29_ = channel_sid; + _tmp30_ = group_id; + _tmp31_ = dvb_database_epg_store_contains_event ((DVBdatabaseEPGStore*) self, _tmp28_, _tmp29_, _tmp30_, &_inner_error_); + _tmp32_ = _tmp31_; if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -508,89 +606,161 @@ return FALSE; } } - if (_tmp6_) { - gboolean _tmp7_ = FALSE; - gboolean _tmp8_ = FALSE; - gboolean _tmp9_ = FALSE; - gboolean _tmp10_ = FALSE; - gboolean _tmp11_ = FALSE; - gboolean _tmp12_ = FALSE; - gboolean _tmp13_ = FALSE; - gboolean _tmp14_ = FALSE; - gboolean _tmp15_ = FALSE; - gint _tmp16_; - gint _tmp29_; - _tmp16_ = sqlite3_bind_double (self->priv->update_event_statement, 1, julian_start); - if (_tmp16_ != SQLITE_OK) { - _tmp15_ = TRUE; - } else { - gint _tmp17_; - _tmp17_ = sqlite3_bind_int (self->priv->update_event_statement, 2, (gint) event->duration); - _tmp15_ = _tmp17_ != SQLITE_OK; - } - if (_tmp15_) { - _tmp14_ = TRUE; - } else { - gint _tmp18_; - _tmp18_ = sqlite3_bind_int (self->priv->update_event_statement, 3, (gint) event->running_status); - _tmp14_ = _tmp18_ != SQLITE_OK; - } - if (_tmp14_) { - _tmp13_ = TRUE; - } else { - gint _tmp19_; - _tmp19_ = sqlite3_bind_int (self->priv->update_event_statement, 4, free_ca_mode); - _tmp13_ = _tmp19_ != SQLITE_OK; - } - if (_tmp13_) { - _tmp12_ = TRUE; - } else { - gchar* _tmp20_; - gint _tmp21_; - _tmp20_ = g_strdup (name); - _tmp21_ = sqlite3_bind_text (self->priv->update_event_statement, 5, _tmp20_, -1, g_free); - _tmp12_ = _tmp21_ != SQLITE_OK; - } - if (_tmp12_) { - _tmp11_ = TRUE; - } else { - gchar* _tmp22_; - gint _tmp23_; - _tmp22_ = g_strdup (desc); - _tmp23_ = sqlite3_bind_text (self->priv->update_event_statement, 6, _tmp22_, -1, g_free); - _tmp11_ = _tmp23_ != SQLITE_OK; - } - if (_tmp11_) { - _tmp10_ = TRUE; - } else { - gchar* _tmp24_; - gint _tmp25_; - _tmp24_ = g_strdup (ext_desc); - _tmp25_ = sqlite3_bind_text (self->priv->update_event_statement, 7, _tmp24_, -1, g_free); - _tmp10_ = _tmp25_ != SQLITE_OK; - } - if (_tmp10_) { - _tmp9_ = TRUE; - } else { - gint _tmp26_; - _tmp26_ = sqlite3_bind_int (self->priv->update_event_statement, 8, (gint) group_id); - _tmp9_ = _tmp26_ != SQLITE_OK; - } - if (_tmp9_) { - _tmp8_ = TRUE; - } else { - gint _tmp27_; - _tmp27_ = sqlite3_bind_int (self->priv->update_event_statement, 9, (gint) channel_sid); - _tmp8_ = _tmp27_ != SQLITE_OK; - } - if (_tmp8_) { - _tmp7_ = TRUE; - } else { - gint _tmp28_; - _tmp28_ = sqlite3_bind_int (self->priv->update_event_statement, 10, (gint) event->id); - _tmp7_ = _tmp28_ != SQLITE_OK; + if (_tmp32_) { + gboolean _tmp33_ = FALSE; + gboolean _tmp34_ = FALSE; + gboolean _tmp35_ = FALSE; + gboolean _tmp36_ = FALSE; + gboolean _tmp37_ = FALSE; + gboolean _tmp38_ = FALSE; + gboolean _tmp39_ = FALSE; + gboolean _tmp40_ = FALSE; + gboolean _tmp41_ = FALSE; + sqlite3_stmt* _tmp42_; + gdouble _tmp43_; + gint _tmp44_ = 0; + gboolean _tmp49_; + gboolean _tmp54_; + gboolean _tmp58_; + gboolean _tmp64_; + gboolean _tmp70_; + gboolean _tmp76_; + gboolean _tmp80_; + gboolean _tmp84_; + gboolean _tmp89_; + sqlite3_stmt* _tmp90_; + gint _tmp91_ = 0; + sqlite3_stmt* _tmp93_; + _tmp42_ = self->priv->update_event_statement; + _tmp43_ = julian_start; + _tmp44_ = sqlite3_bind_double (_tmp42_, 1, _tmp43_); + if (_tmp44_ != SQLITE_OK) { + _tmp41_ = TRUE; + } else { + sqlite3_stmt* _tmp45_; + DVBEvent* _tmp46_; + guint _tmp47_; + gint _tmp48_ = 0; + _tmp45_ = self->priv->update_event_statement; + _tmp46_ = event; + _tmp47_ = _tmp46_->duration; + _tmp48_ = sqlite3_bind_int (_tmp45_, 2, (gint) _tmp47_); + _tmp41_ = _tmp48_ != SQLITE_OK; + } + _tmp49_ = _tmp41_; + if (_tmp49_) { + _tmp40_ = TRUE; + } else { + sqlite3_stmt* _tmp50_; + DVBEvent* _tmp51_; + guint _tmp52_; + gint _tmp53_ = 0; + _tmp50_ = self->priv->update_event_statement; + _tmp51_ = event; + _tmp52_ = _tmp51_->running_status; + _tmp53_ = sqlite3_bind_int (_tmp50_, 3, (gint) _tmp52_); + _tmp40_ = _tmp53_ != SQLITE_OK; + } + _tmp54_ = _tmp40_; + if (_tmp54_) { + _tmp39_ = TRUE; + } else { + sqlite3_stmt* _tmp55_; + gint _tmp56_; + gint _tmp57_ = 0; + _tmp55_ = self->priv->update_event_statement; + _tmp56_ = free_ca_mode; + _tmp57_ = sqlite3_bind_int (_tmp55_, 4, _tmp56_); + _tmp39_ = _tmp57_ != SQLITE_OK; + } + _tmp58_ = _tmp39_; + if (_tmp58_) { + _tmp38_ = TRUE; + } else { + sqlite3_stmt* _tmp59_; + const gchar* _tmp60_; + gchar* _tmp61_; + GDestroyNotify _tmp62_; + gint _tmp63_ = 0; + _tmp59_ = self->priv->update_event_statement; + _tmp60_ = name; + _tmp61_ = g_strdup (_tmp60_); + _tmp62_ = g_free; + _tmp63_ = sqlite3_bind_text (_tmp59_, 5, _tmp61_, -1, _tmp62_); + _tmp38_ = _tmp63_ != SQLITE_OK; + } + _tmp64_ = _tmp38_; + if (_tmp64_) { + _tmp37_ = TRUE; + } else { + sqlite3_stmt* _tmp65_; + const gchar* _tmp66_; + gchar* _tmp67_; + GDestroyNotify _tmp68_; + gint _tmp69_ = 0; + _tmp65_ = self->priv->update_event_statement; + _tmp66_ = desc; + _tmp67_ = g_strdup (_tmp66_); + _tmp68_ = g_free; + _tmp69_ = sqlite3_bind_text (_tmp65_, 6, _tmp67_, -1, _tmp68_); + _tmp37_ = _tmp69_ != SQLITE_OK; + } + _tmp70_ = _tmp37_; + if (_tmp70_) { + _tmp36_ = TRUE; + } else { + sqlite3_stmt* _tmp71_; + const gchar* _tmp72_; + gchar* _tmp73_; + GDestroyNotify _tmp74_; + gint _tmp75_ = 0; + _tmp71_ = self->priv->update_event_statement; + _tmp72_ = ext_desc; + _tmp73_ = g_strdup (_tmp72_); + _tmp74_ = g_free; + _tmp75_ = sqlite3_bind_text (_tmp71_, 7, _tmp73_, -1, _tmp74_); + _tmp36_ = _tmp75_ != SQLITE_OK; + } + _tmp76_ = _tmp36_; + if (_tmp76_) { + _tmp35_ = TRUE; + } else { + sqlite3_stmt* _tmp77_; + guint _tmp78_; + gint _tmp79_ = 0; + _tmp77_ = self->priv->update_event_statement; + _tmp78_ = group_id; + _tmp79_ = sqlite3_bind_int (_tmp77_, 8, (gint) _tmp78_); + _tmp35_ = _tmp79_ != SQLITE_OK; + } + _tmp80_ = _tmp35_; + if (_tmp80_) { + _tmp34_ = TRUE; + } else { + sqlite3_stmt* _tmp81_; + guint _tmp82_; + gint _tmp83_ = 0; + _tmp81_ = self->priv->update_event_statement; + _tmp82_ = channel_sid; + _tmp83_ = sqlite3_bind_int (_tmp81_, 9, (gint) _tmp82_); + _tmp34_ = _tmp83_ != SQLITE_OK; + } + _tmp84_ = _tmp34_; + if (_tmp84_) { + _tmp33_ = TRUE; + } else { + sqlite3_stmt* _tmp85_; + DVBEvent* _tmp86_; + guint _tmp87_; + gint _tmp88_ = 0; + _tmp85_ = self->priv->update_event_statement; + _tmp86_ = event; + _tmp87_ = _tmp86_->id; + _tmp88_ = sqlite3_bind_int (_tmp85_, 10, (gint) _tmp87_); + _tmp33_ = _tmp88_ != SQLITE_OK; } - if (_tmp7_) { + _tmp89_ = _tmp33_; + if (_tmp89_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -614,9 +784,12 @@ _g_free0 (name); return result; } - _tmp29_ = sqlite3_step (self->priv->update_event_statement); - if (_tmp29_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->update_event_statement, &_inner_error_); + _tmp90_ = self->priv->update_event_statement; + _tmp91_ = sqlite3_step (_tmp90_); + if (_tmp91_ != SQLITE_DONE) { + sqlite3_stmt* _tmp92_; + _tmp92_ = self->priv->update_event_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp92_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -639,90 +812,163 @@ _g_free0 (name); return result; } - sqlite3_reset (self->priv->update_event_statement); + _tmp93_ = self->priv->update_event_statement; + sqlite3_reset (_tmp93_); } else { - gboolean _tmp30_ = FALSE; - gboolean _tmp31_ = FALSE; - gboolean _tmp32_ = FALSE; - gboolean _tmp33_ = FALSE; - gboolean _tmp34_ = FALSE; - gboolean _tmp35_ = FALSE; - gboolean _tmp36_ = FALSE; - gboolean _tmp37_ = FALSE; - gboolean _tmp38_ = FALSE; - gint _tmp39_; - gint _tmp52_; - _tmp39_ = sqlite3_bind_int (self->priv->insert_event_statement, 1, (gint) group_id); - if (_tmp39_ != SQLITE_OK) { - _tmp38_ = TRUE; - } else { - gint _tmp40_; - _tmp40_ = sqlite3_bind_int (self->priv->insert_event_statement, 2, (gint) channel_sid); - _tmp38_ = _tmp40_ != SQLITE_OK; - } - if (_tmp38_) { - _tmp37_ = TRUE; - } else { - gint _tmp41_; - _tmp41_ = sqlite3_bind_int (self->priv->insert_event_statement, 3, (gint) event->id); - _tmp37_ = _tmp41_ != SQLITE_OK; - } - if (_tmp37_) { - _tmp36_ = TRUE; - } else { - gint _tmp42_; - _tmp42_ = sqlite3_bind_double (self->priv->insert_event_statement, 4, julian_start); - _tmp36_ = _tmp42_ != SQLITE_OK; - } - if (_tmp36_) { - _tmp35_ = TRUE; - } else { - gint _tmp43_; - _tmp43_ = sqlite3_bind_int (self->priv->insert_event_statement, 5, (gint) event->duration); - _tmp35_ = _tmp43_ != SQLITE_OK; + gboolean _tmp94_ = FALSE; + gboolean _tmp95_ = FALSE; + gboolean _tmp96_ = FALSE; + gboolean _tmp97_ = FALSE; + gboolean _tmp98_ = FALSE; + gboolean _tmp99_ = FALSE; + gboolean _tmp100_ = FALSE; + gboolean _tmp101_ = FALSE; + gboolean _tmp102_ = FALSE; + sqlite3_stmt* _tmp103_; + guint _tmp104_; + gint _tmp105_ = 0; + gboolean _tmp109_; + gboolean _tmp114_; + gboolean _tmp118_; + gboolean _tmp123_; + gboolean _tmp128_; + gboolean _tmp132_; + gboolean _tmp138_; + gboolean _tmp144_; + gboolean _tmp150_; + sqlite3_stmt* _tmp151_; + gint _tmp152_ = 0; + sqlite3_stmt* _tmp154_; + _tmp103_ = self->priv->insert_event_statement; + _tmp104_ = group_id; + _tmp105_ = sqlite3_bind_int (_tmp103_, 1, (gint) _tmp104_); + if (_tmp105_ != SQLITE_OK) { + _tmp102_ = TRUE; + } else { + sqlite3_stmt* _tmp106_; + guint _tmp107_; + gint _tmp108_ = 0; + _tmp106_ = self->priv->insert_event_statement; + _tmp107_ = channel_sid; + _tmp108_ = sqlite3_bind_int (_tmp106_, 2, (gint) _tmp107_); + _tmp102_ = _tmp108_ != SQLITE_OK; + } + _tmp109_ = _tmp102_; + if (_tmp109_) { + _tmp101_ = TRUE; + } else { + sqlite3_stmt* _tmp110_; + DVBEvent* _tmp111_; + guint _tmp112_; + gint _tmp113_ = 0; + _tmp110_ = self->priv->insert_event_statement; + _tmp111_ = event; + _tmp112_ = _tmp111_->id; + _tmp113_ = sqlite3_bind_int (_tmp110_, 3, (gint) _tmp112_); + _tmp101_ = _tmp113_ != SQLITE_OK; + } + _tmp114_ = _tmp101_; + if (_tmp114_) { + _tmp100_ = TRUE; + } else { + sqlite3_stmt* _tmp115_; + gdouble _tmp116_; + gint _tmp117_ = 0; + _tmp115_ = self->priv->insert_event_statement; + _tmp116_ = julian_start; + _tmp117_ = sqlite3_bind_double (_tmp115_, 4, _tmp116_); + _tmp100_ = _tmp117_ != SQLITE_OK; + } + _tmp118_ = _tmp100_; + if (_tmp118_) { + _tmp99_ = TRUE; + } else { + sqlite3_stmt* _tmp119_; + DVBEvent* _tmp120_; + guint _tmp121_; + gint _tmp122_ = 0; + _tmp119_ = self->priv->insert_event_statement; + _tmp120_ = event; + _tmp121_ = _tmp120_->duration; + _tmp122_ = sqlite3_bind_int (_tmp119_, 5, (gint) _tmp121_); + _tmp99_ = _tmp122_ != SQLITE_OK; + } + _tmp123_ = _tmp99_; + if (_tmp123_) { + _tmp98_ = TRUE; + } else { + sqlite3_stmt* _tmp124_; + DVBEvent* _tmp125_; + guint _tmp126_; + gint _tmp127_ = 0; + _tmp124_ = self->priv->insert_event_statement; + _tmp125_ = event; + _tmp126_ = _tmp125_->running_status; + _tmp127_ = sqlite3_bind_int (_tmp124_, 6, (gint) _tmp126_); + _tmp98_ = _tmp127_ != SQLITE_OK; + } + _tmp128_ = _tmp98_; + if (_tmp128_) { + _tmp97_ = TRUE; + } else { + sqlite3_stmt* _tmp129_; + gint _tmp130_; + gint _tmp131_ = 0; + _tmp129_ = self->priv->insert_event_statement; + _tmp130_ = free_ca_mode; + _tmp131_ = sqlite3_bind_int (_tmp129_, 7, _tmp130_); + _tmp97_ = _tmp131_ != SQLITE_OK; + } + _tmp132_ = _tmp97_; + if (_tmp132_) { + _tmp96_ = TRUE; + } else { + sqlite3_stmt* _tmp133_; + const gchar* _tmp134_; + gchar* _tmp135_; + GDestroyNotify _tmp136_; + gint _tmp137_ = 0; + _tmp133_ = self->priv->insert_event_statement; + _tmp134_ = name; + _tmp135_ = g_strdup (_tmp134_); + _tmp136_ = g_free; + _tmp137_ = sqlite3_bind_text (_tmp133_, 8, _tmp135_, -1, _tmp136_); + _tmp96_ = _tmp137_ != SQLITE_OK; + } + _tmp138_ = _tmp96_; + if (_tmp138_) { + _tmp95_ = TRUE; + } else { + sqlite3_stmt* _tmp139_; + const gchar* _tmp140_; + gchar* _tmp141_; + GDestroyNotify _tmp142_; + gint _tmp143_ = 0; + _tmp139_ = self->priv->insert_event_statement; + _tmp140_ = desc; + _tmp141_ = g_strdup (_tmp140_); + _tmp142_ = g_free; + _tmp143_ = sqlite3_bind_text (_tmp139_, 9, _tmp141_, -1, _tmp142_); + _tmp95_ = _tmp143_ != SQLITE_OK; + } + _tmp144_ = _tmp95_; + if (_tmp144_) { + _tmp94_ = TRUE; + } else { + sqlite3_stmt* _tmp145_; + const gchar* _tmp146_; + gchar* _tmp147_; + GDestroyNotify _tmp148_; + gint _tmp149_ = 0; + _tmp145_ = self->priv->insert_event_statement; + _tmp146_ = ext_desc; + _tmp147_ = g_strdup (_tmp146_); + _tmp148_ = g_free; + _tmp149_ = sqlite3_bind_text (_tmp145_, 10, _tmp147_, -1, _tmp148_); + _tmp94_ = _tmp149_ != SQLITE_OK; } - if (_tmp35_) { - _tmp34_ = TRUE; - } else { - gint _tmp44_; - _tmp44_ = sqlite3_bind_int (self->priv->insert_event_statement, 6, (gint) event->running_status); - _tmp34_ = _tmp44_ != SQLITE_OK; - } - if (_tmp34_) { - _tmp33_ = TRUE; - } else { - gint _tmp45_; - _tmp45_ = sqlite3_bind_int (self->priv->insert_event_statement, 7, free_ca_mode); - _tmp33_ = _tmp45_ != SQLITE_OK; - } - if (_tmp33_) { - _tmp32_ = TRUE; - } else { - gchar* _tmp46_; - gint _tmp47_; - _tmp46_ = g_strdup (name); - _tmp47_ = sqlite3_bind_text (self->priv->insert_event_statement, 8, _tmp46_, -1, g_free); - _tmp32_ = _tmp47_ != SQLITE_OK; - } - if (_tmp32_) { - _tmp31_ = TRUE; - } else { - gchar* _tmp48_; - gint _tmp49_; - _tmp48_ = g_strdup (desc); - _tmp49_ = sqlite3_bind_text (self->priv->insert_event_statement, 9, _tmp48_, -1, g_free); - _tmp31_ = _tmp49_ != SQLITE_OK; - } - if (_tmp31_) { - _tmp30_ = TRUE; - } else { - gchar* _tmp50_; - gint _tmp51_; - _tmp50_ = g_strdup (ext_desc); - _tmp51_ = sqlite3_bind_text (self->priv->insert_event_statement, 10, _tmp50_, -1, g_free); - _tmp30_ = _tmp51_ != SQLITE_OK; - } - if (_tmp30_) { + _tmp150_ = _tmp94_; + if (_tmp150_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -746,9 +992,12 @@ _g_free0 (name); return result; } - _tmp52_ = sqlite3_step (self->priv->insert_event_statement); - if (_tmp52_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->insert_event_statement, &_inner_error_); + _tmp151_ = self->priv->insert_event_statement; + _tmp152_ = sqlite3_step (_tmp151_); + if (_tmp152_ != SQLITE_DONE) { + sqlite3_stmt* _tmp153_; + _tmp153_ = self->priv->insert_event_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp153_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -771,7 +1020,8 @@ _g_free0 (name); return result; } - sqlite3_reset (self->priv->insert_event_statement); + _tmp154_ = self->priv->insert_event_statement; + sqlite3_reset (_tmp154_); } result = TRUE; _g_free0 (ext_desc); @@ -786,29 +1036,50 @@ DVBEvent* result = NULL; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - gint _tmp2_; - gint _tmp5_; + sqlite3_stmt* _tmp2_; + guint _tmp3_; + gint _tmp4_ = 0; + gboolean _tmp8_; + gboolean _tmp12_; + sqlite3_stmt* _tmp13_; + gint _tmp14_ = 0; gint rc; - gboolean _tmp6_ = FALSE; + gboolean _tmp15_ = FALSE; + gint _tmp16_; + gboolean _tmp18_; DVBEvent* event; + gint _tmp20_; + sqlite3_stmt* _tmp23_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _tmp2_ = sqlite3_bind_int (self->priv->select_event_statement, 1, (gint) group_id); - if (_tmp2_ != SQLITE_OK) { + _tmp2_ = self->priv->select_event_statement; + _tmp3_ = group_id; + _tmp4_ = sqlite3_bind_int (_tmp2_, 1, (gint) _tmp3_); + if (_tmp4_ != SQLITE_OK) { _tmp1_ = TRUE; } else { - gint _tmp3_; - _tmp3_ = sqlite3_bind_int (self->priv->select_event_statement, 2, (gint) channel_sid); - _tmp1_ = _tmp3_ != SQLITE_OK; + sqlite3_stmt* _tmp5_; + guint _tmp6_; + gint _tmp7_ = 0; + _tmp5_ = self->priv->select_event_statement; + _tmp6_ = channel_sid; + _tmp7_ = sqlite3_bind_int (_tmp5_, 2, (gint) _tmp6_); + _tmp1_ = _tmp7_ != SQLITE_OK; } - if (_tmp1_) { + _tmp8_ = _tmp1_; + if (_tmp8_) { _tmp0_ = TRUE; } else { - gint _tmp4_; - _tmp4_ = sqlite3_bind_int (self->priv->select_event_statement, 3, (gint) event_id); - _tmp0_ = _tmp4_ != SQLITE_OK; + sqlite3_stmt* _tmp9_; + guint _tmp10_; + gint _tmp11_ = 0; + _tmp9_ = self->priv->select_event_statement; + _tmp10_ = event_id; + _tmp11_ = sqlite3_bind_int (_tmp9_, 3, (gint) _tmp10_); + _tmp0_ = _tmp11_ != SQLITE_OK; } - if (_tmp0_) { + _tmp12_ = _tmp0_; + if (_tmp12_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -823,15 +1094,22 @@ result = NULL; return result; } - _tmp5_ = sqlite3_step (self->priv->select_event_statement); - rc = _tmp5_; - if (rc != SQLITE_ROW) { - _tmp6_ = rc != SQLITE_DONE; + _tmp13_ = self->priv->select_event_statement; + _tmp14_ = sqlite3_step (_tmp13_); + rc = _tmp14_; + _tmp16_ = rc; + if (_tmp16_ != SQLITE_ROW) { + gint _tmp17_; + _tmp17_ = rc; + _tmp15_ = _tmp17_ != SQLITE_DONE; } else { - _tmp6_ = FALSE; + _tmp15_ = FALSE; } - if (_tmp6_) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->select_event_statement, &_inner_error_); + _tmp18_ = _tmp15_; + if (_tmp18_) { + sqlite3_stmt* _tmp19_; + _tmp19_ = self->priv->select_event_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp19_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -846,15 +1124,17 @@ return result; } event = NULL; - if (rc != SQLITE_DONE) { - DVBEvent* _tmp7_ = NULL; - DVBEvent* _tmp8_; - _tmp7_ = dvb_database_sqlite_sqlite_epg_store_create_event_from_statement (self, self->priv->select_event_statement); - _tmp8_ = _tmp7_; + _tmp20_ = rc; + if (_tmp20_ != SQLITE_DONE) { + sqlite3_stmt* _tmp21_; + DVBEvent* _tmp22_ = NULL; + _tmp21_ = self->priv->select_event_statement; + _tmp22_ = dvb_database_sqlite_sqlite_epg_store_create_event_from_statement (self, _tmp21_); _dvb_event_unref0 (event); - event = _tmp8_; + event = _tmp22_; } - sqlite3_reset (self->priv->select_event_statement); + _tmp23_ = self->priv->select_event_statement; + sqlite3_reset (_tmp23_); result = event; return result; } @@ -865,26 +1145,44 @@ gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - gint _tmp2_; - gint _tmp5_; + sqlite3_stmt* _tmp2_; + guint _tmp3_; + gint _tmp4_ = 0; + gboolean _tmp8_; + gboolean _tmp12_; + sqlite3_stmt* _tmp13_; + gint _tmp14_ = 0; + sqlite3_stmt* _tmp16_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _tmp2_ = sqlite3_bind_int (self->priv->delete_event_statement, 1, (gint) group_id); - if (_tmp2_ != SQLITE_OK) { + _tmp2_ = self->priv->delete_event_statement; + _tmp3_ = group_id; + _tmp4_ = sqlite3_bind_int (_tmp2_, 1, (gint) _tmp3_); + if (_tmp4_ != SQLITE_OK) { _tmp1_ = TRUE; } else { - gint _tmp3_; - _tmp3_ = sqlite3_bind_int (self->priv->delete_event_statement, 2, (gint) channel_sid); - _tmp1_ = _tmp3_ != SQLITE_OK; + sqlite3_stmt* _tmp5_; + guint _tmp6_; + gint _tmp7_ = 0; + _tmp5_ = self->priv->delete_event_statement; + _tmp6_ = channel_sid; + _tmp7_ = sqlite3_bind_int (_tmp5_, 2, (gint) _tmp6_); + _tmp1_ = _tmp7_ != SQLITE_OK; } - if (_tmp1_) { + _tmp8_ = _tmp1_; + if (_tmp8_) { _tmp0_ = TRUE; } else { - gint _tmp4_; - _tmp4_ = sqlite3_bind_int (self->priv->delete_event_statement, 3, (gint) event_id); - _tmp0_ = _tmp4_ != SQLITE_OK; + sqlite3_stmt* _tmp9_; + guint _tmp10_; + gint _tmp11_ = 0; + _tmp9_ = self->priv->delete_event_statement; + _tmp10_ = event_id; + _tmp11_ = sqlite3_bind_int (_tmp9_, 3, (gint) _tmp10_); + _tmp0_ = _tmp11_ != SQLITE_OK; } - if (_tmp0_) { + _tmp12_ = _tmp0_; + if (_tmp12_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -899,9 +1197,12 @@ result = FALSE; return result; } - _tmp5_ = sqlite3_step (self->priv->delete_event_statement); - if (_tmp5_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_event_statement, &_inner_error_); + _tmp13_ = self->priv->delete_event_statement; + _tmp14_ = sqlite3_step (_tmp13_); + if (_tmp14_ != SQLITE_DONE) { + sqlite3_stmt* _tmp15_; + _tmp15_ = self->priv->delete_event_statement; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp15_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -915,7 +1216,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_event_statement); + _tmp16_ = self->priv->delete_event_statement; + sqlite3_reset (_tmp16_); result = TRUE; return result; } @@ -924,33 +1226,53 @@ static gboolean dvb_database_sqlite_sqlite_epg_store_real_remove_events_older_than (DVBdatabaseEPGStore* base, DVBEvent* event, guint channel_sid, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; gboolean result = FALSE; - time_t _tmp0_; + DVBEvent* _tmp0_; + time_t _tmp1_ = 0; time_t timestamp; - gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; - gint _tmp3_; - gint _tmp6_; + gboolean _tmp3_ = FALSE; + sqlite3_stmt* _tmp4_; + time_t _tmp5_; + gint _tmp6_ = 0; + gboolean _tmp10_; + gboolean _tmp14_; + sqlite3_stmt* _tmp15_; + gint _tmp16_ = 0; + sqlite3_stmt* _tmp18_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; g_return_val_if_fail (event != NULL, FALSE); - _tmp0_ = dvb_event_get_end_timestamp (event); - timestamp = _tmp0_; - _tmp3_ = sqlite3_bind_int64 (self->priv->delete_expired_events, 1, (gint64) timestamp); - if (_tmp3_ != SQLITE_OK) { - _tmp2_ = TRUE; + _tmp0_ = event; + _tmp1_ = dvb_event_get_end_timestamp (_tmp0_); + timestamp = _tmp1_; + _tmp4_ = self->priv->delete_expired_events; + _tmp5_ = timestamp; + _tmp6_ = sqlite3_bind_int64 (_tmp4_, 1, (gint64) _tmp5_); + if (_tmp6_ != SQLITE_OK) { + _tmp3_ = TRUE; } else { - gint _tmp4_; - _tmp4_ = sqlite3_bind_int (self->priv->delete_expired_events, 2, (gint) channel_sid); - _tmp2_ = _tmp4_ != SQLITE_OK; + sqlite3_stmt* _tmp7_; + guint _tmp8_; + gint _tmp9_ = 0; + _tmp7_ = self->priv->delete_expired_events; + _tmp8_ = channel_sid; + _tmp9_ = sqlite3_bind_int (_tmp7_, 2, (gint) _tmp8_); + _tmp3_ = _tmp9_ != SQLITE_OK; } - if (_tmp2_) { - _tmp1_ = TRUE; + _tmp10_ = _tmp3_; + if (_tmp10_) { + _tmp2_ = TRUE; } else { - gint _tmp5_; - _tmp5_ = sqlite3_bind_int (self->priv->delete_expired_events, 3, (gint) group_id); - _tmp1_ = _tmp5_ != SQLITE_OK; + sqlite3_stmt* _tmp11_; + guint _tmp12_; + gint _tmp13_ = 0; + _tmp11_ = self->priv->delete_expired_events; + _tmp12_ = group_id; + _tmp13_ = sqlite3_bind_int (_tmp11_, 3, (gint) _tmp12_); + _tmp2_ = _tmp13_ != SQLITE_OK; } - if (_tmp1_) { + _tmp14_ = _tmp2_; + if (_tmp14_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -965,9 +1287,12 @@ result = FALSE; return result; } - _tmp6_ = sqlite3_step (self->priv->delete_expired_events); - if (_tmp6_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_expired_events, &_inner_error_); + _tmp15_ = self->priv->delete_expired_events; + _tmp16_ = sqlite3_step (_tmp15_); + if (_tmp16_ != SQLITE_DONE) { + sqlite3_stmt* _tmp17_; + _tmp17_ = self->priv->delete_expired_events; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp17_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -981,7 +1306,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_expired_events); + _tmp18_ = self->priv->delete_expired_events; + sqlite3_reset (_tmp18_); result = TRUE; return result; } @@ -992,27 +1318,47 @@ gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - gint _tmp2_; + sqlite3_stmt* _tmp2_; + guint _tmp3_; + gint _tmp4_ = 0; + gboolean _tmp8_; + gboolean _tmp13_; gint c; + sqlite3_stmt* _tmp18_; + gint _tmp19_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; g_return_val_if_fail (event != NULL, FALSE); - _tmp2_ = sqlite3_bind_int (self->priv->has_event_statement, 1, (gint) group_id); - if (_tmp2_ != SQLITE_OK) { + _tmp2_ = self->priv->has_event_statement; + _tmp3_ = group_id; + _tmp4_ = sqlite3_bind_int (_tmp2_, 1, (gint) _tmp3_); + if (_tmp4_ != SQLITE_OK) { _tmp1_ = TRUE; } else { - gint _tmp3_; - _tmp3_ = sqlite3_bind_int (self->priv->has_event_statement, 2, (gint) channel_sid); - _tmp1_ = _tmp3_ != SQLITE_OK; + sqlite3_stmt* _tmp5_; + guint _tmp6_; + gint _tmp7_ = 0; + _tmp5_ = self->priv->has_event_statement; + _tmp6_ = channel_sid; + _tmp7_ = sqlite3_bind_int (_tmp5_, 2, (gint) _tmp6_); + _tmp1_ = _tmp7_ != SQLITE_OK; } - if (_tmp1_) { + _tmp8_ = _tmp1_; + if (_tmp8_) { _tmp0_ = TRUE; } else { - gint _tmp4_; - _tmp4_ = sqlite3_bind_int (self->priv->has_event_statement, 3, (gint) event->id); - _tmp0_ = _tmp4_ != SQLITE_OK; + sqlite3_stmt* _tmp9_; + DVBEvent* _tmp10_; + guint _tmp11_; + gint _tmp12_ = 0; + _tmp9_ = self->priv->has_event_statement; + _tmp10_ = event; + _tmp11_ = _tmp10_->id; + _tmp12_ = sqlite3_bind_int (_tmp9_, 3, (gint) _tmp11_); + _tmp0_ = _tmp12_ != SQLITE_OK; } - if (_tmp0_) { + _tmp13_ = _tmp0_; + if (_tmp13_) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1029,17 +1375,23 @@ } c = 0; while (TRUE) { - gint _tmp5_; - gint _tmp6_; - _tmp5_ = sqlite3_step (self->priv->has_event_statement); - if (!(_tmp5_ == SQLITE_ROW)) { + sqlite3_stmt* _tmp14_; + gint _tmp15_ = 0; + sqlite3_stmt* _tmp16_; + gint _tmp17_ = 0; + _tmp14_ = self->priv->has_event_statement; + _tmp15_ = sqlite3_step (_tmp14_); + if (!(_tmp15_ == SQLITE_ROW)) { break; } - _tmp6_ = sqlite3_column_int (self->priv->has_event_statement, 0); - c = _tmp6_; - } - sqlite3_reset (self->priv->has_event_statement); - result = c > 0; + _tmp16_ = self->priv->has_event_statement; + _tmp17_ = sqlite3_column_int (_tmp16_, 0); + c = _tmp17_; + } + _tmp18_ = self->priv->has_event_statement; + sqlite3_reset (_tmp18_); + _tmp19_ = c; + result = _tmp19_ > 0; return result; } @@ -1047,28 +1399,40 @@ static GeeList* dvb_database_sqlite_sqlite_epg_store_real_get_events (DVBdatabaseEPGStore* base, guint channel_sid, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; GeeList* result = NULL; - GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp0_; GeeList* events; - gchar* _tmp1_ = NULL; + sqlite3* _tmp1_; + guint _tmp3_; + guint _tmp4_; + gchar* _tmp5_ = NULL; gchar* statement_str; - sqlite3_stmt* statement; - sqlite3_stmt* _tmp2_ = NULL; - gint _tmp3_; + sqlite3_stmt* statement = NULL; + sqlite3* _tmp6_; + const gchar* _tmp7_; + sqlite3_stmt* _tmp8_ = NULL; + gint _tmp9_ = 0; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; _tmp0_ = gee_array_list_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, NULL); events = (GeeList*) _tmp0_; - if (((DVBdatabasesqliteSqliteDatabase*) self)->db == NULL) { + _tmp1_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + if (_tmp1_ == NULL) { + DVBLoggingLogger* _tmp2_; + _tmp2_ = dvb_database_sqlite_sqlite_epg_store_log; + dvb_logging_logger_warning (_tmp2_, "SqliteEPGStore.vala:295: DB not initialized"); result = events; return result; } - _tmp1_ = g_strdup_printf (DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_MINIMAL_EVENTS_STATEMENT, group_id, channel_sid); - statement_str = _tmp1_; - statement = NULL; - _tmp3_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, statement_str, -1, &_tmp2_, NULL); + _tmp3_ = group_id; + _tmp4_ = channel_sid; + _tmp5_ = g_strdup_printf (DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_MINIMAL_EVENTS_STATEMENT, _tmp3_, _tmp4_); + statement_str = _tmp5_; + _tmp6_ = ((DVBdatabasesqliteSqliteDatabase*) self)->db; + _tmp7_ = statement_str; + _tmp9_ = sqlite3_prepare (_tmp6_, _tmp7_, -1, &_tmp8_, NULL); _sqlite3_finalize0 (statement); - statement = _tmp2_; - if (_tmp3_ != SQLITE_OK) { + statement = _tmp8_; + if (_tmp9_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1092,16 +1456,24 @@ return result; } while (TRUE) { - gint _tmp4_; - DVBEvent* _tmp5_ = NULL; + sqlite3_stmt* _tmp10_; + gint _tmp11_ = 0; + sqlite3_stmt* _tmp12_; + DVBEvent* _tmp13_ = NULL; DVBEvent* event; - _tmp4_ = sqlite3_step (statement); - if (!(_tmp4_ == SQLITE_ROW)) { + GeeList* _tmp14_; + DVBEvent* _tmp15_; + _tmp10_ = statement; + _tmp11_ = sqlite3_step (_tmp10_); + if (!(_tmp11_ == SQLITE_ROW)) { break; } - _tmp5_ = dvb_database_sqlite_sqlite_epg_store_create_minimal_event (self, statement); - event = _tmp5_; - gee_collection_add ((GeeCollection*) events, event); + _tmp12_ = statement; + _tmp13_ = dvb_database_sqlite_sqlite_epg_store_create_minimal_event (self, _tmp12_); + event = _tmp13_; + _tmp14_ = events; + _tmp15_ = event; + gee_collection_add ((GeeCollection*) _tmp14_, _tmp15_); _dvb_event_unref0 (event); } result = events; @@ -1114,12 +1486,18 @@ static gboolean dvb_database_sqlite_sqlite_epg_store_real_remove_events_of_group (DVBdatabaseEPGStore* base, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; gboolean result = FALSE; - gint _tmp0_; - gint _tmp1_; + sqlite3_stmt* _tmp0_; + guint _tmp1_; + gint _tmp2_ = 0; + sqlite3_stmt* _tmp3_; + gint _tmp4_ = 0; + sqlite3_stmt* _tmp6_; GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _tmp0_ = sqlite3_bind_int (self->priv->delete_events_group, 1, (gint) group_id); - if (_tmp0_ != SQLITE_OK) { + _tmp0_ = self->priv->delete_events_group; + _tmp1_ = group_id; + _tmp2_ = sqlite3_bind_int (_tmp0_, 1, (gint) _tmp1_); + if (_tmp2_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1134,9 +1512,12 @@ result = FALSE; return result; } - _tmp1_ = sqlite3_step (self->priv->delete_events_group); - if (_tmp1_ != SQLITE_DONE) { - dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, self->priv->delete_events_group, &_inner_error_); + _tmp3_ = self->priv->delete_events_group; + _tmp4_ = sqlite3_step (_tmp3_); + if (_tmp4_ != SQLITE_DONE) { + sqlite3_stmt* _tmp5_; + _tmp5_ = self->priv->delete_events_group; + dvb_database_sqlite_sqlite_database_throw_last_error_reset ((DVBdatabasesqliteSqliteDatabase*) self, _tmp5_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -1150,7 +1531,8 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_events_group); + _tmp6_ = self->priv->delete_events_group; + sqlite3_reset (_tmp6_); result = TRUE; return result; } @@ -1158,23 +1540,29 @@ static DVBEvent* dvb_database_sqlite_sqlite_epg_store_create_minimal_event (DVBdatabasesqliteSqliteEPGStore* self, sqlite3_stmt* statement) { DVBEvent* result = NULL; - DVBEvent* _tmp0_ = NULL; + DVBEvent* _tmp0_; DVBEvent* event; - gint _tmp1_; - const gchar* _tmp2_ = NULL; + sqlite3_stmt* _tmp1_; + gint _tmp2_ = 0; + sqlite3_stmt* _tmp3_; + const gchar* _tmp4_ = NULL; const gchar* starttime; - gint _tmp3_; + sqlite3_stmt* _tmp5_; + gint _tmp6_ = 0; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (statement != NULL, NULL); _tmp0_ = dvb_event_new (); event = _tmp0_; - _tmp1_ = sqlite3_column_int (statement, 0); - event->id = (guint) _tmp1_; - _tmp2_ = sqlite3_column_text (statement, 1); - starttime = _tmp2_; + _tmp1_ = statement; + _tmp2_ = sqlite3_column_int (_tmp1_, 0); + event->id = (guint) _tmp2_; + _tmp3_ = statement; + _tmp4_ = sqlite3_column_text (_tmp3_, 1); + starttime = _tmp4_; sscanf (starttime, "%04u-%02u-%02u %02u:%02u:%02u", &event->year, &event->month, &event->day, &event->hour, &event->minute, &event->second); - _tmp3_ = sqlite3_column_int (statement, 2); - event->duration = (guint) _tmp3_; + _tmp5_ = statement; + _tmp6_ = sqlite3_column_int (_tmp5_, 2); + event->duration = (guint) _tmp6_; result = event; return result; } @@ -1215,65 +1603,69 @@ static DVBEvent* dvb_database_sqlite_sqlite_epg_store_create_event_from_statement (DVBdatabasesqliteSqliteEPGStore* self, sqlite3_stmt* statement) { DVBEvent* result = NULL; - DVBEvent* _tmp0_ = NULL; + DVBEvent* _tmp0_; DVBEvent* event; - gint _tmp1_; - const gchar* _tmp2_ = NULL; + sqlite3_stmt* _tmp1_; + gint _tmp2_ = 0; + sqlite3_stmt* _tmp3_; + const gchar* _tmp4_ = NULL; const gchar* starttime; - gint _tmp3_; - gint _tmp4_; - gint _tmp5_; - const gchar* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - const gchar* _tmp9_ = NULL; - gchar* _tmp10_ = NULL; - gchar* _tmp11_; + sqlite3_stmt* _tmp5_; + gint _tmp6_ = 0; + sqlite3_stmt* _tmp7_; + gint _tmp8_ = 0; + sqlite3_stmt* _tmp9_; + gint _tmp10_ = 0; + sqlite3_stmt* _tmp11_; const gchar* _tmp12_ = NULL; gchar* _tmp13_ = NULL; - gchar* _tmp14_; - GSList* _tmp15_; - GSList* _tmp16_; - GSList* _tmp17_; + sqlite3_stmt* _tmp14_; + const gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + sqlite3_stmt* _tmp17_; + const gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (statement != NULL, NULL); _tmp0_ = dvb_event_new (); event = _tmp0_; - _tmp1_ = sqlite3_column_int (statement, 0); - event->id = (guint) _tmp1_; - _tmp2_ = sqlite3_column_text (statement, 1); - starttime = _tmp2_; + _tmp1_ = statement; + _tmp2_ = sqlite3_column_int (_tmp1_, 0); + event->id = (guint) _tmp2_; + _tmp3_ = statement; + _tmp4_ = sqlite3_column_text (_tmp3_, 1); + starttime = _tmp4_; sscanf (starttime, "%04u-%02u-%02u %02u:%02u:%02u", &event->year, &event->month, &event->day, &event->hour, &event->minute, &event->second); - _tmp3_ = sqlite3_column_int (statement, 2); - event->duration = (guint) _tmp3_; - _tmp4_ = sqlite3_column_int (statement, 3); - event->running_status = (guint) _tmp4_; - _tmp5_ = sqlite3_column_int (statement, 4); - event->free_ca_mode = _tmp5_ == 1; - _tmp6_ = sqlite3_column_text (statement, 5); - _tmp7_ = dvb_database_sqlite_utils_unescape (_tmp6_); - _tmp8_ = _tmp7_; + _tmp5_ = statement; + _tmp6_ = sqlite3_column_int (_tmp5_, 2); + event->duration = (guint) _tmp6_; + _tmp7_ = statement; + _tmp8_ = sqlite3_column_int (_tmp7_, 3); + event->running_status = (guint) _tmp8_; + _tmp9_ = statement; + _tmp10_ = sqlite3_column_int (_tmp9_, 4); + event->free_ca_mode = _tmp10_ == 1; + _tmp11_ = statement; + _tmp12_ = sqlite3_column_text (_tmp11_, 5); + _tmp13_ = dvb_database_sqlite_utils_unescape (_tmp12_); _g_free0 (event->name); - event->name = _tmp8_; - _tmp9_ = sqlite3_column_text (statement, 6); - _tmp10_ = dvb_database_sqlite_utils_unescape (_tmp9_); - _tmp11_ = _tmp10_; + event->name = _tmp13_; + _tmp14_ = statement; + _tmp15_ = sqlite3_column_text (_tmp14_, 6); + _tmp16_ = dvb_database_sqlite_utils_unescape (_tmp15_); _g_free0 (event->description); - event->description = _tmp11_; - _tmp12_ = sqlite3_column_text (statement, 7); - _tmp13_ = dvb_database_sqlite_utils_unescape (_tmp12_); - _tmp14_ = _tmp13_; + event->description = _tmp16_; + _tmp17_ = statement; + _tmp18_ = sqlite3_column_text (_tmp17_, 7); + _tmp19_ = dvb_database_sqlite_utils_unescape (_tmp18_); _g_free0 (event->extended_description); - event->extended_description = _tmp14_; - _tmp15_ = NULL; + event->extended_description = _tmp19_; __g_slist_free__dvb_event_audio_component_unref0_0 (event->audio_components); - event->audio_components = _tmp15_; - _tmp16_ = NULL; + event->audio_components = NULL; __g_slist_free__dvb_event_video_component_unref0_0 (event->video_components); - event->video_components = _tmp16_; - _tmp17_ = NULL; + event->video_components = NULL; __g_slist_free__dvb_event_teletext_component_unref0_0 (event->teletext_components); - event->teletext_components = _tmp17_; + event->teletext_components = NULL; result = event; return result; } @@ -1281,20 +1673,41 @@ static gdouble dvb_database_sqlite_sqlite_epg_store_to_julian (DVBdatabasesqliteSqliteEPGStore* self, guint year, guint month, guint day, guint hour, guint minute, guint second, GError** error) { gdouble result = 0.0; - gchar* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + guint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_; + gchar* _tmp6_ = NULL; gchar* datetime_str; - gchar* _tmp1_; - gint _tmp2_; - gint _tmp3_; - gdouble _tmp4_; + sqlite3_stmt* _tmp7_; + const gchar* _tmp8_; + gchar* _tmp9_; + GDestroyNotify _tmp10_; + gint _tmp11_ = 0; + sqlite3_stmt* _tmp12_; + gint _tmp13_ = 0; + sqlite3_stmt* _tmp14_; + gdouble _tmp15_ = 0.0; gdouble val; + sqlite3_stmt* _tmp16_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0.0); - _tmp0_ = g_strdup_printf ("%04u-%02u-%02u %02u:%02u:%02u", year, month, day, hour, minute, second); - datetime_str = _tmp0_; - _tmp1_ = g_strdup (datetime_str); - _tmp2_ = sqlite3_bind_text (self->priv->to_julian_statement, 1, _tmp1_, -1, g_free); - if (_tmp2_ != SQLITE_OK) { + _tmp0_ = year; + _tmp1_ = month; + _tmp2_ = day; + _tmp3_ = hour; + _tmp4_ = minute; + _tmp5_ = second; + _tmp6_ = g_strdup_printf ("%04u-%02u-%02u %02u:%02u:%02u", _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_); + datetime_str = _tmp6_; + _tmp7_ = self->priv->to_julian_statement; + _tmp8_ = datetime_str; + _tmp9_ = g_strdup (_tmp8_); + _tmp10_ = g_free; + _tmp11_ = sqlite3_bind_text (_tmp7_, 1, _tmp9_, -1, _tmp10_); + if (_tmp11_ != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1312,8 +1725,9 @@ _g_free0 (datetime_str); return result; } - _tmp3_ = sqlite3_step (self->priv->to_julian_statement); - if (_tmp3_ != SQLITE_ROW) { + _tmp12_ = self->priv->to_julian_statement; + _tmp13_ = sqlite3_step (_tmp12_); + if (_tmp13_ != SQLITE_ROW) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1331,9 +1745,11 @@ _g_free0 (datetime_str); return result; } - _tmp4_ = sqlite3_column_double (self->priv->to_julian_statement, 0); - val = _tmp4_; - sqlite3_reset (self->priv->to_julian_statement); + _tmp14_ = self->priv->to_julian_statement; + _tmp15_ = sqlite3_column_double (_tmp14_, 0); + val = _tmp15_; + _tmp16_ = self->priv->to_julian_statement; + sqlite3_reset (_tmp16_); result = val; _g_free0 (datetime_str); return result; @@ -1341,24 +1757,29 @@ static void dvb_database_sqlite_sqlite_epg_store_class_init (DVBdatabasesqliteSqliteEPGStoreClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_database_sqlite_sqlite_epg_store_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBdatabasesqliteSqliteEPGStorePrivate)); DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS (klass)->on_open = dvb_database_sqlite_sqlite_epg_store_real_on_open; DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS (klass)->create = dvb_database_sqlite_sqlite_epg_store_real_create; DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS (klass)->upgrade = dvb_database_sqlite_sqlite_epg_store_real_upgrade; G_OBJECT_CLASS (klass)->finalize = dvb_database_sqlite_sqlite_epg_store_finalize; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_database_sqlite_sqlite_epg_store_log = _tmp1_; } static void dvb_database_sqlite_sqlite_epg_store_dvb_database_epg_store_interface_init (DVBdatabaseEPGStoreIface * iface) { dvb_database_sqlite_sqlite_epg_store_dvb_database_epg_store_parent_iface = g_type_interface_peek_parent (iface); - iface->add_or_update_event = (gboolean (*)(DVBdatabaseEPGStore* ,DVBEvent* ,guint ,guint ,GError**)) dvb_database_sqlite_sqlite_epg_store_real_add_or_update_event; - iface->get_event = (DVBEvent* (*)(DVBdatabaseEPGStore* ,guint ,guint ,guint ,GError**)) dvb_database_sqlite_sqlite_epg_store_real_get_event; - iface->remove_event = (gboolean (*)(DVBdatabaseEPGStore* ,guint ,guint ,guint ,GError**)) dvb_database_sqlite_sqlite_epg_store_real_remove_event; - iface->remove_events_older_than = (gboolean (*)(DVBdatabaseEPGStore* ,DVBEvent* ,guint ,guint ,GError**)) dvb_database_sqlite_sqlite_epg_store_real_remove_events_older_than; - iface->contains_event = (gboolean (*)(DVBdatabaseEPGStore* ,DVBEvent* ,guint ,guint ,GError**)) dvb_database_sqlite_sqlite_epg_store_real_contains_event; - iface->get_events = (GeeList* (*)(DVBdatabaseEPGStore* ,guint ,guint ,GError**)) dvb_database_sqlite_sqlite_epg_store_real_get_events; - iface->remove_events_of_group = (gboolean (*)(DVBdatabaseEPGStore* ,guint ,GError**)) dvb_database_sqlite_sqlite_epg_store_real_remove_events_of_group; + iface->add_or_update_event = (gboolean (*)(DVBdatabaseEPGStore*, DVBEvent*, guint, guint, GError**)) dvb_database_sqlite_sqlite_epg_store_real_add_or_update_event; + iface->get_event = (DVBEvent* (*)(DVBdatabaseEPGStore*, guint, guint, guint, GError**)) dvb_database_sqlite_sqlite_epg_store_real_get_event; + iface->remove_event = (gboolean (*)(DVBdatabaseEPGStore*, guint, guint, guint, GError**)) dvb_database_sqlite_sqlite_epg_store_real_remove_event; + iface->remove_events_older_than = (gboolean (*)(DVBdatabaseEPGStore*, DVBEvent*, guint, guint, GError**)) dvb_database_sqlite_sqlite_epg_store_real_remove_events_older_than; + iface->contains_event = (gboolean (*)(DVBdatabaseEPGStore*, DVBEvent*, guint, guint, GError**)) dvb_database_sqlite_sqlite_epg_store_real_contains_event; + iface->get_events = (GeeList* (*)(DVBdatabaseEPGStore*, guint, guint, GError**)) dvb_database_sqlite_sqlite_epg_store_real_get_events; + iface->remove_events_of_group = (gboolean (*)(DVBdatabaseEPGStore*, guint, GError**)) dvb_database_sqlite_sqlite_epg_store_real_remove_events_of_group; } diff -Nru gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteEPGStore.vala gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteEPGStore.vala --- gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteEPGStore.vala 2011-01-05 11:51:05.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteEPGStore.vala 2011-05-29 11:07:27.000000000 +0000 @@ -20,11 +20,14 @@ using GLib; using Gee; using Sqlite; +using DVB.Logging; namespace DVB.database.sqlite { public class SqliteEPGStore : SqliteDatabase, EPGStore { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + private static const int VERSION = 2; private static const string CREATE_EVENTS_TABLE_STATEMENT = @@ -143,7 +146,10 @@ event.day, event.hour, event.minute, event.second); // Check if start time got converted correctly - if (julian_start <= 0) return false; + if (julian_start <= 0) { + log.warning ("Failed to convert start time"); + return false; + } if (this.contains_event (event, channel_sid, group_id)) { if (this.update_event_statement.bind_double (1, julian_start) != Sqlite.OK @@ -285,7 +291,10 @@ { Gee.List events = new ArrayList (); - if (this.db == null) return events; + if (this.db == null) { + log.warning ("DB not initialized"); + return events; + } string statement_str = SELECT_MINIMAL_EVENTS_STATEMENT.printf ( group_id, channel_sid); diff -Nru gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteUtils.c gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteUtils.c --- gnome-dvb-daemon-0.1.23/src/database/sqlite/SqliteUtils.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/sqlite/SqliteUtils.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqliteUtils.c generated by valac 0.11.3, the Vala compiler +/* SqliteUtils.c generated by valac 0.14.0, the Vala compiler * generated from SqliteUtils.vala, do not modify */ /* @@ -40,46 +40,50 @@ */ gchar* dvb_database_sqlite_utils_escape (const gchar* text) { gchar* result = NULL; - GRegex* regex; - GRegex* _tmp1_ = NULL; - GRegex* _tmp2_; - GRegex* _tmp3_; - gchar* escaped_str; - gchar* _tmp5_ = NULL; - gchar* _tmp6_; - gchar* _tmp7_; + const gchar* _tmp0_; + GRegex* regex = NULL; + gchar* escaped_str = NULL; GError * _inner_error_ = NULL; - if (text == NULL) { - gchar* _tmp0_; - _tmp0_ = g_strdup (""); - result = _tmp0_; + _tmp0_ = text; + if (_tmp0_ == NULL) { + gchar* _tmp1_; + _tmp1_ = g_strdup (""); + result = _tmp1_; return result; } - regex = NULL; - _tmp1_ = g_regex_new ("'", G_REGEX_MULTILINE, 0, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch4_g_regex_error; + { + GRegex* _tmp2_; + GRegex* _tmp3_; + _tmp2_ = g_regex_new ("'", G_REGEX_MULTILINE, 0, &_inner_error_); + _tmp3_ = _tmp2_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch4_g_regex_error; + } + _g_regex_unref0 (regex); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_regex_unref0 (regex); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + regex = _tmp3_; } - _tmp3_ = _tmp2_; - _g_regex_unref0 (regex); - regex = _tmp3_; goto __finally4; __catch4_g_regex_error: { - GError * e; - gchar* _tmp4_; + GError* e = NULL; + GError* _tmp4_; + const gchar* _tmp5_; + const gchar* _tmp6_; + gchar* _tmp7_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("SqliteUtils.vala:36: RegexError: %s", e->message); - _tmp4_ = g_strdup (text); - result = _tmp4_; + _tmp4_ = e; + _tmp5_ = _tmp4_->message; + g_warning ("SqliteUtils.vala:36: RegexError: %s", _tmp5_); + _tmp6_ = text; + _tmp7_ = g_strdup (_tmp6_); + result = _tmp7_; _g_error_free0 (e); _g_regex_unref0 (regex); return result; @@ -91,32 +95,44 @@ g_clear_error (&_inner_error_); return NULL; } - escaped_str = NULL; - _tmp5_ = g_regex_replace_literal (regex, text, (gssize) (-1), 0, "''", 0, &_inner_error_); - _tmp6_ = _tmp5_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch5_g_regex_error; + { + GRegex* _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_ = NULL; + gchar* _tmp11_; + _tmp8_ = regex; + _tmp9_ = text; + _tmp10_ = g_regex_replace_literal (_tmp8_, _tmp9_, (gssize) (-1), 0, "''", 0, &_inner_error_); + _tmp11_ = _tmp10_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch5_g_regex_error; + } + _g_free0 (escaped_str); + _g_regex_unref0 (regex); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_free0 (escaped_str); - _g_regex_unref0 (regex); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + escaped_str = _tmp11_; } - _tmp7_ = _tmp6_; - _g_free0 (escaped_str); - escaped_str = _tmp7_; goto __finally5; __catch5_g_regex_error: { - GError * e; - gchar* _tmp8_; + GError* e = NULL; + GError* _tmp12_; + const gchar* _tmp13_; + const gchar* _tmp14_; + gchar* _tmp15_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("SqliteUtils.vala:45: RegexError: %s", e->message); - _tmp8_ = g_strdup (text); - result = _tmp8_; + _tmp12_ = e; + _tmp13_ = _tmp12_->message; + g_warning ("SqliteUtils.vala:45: RegexError: %s", _tmp13_); + _tmp14_ = text; + _tmp15_ = g_strdup (_tmp14_); + result = _tmp15_; _g_error_free0 (e); _g_free0 (escaped_str); _g_regex_unref0 (regex); @@ -141,41 +157,43 @@ */ gchar* dvb_database_sqlite_utils_unescape (const gchar* text) { gchar* result = NULL; - GRegex* regex; - GRegex* _tmp0_ = NULL; - GRegex* _tmp1_; - GRegex* _tmp2_; - gchar* new_str; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - gchar* _tmp6_; + GRegex* regex = NULL; + gchar* new_str = NULL; GError * _inner_error_ = NULL; g_return_val_if_fail (text != NULL, NULL); - regex = NULL; - _tmp0_ = g_regex_new ("''", G_REGEX_MULTILINE, 0, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch6_g_regex_error; + { + GRegex* _tmp0_; + GRegex* _tmp1_; + _tmp0_ = g_regex_new ("''", G_REGEX_MULTILINE, 0, &_inner_error_); + _tmp1_ = _tmp0_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch6_g_regex_error; + } + _g_regex_unref0 (regex); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_regex_unref0 (regex); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + regex = _tmp1_; } - _tmp2_ = _tmp1_; - _g_regex_unref0 (regex); - regex = _tmp2_; goto __finally6; __catch6_g_regex_error: { - GError * e; - gchar* _tmp3_; + GError* e = NULL; + GError* _tmp2_; + const gchar* _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("SqliteUtils.vala:62: RegexError: %s", e->message); - _tmp3_ = g_strdup (text); - result = _tmp3_; + _tmp2_ = e; + _tmp3_ = _tmp2_->message; + g_warning ("SqliteUtils.vala:62: RegexError: %s", _tmp3_); + _tmp4_ = text; + _tmp5_ = g_strdup (_tmp4_); + result = _tmp5_; _g_error_free0 (e); _g_regex_unref0 (regex); return result; @@ -187,32 +205,44 @@ g_clear_error (&_inner_error_); return NULL; } - new_str = NULL; - _tmp4_ = g_regex_replace_literal (regex, text, (gssize) (-1), 0, "'", 0, &_inner_error_); - _tmp5_ = _tmp4_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch7_g_regex_error; + { + GRegex* _tmp6_; + const gchar* _tmp7_; + gchar* _tmp8_ = NULL; + gchar* _tmp9_; + _tmp6_ = regex; + _tmp7_ = text; + _tmp8_ = g_regex_replace_literal (_tmp6_, _tmp7_, (gssize) (-1), 0, "'", 0, &_inner_error_); + _tmp9_ = _tmp8_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch7_g_regex_error; + } + _g_free0 (new_str); + _g_regex_unref0 (regex); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_free0 (new_str); - _g_regex_unref0 (regex); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + new_str = _tmp9_; } - _tmp6_ = _tmp5_; - _g_free0 (new_str); - new_str = _tmp6_; goto __finally7; __catch7_g_regex_error: { - GError * e; - gchar* _tmp7_; + GError* e = NULL; + GError* _tmp10_; + const gchar* _tmp11_; + const gchar* _tmp12_; + gchar* _tmp13_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("SqliteUtils.vala:71: RegexError: %s", e->message); - _tmp7_ = g_strdup (text); - result = _tmp7_; + _tmp10_ = e; + _tmp11_ = _tmp10_->message; + g_warning ("SqliteUtils.vala:71: RegexError: %s", _tmp11_); + _tmp12_ = text; + _tmp13_ = g_strdup (_tmp12_); + result = _tmp13_; _g_error_free0 (e); _g_free0 (new_str); _g_regex_unref0 (regex); diff -Nru gnome-dvb-daemon-0.1.23/src/database/TimersStore.c gnome-dvb-daemon-0.2.7/src/database/TimersStore.c --- gnome-dvb-daemon-0.1.23/src/database/TimersStore.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/database/TimersStore.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* TimersStore.c generated by valac 0.11.3, the Vala compiler +/* TimersStore.c generated by valac 0.14.0, the Vala compiler * generated from TimersStore.vala, do not modify */ /* @@ -103,21 +103,25 @@ GeeList* dvb_database_timers_store_get_all_timers_of_device_group (DVBdatabaseTimersStore* self, DVBDeviceGroup* dev, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_DATABASE_TIMERS_STORE_GET_INTERFACE (self)->get_all_timers_of_device_group (self, dev, error); } gboolean dvb_database_timers_store_add_timer_to_device_group (DVBdatabaseTimersStore* self, DVBTimer* timer, DVBDeviceGroup* dev, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_TIMERS_STORE_GET_INTERFACE (self)->add_timer_to_device_group (self, timer, dev, error); } gboolean dvb_database_timers_store_remove_timer_from_device_group (DVBdatabaseTimersStore* self, guint timer_id, DVBDeviceGroup* dev, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_TIMERS_STORE_GET_INTERFACE (self)->remove_timer_from_device_group (self, timer_id, dev, error); } gboolean dvb_database_timers_store_remove_all_timers_from_device_group (DVBdatabaseTimersStore* self, guint group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_DATABASE_TIMERS_STORE_GET_INTERFACE (self)->remove_all_timers_from_device_group (self, group_id, error); } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusChannelList.c gnome-dvb-daemon-0.2.7/src/dbus/IDBusChannelList.c --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusChannelList.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusChannelList.c 2011-09-22 19:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusChannelList.c generated by valac 0.11.3, the Vala compiler +/* IDBusChannelList.c generated by valac 0.14.0, the Vala compiler * generated from IDBusChannelList.vala, do not modify */ /* @@ -24,9 +24,7 @@ #include #include #include -#include -#include -#include +#include #define DVB_TYPE_CHANNEL_INFO (dvb_channel_info_get_type ()) @@ -40,9 +38,10 @@ typedef struct _DVBIDBusChannelList DVBIDBusChannelList; typedef struct _DVBIDBusChannelListIface DVBIDBusChannelListIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; -typedef struct _DVBIDBusChannelListDBusProxy DVBIDBusChannelListDBusProxy; -typedef DBusGProxyClass DVBIDBusChannelListDBusProxyClass; + +#define DVB_TYPE_ID_BUS_CHANNEL_LIST_PROXY (dvb_id_bus_channel_list_proxy_get_type ()) +typedef GDBusProxy DVBIDBusChannelListProxy; +typedef GDBusProxyClass DVBIDBusChannelListProxyClass; struct _DVBChannelInfo { guint id; @@ -65,15 +64,6 @@ gboolean (*RemoveChannelFromGroup) (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusChannelListDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - GType dvb_channel_info_get_type (void) G_GNUC_CONST; @@ -81,7 +71,8 @@ void dvb_channel_info_free (DVBChannelInfo* self); void dvb_channel_info_copy (const DVBChannelInfo* self, DVBChannelInfo* dest); void dvb_channel_info_destroy (DVBChannelInfo* self); -DVBIDBusChannelList* dvb_id_bus_channel_list_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_channel_list_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_channel_list_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_channel_list_get_type (void) G_GNUC_CONST; guint* dvb_id_bus_channel_list_GetChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); guint* dvb_id_bus_channel_list_GetRadioChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); @@ -95,59 +86,124 @@ gboolean dvb_id_bus_channel_list_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); gboolean dvb_id_bus_channel_list_RemoveChannelFromGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_channel_list_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_channel_list_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_channel_list_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_introspect (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_property_get_all (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannels (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetRadioChannels (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetTVChannels (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelName (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelNetwork (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_IsRadioChannel (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelURL (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); +static void dvb_id_bus_channel_list_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_channel_list_changed (DVBIDBusChannelList* self, GVariant* parameters); +static guint* dvb_id_bus_channel_list_proxy_GetChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); +static guint* dvb_id_bus_channel_list_proxy_GetRadioChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); +static guint* dvb_id_bus_channel_list_proxy_GetTVChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_channel_list_proxy_GetChannelName (DVBIDBusChannelList* self, guint channel_id, gchar** channel_name, GError** error); +static gboolean dvb_id_bus_channel_list_proxy_GetChannelNetwork (DVBIDBusChannelList* self, guint channel_id, gchar** network, GError** error); +static gboolean dvb_id_bus_channel_list_proxy_IsRadioChannel (DVBIDBusChannelList* self, guint channel_id, gboolean* radio, GError** error); +static gboolean dvb_id_bus_channel_list_proxy_GetChannelURL (DVBIDBusChannelList* self, guint channel_id, gchar** url, GError** error); +static DVBChannelInfo* dvb_id_bus_channel_list_proxy_GetChannelInfos (DVBIDBusChannelList* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_channel_list_proxy_GetChannelsOfGroup (DVBIDBusChannelList* self, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error); +static gboolean dvb_id_bus_channel_list_proxy_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); +static gboolean dvb_id_bus_channel_list_proxy_RemoveChannelFromGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); +static void dvb_id_bus_channel_list_proxy_dvb_id_bus_channel_list_interface_init (DVBIDBusChannelListIface* iface); +static void _dbus_dvb_id_bus_channel_list_GetChannels (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_GetRadioChannels (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_GetTVChannels (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_GetChannelName (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_GetChannelNetwork (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_IsRadioChannel (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_GetChannelURL (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); static void _vala_DVBChannelInfo_array_free (DVBChannelInfo* array, gint array_length); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelInfos (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelsOfGroup (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_AddChannelToGroup (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_RemoveChannelFromGroup (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_channel_list_changed (GObject* _sender, guint channel_id, guint type, DBusConnection* _connection); -GType dvb_id_bus_channel_list_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_channel_list_changed (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_channel_list_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_CHANNEL_LIST_DBUS_PROXY_DUMMY_PROPERTY -}; -static guint* dvb_id_bus_channel_list_dbus_proxy_GetChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); -static guint* dvb_id_bus_channel_list_dbus_proxy_GetRadioChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); -static guint* dvb_id_bus_channel_list_dbus_proxy_GetTVChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelName (DVBIDBusChannelList* self, guint channel_id, gchar** channel_name, GError** error); -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelNetwork (DVBIDBusChannelList* self, guint channel_id, gchar** network, GError** error); -static gboolean dvb_id_bus_channel_list_dbus_proxy_IsRadioChannel (DVBIDBusChannelList* self, guint channel_id, gboolean* radio, GError** error); -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelURL (DVBIDBusChannelList* self, guint channel_id, gchar** url, GError** error); -static DVBChannelInfo* dvb_id_bus_channel_list_dbus_proxy_GetChannelInfos (DVBIDBusChannelList* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelsOfGroup (DVBIDBusChannelList* self, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error); -static gboolean dvb_id_bus_channel_list_dbus_proxy_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); -static gboolean dvb_id_bus_channel_list_dbus_proxy_RemoveChannelFromGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); -static void dvb_id_bus_channel_list_dbus_proxy_dvb_id_bus_channel_list__interface_init (DVBIDBusChannelListIface* iface); -static void _vala_dvb_id_bus_channel_list_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_channel_list_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); - -static const DBusObjectPathVTable _dvb_id_bus_channel_list_dbus_path_vtable = {_dvb_id_bus_channel_list_dbus_unregister, dvb_id_bus_channel_list_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_channel_list_dbus_vtable = {dvb_id_bus_channel_list_dbus_register_object}; +static void _dbus_dvb_id_bus_channel_list_GetChannelInfos (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_GetChannelsOfGroup (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_AddChannelToGroup (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_channel_list_RemoveChannelFromGroup (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_channel_list_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_channel_list_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_channel_list_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_dvb_id_bus_channel_list_changed (GObject* _sender, guint channel_id, guint type, gpointer* _data); +static void _dvb_id_bus_channel_list_unregister_object (gpointer user_data); + +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannels_result = {-1, "result", "au"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannels_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannels_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannels_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetChannels = {-1, "GetChannels", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannels_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannels_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetRadioChannels_result = {-1, "result", "au"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetRadioChannels_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetRadioChannels_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetRadioChannels_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetRadioChannels = {-1, "GetRadioChannels", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetRadioChannels_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetRadioChannels_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetTVChannels_result = {-1, "result", "au"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetTVChannels_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetTVChannels_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetTVChannels_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetTVChannels = {-1, "GetTVChannels", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetTVChannels_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetTVChannels_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_channel_id = {-1, "channel_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_channel_name = {-1, "channel_name", "s"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_in[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_channel_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_channel_name, &_dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetChannelName = {-1, "GetChannelName", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelName_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_channel_id = {-1, "channel_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_network = {-1, "network", "s"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_in[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_channel_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_network, &_dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetChannelNetwork = {-1, "GetChannelNetwork", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelNetwork_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_channel_id = {-1, "channel_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_radio = {-1, "radio", "b"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_in[] = {&_dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_channel_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_radio, &_dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_IsRadioChannel = {-1, "IsRadioChannel", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_IsRadioChannel_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_channel_id = {-1, "channel_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_url = {-1, "url", "s"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_in[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_channel_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_url, &_dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetChannelURL = {-1, "GetChannelURL", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelURL_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelInfos_result = {-1, "result", "a(usb)"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelInfos_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelInfos_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelInfos_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetChannelInfos = {-1, "GetChannelInfos", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelInfos_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelInfos_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_channel_group_id = {-1, "channel_group_id", "i"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_channel_ids = {-1, "channel_ids", "au"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_in[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_channel_group_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_channel_ids, &_dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_GetChannelsOfGroup = {-1, "GetChannelsOfGroup", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_GetChannelsOfGroup_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_channel_id = {-1, "channel_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_channel_group_id = {-1, "channel_group_id", "i"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_in[] = {&_dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_channel_id, &_dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_channel_group_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_AddChannelToGroup = {-1, "AddChannelToGroup", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_AddChannelToGroup_out)}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_channel_id = {-1, "channel_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_channel_group_id = {-1, "channel_group_id", "i"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_in[] = {&_dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_channel_id, &_dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_channel_group_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_out[] = {&_dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_channel_list_dbus_method_info_RemoveChannelFromGroup = {-1, "RemoveChannelFromGroup", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_in), (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_RemoveChannelFromGroup_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_channel_list_dbus_method_info[] = {&_dvb_id_bus_channel_list_dbus_method_info_GetChannels, &_dvb_id_bus_channel_list_dbus_method_info_GetRadioChannels, &_dvb_id_bus_channel_list_dbus_method_info_GetTVChannels, &_dvb_id_bus_channel_list_dbus_method_info_GetChannelName, &_dvb_id_bus_channel_list_dbus_method_info_GetChannelNetwork, &_dvb_id_bus_channel_list_dbus_method_info_IsRadioChannel, &_dvb_id_bus_channel_list_dbus_method_info_GetChannelURL, &_dvb_id_bus_channel_list_dbus_method_info_GetChannelInfos, &_dvb_id_bus_channel_list_dbus_method_info_GetChannelsOfGroup, &_dvb_id_bus_channel_list_dbus_method_info_AddChannelToGroup, &_dvb_id_bus_channel_list_dbus_method_info_RemoveChannelFromGroup, NULL}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_changed_channel_id = {-1, "channel_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_channel_list_dbus_arg_info_changed_type = {-1, "type", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_channel_list_dbus_arg_info_changed[] = {&_dvb_id_bus_channel_list_dbus_arg_info_changed_channel_id, &_dvb_id_bus_channel_list_dbus_arg_info_changed_type, NULL}; +static const GDBusSignalInfo _dvb_id_bus_channel_list_dbus_signal_info_changed = {-1, "Changed", (GDBusArgInfo **) (&_dvb_id_bus_channel_list_dbus_arg_info_changed)}; +static const GDBusSignalInfo * const _dvb_id_bus_channel_list_dbus_signal_info[] = {&_dvb_id_bus_channel_list_dbus_signal_info_changed, NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_channel_list_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_channel_list_dbus_interface_info = {-1, "org.gnome.DVB.ChannelList", (GDBusMethodInfo **) (&_dvb_id_bus_channel_list_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_channel_list_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_channel_list_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_channel_list_dbus_interface_vtable = {dvb_id_bus_channel_list_dbus_interface_method_call, dvb_id_bus_channel_list_dbus_interface_get_property, dvb_id_bus_channel_list_dbus_interface_set_property}; void dvb_channel_info_copy (const DVBChannelInfo* self, DVBChannelInfo* dest) { - dest->id = self->id; - dest->name = g_strdup (self->name); - dest->is_radio = self->is_radio; + guint _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gboolean _tmp3_; + _tmp0_ = (*self).id; + (*dest).id = _tmp0_; + _tmp1_ = (*self).name; + _tmp2_ = g_strdup (_tmp1_); + _g_free0 ((*dest).name); + (*dest).name = _tmp2_; + _tmp3_ = (*self).is_radio; + (*dest).is_radio = _tmp3_; } void dvb_channel_info_destroy (DVBChannelInfo* self) { - _g_free0 (self->name); + _g_free0 ((*self).name); } @@ -180,6 +236,7 @@ * @returns: List of channel IDs aka SIDs of all channels */ guint* dvb_id_bus_channel_list_GetChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannels (self, result_length1, error); } @@ -188,6 +245,7 @@ * @returns: List of channel IDs aka SIDs of radio channels */ guint* dvb_id_bus_channel_list_GetRadioChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetRadioChannels (self, result_length1, error); } @@ -196,6 +254,7 @@ * @returns: List of channel IDs aka SIDs of TV channels */ guint* dvb_id_bus_channel_list_GetTVChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetTVChannels (self, result_length1, error); } @@ -207,6 +266,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_channel_list_GetChannelName (DVBIDBusChannelList* self, guint channel_id, gchar** channel_name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelName (self, channel_id, channel_name, error); } @@ -219,6 +279,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_channel_list_GetChannelNetwork (DVBIDBusChannelList* self, guint channel_id, gchar** network, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelNetwork (self, channel_id, network, error); } @@ -229,6 +290,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_channel_list_IsRadioChannel (DVBIDBusChannelList* self, guint channel_id, gboolean* radio, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->IsRadioChannel (self, channel_id, radio, error); } @@ -239,11 +301,13 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_channel_list_GetChannelURL (DVBIDBusChannelList* self, guint channel_id, gchar** url, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelURL (self, channel_id, url, error); } DVBChannelInfo* dvb_id_bus_channel_list_GetChannelInfos (DVBIDBusChannelList* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelInfos (self, result_length1, error); } @@ -253,6 +317,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_channel_list_GetChannelsOfGroup (DVBIDBusChannelList* self, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelsOfGroup (self, channel_group_id, channel_ids, channel_ids_length1, error); } @@ -263,6 +328,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_channel_list_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->AddChannelToGroup (self, channel_id, channel_group_id, error); } @@ -273,6 +339,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_channel_list_RemoveChannelFromGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->RemoveChannelFromGroup (self, channel_id, channel_group_id, error); } @@ -281,7 +348,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2); register GMarshalFunc_VOID__UINT_UINT callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -296,1099 +364,844 @@ } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); +static void dvb_id_bus_channel_list_base_init (DVBIDBusChannelListIface * iface) { + static gboolean initialized = FALSE; + if (!initialized) { + initialized = TRUE; + /** + * @type: 0: added, 1: deleted, 2: updated + */ + g_signal_new ("changed", DVB_TYPE_ID_BUS_CHANNEL_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); } } -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); +GType dvb_id_bus_channel_list_get_type (void) { + static volatile gsize dvb_id_bus_channel_list_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_channel_list_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusChannelListIface), (GBaseInitFunc) dvb_id_bus_channel_list_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_id_bus_channel_list_type_id; + dvb_id_bus_channel_list_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusChannelList", &g_define_type_info, 0); + g_type_interface_add_prerequisite (dvb_id_bus_channel_list_type_id, G_TYPE_OBJECT); + g_type_set_qdata (dvb_id_bus_channel_list_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_channel_list_proxy_get_type); + g_type_set_qdata (dvb_id_bus_channel_list_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.ChannelList"); + g_type_set_qdata (dvb_id_bus_channel_list_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_channel_list_register_object); + g_once_init_leave (&dvb_id_bus_channel_list_type_id__volatile, dvb_id_bus_channel_list_type_id); + } + return dvb_id_bus_channel_list_type_id__volatile; +} + + +G_DEFINE_TYPE_EXTENDED (DVBIDBusChannelListProxy, dvb_id_bus_channel_list_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_CHANNEL_LIST, dvb_id_bus_channel_list_proxy_dvb_id_bus_channel_list_interface_init) ) +static void dvb_id_bus_channel_list_proxy_class_init (DVBIDBusChannelListProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_channel_list_proxy_g_signal; } -void _dvb_id_bus_channel_list_dbus_unregister (DBusConnection* connection, void* _user_data_) { +static void _dbus_handle_dvb_id_bus_channel_list_changed (DVBIDBusChannelList* self, GVariant* parameters) { + GVariantIter _arguments_iter; + guint channel_id = 0U; + GVariant* _tmp26_; + guint type = 0U; + GVariant* _tmp27_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp26_ = g_variant_iter_next_value (&_arguments_iter); + channel_id = g_variant_get_uint32 (_tmp26_); + g_variant_unref (_tmp26_); + _tmp27_ = g_variant_iter_next_value (&_arguments_iter); + type = g_variant_get_uint32 (_tmp27_); + g_variant_unref (_tmp27_); + g_signal_emit_by_name (self, "changed", channel_id, type); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_introspect (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); +static void dvb_id_bus_channel_list_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "Changed") == 0) { + _dbus_handle_dvb_id_bus_channel_list_changed ((DVBIDBusChannelList*) proxy, parameters); } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + + +static void dvb_id_bus_channel_list_proxy_init (DVBIDBusChannelListProxy* self) { +} + + +static guint* dvb_id_bus_channel_list_proxy_GetChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint* _result; + int _result_length1; + GVariant* _tmp28_; + guint* _tmp29_; + int _tmp29__length; + int _tmp29__size; + int _tmp29__length1; + GVariantIter _tmp30_; + GVariant* _tmp31_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetChannels"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp28_ = g_variant_iter_next_value (&_reply_iter); + _tmp29_ = g_new (guint, 5); + _tmp29__length = 0; + _tmp29__size = 4; + _tmp29__length1 = 0; + g_variant_iter_init (&_tmp30_, _tmp28_); + for (; (_tmp31_ = g_variant_iter_next_value (&_tmp30_)) != NULL; _tmp29__length1++) { + if (_tmp29__size == _tmp29__length) { + _tmp29__size = 2 * _tmp29__size; + _tmp29_ = g_renew (guint, _tmp29_, _tmp29__size + 1); + } + _tmp29_[_tmp29__length++] = g_variant_get_uint32 (_tmp31_); + g_variant_unref (_tmp31_); + } + _result_length1 = _tmp29__length1; + _result = _tmp29_; + g_variant_unref (_tmp28_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; +} + + +static guint* dvb_id_bus_channel_list_proxy_GetRadioChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint* _result; + int _result_length1; + GVariant* _tmp32_; + guint* _tmp33_; + int _tmp33__length; + int _tmp33__size; + int _tmp33__length1; + GVariantIter _tmp34_; + GVariant* _tmp35_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetRadioChannels"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp32_ = g_variant_iter_next_value (&_reply_iter); + _tmp33_ = g_new (guint, 5); + _tmp33__length = 0; + _tmp33__size = 4; + _tmp33__length1 = 0; + g_variant_iter_init (&_tmp34_, _tmp32_); + for (; (_tmp35_ = g_variant_iter_next_value (&_tmp34_)) != NULL; _tmp33__length1++) { + if (_tmp33__size == _tmp33__length) { + _tmp33__size = 2 * _tmp33__size; + _tmp33_ = g_renew (guint, _tmp33_, _tmp33__size + 1); + } + _tmp33_[_tmp33__length++] = g_variant_get_uint32 (_tmp35_); + g_variant_unref (_tmp35_); + } + _result_length1 = _tmp33__length1; + _result = _tmp33_; + g_variant_unref (_tmp32_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_property_get_all (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.ChannelList") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; +static guint* dvb_id_bus_channel_list_proxy_GetTVChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint* _result; + int _result_length1; + GVariant* _tmp36_; + guint* _tmp37_; + int _tmp37__length; + int _tmp37__size; + int _tmp37__length1; + GVariantIter _tmp38_; + GVariant* _tmp39_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetTVChannels"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp36_ = g_variant_iter_next_value (&_reply_iter); + _tmp37_ = g_new (guint, 5); + _tmp37__length = 0; + _tmp37__size = 4; + _tmp37__length1 = 0; + g_variant_iter_init (&_tmp38_, _tmp36_); + for (; (_tmp39_ = g_variant_iter_next_value (&_tmp38_)) != NULL; _tmp37__length1++) { + if (_tmp37__size == _tmp37__length) { + _tmp37__size = 2 * _tmp37__size; + _tmp37_ = g_renew (guint, _tmp37_, _tmp37__size + 1); + } + _tmp37_[_tmp37__length++] = g_variant_get_uint32 (_tmp39_); + g_variant_unref (_tmp39_); + } + _result_length1 = _tmp37__length1; + _result = _tmp37_; + g_variant_unref (_tmp36_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannels (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint* result; - int result_length1; - DBusMessage* reply; - guint* _tmp1_; - DBusMessageIter _tmp2_; - int _tmp3_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +static gboolean dvb_id_bus_channel_list_proxy_GetChannelName (DVBIDBusChannelList* self, guint channel_id, gchar** channel_name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_channel_name; + GVariant* _tmp40_; + gboolean _result; + GVariant* _tmp41_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetChannelName"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp40_ = g_variant_iter_next_value (&_reply_iter); + _vala_channel_name = g_variant_dup_string (_tmp40_, NULL); + g_variant_unref (_tmp40_); + *channel_name = _vala_channel_name; + _tmp41_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp41_); + g_variant_unref (_tmp41_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_channel_list_proxy_GetChannelNetwork (DVBIDBusChannelList* self, guint channel_id, gchar** network, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_network; + GVariant* _tmp42_; + gboolean _result; + GVariant* _tmp43_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetChannelNetwork"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp42_ = g_variant_iter_next_value (&_reply_iter); + _vala_network = g_variant_dup_string (_tmp42_, NULL); + g_variant_unref (_tmp42_); + *network = _vala_network; + _tmp43_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp43_); + g_variant_unref (_tmp43_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_channel_list_proxy_IsRadioChannel (DVBIDBusChannelList* self, guint channel_id, gboolean* radio, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _vala_radio; + GVariant* _tmp44_; + gboolean _result; + GVariant* _tmp45_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "IsRadioChannel"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp44_ = g_variant_iter_next_value (&_reply_iter); + _vala_radio = g_variant_get_boolean (_tmp44_); + g_variant_unref (_tmp44_); + *radio = _vala_radio; + _tmp45_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp45_); + g_variant_unref (_tmp45_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_channel_list_proxy_GetChannelURL (DVBIDBusChannelList* self, guint channel_id, gchar** url, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_url; + GVariant* _tmp46_; + gboolean _result; + GVariant* _tmp47_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetChannelURL"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp46_ = g_variant_iter_next_value (&_reply_iter); + _vala_url = g_variant_dup_string (_tmp46_, NULL); + g_variant_unref (_tmp46_); + *url = _vala_url; + _tmp47_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp47_); + g_variant_unref (_tmp47_); + g_object_unref (_reply_message); + return _result; +} + + +static DVBChannelInfo* dvb_id_bus_channel_list_proxy_GetChannelInfos (DVBIDBusChannelList* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + DVBChannelInfo* _result; + int _result_length1; + GVariant* _tmp48_; + DVBChannelInfo* _tmp49_; + int _tmp49__length; + int _tmp49__size; + int _tmp49__length1; + GVariantIter _tmp50_; + GVariant* _tmp51_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetChannelInfos"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp48_ = g_variant_iter_next_value (&_reply_iter); + _tmp49_ = g_new (DVBChannelInfo, 5); + _tmp49__length = 0; + _tmp49__size = 4; + _tmp49__length1 = 0; + g_variant_iter_init (&_tmp50_, _tmp48_); + for (; (_tmp51_ = g_variant_iter_next_value (&_tmp50_)) != NULL; _tmp49__length1++) { + DVBChannelInfo _tmp52_; + GVariantIter _tmp53_; + GVariant* _tmp54_; + GVariant* _tmp55_; + GVariant* _tmp56_; + if (_tmp49__size == _tmp49__length) { + _tmp49__size = 2 * _tmp49__size; + _tmp49_ = g_renew (DVBChannelInfo, _tmp49_, _tmp49__size + 1); + } + g_variant_iter_init (&_tmp53_, _tmp51_); + _tmp54_ = g_variant_iter_next_value (&_tmp53_); + _tmp52_.id = g_variant_get_uint32 (_tmp54_); + g_variant_unref (_tmp54_); + _tmp55_ = g_variant_iter_next_value (&_tmp53_); + _tmp52_.name = g_variant_dup_string (_tmp55_, NULL); + g_variant_unref (_tmp55_); + _tmp56_ = g_variant_iter_next_value (&_tmp53_); + _tmp52_.is_radio = g_variant_get_boolean (_tmp56_); + g_variant_unref (_tmp56_); + _tmp49_[_tmp49__length++] = _tmp52_; + g_variant_unref (_tmp51_); + } + _result_length1 = _tmp49__length1; + _result = _tmp49_; + g_variant_unref (_tmp48_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_channel_list_proxy_GetChannelsOfGroup (DVBIDBusChannelList* self, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint* _vala_channel_ids; + int _vala_channel_ids_length1; + GVariant* _tmp57_; + guint* _tmp58_; + int _tmp58__length; + int _tmp58__size; + int _tmp58__length1; + GVariantIter _tmp59_; + GVariant* _tmp60_; + gboolean _result; + GVariant* _tmp61_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "GetChannelsOfGroup"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (channel_group_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _vala_channel_ids_length1 = 0; + _tmp57_ = g_variant_iter_next_value (&_reply_iter); + _tmp58_ = g_new (guint, 5); + _tmp58__length = 0; + _tmp58__size = 4; + _tmp58__length1 = 0; + g_variant_iter_init (&_tmp59_, _tmp57_); + for (; (_tmp60_ = g_variant_iter_next_value (&_tmp59_)) != NULL; _tmp58__length1++) { + if (_tmp58__size == _tmp58__length) { + _tmp58__size = 2 * _tmp58__size; + _tmp58_ = g_renew (guint, _tmp58_, _tmp58__size + 1); + } + _tmp58_[_tmp58__length++] = g_variant_get_uint32 (_tmp60_); + g_variant_unref (_tmp60_); + } + _vala_channel_ids_length1 = _tmp58__length1; + _vala_channel_ids = _tmp58_; + g_variant_unref (_tmp57_); + *channel_ids = _vala_channel_ids; + *channel_ids_length1 = _vala_channel_ids_length1; + _tmp61_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp61_); + g_variant_unref (_tmp61_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_channel_list_proxy_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp62_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "AddChannelToGroup"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (channel_group_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp62_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp62_); + g_variant_unref (_tmp62_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_channel_list_proxy_RemoveChannelFromGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp63_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.ChannelList", "RemoveChannelFromGroup"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (channel_group_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp63_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp63_); + g_variant_unref (_tmp63_); + g_object_unref (_reply_message); + return _result; +} + + +static void dvb_id_bus_channel_list_proxy_dvb_id_bus_channel_list_interface_init (DVBIDBusChannelListIface* iface) { + iface->GetChannels = dvb_id_bus_channel_list_proxy_GetChannels; + iface->GetRadioChannels = dvb_id_bus_channel_list_proxy_GetRadioChannels; + iface->GetTVChannels = dvb_id_bus_channel_list_proxy_GetTVChannels; + iface->GetChannelName = dvb_id_bus_channel_list_proxy_GetChannelName; + iface->GetChannelNetwork = dvb_id_bus_channel_list_proxy_GetChannelNetwork; + iface->IsRadioChannel = dvb_id_bus_channel_list_proxy_IsRadioChannel; + iface->GetChannelURL = dvb_id_bus_channel_list_proxy_GetChannelURL; + iface->GetChannelInfos = dvb_id_bus_channel_list_proxy_GetChannelInfos; + iface->GetChannelsOfGroup = dvb_id_bus_channel_list_proxy_GetChannelsOfGroup; + iface->AddChannelToGroup = dvb_id_bus_channel_list_proxy_AddChannelToGroup; + iface->RemoveChannelFromGroup = dvb_id_bus_channel_list_proxy_RemoveChannelFromGroup; +} + + +static void _dbus_dvb_id_bus_channel_list_GetChannels (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + guint* result; + int result_length1 = 0; + guint* _tmp64_; + GVariantBuilder _tmp65_; + int _tmp66_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_channel_list_GetChannels (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp1_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp2_); - for (_tmp3_ = 0; _tmp3_ < result_length1; _tmp3_++) { - dbus_uint32_t _tmp4_; - _tmp4_ = *_tmp1_; - dbus_message_iter_append_basic (&_tmp2_, DBUS_TYPE_UINT32, &_tmp4_); - _tmp1_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp2_); - result = (g_free (result), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp64_ = result; + g_variant_builder_init (&_tmp65_, G_VARIANT_TYPE ("au")); + for (_tmp66_ = 0; _tmp66_ < result_length1; _tmp66_++) { + g_variant_builder_add_value (&_tmp65_, g_variant_new_uint32 (*_tmp64_)); + _tmp64_++; } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp65_)); + result = (g_free (result), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetRadioChannels (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_GetRadioChannels (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint* result; - int result_length1; - DBusMessage* reply; - guint* _tmp5_; - DBusMessageIter _tmp6_; - int _tmp7_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + int result_length1 = 0; + guint* _tmp67_; + GVariantBuilder _tmp68_; + int _tmp69_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_channel_list_GetRadioChannels (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp5_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp6_); - for (_tmp7_ = 0; _tmp7_ < result_length1; _tmp7_++) { - dbus_uint32_t _tmp8_; - _tmp8_ = *_tmp5_; - dbus_message_iter_append_basic (&_tmp6_, DBUS_TYPE_UINT32, &_tmp8_); - _tmp5_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp6_); - result = (g_free (result), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp67_ = result; + g_variant_builder_init (&_tmp68_, G_VARIANT_TYPE ("au")); + for (_tmp69_ = 0; _tmp69_ < result_length1; _tmp69_++) { + g_variant_builder_add_value (&_tmp68_, g_variant_new_uint32 (*_tmp67_)); + _tmp67_++; } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp68_)); + result = (g_free (result), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetTVChannels (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_GetTVChannels (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint* result; - int result_length1; - DBusMessage* reply; - guint* _tmp9_; - DBusMessageIter _tmp10_; - int _tmp11_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + int result_length1 = 0; + guint* _tmp70_; + GVariantBuilder _tmp71_; + int _tmp72_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_channel_list_GetTVChannels (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp9_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp10_); - for (_tmp11_ = 0; _tmp11_ < result_length1; _tmp11_++) { - dbus_uint32_t _tmp12_; - _tmp12_ = *_tmp9_; - dbus_message_iter_append_basic (&_tmp10_, DBUS_TYPE_UINT32, &_tmp12_); - _tmp9_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp10_); - result = (g_free (result), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp70_ = result; + g_variant_builder_init (&_tmp71_, G_VARIANT_TYPE ("au")); + for (_tmp72_ = 0; _tmp72_ < result_length1; _tmp72_++) { + g_variant_builder_add_value (&_tmp71_, g_variant_new_uint32 (*_tmp70_)); + _tmp70_++; } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp71_)); + result = (g_free (result), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelName (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_GetChannelName (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel_id = 0U; - dbus_uint32_t _tmp13_; + GVariant* _tmp73_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* channel_name = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp14_; - dbus_bool_t _tmp15_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp13_); - dbus_message_iter_next (&iter); - channel_id = _tmp13_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp73_ = g_variant_iter_next_value (&_arguments_iter); + channel_id = g_variant_get_uint32 (_tmp73_); + g_variant_unref (_tmp73_); result = dvb_id_bus_channel_list_GetChannelName (self, channel_id, &channel_name, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp14_ = channel_name; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp14_); - _g_free0 (channel_name); - _tmp15_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp15_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (channel_name)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (channel_name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelNetwork (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_GetChannelNetwork (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel_id = 0U; - dbus_uint32_t _tmp16_; + GVariant* _tmp74_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* network = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp17_; - dbus_bool_t _tmp18_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp16_); - dbus_message_iter_next (&iter); - channel_id = _tmp16_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp74_ = g_variant_iter_next_value (&_arguments_iter); + channel_id = g_variant_get_uint32 (_tmp74_); + g_variant_unref (_tmp74_); result = dvb_id_bus_channel_list_GetChannelNetwork (self, channel_id, &network, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp17_ = network; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp17_); - _g_free0 (network); - _tmp18_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp18_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (network)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (network); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_IsRadioChannel (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_IsRadioChannel (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel_id = 0U; - dbus_uint32_t _tmp19_; + GVariant* _tmp75_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean radio = FALSE; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp20_; - dbus_bool_t _tmp21_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp19_); - dbus_message_iter_next (&iter); - channel_id = _tmp19_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp75_ = g_variant_iter_next_value (&_arguments_iter); + channel_id = g_variant_get_uint32 (_tmp75_); + g_variant_unref (_tmp75_); result = dvb_id_bus_channel_list_IsRadioChannel (self, channel_id, &radio, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp20_ = radio; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp20_); - _tmp21_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp21_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (radio)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelURL (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_GetChannelURL (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel_id = 0U; - dbus_uint32_t _tmp22_; + GVariant* _tmp76_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* url = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp23_; - dbus_bool_t _tmp24_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp22_); - dbus_message_iter_next (&iter); - channel_id = _tmp22_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp76_ = g_variant_iter_next_value (&_arguments_iter); + channel_id = g_variant_get_uint32 (_tmp76_); + g_variant_unref (_tmp76_); result = dvb_id_bus_channel_list_GetChannelURL (self, channel_id, &url, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp23_ = url; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp23_); - _g_free0 (url); - _tmp24_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp24_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (url)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (url); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } @@ -1403,2199 +1216,246 @@ } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelInfos (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_GetChannelInfos (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; DVBChannelInfo* result; - int result_length1; - DBusMessage* reply; - DVBChannelInfo* _tmp25_; - DBusMessageIter _tmp26_; - int _tmp27_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + int result_length1 = 0; + DVBChannelInfo* _tmp77_; + GVariantBuilder _tmp78_; + int _tmp79_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_channel_list_GetChannelInfos (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp25_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(usb)", &_tmp26_); - for (_tmp27_ = 0; _tmp27_ < result_length1; _tmp27_++) { - DBusMessageIter _tmp28_; - dbus_uint32_t _tmp29_; - const char* _tmp30_; - dbus_bool_t _tmp31_; - dbus_message_iter_open_container (&_tmp26_, DBUS_TYPE_STRUCT, NULL, &_tmp28_); - _tmp29_ = (*_tmp25_).id; - dbus_message_iter_append_basic (&_tmp28_, DBUS_TYPE_UINT32, &_tmp29_); - _tmp30_ = (*_tmp25_).name; - dbus_message_iter_append_basic (&_tmp28_, DBUS_TYPE_STRING, &_tmp30_); - _tmp31_ = (*_tmp25_).is_radio; - dbus_message_iter_append_basic (&_tmp28_, DBUS_TYPE_BOOLEAN, &_tmp31_); - dbus_message_iter_close_container (&_tmp26_, &_tmp28_); - _tmp25_++; - } - dbus_message_iter_close_container (&iter, &_tmp26_); - result = (_vala_DVBChannelInfo_array_free (result, result_length1), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp77_ = result; + g_variant_builder_init (&_tmp78_, G_VARIANT_TYPE ("a(usb)")); + for (_tmp79_ = 0; _tmp79_ < result_length1; _tmp79_++) { + GVariantBuilder _tmp80_; + g_variant_builder_init (&_tmp80_, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_tmp80_, g_variant_new_uint32 ((*_tmp77_).id)); + g_variant_builder_add_value (&_tmp80_, g_variant_new_string ((*_tmp77_).name)); + g_variant_builder_add_value (&_tmp80_, g_variant_new_boolean ((*_tmp77_).is_radio)); + g_variant_builder_add_value (&_tmp78_, g_variant_builder_end (&_tmp80_)); + _tmp77_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp78_)); + result = (_vala_DVBChannelInfo_array_free (result, result_length1), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_GetChannelsOfGroup (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_GetChannelsOfGroup (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; gint channel_group_id = 0; - dbus_int32_t _tmp32_; + GVariant* _tmp81_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint* channel_ids = NULL; - int channel_ids_length1; + int channel_ids_length1 = 0; + guint* _tmp82_; + GVariantBuilder _tmp83_; + int _tmp84_; gboolean result; - DBusMessage* reply; - guint* _tmp33_; - DBusMessageIter _tmp34_; - int _tmp35_; - dbus_bool_t _tmp37_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "i")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp32_); - dbus_message_iter_next (&iter); - channel_group_id = _tmp32_; - channel_ids_length1 = 0; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp81_ = g_variant_iter_next_value (&_arguments_iter); + channel_group_id = g_variant_get_int32 (_tmp81_); + g_variant_unref (_tmp81_); result = dvb_id_bus_channel_list_GetChannelsOfGroup (self, channel_group_id, &channel_ids, &channel_ids_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp33_ = channel_ids; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp34_); - for (_tmp35_ = 0; _tmp35_ < channel_ids_length1; _tmp35_++) { - dbus_uint32_t _tmp36_; - _tmp36_ = *_tmp33_; - dbus_message_iter_append_basic (&_tmp34_, DBUS_TYPE_UINT32, &_tmp36_); - _tmp33_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp34_); + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp82_ = channel_ids; + g_variant_builder_init (&_tmp83_, G_VARIANT_TYPE ("au")); + for (_tmp84_ = 0; _tmp84_ < channel_ids_length1; _tmp84_++) { + g_variant_builder_add_value (&_tmp83_, g_variant_new_uint32 (*_tmp82_)); + _tmp82_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp83_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); channel_ids = (g_free (channel_ids), NULL); - _tmp37_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp37_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_AddChannelToGroup (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_AddChannelToGroup (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel_id = 0U; - dbus_uint32_t _tmp38_; + GVariant* _tmp85_; gint channel_group_id = 0; - dbus_int32_t _tmp39_; + GVariant* _tmp86_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp40_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "ui")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp38_); - dbus_message_iter_next (&iter); - channel_id = _tmp38_; - dbus_message_iter_get_basic (&iter, &_tmp39_); - dbus_message_iter_next (&iter); - channel_group_id = _tmp39_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp85_ = g_variant_iter_next_value (&_arguments_iter); + channel_id = g_variant_get_uint32 (_tmp85_); + g_variant_unref (_tmp85_); + _tmp86_ = g_variant_iter_next_value (&_arguments_iter); + channel_group_id = g_variant_get_int32 (_tmp86_); + g_variant_unref (_tmp86_); result = dvb_id_bus_channel_list_AddChannelToGroup (self, channel_id, channel_group_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp40_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp40_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_channel_list_RemoveChannelFromGroup (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_channel_list_RemoveChannelFromGroup (DVBIDBusChannelList* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel_id = 0U; - dbus_uint32_t _tmp41_; + GVariant* _tmp87_; gint channel_group_id = 0; - dbus_int32_t _tmp42_; + GVariant* _tmp88_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp43_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "ui")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp41_); - dbus_message_iter_next (&iter); - channel_id = _tmp41_; - dbus_message_iter_get_basic (&iter, &_tmp42_); - dbus_message_iter_next (&iter); - channel_group_id = _tmp42_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp87_ = g_variant_iter_next_value (&_arguments_iter); + channel_id = g_variant_get_uint32 (_tmp87_); + g_variant_unref (_tmp87_); + _tmp88_ = g_variant_iter_next_value (&_arguments_iter); + channel_group_id = g_variant_get_int32 (_tmp88_); + g_variant_unref (_tmp88_); result = dvb_id_bus_channel_list_RemoveChannelFromGroup (self, channel_id, channel_group_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp43_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp43_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_channel_list_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_channel_list_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_channel_list_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetChannels")) { - result = _dbus_dvb_id_bus_channel_list_GetChannels (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetRadioChannels")) { - result = _dbus_dvb_id_bus_channel_list_GetRadioChannels (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetTVChannels")) { - result = _dbus_dvb_id_bus_channel_list_GetTVChannels (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetChannelName")) { - result = _dbus_dvb_id_bus_channel_list_GetChannelName (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetChannelNetwork")) { - result = _dbus_dvb_id_bus_channel_list_GetChannelNetwork (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "IsRadioChannel")) { - result = _dbus_dvb_id_bus_channel_list_IsRadioChannel (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetChannelURL")) { - result = _dbus_dvb_id_bus_channel_list_GetChannelURL (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetChannelInfos")) { - result = _dbus_dvb_id_bus_channel_list_GetChannelInfos (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "GetChannelsOfGroup")) { - result = _dbus_dvb_id_bus_channel_list_GetChannelsOfGroup (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "AddChannelToGroup")) { - result = _dbus_dvb_id_bus_channel_list_AddChannelToGroup (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.ChannelList", "RemoveChannelFromGroup")) { - result = _dbus_dvb_id_bus_channel_list_RemoveChannelFromGroup (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _dbus_dvb_id_bus_channel_list_changed (GObject* _sender, guint channel_id, guint type, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp44_; - dbus_uint32_t _tmp45_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.ChannelList", "Changed"); - dbus_message_iter_init_append (_message, &_iter); - _tmp44_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp44_); - _tmp45_ = type; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp45_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_channel_list_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_channel_list_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "changed", (GCallback) _dbus_dvb_id_bus_channel_list_changed, connection); -} - - -static void dvb_id_bus_channel_list_base_init (DVBIDBusChannelListIface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - /** - * @type: 0: added, 1: deleted, 2: updated - */ - g_signal_new ("changed", DVB_TYPE_ID_BUS_CHANNEL_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); - g_type_set_qdata (DVB_TYPE_ID_BUS_CHANNEL_LIST, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_channel_list_dbus_vtable)); - } -} - - -GType dvb_id_bus_channel_list_get_type (void) { - static volatile gsize dvb_id_bus_channel_list_type_id__volatile = 0; - if (g_once_init_enter (&dvb_id_bus_channel_list_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusChannelListIface), (GBaseInitFunc) dvb_id_bus_channel_list_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType dvb_id_bus_channel_list_type_id; - dvb_id_bus_channel_list_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusChannelList", &g_define_type_info, 0); - g_type_interface_add_prerequisite (dvb_id_bus_channel_list_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_channel_list_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_channel_list_dbus_proxy_get_type); - g_once_init_leave (&dvb_id_bus_channel_list_type_id__volatile, dvb_id_bus_channel_list_type_id); - } - return dvb_id_bus_channel_list_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (DVBIDBusChannelListDBusProxy, dvb_id_bus_channel_list_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_CHANNEL_LIST, dvb_id_bus_channel_list_dbus_proxy_dvb_id_bus_channel_list__interface_init) ); -DVBIDBusChannelList* dvb_id_bus_channel_list_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusChannelList* self; - self = g_object_new (dvb_id_bus_channel_list_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.ChannelList", NULL); - return self; -} - - -static GObject* dvb_id_bus_channel_list_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_channel_list_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_channel_list_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_dvb_id_bus_channel_list_changed (DVBIDBusChannelList* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint channel_id = 0U; - dbus_uint32_t _tmp93_; - guint type = 0U; - dbus_uint32_t _tmp94_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { + g_dbus_method_invocation_return_gerror (invocation, error); return; } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp93_); - dbus_message_iter_next (&iter); - channel_id = _tmp93_; - dbus_message_iter_get_basic (&iter, &_tmp94_); - dbus_message_iter_next (&iter); - type = _tmp94_; - g_signal_emit_by_name (self, "changed", channel_id, type); -} - - -DBusHandlerResult dvb_id_bus_channel_list_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.ChannelList", "Changed")) { - _dbus_handle_dvb_id_bus_channel_list_changed (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void dvb_id_bus_channel_list_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - return; - } - ((DVBIDBusChannelListDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_channel_list_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_channel_list_dbus_proxy_parent_class)->dispose (self); -} - - -static void dvb_id_bus_channel_list_dbus_proxy_class_init (DVBIDBusChannelListDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_channel_list_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_channel_list_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_channel_list_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_channel_list_dbus_proxy_set_property; -} - - -static void dvb_id_bus_channel_list_dbus_proxy_init (DVBIDBusChannelListDBusProxy* self) { -} - - -static guint* dvb_id_bus_channel_list_dbus_proxy_GetChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint* _result; - int _result_length1; - guint* _tmp95_; - int _tmp95__length; - int _tmp95__size; - int _tmp95__length1; - DBusMessageIter _tmp96_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetChannels"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp98_; - _edomain = DBUS_GERROR; - _tmp98_ = _dbus_error.name + 27; - if (strcmp (_tmp98_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp98_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp98_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp98_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp98_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp98_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp98_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp98_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp98_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp98_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp98_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp98_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp98_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp98_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp98_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp98_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp98_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp98_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp98_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp98_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp98_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp98_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp98_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp98_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp98_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp98_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp98_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp98_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp98_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp98_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp98_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp98_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp98_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "au")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "au", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp95_ = g_new (guint, 5); - _tmp95__length = 0; - _tmp95__size = 4; - _tmp95__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp96_); - for (; dbus_message_iter_get_arg_type (&_tmp96_); _tmp95__length1++) { - dbus_uint32_t _tmp97_; - if (_tmp95__size == _tmp95__length) { - _tmp95__size = 2 * _tmp95__size; - _tmp95_ = g_renew (guint, _tmp95_, _tmp95__size + 1); - } - dbus_message_iter_get_basic (&_tmp96_, &_tmp97_); - dbus_message_iter_next (&_tmp96_); - _tmp95_[_tmp95__length++] = _tmp97_; - } - _result_length1 = _tmp95__length1; - dbus_message_iter_next (&_iter); - _result = _tmp95_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static guint* dvb_id_bus_channel_list_dbus_proxy_GetRadioChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint* _result; - int _result_length1; - guint* _tmp99_; - int _tmp99__length; - int _tmp99__size; - int _tmp99__length1; - DBusMessageIter _tmp100_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetRadioChannels"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp102_; - _edomain = DBUS_GERROR; - _tmp102_ = _dbus_error.name + 27; - if (strcmp (_tmp102_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp102_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp102_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp102_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp102_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp102_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp102_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp102_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp102_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp102_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp102_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp102_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp102_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp102_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp102_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp102_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp102_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp102_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp102_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp102_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp102_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp102_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp102_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp102_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp102_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp102_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp102_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp102_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp102_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp102_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp102_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp102_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp102_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "au")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "au", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp99_ = g_new (guint, 5); - _tmp99__length = 0; - _tmp99__size = 4; - _tmp99__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp100_); - for (; dbus_message_iter_get_arg_type (&_tmp100_); _tmp99__length1++) { - dbus_uint32_t _tmp101_; - if (_tmp99__size == _tmp99__length) { - _tmp99__size = 2 * _tmp99__size; - _tmp99_ = g_renew (guint, _tmp99_, _tmp99__size + 1); - } - dbus_message_iter_get_basic (&_tmp100_, &_tmp101_); - dbus_message_iter_next (&_tmp100_); - _tmp99_[_tmp99__length++] = _tmp101_; - } - _result_length1 = _tmp99__length1; - dbus_message_iter_next (&_iter); - _result = _tmp99_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static guint* dvb_id_bus_channel_list_dbus_proxy_GetTVChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint* _result; - int _result_length1; - guint* _tmp103_; - int _tmp103__length; - int _tmp103__size; - int _tmp103__length1; - DBusMessageIter _tmp104_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetTVChannels"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp106_; - _edomain = DBUS_GERROR; - _tmp106_ = _dbus_error.name + 27; - if (strcmp (_tmp106_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp106_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp106_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp106_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp106_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp106_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp106_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp106_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp106_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp106_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp106_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp106_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp106_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp106_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp106_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp106_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp106_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp106_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp106_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp106_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp106_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp106_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp106_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp106_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp106_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp106_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp106_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp106_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp106_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp106_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp106_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp106_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp106_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "au")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "au", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp103_ = g_new (guint, 5); - _tmp103__length = 0; - _tmp103__size = 4; - _tmp103__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp104_); - for (; dbus_message_iter_get_arg_type (&_tmp104_); _tmp103__length1++) { - dbus_uint32_t _tmp105_; - if (_tmp103__size == _tmp103__length) { - _tmp103__size = 2 * _tmp103__size; - _tmp103_ = g_renew (guint, _tmp103_, _tmp103__size + 1); - } - dbus_message_iter_get_basic (&_tmp104_, &_tmp105_); - dbus_message_iter_next (&_tmp104_); - _tmp103_[_tmp103__length++] = _tmp105_; - } - _result_length1 = _tmp103__length1; - dbus_message_iter_next (&_iter); - _result = _tmp103_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelName (DVBIDBusChannelList* self, guint channel_id, gchar** channel_name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp107_; - gchar* _channel_name; - const char* _tmp108_; - gboolean _result; - dbus_bool_t _tmp109_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetChannelName"); - dbus_message_iter_init_append (_message, &_iter); - _tmp107_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp107_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp110_; - _edomain = DBUS_GERROR; - _tmp110_ = _dbus_error.name + 27; - if (strcmp (_tmp110_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp110_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp110_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp110_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp110_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp110_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp110_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp110_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp110_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp110_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp110_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp110_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp110_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp110_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp110_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp110_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp110_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp110_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp110_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp110_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp110_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp110_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp110_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp110_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp110_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp110_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp110_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp110_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp110_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp110_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp110_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp110_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp110_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; +static void dvb_id_bus_channel_list_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "GetChannels") == 0) { + _dbus_dvb_id_bus_channel_list_GetChannels (object, parameters, invocation); + } else if (strcmp (method_name, "GetRadioChannels") == 0) { + _dbus_dvb_id_bus_channel_list_GetRadioChannels (object, parameters, invocation); + } else if (strcmp (method_name, "GetTVChannels") == 0) { + _dbus_dvb_id_bus_channel_list_GetTVChannels (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelName") == 0) { + _dbus_dvb_id_bus_channel_list_GetChannelName (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelNetwork") == 0) { + _dbus_dvb_id_bus_channel_list_GetChannelNetwork (object, parameters, invocation); + } else if (strcmp (method_name, "IsRadioChannel") == 0) { + _dbus_dvb_id_bus_channel_list_IsRadioChannel (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelURL") == 0) { + _dbus_dvb_id_bus_channel_list_GetChannelURL (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelInfos") == 0) { + _dbus_dvb_id_bus_channel_list_GetChannelInfos (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelsOfGroup") == 0) { + _dbus_dvb_id_bus_channel_list_GetChannelsOfGroup (object, parameters, invocation); + } else if (strcmp (method_name, "AddChannelToGroup") == 0) { + _dbus_dvb_id_bus_channel_list_AddChannelToGroup (object, parameters, invocation); + } else if (strcmp (method_name, "RemoveChannelFromGroup") == 0) { + _dbus_dvb_id_bus_channel_list_RemoveChannelFromGroup (object, parameters, invocation); + } else { + g_object_unref (invocation); } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp108_); - dbus_message_iter_next (&_iter); - _channel_name = g_strdup (_tmp108_); - *channel_name = _channel_name; - dbus_message_iter_get_basic (&_iter, &_tmp109_); - dbus_message_iter_next (&_iter); - _result = _tmp109_; - dbus_message_unref (_reply); - return _result; } -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelNetwork (DVBIDBusChannelList* self, guint channel_id, gchar** network, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp111_; - gchar* _network; - const char* _tmp112_; - gboolean _result; - dbus_bool_t _tmp113_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetChannelNetwork"); - dbus_message_iter_init_append (_message, &_iter); - _tmp111_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp111_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp114_; - _edomain = DBUS_GERROR; - _tmp114_ = _dbus_error.name + 27; - if (strcmp (_tmp114_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp114_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp114_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp114_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp114_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp114_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp114_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp114_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp114_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp114_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp114_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp114_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp114_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp114_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp114_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp114_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp114_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp114_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp114_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp114_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp114_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp114_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp114_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp114_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp114_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp114_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp114_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp114_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp114_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp114_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp114_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp114_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp114_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp112_); - dbus_message_iter_next (&_iter); - _network = g_strdup (_tmp112_); - *network = _network; - dbus_message_iter_get_basic (&_iter, &_tmp113_); - dbus_message_iter_next (&_iter); - _result = _tmp113_; - dbus_message_unref (_reply); - return _result; +static GVariant* dvb_id_bus_channel_list_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; } -static gboolean dvb_id_bus_channel_list_dbus_proxy_IsRadioChannel (DVBIDBusChannelList* self, guint channel_id, gboolean* radio, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp115_; - gboolean _radio; - dbus_bool_t _tmp116_; - gboolean _result; - dbus_bool_t _tmp117_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "IsRadioChannel"); - dbus_message_iter_init_append (_message, &_iter); - _tmp115_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp115_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp118_; - _edomain = DBUS_GERROR; - _tmp118_ = _dbus_error.name + 27; - if (strcmp (_tmp118_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp118_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp118_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp118_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp118_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp118_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp118_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp118_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp118_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp118_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp118_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp118_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp118_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp118_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp118_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp118_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp118_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp118_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp118_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp118_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp118_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp118_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp118_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp118_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp118_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp118_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp118_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp118_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp118_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp118_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp118_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp118_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp118_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "bb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "bb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp116_); - dbus_message_iter_next (&_iter); - _radio = _tmp116_; - *radio = _radio; - dbus_message_iter_get_basic (&_iter, &_tmp117_); - dbus_message_iter_next (&_iter); - _result = _tmp117_; - dbus_message_unref (_reply); - return _result; +static gboolean dvb_id_bus_channel_list_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; } -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelURL (DVBIDBusChannelList* self, guint channel_id, gchar** url, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp119_; - gchar* _url; - const char* _tmp120_; - gboolean _result; - dbus_bool_t _tmp121_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetChannelURL"); - dbus_message_iter_init_append (_message, &_iter); - _tmp119_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp119_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp122_; - _edomain = DBUS_GERROR; - _tmp122_ = _dbus_error.name + 27; - if (strcmp (_tmp122_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp122_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp122_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp122_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp122_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp122_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp122_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp122_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp122_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp122_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp122_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp122_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp122_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp122_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp122_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp122_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp122_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp122_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp122_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp122_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp122_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp122_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp122_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp122_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp122_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp122_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp122_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp122_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp122_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp122_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp122_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp122_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp122_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp120_); - dbus_message_iter_next (&_iter); - _url = g_strdup (_tmp120_); - *url = _url; - dbus_message_iter_get_basic (&_iter, &_tmp121_); - dbus_message_iter_next (&_iter); - _result = _tmp121_; - dbus_message_unref (_reply); - return _result; +static void _dbus_dvb_id_bus_channel_list_changed (GObject* _sender, guint channel_id, guint type, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (type)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.ChannelList", "Changed", _arguments, NULL); } -static DVBChannelInfo* dvb_id_bus_channel_list_dbus_proxy_GetChannelInfos (DVBIDBusChannelList* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - DVBChannelInfo* _result; - int _result_length1; - DVBChannelInfo* _tmp123_; - int _tmp123__length; - int _tmp123__size; - int _tmp123__length1; - DBusMessageIter _tmp124_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; +guint dvb_id_bus_channel_list_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_channel_list_dbus_interface_info), &_dvb_id_bus_channel_list_dbus_interface_vtable, data, _dvb_id_bus_channel_list_unregister_object, error); + if (!result) { + return 0; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetChannelInfos"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp130_; - _edomain = DBUS_GERROR; - _tmp130_ = _dbus_error.name + 27; - if (strcmp (_tmp130_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp130_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp130_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp130_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp130_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp130_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp130_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp130_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp130_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp130_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp130_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp130_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp130_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp130_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp130_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp130_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp130_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp130_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp130_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp130_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp130_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp130_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp130_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp130_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp130_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp130_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp130_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp130_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp130_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp130_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp130_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp130_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp130_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "a(usb)")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "a(usb)", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp123_ = g_new (DVBChannelInfo, 5); - _tmp123__length = 0; - _tmp123__size = 4; - _tmp123__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp124_); - for (; dbus_message_iter_get_arg_type (&_tmp124_); _tmp123__length1++) { - DVBChannelInfo _tmp125_; - DBusMessageIter _tmp126_; - dbus_uint32_t _tmp127_; - const char* _tmp128_; - dbus_bool_t _tmp129_; - if (_tmp123__size == _tmp123__length) { - _tmp123__size = 2 * _tmp123__size; - _tmp123_ = g_renew (DVBChannelInfo, _tmp123_, _tmp123__size + 1); - } - dbus_message_iter_recurse (&_tmp124_, &_tmp126_); - dbus_message_iter_get_basic (&_tmp126_, &_tmp127_); - dbus_message_iter_next (&_tmp126_); - _tmp125_.id = _tmp127_; - dbus_message_iter_get_basic (&_tmp126_, &_tmp128_); - dbus_message_iter_next (&_tmp126_); - _tmp125_.name = g_strdup (_tmp128_); - dbus_message_iter_get_basic (&_tmp126_, &_tmp129_); - dbus_message_iter_next (&_tmp126_); - _tmp125_.is_radio = _tmp129_; - dbus_message_iter_next (&_tmp124_); - _tmp123_[_tmp123__length++] = _tmp125_; - } - _result_length1 = _tmp123__length1; - dbus_message_iter_next (&_iter); - _result = _tmp123_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_channel_list_dbus_proxy_GetChannelsOfGroup (DVBIDBusChannelList* self, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_int32_t _tmp131_; - guint* _channel_ids; - int _channel_ids_length1; - guint* _tmp132_; - int _tmp132__length; - int _tmp132__size; - int _tmp132__length1; - DBusMessageIter _tmp133_; - gboolean _result; - dbus_bool_t _tmp135_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "GetChannelsOfGroup"); - dbus_message_iter_init_append (_message, &_iter); - _tmp131_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp131_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp136_; - _edomain = DBUS_GERROR; - _tmp136_ = _dbus_error.name + 27; - if (strcmp (_tmp136_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp136_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp136_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp136_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp136_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp136_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp136_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp136_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp136_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp136_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp136_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp136_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp136_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp136_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp136_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp136_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp136_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp136_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp136_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp136_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp136_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp136_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp136_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp136_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp136_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp136_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp136_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp136_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp136_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp136_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp136_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp136_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp136_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "aub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - _channel_ids_length1 = 0; - _tmp132_ = g_new (guint, 5); - _tmp132__length = 0; - _tmp132__size = 4; - _tmp132__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp133_); - for (; dbus_message_iter_get_arg_type (&_tmp133_); _tmp132__length1++) { - dbus_uint32_t _tmp134_; - if (_tmp132__size == _tmp132__length) { - _tmp132__size = 2 * _tmp132__size; - _tmp132_ = g_renew (guint, _tmp132_, _tmp132__size + 1); - } - dbus_message_iter_get_basic (&_tmp133_, &_tmp134_); - dbus_message_iter_next (&_tmp133_); - _tmp132_[_tmp132__length++] = _tmp134_; - } - _channel_ids_length1 = _tmp132__length1; - dbus_message_iter_next (&_iter); - _channel_ids = _tmp132_; - *channel_ids = _channel_ids; - *channel_ids_length1 = _channel_ids_length1; - dbus_message_iter_get_basic (&_iter, &_tmp135_); - dbus_message_iter_next (&_iter); - _result = _tmp135_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_channel_list_dbus_proxy_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp137_; - dbus_int32_t _tmp138_; - gboolean _result; - dbus_bool_t _tmp139_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "AddChannelToGroup"); - dbus_message_iter_init_append (_message, &_iter); - _tmp137_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp137_); - _tmp138_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp138_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp140_; - _edomain = DBUS_GERROR; - _tmp140_ = _dbus_error.name + 27; - if (strcmp (_tmp140_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp140_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp140_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp140_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp140_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp140_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp140_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp140_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp140_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp140_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp140_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp140_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp140_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp140_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp140_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp140_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp140_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp140_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp140_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp140_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp140_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp140_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp140_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp140_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp140_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp140_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp140_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp140_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp140_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp140_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp140_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp140_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp140_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp139_); - dbus_message_iter_next (&_iter); - _result = _tmp139_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_channel_list_dbus_proxy_RemoveChannelFromGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp141_; - dbus_int32_t _tmp142_; - gboolean _result; - dbus_bool_t _tmp143_; - if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.ChannelList", "RemoveChannelFromGroup"); - dbus_message_iter_init_append (_message, &_iter); - _tmp141_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp141_); - _tmp142_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp142_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp144_; - _edomain = DBUS_GERROR; - _tmp144_ = _dbus_error.name + 27; - if (strcmp (_tmp144_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp144_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp144_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp144_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp144_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp144_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp144_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp144_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp144_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp144_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp144_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp144_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp144_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp144_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp144_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp144_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp144_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp144_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp144_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp144_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp144_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp144_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp144_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp144_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp144_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp144_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp144_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp144_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp144_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp144_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp144_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp144_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp144_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp143_); - dbus_message_iter_next (&_iter); - _result = _tmp143_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_channel_list_dbus_proxy_dvb_id_bus_channel_list__interface_init (DVBIDBusChannelListIface* iface) { - iface->GetChannels = dvb_id_bus_channel_list_dbus_proxy_GetChannels; - iface->GetRadioChannels = dvb_id_bus_channel_list_dbus_proxy_GetRadioChannels; - iface->GetTVChannels = dvb_id_bus_channel_list_dbus_proxy_GetTVChannels; - iface->GetChannelName = dvb_id_bus_channel_list_dbus_proxy_GetChannelName; - iface->GetChannelNetwork = dvb_id_bus_channel_list_dbus_proxy_GetChannelNetwork; - iface->IsRadioChannel = dvb_id_bus_channel_list_dbus_proxy_IsRadioChannel; - iface->GetChannelURL = dvb_id_bus_channel_list_dbus_proxy_GetChannelURL; - iface->GetChannelInfos = dvb_id_bus_channel_list_dbus_proxy_GetChannelInfos; - iface->GetChannelsOfGroup = dvb_id_bus_channel_list_dbus_proxy_GetChannelsOfGroup; - iface->AddChannelToGroup = dvb_id_bus_channel_list_dbus_proxy_AddChannelToGroup; - iface->RemoveChannelFromGroup = dvb_id_bus_channel_list_dbus_proxy_RemoveChannelFromGroup; -} - - -static void _vala_dvb_id_bus_channel_list_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + g_signal_connect (object, "changed", (GCallback) _dbus_dvb_id_bus_channel_list_changed, data); + return result; } -static void _vala_dvb_id_bus_channel_list_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dvb_id_bus_channel_list_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_channel_list_changed, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusChannelList.vala gnome-dvb-daemon-0.2.7/src/dbus/IDBusChannelList.vala --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusChannelList.vala 2010-04-01 09:50:34.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusChannelList.vala 2011-09-22 20:05:15.000000000 +0000 @@ -36,17 +36,17 @@ /** * @returns: List of channel IDs aka SIDs of all channels */ - public abstract uint[] GetChannels () throws DBus.Error; + public abstract uint[] GetChannels () throws DBusError; /** * @returns: List of channel IDs aka SIDs of radio channels */ - public abstract uint[] GetRadioChannels () throws DBus.Error; + public abstract uint[] GetRadioChannels () throws DBusError; /** * @returns: List of channel IDs aka SIDs of TV channels */ - public abstract uint[] GetTVChannels () throws DBus.Error; + public abstract uint[] GetTVChannels () throws DBusError; /** * @channel_id: ID of channel @@ -54,7 +54,7 @@ * otherwise an empty string * @returns: TRUE on success */ - public abstract bool GetChannelName (uint channel_id, out string channel_name) throws DBus.Error; + public abstract bool GetChannelName (uint channel_id, out string channel_name) throws DBusError; /** * @channel_id: ID of channel @@ -63,44 +63,44 @@ * string * @returns: TRUE on success */ - public abstract bool GetChannelNetwork (uint channel_id, out string network) throws DBus.Error; + public abstract bool GetChannelNetwork (uint channel_id, out string network) throws DBusError; /** * @channel_id: ID of channel * @radio: Whether the channel is a radio channel or not * @returns: TRUE on success */ - public abstract bool IsRadioChannel (uint channel_id, out bool radio) throws DBus.Error; + public abstract bool IsRadioChannel (uint channel_id, out bool radio) throws DBusError; /** * @channel_id: ID of channel * @url: URL to watch the channel * @returns: TRUE on success */ - public abstract bool GetChannelURL (uint channel_id, out string url) throws DBus.Error; + public abstract bool GetChannelURL (uint channel_id, out string url) throws DBusError; - public abstract ChannelInfo[] GetChannelInfos () throws DBus.Error; + public abstract ChannelInfo[] GetChannelInfos () throws DBusError; /** * @channel_group_id: ID of the ChannelGroup * @returns: TRUE on success */ public abstract bool GetChannelsOfGroup (int channel_group_id, - out uint[] channel_ids) throws DBus.Error; + out uint[] channel_ids) throws DBusError; /** * @channel_id: ID of channel * @channel_group_id: ID of the ChannelGroup * @returns: TRUE on success */ - public abstract bool AddChannelToGroup (uint channel_id, int channel_group_id) throws DBus.Error; + public abstract bool AddChannelToGroup (uint channel_id, int channel_group_id) throws DBusError; /** * @channel_id: ID of channel * @channel_group_id: ID of the ChannelGroup * @returns: TRUE on success */ - public abstract bool RemoveChannelFromGroup (uint channel_id, int channel_group_id) throws DBus.Error; + public abstract bool RemoveChannelFromGroup (uint channel_id, int channel_group_id) throws DBusError; } } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusDeviceGroup.c gnome-dvb-daemon-0.2.7/src/dbus/IDBusDeviceGroup.c --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusDeviceGroup.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusDeviceGroup.c 2011-09-22 19:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusDeviceGroup.c generated by valac 0.11.3, the Vala compiler +/* IDBusDeviceGroup.c generated by valac 0.14.0, the Vala compiler * generated from IDBusDeviceGroup.vala, do not modify */ /* @@ -22,11 +22,9 @@ #include #include -#include +#include #include #include -#include -#include #define DVB_TYPE_ID_BUS_DEVICE_GROUP (dvb_id_bus_device_group_get_type ()) @@ -36,10 +34,11 @@ typedef struct _DVBIDBusDeviceGroup DVBIDBusDeviceGroup; typedef struct _DVBIDBusDeviceGroupIface DVBIDBusDeviceGroupIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_TYPE_ID_BUS_DEVICE_GROUP_PROXY (dvb_id_bus_device_group_proxy_get_type ()) +typedef GDBusProxy DVBIDBusDeviceGroupProxy; +typedef GDBusProxyClass DVBIDBusDeviceGroupProxyClass; #define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _DVBIDBusDeviceGroupDBusProxy DVBIDBusDeviceGroupDBusProxy; -typedef DBusGProxyClass DVBIDBusDeviceGroupDBusProxyClass; struct _DVBIDBusDeviceGroupIface { GTypeInterface parent_iface; @@ -56,18 +55,10 @@ gboolean (*SetRecordingsDirectory) (DVBIDBusDeviceGroup* self, const gchar* location, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusDeviceGroupDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - -DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_device_group_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_device_group_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_device_group_get_type (void) G_GNUC_CONST; gchar* dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, GError** error); char* dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, GError** error); @@ -81,58 +72,113 @@ gchar* dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error); gboolean dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const gchar* location, GError** error); static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_device_group_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_device_group_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_device_group_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_introspect (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_property_get_all (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_AddDevice (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_RemoveDevice (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetChannelList (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetName (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_SetName (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetMembers (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetSchedule (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_device_group_device_added (GObject* _sender, guint adapter, guint frontend, DBusConnection* _connection); -static void _dbus_dvb_id_bus_device_group_device_removed (GObject* _sender, guint adapter, guint frontend, DBusConnection* _connection); -GType dvb_id_bus_device_group_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_device_group_device_added (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_device_group_device_removed (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_device_group_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_DEVICE_GROUP_DBUS_PROXY_DUMMY_PROPERTY -}; -static gchar* dvb_id_bus_device_group_dbus_proxy_GetType (DVBIDBusDeviceGroup* self, GError** error); -static char* dvb_id_bus_device_group_dbus_proxy_GetRecorder (DVBIDBusDeviceGroup* self, GError** error); -static gboolean dvb_id_bus_device_group_dbus_proxy_AddDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error); -static gboolean dvb_id_bus_device_group_dbus_proxy_RemoveDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error); -static char* dvb_id_bus_device_group_dbus_proxy_GetChannelList (DVBIDBusDeviceGroup* self, GError** error); -static gchar* dvb_id_bus_device_group_dbus_proxy_GetName (DVBIDBusDeviceGroup* self, GError** error); -static gboolean dvb_id_bus_device_group_dbus_proxy_SetName (DVBIDBusDeviceGroup* self, const gchar* name, GError** error); -static gchar** dvb_id_bus_device_group_dbus_proxy_GetMembers (DVBIDBusDeviceGroup* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_device_group_dbus_proxy_GetSchedule (DVBIDBusDeviceGroup* self, guint channel_sid, char** opath, GError** error); -static gchar* dvb_id_bus_device_group_dbus_proxy_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error); -static gboolean dvb_id_bus_device_group_dbus_proxy_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const gchar* location, GError** error); -static void dvb_id_bus_device_group_dbus_proxy_dvb_id_bus_device_group__interface_init (DVBIDBusDeviceGroupIface* iface); -static void _vala_dvb_id_bus_device_group_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_device_group_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +static void dvb_id_bus_device_group_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_device_group_device_added (DVBIDBusDeviceGroup* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_device_group_device_removed (DVBIDBusDeviceGroup* self, GVariant* parameters); +static gchar* dvb_id_bus_device_group_proxy_GetType (DVBIDBusDeviceGroup* self, GError** error); +static char* dvb_id_bus_device_group_proxy_GetRecorder (DVBIDBusDeviceGroup* self, GError** error); +static gboolean dvb_id_bus_device_group_proxy_AddDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error); +static gboolean dvb_id_bus_device_group_proxy_RemoveDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error); +static char* dvb_id_bus_device_group_proxy_GetChannelList (DVBIDBusDeviceGroup* self, GError** error); +static gchar* dvb_id_bus_device_group_proxy_GetName (DVBIDBusDeviceGroup* self, GError** error); +static gboolean dvb_id_bus_device_group_proxy_SetName (DVBIDBusDeviceGroup* self, const gchar* name, GError** error); +static gchar** dvb_id_bus_device_group_proxy_GetMembers (DVBIDBusDeviceGroup* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_device_group_proxy_GetSchedule (DVBIDBusDeviceGroup* self, guint channel_sid, char** opath, GError** error); +static gchar* dvb_id_bus_device_group_proxy_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error); +static gboolean dvb_id_bus_device_group_proxy_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const gchar* location, GError** error); +static void dvb_id_bus_device_group_proxy_dvb_id_bus_device_group_interface_init (DVBIDBusDeviceGroupIface* iface); +static void _dbus_dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_AddDevice (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_RemoveDevice (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_GetChannelList (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_GetName (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_SetName (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_GetMembers (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_GetSchedule (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_device_group_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_device_group_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_device_group_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_dvb_id_bus_device_group_device_added (GObject* _sender, guint adapter, guint frontend, gpointer* _data); +static void _dbus_dvb_id_bus_device_group_device_removed (GObject* _sender, guint adapter, guint frontend, gpointer* _data); +static void _dvb_id_bus_device_group_unregister_object (gpointer user_data); static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static const DBusObjectPathVTable _dvb_id_bus_device_group_dbus_path_vtable = {_dvb_id_bus_device_group_dbus_unregister, dvb_id_bus_device_group_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_device_group_dbus_vtable = {dvb_id_bus_device_group_dbus_register_object}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetType_result = {-1, "result", "s"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetType_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetType_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetType_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_GetType = {-1, "GetType", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetType_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetType_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetRecorder_result = {-1, "result", "o"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetRecorder_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetRecorder_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetRecorder_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_GetRecorder = {-1, "GetRecorder", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetRecorder_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetRecorder_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_AddDevice_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_AddDevice_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_AddDevice_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_AddDevice_in[] = {&_dvb_id_bus_device_group_dbus_arg_info_AddDevice_adapter, &_dvb_id_bus_device_group_dbus_arg_info_AddDevice_frontend, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_AddDevice_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_AddDevice_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_AddDevice = {-1, "AddDevice", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_AddDevice_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_AddDevice_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_in[] = {&_dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_adapter, &_dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_frontend, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_RemoveDevice = {-1, "RemoveDevice", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_RemoveDevice_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetChannelList_result = {-1, "result", "o"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetChannelList_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetChannelList_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetChannelList_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_GetChannelList = {-1, "GetChannelList", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetChannelList_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetChannelList_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetName_result = {-1, "result", "s"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetName_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetName_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetName_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_GetName = {-1, "GetName", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetName_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetName_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_SetName_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_SetName_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_SetName_in[] = {&_dvb_id_bus_device_group_dbus_arg_info_SetName_name, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_SetName_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_SetName_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_SetName = {-1, "SetName", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_SetName_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_SetName_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetMembers_result = {-1, "result", "as"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetMembers_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetMembers_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetMembers_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_GetMembers = {-1, "GetMembers", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetMembers_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetMembers_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetSchedule_channel_sid = {-1, "channel_sid", "u"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetSchedule_opath = {-1, "opath", "o"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetSchedule_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetSchedule_in[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetSchedule_channel_sid, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetSchedule_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetSchedule_opath, &_dvb_id_bus_device_group_dbus_arg_info_GetSchedule_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_GetSchedule = {-1, "GetSchedule", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetSchedule_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetSchedule_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_GetRecordingsDirectory_result = {-1, "result", "s"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetRecordingsDirectory_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_GetRecordingsDirectory_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_GetRecordingsDirectory_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_GetRecordingsDirectory = {-1, "GetRecordingsDirectory", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetRecordingsDirectory_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_GetRecordingsDirectory_out)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_location = {-1, "location", "s"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_in[] = {&_dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_location, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_out[] = {&_dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_device_group_dbus_method_info_SetRecordingsDirectory = {-1, "SetRecordingsDirectory", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_in), (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_SetRecordingsDirectory_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_device_group_dbus_method_info[] = {&_dvb_id_bus_device_group_dbus_method_info_GetType, &_dvb_id_bus_device_group_dbus_method_info_GetRecorder, &_dvb_id_bus_device_group_dbus_method_info_AddDevice, &_dvb_id_bus_device_group_dbus_method_info_RemoveDevice, &_dvb_id_bus_device_group_dbus_method_info_GetChannelList, &_dvb_id_bus_device_group_dbus_method_info_GetName, &_dvb_id_bus_device_group_dbus_method_info_SetName, &_dvb_id_bus_device_group_dbus_method_info_GetMembers, &_dvb_id_bus_device_group_dbus_method_info_GetSchedule, &_dvb_id_bus_device_group_dbus_method_info_GetRecordingsDirectory, &_dvb_id_bus_device_group_dbus_method_info_SetRecordingsDirectory, NULL}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_device_added_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_device_added_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_device_added[] = {&_dvb_id_bus_device_group_dbus_arg_info_device_added_adapter, &_dvb_id_bus_device_group_dbus_arg_info_device_added_frontend, NULL}; +static const GDBusSignalInfo _dvb_id_bus_device_group_dbus_signal_info_device_added = {-1, "DeviceAdded", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_device_added)}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_device_removed_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_device_group_dbus_arg_info_device_removed_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_device_group_dbus_arg_info_device_removed[] = {&_dvb_id_bus_device_group_dbus_arg_info_device_removed_adapter, &_dvb_id_bus_device_group_dbus_arg_info_device_removed_frontend, NULL}; +static const GDBusSignalInfo _dvb_id_bus_device_group_dbus_signal_info_device_removed = {-1, "DeviceRemoved", (GDBusArgInfo **) (&_dvb_id_bus_device_group_dbus_arg_info_device_removed)}; +static const GDBusSignalInfo * const _dvb_id_bus_device_group_dbus_signal_info[] = {&_dvb_id_bus_device_group_dbus_signal_info_device_added, &_dvb_id_bus_device_group_dbus_signal_info_device_removed, NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_device_group_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_device_group_dbus_interface_info = {-1, "org.gnome.DVB.DeviceGroup", (GDBusMethodInfo **) (&_dvb_id_bus_device_group_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_device_group_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_device_group_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_device_group_dbus_interface_vtable = {dvb_id_bus_device_group_dbus_interface_method_call, dvb_id_bus_device_group_dbus_interface_get_property, dvb_id_bus_device_group_dbus_interface_set_property}; /** * @returns: Name of adapter type the group holds * or an empty string when group with given id doesn't exist. */ gchar* dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetType (self, error); } @@ -143,6 +189,7 @@ * Returns the object path to the device's recorder. */ char* dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetRecorder (self, error); } @@ -158,6 +205,7 @@ * reference device. */ gboolean dvb_id_bus_device_group_AddDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->AddDevice (self, adapter, frontend, error); } @@ -171,6 +219,7 @@ * no devices after the removal it's removed as well. */ gboolean dvb_id_bus_device_group_RemoveDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->RemoveDevice (self, adapter, frontend, error); } @@ -179,6 +228,7 @@ * @returns: Object path to the ChannelList service for this device */ char* dvb_id_bus_device_group_GetChannelList (DVBIDBusDeviceGroup* self, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetChannelList (self, error); } @@ -187,6 +237,7 @@ * @returns: Name of the device group */ gchar* dvb_id_bus_device_group_GetName (DVBIDBusDeviceGroup* self, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetName (self, error); } @@ -196,6 +247,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_device_group_SetName (DVBIDBusDeviceGroup* self, const gchar* name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->SetName (self, name, error); } @@ -205,6 +257,7 @@ * the group (e.g. /dev/dvb/adapter0/frontend0) */ gchar** dvb_id_bus_device_group_GetMembers (DVBIDBusDeviceGroup* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetMembers (self, result_length1, error); } @@ -215,6 +268,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_device_group_GetSchedule (DVBIDBusDeviceGroup* self, guint channel_sid, char** opath, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetSchedule (self, channel_sid, opath, error); } @@ -223,6 +277,7 @@ * @returns: Location of the recordings directory */ gchar* dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetRecordingsDirectory (self, error); } @@ -232,6 +287,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const gchar* location, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->SetRecordingsDirectory (self, location, error); } @@ -240,7 +296,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2); register GMarshalFunc_VOID__UINT_UINT callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -255,1714 +312,12 @@ } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_id_bus_device_group_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_introspect (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_property_get_all (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.DeviceGroup") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* result; - DBusMessage* reply; - const char* _tmp1_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result = dvb_id_bus_device_group_GetType (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp1_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp1_); - _g_free0 (result); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - char* result; - DBusMessage* reply; - const char* _tmp2_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result = dvb_id_bus_device_group_GetRecorder (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp2_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_OBJECT_PATH, &_tmp2_); - _g_free0 (result); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_AddDevice (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint adapter = 0U; - dbus_uint32_t _tmp3_; - guint frontend = 0U; - dbus_uint32_t _tmp4_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp5_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp3_); - dbus_message_iter_next (&iter); - adapter = _tmp3_; - dbus_message_iter_get_basic (&iter, &_tmp4_); - dbus_message_iter_next (&iter); - frontend = _tmp4_; - result = dvb_id_bus_device_group_AddDevice (self, adapter, frontend, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp5_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp5_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_RemoveDevice (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint adapter = 0U; - dbus_uint32_t _tmp6_; - guint frontend = 0U; - dbus_uint32_t _tmp7_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp8_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - adapter = _tmp6_; - dbus_message_iter_get_basic (&iter, &_tmp7_); - dbus_message_iter_next (&iter); - frontend = _tmp7_; - result = dvb_id_bus_device_group_RemoveDevice (self, adapter, frontend, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp8_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp8_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetChannelList (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - char* result; - DBusMessage* reply; - const char* _tmp9_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result = dvb_id_bus_device_group_GetChannelList (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp9_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_OBJECT_PATH, &_tmp9_); - _g_free0 (result); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetName (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* result; - DBusMessage* reply; - const char* _tmp10_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result = dvb_id_bus_device_group_GetName (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp10_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp10_); - _g_free0 (result); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_SetName (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* name = NULL; - const char* _tmp11_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp12_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp11_); - dbus_message_iter_next (&iter); - name = g_strdup (_tmp11_); - result = dvb_id_bus_device_group_SetName (self, name, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (name); - _tmp12_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp12_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetMembers (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar** result; - int result_length1; - DBusMessage* reply; - gchar** _tmp13_; - DBusMessageIter _tmp14_; - int _tmp15_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; - result = dvb_id_bus_device_group_GetMembers (self, &result_length1, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp13_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "s", &_tmp14_); - for (_tmp15_ = 0; _tmp15_ < result_length1; _tmp15_++) { - const char* _tmp16_; - _tmp16_ = *_tmp13_; - dbus_message_iter_append_basic (&_tmp14_, DBUS_TYPE_STRING, &_tmp16_); - _tmp13_++; - } - dbus_message_iter_close_container (&iter, &_tmp14_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetSchedule (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint channel_sid = 0U; - dbus_uint32_t _tmp17_; - char* opath = NULL; - gboolean result; - DBusMessage* reply; - const char* _tmp18_; - dbus_bool_t _tmp19_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp17_); - dbus_message_iter_next (&iter); - channel_sid = _tmp17_; - result = dvb_id_bus_device_group_GetSchedule (self, channel_sid, &opath, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp18_ = opath; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_OBJECT_PATH, &_tmp18_); - _g_free0 (opath); - _tmp19_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp19_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* result; - DBusMessage* reply; - const char* _tmp20_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result = dvb_id_bus_device_group_GetRecordingsDirectory (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp20_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp20_); - _g_free0 (result); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* location = NULL; - const char* _tmp21_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp22_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp21_); - dbus_message_iter_next (&iter); - location = g_strdup (_tmp21_); - result = dvb_id_bus_device_group_SetRecordingsDirectory (self, location, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (location); - _tmp22_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp22_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_device_group_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_device_group_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_device_group_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "GetType")) { - result = _dbus_dvb_id_bus_device_group_GetType (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "GetRecorder")) { - result = _dbus_dvb_id_bus_device_group_GetRecorder (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "AddDevice")) { - result = _dbus_dvb_id_bus_device_group_AddDevice (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "RemoveDevice")) { - result = _dbus_dvb_id_bus_device_group_RemoveDevice (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "GetChannelList")) { - result = _dbus_dvb_id_bus_device_group_GetChannelList (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "GetName")) { - result = _dbus_dvb_id_bus_device_group_GetName (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "SetName")) { - result = _dbus_dvb_id_bus_device_group_SetName (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "GetMembers")) { - result = _dbus_dvb_id_bus_device_group_GetMembers (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "GetSchedule")) { - result = _dbus_dvb_id_bus_device_group_GetSchedule (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "GetRecordingsDirectory")) { - result = _dbus_dvb_id_bus_device_group_GetRecordingsDirectory (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.DeviceGroup", "SetRecordingsDirectory")) { - result = _dbus_dvb_id_bus_device_group_SetRecordingsDirectory (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _dbus_dvb_id_bus_device_group_device_added (GObject* _sender, guint adapter, guint frontend, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp23_; - dbus_uint32_t _tmp24_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.DeviceGroup", "DeviceAdded"); - dbus_message_iter_init_append (_message, &_iter); - _tmp23_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp23_); - _tmp24_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp24_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_device_group_device_removed (GObject* _sender, guint adapter, guint frontend, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp25_; - dbus_uint32_t _tmp26_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.DeviceGroup", "DeviceRemoved"); - dbus_message_iter_init_append (_message, &_iter); - _tmp25_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp25_); - _tmp26_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp26_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_device_group_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_device_group_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "device-added", (GCallback) _dbus_dvb_id_bus_device_group_device_added, connection); - g_signal_connect (object, "device-removed", (GCallback) _dbus_dvb_id_bus_device_group_device_removed, connection); -} - - static void dvb_id_bus_device_group_base_init (DVBIDBusDeviceGroupIface * iface) { static gboolean initialized = FALSE; if (!initialized) { initialized = TRUE; g_signal_new ("device_added", DVB_TYPE_ID_BUS_DEVICE_GROUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); g_signal_new ("device_removed", DVB_TYPE_ID_BUS_DEVICE_GROUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); - g_type_set_qdata (DVB_TYPE_ID_BUS_DEVICE_GROUP, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_device_group_dbus_vtable)); } } @@ -1974,1408 +329,910 @@ GType dvb_id_bus_device_group_type_id; dvb_id_bus_device_group_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusDeviceGroup", &g_define_type_info, 0); g_type_interface_add_prerequisite (dvb_id_bus_device_group_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_device_group_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_device_group_dbus_proxy_get_type); + g_type_set_qdata (dvb_id_bus_device_group_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_device_group_proxy_get_type); + g_type_set_qdata (dvb_id_bus_device_group_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.DeviceGroup"); + g_type_set_qdata (dvb_id_bus_device_group_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_device_group_register_object); g_once_init_leave (&dvb_id_bus_device_group_type_id__volatile, dvb_id_bus_device_group_type_id); } return dvb_id_bus_device_group_type_id__volatile; } -G_DEFINE_TYPE_EXTENDED (DVBIDBusDeviceGroupDBusProxy, dvb_id_bus_device_group_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_DEVICE_GROUP, dvb_id_bus_device_group_dbus_proxy_dvb_id_bus_device_group__interface_init) ); -DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusDeviceGroup* self; - self = g_object_new (dvb_id_bus_device_group_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.DeviceGroup", NULL); - return self; +G_DEFINE_TYPE_EXTENDED (DVBIDBusDeviceGroupProxy, dvb_id_bus_device_group_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_DEVICE_GROUP, dvb_id_bus_device_group_proxy_dvb_id_bus_device_group_interface_init) ) +static void dvb_id_bus_device_group_proxy_class_init (DVBIDBusDeviceGroupProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_device_group_proxy_g_signal; } -static GObject* dvb_id_bus_device_group_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_device_group_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_device_group_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_dvb_id_bus_device_group_device_added (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; +static void _dbus_handle_dvb_id_bus_device_group_device_added (DVBIDBusDeviceGroup* self, GVariant* parameters) { + GVariantIter _arguments_iter; guint adapter = 0U; - dbus_uint32_t _tmp145_; + GVariant* _tmp89_; guint frontend = 0U; - dbus_uint32_t _tmp146_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp145_); - dbus_message_iter_next (&iter); - adapter = _tmp145_; - dbus_message_iter_get_basic (&iter, &_tmp146_); - dbus_message_iter_next (&iter); - frontend = _tmp146_; + GVariant* _tmp90_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp89_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp89_); + g_variant_unref (_tmp89_); + _tmp90_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp90_); + g_variant_unref (_tmp90_); g_signal_emit_by_name (self, "device-added", adapter, frontend); } -static void _dbus_handle_dvb_id_bus_device_group_device_removed (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; +static void _dbus_handle_dvb_id_bus_device_group_device_removed (DVBIDBusDeviceGroup* self, GVariant* parameters) { + GVariantIter _arguments_iter; guint adapter = 0U; - dbus_uint32_t _tmp147_; + GVariant* _tmp91_; guint frontend = 0U; - dbus_uint32_t _tmp148_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp147_); - dbus_message_iter_next (&iter); - adapter = _tmp147_; - dbus_message_iter_get_basic (&iter, &_tmp148_); - dbus_message_iter_next (&iter); - frontend = _tmp148_; + GVariant* _tmp92_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp91_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp91_); + g_variant_unref (_tmp91_); + _tmp92_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp92_); + g_variant_unref (_tmp92_); g_signal_emit_by_name (self, "device-removed", adapter, frontend); } -DBusHandlerResult dvb_id_bus_device_group_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.DeviceGroup", "DeviceAdded")) { - _dbus_handle_dvb_id_bus_device_group_device_added (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.DeviceGroup", "DeviceRemoved")) { - _dbus_handle_dvb_id_bus_device_group_device_removed (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void dvb_id_bus_device_group_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - return; +static void dvb_id_bus_device_group_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "DeviceAdded") == 0) { + _dbus_handle_dvb_id_bus_device_group_device_added ((DVBIDBusDeviceGroup*) proxy, parameters); + } else if (strcmp (signal_name, "DeviceRemoved") == 0) { + _dbus_handle_dvb_id_bus_device_group_device_removed ((DVBIDBusDeviceGroup*) proxy, parameters); } - ((DVBIDBusDeviceGroupDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_device_group_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_device_group_dbus_proxy_parent_class)->dispose (self); } -static void dvb_id_bus_device_group_dbus_proxy_class_init (DVBIDBusDeviceGroupDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_device_group_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_device_group_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_device_group_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_device_group_dbus_proxy_set_property; +static void dvb_id_bus_device_group_proxy_init (DVBIDBusDeviceGroupProxy* self) { } -static void dvb_id_bus_device_group_dbus_proxy_init (DVBIDBusDeviceGroupDBusProxy* self) { -} - - -static gchar* dvb_id_bus_device_group_dbus_proxy_GetType (DVBIDBusDeviceGroup* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static gchar* dvb_id_bus_device_group_proxy_GetType (DVBIDBusDeviceGroup* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gchar* _result; - const char* _tmp149_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "GetType"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp150_; - _edomain = DBUS_GERROR; - _tmp150_ = _dbus_error.name + 27; - if (strcmp (_tmp150_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp150_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp150_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp150_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp150_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp150_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp150_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp150_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp150_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp150_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp150_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp150_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp150_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp150_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp150_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp150_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp150_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp150_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp150_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp150_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp150_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp150_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp150_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp150_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp150_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp150_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp150_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp150_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp150_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp150_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp150_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp150_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp150_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp93_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "GetType"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "s")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "s", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp149_); - dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp149_); - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp93_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_dup_string (_tmp93_, NULL); + g_variant_unref (_tmp93_); + g_object_unref (_reply_message); return _result; } -static char* dvb_id_bus_device_group_dbus_proxy_GetRecorder (DVBIDBusDeviceGroup* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static char* dvb_id_bus_device_group_proxy_GetRecorder (DVBIDBusDeviceGroup* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; char* _result; - const char* _tmp151_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp94_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "GetRecorder"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "GetRecorder"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp152_; - _edomain = DBUS_GERROR; - _tmp152_ = _dbus_error.name + 27; - if (strcmp (_tmp152_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp152_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp152_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp152_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp152_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp152_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp152_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp152_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp152_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp152_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp152_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp152_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp152_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp152_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp152_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp152_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp152_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp152_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp152_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp152_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp152_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp152_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp152_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp152_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp152_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp152_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp152_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp152_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp152_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp152_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp152_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp152_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp152_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "o")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "o", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp151_); - dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp151_); - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp94_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_dup_string (_tmp94_, NULL); + g_variant_unref (_tmp94_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_device_group_dbus_proxy_AddDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp153_; - dbus_uint32_t _tmp154_; +static gboolean dvb_id_bus_device_group_proxy_AddDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp155_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "AddDevice"); - dbus_message_iter_init_append (_message, &_iter); - _tmp153_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp153_); - _tmp154_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp154_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp156_; - _edomain = DBUS_GERROR; - _tmp156_ = _dbus_error.name + 27; - if (strcmp (_tmp156_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp156_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp156_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp156_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp156_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp156_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp156_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp156_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp156_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp156_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp156_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp156_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp156_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp156_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp156_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp156_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp156_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp156_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp156_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp156_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp156_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp156_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp156_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp156_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp156_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp156_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp156_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp156_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp156_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp156_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp156_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp156_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp156_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp95_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "AddDevice"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp155_); - dbus_message_iter_next (&_iter); - _result = _tmp155_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp95_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp95_); + g_variant_unref (_tmp95_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_device_group_dbus_proxy_RemoveDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp157_; - dbus_uint32_t _tmp158_; +static gboolean dvb_id_bus_device_group_proxy_RemoveDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp159_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "RemoveDevice"); - dbus_message_iter_init_append (_message, &_iter); - _tmp157_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp157_); - _tmp158_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp158_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp160_; - _edomain = DBUS_GERROR; - _tmp160_ = _dbus_error.name + 27; - if (strcmp (_tmp160_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp160_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp160_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp160_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp160_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp160_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp160_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp160_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp160_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp160_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp160_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp160_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp160_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp160_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp160_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp160_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp160_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp160_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp160_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp160_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp160_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp160_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp160_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp160_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp160_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp160_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp160_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp160_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp160_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp160_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp160_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp160_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp160_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp96_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "RemoveDevice"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp159_); - dbus_message_iter_next (&_iter); - _result = _tmp159_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp96_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp96_); + g_variant_unref (_tmp96_); + g_object_unref (_reply_message); return _result; } -static char* dvb_id_bus_device_group_dbus_proxy_GetChannelList (DVBIDBusDeviceGroup* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static char* dvb_id_bus_device_group_proxy_GetChannelList (DVBIDBusDeviceGroup* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; char* _result; - const char* _tmp161_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "GetChannelList"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp162_; - _edomain = DBUS_GERROR; - _tmp162_ = _dbus_error.name + 27; - if (strcmp (_tmp162_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp162_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp162_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp162_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp162_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp162_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp162_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp162_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp162_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp162_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp162_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp162_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp162_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp162_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp162_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp162_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp162_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp162_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp162_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp162_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp162_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp162_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp162_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp162_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp162_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp162_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp162_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp162_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp162_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp162_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp162_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp162_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp162_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp97_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "GetChannelList"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "o")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "o", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp161_); - dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp161_); - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp97_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_dup_string (_tmp97_, NULL); + g_variant_unref (_tmp97_); + g_object_unref (_reply_message); return _result; } -static gchar* dvb_id_bus_device_group_dbus_proxy_GetName (DVBIDBusDeviceGroup* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static gchar* dvb_id_bus_device_group_proxy_GetName (DVBIDBusDeviceGroup* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gchar* _result; - const char* _tmp163_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp98_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "GetName"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "GetName"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp164_; - _edomain = DBUS_GERROR; - _tmp164_ = _dbus_error.name + 27; - if (strcmp (_tmp164_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp164_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp164_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp164_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp164_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp164_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp164_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp164_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp164_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp164_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp164_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp164_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp164_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp164_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp164_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp164_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp164_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp164_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp164_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp164_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp164_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp164_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp164_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp164_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp164_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp164_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp164_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp164_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp164_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp164_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp164_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp164_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp164_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "s")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "s", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp163_); - dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp163_); - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp98_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_dup_string (_tmp98_, NULL); + g_variant_unref (_tmp98_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_device_group_dbus_proxy_SetName (DVBIDBusDeviceGroup* self, const gchar* name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp165_; +static gboolean dvb_id_bus_device_group_proxy_SetName (DVBIDBusDeviceGroup* self, const gchar* name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp166_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp99_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "SetName"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "SetName"); - dbus_message_iter_init_append (_message, &_iter); - _tmp165_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp165_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp167_; - _edomain = DBUS_GERROR; - _tmp167_ = _dbus_error.name + 27; - if (strcmp (_tmp167_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp167_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp167_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp167_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp167_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp167_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp167_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp167_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp167_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp167_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp167_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp167_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp167_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp167_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp167_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp167_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp167_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp167_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp167_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp167_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp167_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp167_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp167_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp167_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp167_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp167_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp167_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp167_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp167_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp167_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp167_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp167_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp167_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp166_); - dbus_message_iter_next (&_iter); - _result = _tmp166_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp99_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp99_); + g_variant_unref (_tmp99_); + g_object_unref (_reply_message); return _result; } -static gchar** dvb_id_bus_device_group_dbus_proxy_GetMembers (DVBIDBusDeviceGroup* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static gchar** dvb_id_bus_device_group_proxy_GetMembers (DVBIDBusDeviceGroup* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gchar** _result; int _result_length1; - gchar** _tmp168_; - int _tmp168__length; - int _tmp168__size; - int _tmp168__length1; - DBusMessageIter _tmp169_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "GetMembers"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp171_; - _edomain = DBUS_GERROR; - _tmp171_ = _dbus_error.name + 27; - if (strcmp (_tmp171_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp171_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp171_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp171_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp171_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp171_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp171_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp171_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp171_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp171_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp171_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp171_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp171_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp171_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp171_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp171_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp171_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp171_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp171_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp171_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp171_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp171_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp171_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp171_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp171_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp171_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp171_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp171_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp171_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp171_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp171_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp171_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp171_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp100_; + gchar** _tmp101_; + int _tmp101__length; + int _tmp101__size; + int _tmp101__length1; + GVariantIter _tmp102_; + GVariant* _tmp103_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "GetMembers"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "as")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "as", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); _result_length1 = 0; - _tmp168_ = g_new (gchar*, 5); - _tmp168__length = 0; - _tmp168__size = 4; - _tmp168__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp169_); - for (; dbus_message_iter_get_arg_type (&_tmp169_); _tmp168__length1++) { - const char* _tmp170_; - if (_tmp168__size == _tmp168__length) { - _tmp168__size = 2 * _tmp168__size; - _tmp168_ = g_renew (gchar*, _tmp168_, _tmp168__size + 1); - } - dbus_message_iter_get_basic (&_tmp169_, &_tmp170_); - dbus_message_iter_next (&_tmp169_); - _tmp168_[_tmp168__length++] = g_strdup (_tmp170_); - } - _result_length1 = _tmp168__length1; - _tmp168_[_tmp168__length] = NULL; - dbus_message_iter_next (&_iter); - _result = _tmp168_; + _tmp100_ = g_variant_iter_next_value (&_reply_iter); + _tmp101_ = g_new (gchar*, 5); + _tmp101__length = 0; + _tmp101__size = 4; + _tmp101__length1 = 0; + g_variant_iter_init (&_tmp102_, _tmp100_); + for (; (_tmp103_ = g_variant_iter_next_value (&_tmp102_)) != NULL; _tmp101__length1++) { + if (_tmp101__size == _tmp101__length) { + _tmp101__size = 2 * _tmp101__size; + _tmp101_ = g_renew (gchar*, _tmp101_, _tmp101__size + 1); + } + _tmp101_[_tmp101__length++] = g_variant_dup_string (_tmp103_, NULL); + g_variant_unref (_tmp103_); + } + _result_length1 = _tmp101__length1; + _tmp101_[_tmp101__length] = NULL; + _result = _tmp101_; + g_variant_unref (_tmp100_); *result_length1 = _result_length1; - dbus_message_unref (_reply); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_device_group_dbus_proxy_GetSchedule (DVBIDBusDeviceGroup* self, guint channel_sid, char** opath, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp172_; - char* _opath; - const char* _tmp173_; +static gboolean dvb_id_bus_device_group_proxy_GetSchedule (DVBIDBusDeviceGroup* self, guint channel_sid, char** opath, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + char* _vala_opath; + GVariant* _tmp104_; gboolean _result; - dbus_bool_t _tmp174_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "GetSchedule"); - dbus_message_iter_init_append (_message, &_iter); - _tmp172_ = channel_sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp172_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp175_; - _edomain = DBUS_GERROR; - _tmp175_ = _dbus_error.name + 27; - if (strcmp (_tmp175_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp175_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp175_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp175_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp175_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp175_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp175_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp175_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp175_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp175_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp175_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp175_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp175_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp175_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp175_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp175_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp175_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp175_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp175_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp175_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp175_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp175_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp175_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp175_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp175_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp175_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp175_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp175_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp175_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp175_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp175_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp175_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp175_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp105_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "GetSchedule"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_sid)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "ob")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ob", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp173_); - dbus_message_iter_next (&_iter); - _opath = g_strdup (_tmp173_); - *opath = _opath; - dbus_message_iter_get_basic (&_iter, &_tmp174_); - dbus_message_iter_next (&_iter); - _result = _tmp174_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp104_ = g_variant_iter_next_value (&_reply_iter); + _vala_opath = g_variant_dup_string (_tmp104_, NULL); + g_variant_unref (_tmp104_); + *opath = _vala_opath; + _tmp105_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp105_); + g_variant_unref (_tmp105_); + g_object_unref (_reply_message); return _result; } -static gchar* dvb_id_bus_device_group_dbus_proxy_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static gchar* dvb_id_bus_device_group_proxy_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gchar* _result; - const char* _tmp176_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "GetRecordingsDirectory"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp177_; - _edomain = DBUS_GERROR; - _tmp177_ = _dbus_error.name + 27; - if (strcmp (_tmp177_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp177_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp177_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp177_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp177_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp177_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp177_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp177_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp177_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp177_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp177_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp177_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp177_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp177_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp177_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp177_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp177_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp177_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp177_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp177_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp177_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp177_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp177_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp177_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp177_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp177_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp177_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp177_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp177_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp177_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp177_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp177_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp177_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp106_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "GetRecordingsDirectory"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "s")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "s", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp176_); - dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp176_); - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp106_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_dup_string (_tmp106_, NULL); + g_variant_unref (_tmp106_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_device_group_dbus_proxy_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const gchar* location, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp178_; +static gboolean dvb_id_bus_device_group_proxy_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const gchar* location, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp179_; - if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp107_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.DeviceGroup", "SetRecordingsDirectory"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (location)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.DeviceGroup", "SetRecordingsDirectory"); - dbus_message_iter_init_append (_message, &_iter); - _tmp178_ = location; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp178_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp180_; - _edomain = DBUS_GERROR; - _tmp180_ = _dbus_error.name + 27; - if (strcmp (_tmp180_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp180_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp180_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp180_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp180_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp180_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp180_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp180_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp180_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp180_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp180_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp180_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp180_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp180_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp180_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp180_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp180_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp180_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp180_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp180_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp180_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp180_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp180_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp180_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp180_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp180_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp180_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp180_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp180_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp180_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp180_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp180_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp180_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp179_); - dbus_message_iter_next (&_iter); - _result = _tmp179_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp107_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp107_); + g_variant_unref (_tmp107_); + g_object_unref (_reply_message); return _result; } -static void dvb_id_bus_device_group_dbus_proxy_dvb_id_bus_device_group__interface_init (DVBIDBusDeviceGroupIface* iface) { - iface->GetType = dvb_id_bus_device_group_dbus_proxy_GetType; - iface->GetRecorder = dvb_id_bus_device_group_dbus_proxy_GetRecorder; - iface->AddDevice = dvb_id_bus_device_group_dbus_proxy_AddDevice; - iface->RemoveDevice = dvb_id_bus_device_group_dbus_proxy_RemoveDevice; - iface->GetChannelList = dvb_id_bus_device_group_dbus_proxy_GetChannelList; - iface->GetName = dvb_id_bus_device_group_dbus_proxy_GetName; - iface->SetName = dvb_id_bus_device_group_dbus_proxy_SetName; - iface->GetMembers = dvb_id_bus_device_group_dbus_proxy_GetMembers; - iface->GetSchedule = dvb_id_bus_device_group_dbus_proxy_GetSchedule; - iface->GetRecordingsDirectory = dvb_id_bus_device_group_dbus_proxy_GetRecordingsDirectory; - iface->SetRecordingsDirectory = dvb_id_bus_device_group_dbus_proxy_SetRecordingsDirectory; +static void dvb_id_bus_device_group_proxy_dvb_id_bus_device_group_interface_init (DVBIDBusDeviceGroupIface* iface) { + iface->GetType = dvb_id_bus_device_group_proxy_GetType; + iface->GetRecorder = dvb_id_bus_device_group_proxy_GetRecorder; + iface->AddDevice = dvb_id_bus_device_group_proxy_AddDevice; + iface->RemoveDevice = dvb_id_bus_device_group_proxy_RemoveDevice; + iface->GetChannelList = dvb_id_bus_device_group_proxy_GetChannelList; + iface->GetName = dvb_id_bus_device_group_proxy_GetName; + iface->SetName = dvb_id_bus_device_group_proxy_SetName; + iface->GetMembers = dvb_id_bus_device_group_proxy_GetMembers; + iface->GetSchedule = dvb_id_bus_device_group_proxy_GetSchedule; + iface->GetRecordingsDirectory = dvb_id_bus_device_group_proxy_GetRecordingsDirectory; + iface->SetRecordingsDirectory = dvb_id_bus_device_group_proxy_SetRecordingsDirectory; } -static void _vala_dvb_id_bus_device_group_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +static void _dbus_dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gchar* result; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_device_group_GetType (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result)); + _g_free0 (result); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + char* result; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_device_group_GetRecorder (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (result)); + _g_free0 (result); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_AddDevice (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint adapter = 0U; + GVariant* _tmp108_; + guint frontend = 0U; + GVariant* _tmp109_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp108_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp108_); + g_variant_unref (_tmp108_); + _tmp109_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp109_); + g_variant_unref (_tmp109_); + result = dvb_id_bus_device_group_AddDevice (self, adapter, frontend, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_RemoveDevice (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint adapter = 0U; + GVariant* _tmp110_; + guint frontend = 0U; + GVariant* _tmp111_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp110_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp110_); + g_variant_unref (_tmp110_); + _tmp111_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp111_); + g_variant_unref (_tmp111_); + result = dvb_id_bus_device_group_RemoveDevice (self, adapter, frontend, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_GetChannelList (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + char* result; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_device_group_GetChannelList (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (result)); + _g_free0 (result); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_GetName (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gchar* result; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_device_group_GetName (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result)); + _g_free0 (result); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_SetName (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gchar* name = NULL; + GVariant* _tmp112_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp112_ = g_variant_iter_next_value (&_arguments_iter); + name = g_variant_dup_string (_tmp112_, NULL); + g_variant_unref (_tmp112_); + result = dvb_id_bus_device_group_SetName (self, name, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_GetMembers (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gchar** result; + int result_length1 = 0; + gchar** _tmp113_; + GVariantBuilder _tmp114_; + int _tmp115_; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_device_group_GetMembers (self, &result_length1, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp113_ = result; + g_variant_builder_init (&_tmp114_, G_VARIANT_TYPE ("as")); + for (_tmp115_ = 0; _tmp115_ < result_length1; _tmp115_++) { + g_variant_builder_add_value (&_tmp114_, g_variant_new_string (*_tmp113_)); + _tmp113_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp114_)); + result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_GetSchedule (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint channel_sid = 0U; + GVariant* _tmp116_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + char* opath = NULL; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp116_ = g_variant_iter_next_value (&_arguments_iter); + channel_sid = g_variant_get_uint32 (_tmp116_); + g_variant_unref (_tmp116_); + result = dvb_id_bus_device_group_GetSchedule (self, channel_sid, &opath, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (opath)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (opath); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gchar* result; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_device_group_GetRecordingsDirectory (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result)); + _g_free0 (result); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gchar* location = NULL; + GVariant* _tmp117_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp117_ = g_variant_iter_next_value (&_arguments_iter); + location = g_variant_dup_string (_tmp117_, NULL); + g_variant_unref (_tmp117_); + result = dvb_id_bus_device_group_SetRecordingsDirectory (self, location, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (location); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void dvb_id_bus_device_group_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "GetType") == 0) { + _dbus_dvb_id_bus_device_group_GetType (object, parameters, invocation); + } else if (strcmp (method_name, "GetRecorder") == 0) { + _dbus_dvb_id_bus_device_group_GetRecorder (object, parameters, invocation); + } else if (strcmp (method_name, "AddDevice") == 0) { + _dbus_dvb_id_bus_device_group_AddDevice (object, parameters, invocation); + } else if (strcmp (method_name, "RemoveDevice") == 0) { + _dbus_dvb_id_bus_device_group_RemoveDevice (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelList") == 0) { + _dbus_dvb_id_bus_device_group_GetChannelList (object, parameters, invocation); + } else if (strcmp (method_name, "GetName") == 0) { + _dbus_dvb_id_bus_device_group_GetName (object, parameters, invocation); + } else if (strcmp (method_name, "SetName") == 0) { + _dbus_dvb_id_bus_device_group_SetName (object, parameters, invocation); + } else if (strcmp (method_name, "GetMembers") == 0) { + _dbus_dvb_id_bus_device_group_GetMembers (object, parameters, invocation); + } else if (strcmp (method_name, "GetSchedule") == 0) { + _dbus_dvb_id_bus_device_group_GetSchedule (object, parameters, invocation); + } else if (strcmp (method_name, "GetRecordingsDirectory") == 0) { + _dbus_dvb_id_bus_device_group_GetRecordingsDirectory (object, parameters, invocation); + } else if (strcmp (method_name, "SetRecordingsDirectory") == 0) { + _dbus_dvb_id_bus_device_group_SetRecordingsDirectory (object, parameters, invocation); + } else { + g_object_unref (invocation); + } +} + + +static GVariant* dvb_id_bus_device_group_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; +} + + +static gboolean dvb_id_bus_device_group_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; +} + + +static void _dbus_dvb_id_bus_device_group_device_added (GObject* _sender, guint adapter, guint frontend, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.DeviceGroup", "DeviceAdded", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_device_group_device_removed (GObject* _sender, guint adapter, guint frontend, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.DeviceGroup", "DeviceRemoved", _arguments, NULL); +} + + +guint dvb_id_bus_device_group_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_device_group_dbus_interface_info), &_dvb_id_bus_device_group_dbus_interface_vtable, data, _dvb_id_bus_device_group_unregister_object, error); + if (!result) { + return 0; + } + g_signal_connect (object, "device-added", (GCallback) _dbus_dvb_id_bus_device_group_device_added, data); + g_signal_connect (object, "device-removed", (GCallback) _dbus_dvb_id_bus_device_group_device_removed, data); + return result; } -static void _vala_dvb_id_bus_device_group_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dvb_id_bus_device_group_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_device_group_device_added, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_device_group_device_removed, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusDeviceGroup.vala gnome-dvb-daemon-0.2.7/src/dbus/IDBusDeviceGroup.vala --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusDeviceGroup.vala 2010-04-01 09:50:35.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusDeviceGroup.vala 2011-04-19 20:46:24.000000000 +0000 @@ -31,14 +31,14 @@ * @returns: Name of adapter type the group holds * or an empty string when group with given id doesn't exist. */ - public abstract string GetType () throws DBus.Error; + public abstract string GetType () throws DBusError; /** * @returns: Object path of the device's recorder * * Returns the object path to the device's recorder. */ - public abstract DBus.ObjectPath GetRecorder () throws DBus.Error; + public abstract ObjectPath GetRecorder () throws DBusError; /** * @adapter: Number of the device's adapter @@ -50,7 +50,7 @@ * The new device will inherit all settings from the group's * reference device. */ - public abstract bool AddDevice (uint adapter, uint frontend) throws DBus.Error; + public abstract bool AddDevice (uint adapter, uint frontend) throws DBusError; /** * @adapter: Number of the device's adapter @@ -60,47 +60,47 @@ * Removes the device from the group. If the group contains * no devices after the removal it's removed as well. */ - public abstract bool RemoveDevice (uint adapter, uint frontend) throws DBus.Error; + public abstract bool RemoveDevice (uint adapter, uint frontend) throws DBusError; /** * @returns: Object path to the ChannelList service for this device */ - public abstract DBus.ObjectPath GetChannelList () throws DBus.Error; + public abstract ObjectPath GetChannelList () throws DBusError; /** * @returns: Name of the device group */ - public abstract string GetName () throws DBus.Error; + public abstract string GetName () throws DBusError; /** * @name: Name of the group * @returns: TRUE on success */ - public abstract bool SetName (string name) throws DBus.Error; + public abstract bool SetName (string name) throws DBusError; /** * @returns: List of paths to the devices that are part of * the group (e.g. /dev/dvb/adapter0/frontend0) */ - public abstract string[] GetMembers () throws DBus.Error; + public abstract string[] GetMembers () throws DBusError; /** * @channel_sid: ID of the channel * @opath: Object path to Schedule service * @returns: TRUE on success */ - public abstract bool GetSchedule (uint channel_sid, out DBus.ObjectPath opath) throws DBus.Error; + public abstract bool GetSchedule (uint channel_sid, out ObjectPath opath) throws DBusError; /** * @returns: Location of the recordings directory */ - public abstract string GetRecordingsDirectory () throws DBus.Error; + public abstract string GetRecordingsDirectory () throws DBusError; /** * @location: Location of the recordings directory * @returns: TRUE on success */ - public abstract bool SetRecordingsDirectory (string location) throws DBus.Error; + public abstract bool SetRecordingsDirectory (string location) throws DBusError; } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusManager.c gnome-dvb-daemon-0.2.7/src/dbus/IDBusManager.c --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusManager.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusManager.c 2011-12-09 11:14:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusManager.c generated by valac 0.11.3, the Vala compiler +/* IDBusManager.c generated by valac 0.14.0, the Vala compiler * generated from IDBusManager.vala, do not modify */ /* @@ -24,15 +24,16 @@ #include #include #include -#include -#include -#include +#include #define DVB_TYPE_CHANNEL_GROUP_INFO (dvb_channel_group_info_get_type ()) typedef struct _DVBChannelGroupInfo DVBChannelGroupInfo; #define _g_free0(var) (var = (g_free (var), NULL)) +#define DVB_TYPE_ADAPTER_INFO (dvb_adapter_info_get_type ()) +typedef struct _DVBAdapterInfo DVBAdapterInfo; + #define DVB_TYPE_ID_BUS_MANAGER (dvb_id_bus_manager_get_type ()) #define DVB_ID_BUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_MANAGER, DVBIDBusManager)) #define DVB_IS_ID_BUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_MANAGER)) @@ -40,15 +41,21 @@ typedef struct _DVBIDBusManager DVBIDBusManager; typedef struct _DVBIDBusManagerIface DVBIDBusManagerIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; -typedef struct _DVBIDBusManagerDBusProxy DVBIDBusManagerDBusProxy; -typedef DBusGProxyClass DVBIDBusManagerDBusProxyClass; + +#define DVB_TYPE_ID_BUS_MANAGER_PROXY (dvb_id_bus_manager_proxy_get_type ()) +typedef GDBusProxy DVBIDBusManagerProxy; +typedef GDBusProxyClass DVBIDBusManagerProxyClass; struct _DVBChannelGroupInfo { gint id; gchar* name; }; +struct _DVBAdapterInfo { + gchar* name; + gchar* type; +}; + struct _DVBIDBusManagerIface { GTypeInterface parent_iface; gboolean (*GetScannerForDevice) (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); @@ -61,15 +68,7 @@ gboolean (*AddChannelGroup) (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); gboolean (*RemoveChannelGroup) (DVBIDBusManager* self, gint channel_group_id, GError** error); GHashTable** (*GetDevices) (DVBIDBusManager* self, int* result_length1, GError** error); -}; - -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusManagerDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; + gboolean (*GetAdapterInfo) (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error); }; @@ -79,7 +78,13 @@ void dvb_channel_group_info_free (DVBChannelGroupInfo* self); void dvb_channel_group_info_copy (const DVBChannelGroupInfo* self, DVBChannelGroupInfo* dest); void dvb_channel_group_info_destroy (DVBChannelGroupInfo* self); -DVBIDBusManager* dvb_id_bus_manager_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_adapter_info_get_type (void) G_GNUC_CONST; +DVBAdapterInfo* dvb_adapter_info_dup (const DVBAdapterInfo* self); +void dvb_adapter_info_free (DVBAdapterInfo* self); +void dvb_adapter_info_copy (const DVBAdapterInfo* self, DVBAdapterInfo* dest); +void dvb_adapter_info_destroy (DVBAdapterInfo* self); +GType dvb_id_bus_manager_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_manager_get_type (void) G_GNUC_CONST; gboolean dvb_id_bus_manager_GetScannerForDevice (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); char** dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error); @@ -91,60 +96,134 @@ gboolean dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); gboolean dvb_id_bus_manager_RemoveChannelGroup (DVBIDBusManager* self, gint channel_group_id, GError** error); GHashTable** dvb_id_bus_manager_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_manager_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_manager_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_manager_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_manager_introspect (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_property_get_all (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetScannerForDevice (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetDeviceGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_AddDeviceToNewGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetNameOfRegisteredDevice (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetDeviceGroupSize (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); +gboolean dvb_id_bus_manager_GetAdapterInfo (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error); +static void dvb_id_bus_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_manager_group_added (DVBIDBusManager* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_manager_group_removed (DVBIDBusManager* self, GVariant* parameters); +static gboolean dvb_id_bus_manager_proxy_GetScannerForDevice (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); +static char** dvb_id_bus_manager_proxy_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_manager_proxy_GetDeviceGroup (DVBIDBusManager* self, guint group_id, char** opath, GError** error); +static gboolean dvb_id_bus_manager_proxy_AddDeviceToNewGroup (DVBIDBusManager* self, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error); +static gboolean dvb_id_bus_manager_proxy_GetNameOfRegisteredDevice (DVBIDBusManager* self, guint adapter, guint frontend, gchar** name, GError** error); +static gint dvb_id_bus_manager_proxy_GetDeviceGroupSize (DVBIDBusManager* self, GError** error); +static DVBChannelGroupInfo* dvb_id_bus_manager_proxy_GetChannelGroups (DVBIDBusManager* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_manager_proxy_AddChannelGroup (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); +static gboolean dvb_id_bus_manager_proxy_RemoveChannelGroup (DVBIDBusManager* self, gint channel_group_id, GError** error); +static GHashTable** dvb_id_bus_manager_proxy_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_manager_proxy_GetAdapterInfo (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error); +static void dvb_id_bus_manager_proxy_dvb_id_bus_manager_interface_init (DVBIDBusManagerIface* iface); +static void _dbus_dvb_id_bus_manager_GetScannerForDevice (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_GetDeviceGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_AddDeviceToNewGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_GetNameOfRegisteredDevice (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_GetDeviceGroupSize (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); static void _vala_DVBChannelGroupInfo_array_free (DVBChannelGroupInfo* array, gint array_length); -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetChannelGroups (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_RemoveChannelGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetDevices (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_manager_group_added (GObject* _sender, guint group_id, DBusConnection* _connection); -static void _dbus_dvb_id_bus_manager_group_removed (GObject* _sender, guint group_id, DBusConnection* _connection); -GType dvb_id_bus_manager_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_manager_group_added (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_manager_group_removed (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_manager_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_MANAGER_DBUS_PROXY_DUMMY_PROPERTY -}; -static gboolean dvb_id_bus_manager_dbus_proxy_GetScannerForDevice (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); -static char** dvb_id_bus_manager_dbus_proxy_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_manager_dbus_proxy_GetDeviceGroup (DVBIDBusManager* self, guint group_id, char** opath, GError** error); -static gboolean dvb_id_bus_manager_dbus_proxy_AddDeviceToNewGroup (DVBIDBusManager* self, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error); -static gboolean dvb_id_bus_manager_dbus_proxy_GetNameOfRegisteredDevice (DVBIDBusManager* self, guint adapter, guint frontend, gchar** name, GError** error); -static gint dvb_id_bus_manager_dbus_proxy_GetDeviceGroupSize (DVBIDBusManager* self, GError** error); -static DVBChannelGroupInfo* dvb_id_bus_manager_dbus_proxy_GetChannelGroups (DVBIDBusManager* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_manager_dbus_proxy_AddChannelGroup (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); -static gboolean dvb_id_bus_manager_dbus_proxy_RemoveChannelGroup (DVBIDBusManager* self, gint channel_group_id, GError** error); -static GHashTable** dvb_id_bus_manager_dbus_proxy_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error); -static void dvb_id_bus_manager_dbus_proxy_dvb_id_bus_manager__interface_init (DVBIDBusManagerIface* iface); -static void _vala_dvb_id_bus_manager_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_manager_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +static void _dbus_dvb_id_bus_manager_GetChannelGroups (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_RemoveChannelGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_GetDevices (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_manager_GetAdapterInfo (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_dvb_id_bus_manager_group_added (GObject* _sender, guint group_id, gpointer* _data); +static void _dbus_dvb_id_bus_manager_group_removed (GObject* _sender, guint group_id, gpointer* _data); +static void _dvb_id_bus_manager_unregister_object (gpointer user_data); static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static const DBusObjectPathVTable _dvb_id_bus_manager_dbus_path_vtable = {_dvb_id_bus_manager_dbus_unregister, dvb_id_bus_manager_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_manager_dbus_vtable = {dvb_id_bus_manager_dbus_register_object}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_opath = {-1, "opath", "o"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_dbusiface = {-1, "dbusiface", "s"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_in[] = {&_dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_adapter, &_dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_frontend, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_opath, &_dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_dbusiface, &_dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetScannerForDevice = {-1, "GetScannerForDevice", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetScannerForDevice_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetRegisteredDeviceGroups_result = {-1, "result", "ao"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetRegisteredDeviceGroups_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetRegisteredDeviceGroups_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetRegisteredDeviceGroups_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetRegisteredDeviceGroups = {-1, "GetRegisteredDeviceGroups", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetRegisteredDeviceGroups_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetRegisteredDeviceGroups_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_group_id = {-1, "group_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_opath = {-1, "opath", "o"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_in[] = {&_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_group_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_opath, &_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetDeviceGroup = {-1, "GetDeviceGroup", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroup_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_channels_conf = {-1, "channels_conf", "s"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_recordings_dir = {-1, "recordings_dir", "s"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_in[] = {&_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_adapter, &_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_frontend, &_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_channels_conf, &_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_recordings_dir, &_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_name, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_out[] = {&_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_AddDeviceToNewGroup = {-1, "AddDeviceToNewGroup", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_AddDeviceToNewGroup_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_in[] = {&_dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_adapter, &_dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_frontend, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_name, &_dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetNameOfRegisteredDevice = {-1, "GetNameOfRegisteredDevice", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetNameOfRegisteredDevice_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroupSize_result = {-1, "result", "i"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroupSize_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetDeviceGroupSize_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroupSize_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetDeviceGroupSize = {-1, "GetDeviceGroupSize", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroupSize_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetDeviceGroupSize_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetChannelGroups_result = {-1, "result", "a(is)"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetChannelGroups_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetChannelGroups_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetChannelGroups_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetChannelGroups = {-1, "GetChannelGroups", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetChannelGroups_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetChannelGroups_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_channel_group_id = {-1, "channel_group_id", "i"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_in[] = {&_dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_name, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_out[] = {&_dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_channel_group_id, &_dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_AddChannelGroup = {-1, "AddChannelGroup", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_AddChannelGroup_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_channel_group_id = {-1, "channel_group_id", "i"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_in[] = {&_dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_channel_group_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_out[] = {&_dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_RemoveChannelGroup = {-1, "RemoveChannelGroup", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_RemoveChannelGroup_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetDevices_result = {-1, "result", "aa{ss}"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetDevices_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetDevices_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetDevices_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetDevices = {-1, "GetDevices", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetDevices_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetDevices_out)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_adapter = {-1, "adapter", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_frontend = {-1, "frontend", "u"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_info = {-1, "info", "(ss)"}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_in[] = {&_dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_adapter, &_dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_frontend, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_out[] = {&_dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_info, &_dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_manager_dbus_method_info_GetAdapterInfo = {-1, "GetAdapterInfo", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_in), (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_GetAdapterInfo_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_manager_dbus_method_info[] = {&_dvb_id_bus_manager_dbus_method_info_GetScannerForDevice, &_dvb_id_bus_manager_dbus_method_info_GetRegisteredDeviceGroups, &_dvb_id_bus_manager_dbus_method_info_GetDeviceGroup, &_dvb_id_bus_manager_dbus_method_info_AddDeviceToNewGroup, &_dvb_id_bus_manager_dbus_method_info_GetNameOfRegisteredDevice, &_dvb_id_bus_manager_dbus_method_info_GetDeviceGroupSize, &_dvb_id_bus_manager_dbus_method_info_GetChannelGroups, &_dvb_id_bus_manager_dbus_method_info_AddChannelGroup, &_dvb_id_bus_manager_dbus_method_info_RemoveChannelGroup, &_dvb_id_bus_manager_dbus_method_info_GetDevices, &_dvb_id_bus_manager_dbus_method_info_GetAdapterInfo, NULL}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_group_added_group_id = {-1, "group_id", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_group_added[] = {&_dvb_id_bus_manager_dbus_arg_info_group_added_group_id, NULL}; +static const GDBusSignalInfo _dvb_id_bus_manager_dbus_signal_info_group_added = {-1, "GroupAdded", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_group_added)}; +static const GDBusArgInfo _dvb_id_bus_manager_dbus_arg_info_group_removed_group_id = {-1, "group_id", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_manager_dbus_arg_info_group_removed[] = {&_dvb_id_bus_manager_dbus_arg_info_group_removed_group_id, NULL}; +static const GDBusSignalInfo _dvb_id_bus_manager_dbus_signal_info_group_removed = {-1, "GroupRemoved", (GDBusArgInfo **) (&_dvb_id_bus_manager_dbus_arg_info_group_removed)}; +static const GDBusSignalInfo * const _dvb_id_bus_manager_dbus_signal_info[] = {&_dvb_id_bus_manager_dbus_signal_info_group_added, &_dvb_id_bus_manager_dbus_signal_info_group_removed, NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_manager_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_manager_dbus_interface_info = {-1, "org.gnome.DVB.Manager", (GDBusMethodInfo **) (&_dvb_id_bus_manager_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_manager_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_manager_dbus_interface_vtable = {dvb_id_bus_manager_dbus_interface_method_call, dvb_id_bus_manager_dbus_interface_get_property, dvb_id_bus_manager_dbus_interface_set_property}; void dvb_channel_group_info_copy (const DVBChannelGroupInfo* self, DVBChannelGroupInfo* dest) { - dest->id = self->id; - dest->name = g_strdup (self->name); + gint _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + _tmp0_ = (*self).id; + (*dest).id = _tmp0_; + _tmp1_ = (*self).name; + _tmp2_ = g_strdup (_tmp1_); + _g_free0 ((*dest).name); + (*dest).name = _tmp2_; } void dvb_channel_group_info_destroy (DVBChannelGroupInfo* self) { - _g_free0 (self->name); + _g_free0 ((*self).name); } @@ -173,6 +252,53 @@ } +void dvb_adapter_info_copy (const DVBAdapterInfo* self, DVBAdapterInfo* dest) { + const gchar* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; + _tmp0_ = (*self).name; + _tmp1_ = g_strdup (_tmp0_); + _g_free0 ((*dest).name); + (*dest).name = _tmp1_; + _tmp2_ = (*self).type; + _tmp3_ = g_strdup (_tmp2_); + _g_free0 ((*dest).type); + (*dest).type = _tmp3_; +} + + +void dvb_adapter_info_destroy (DVBAdapterInfo* self) { + _g_free0 ((*self).name); + _g_free0 ((*self).type); +} + + +DVBAdapterInfo* dvb_adapter_info_dup (const DVBAdapterInfo* self) { + DVBAdapterInfo* dup; + dup = g_new0 (DVBAdapterInfo, 1); + dvb_adapter_info_copy (self, dup); + return dup; +} + + +void dvb_adapter_info_free (DVBAdapterInfo* self) { + dvb_adapter_info_destroy (self); + g_free (self); +} + + +GType dvb_adapter_info_get_type (void) { + static volatile gsize dvb_adapter_info_type_id__volatile = 0; + if (g_once_init_enter (&dvb_adapter_info_type_id__volatile)) { + GType dvb_adapter_info_type_id; + dvb_adapter_info_type_id = g_boxed_type_register_static ("DVBAdapterInfo", (GBoxedCopyFunc) dvb_adapter_info_dup, (GBoxedFreeFunc) dvb_adapter_info_free); + g_once_init_leave (&dvb_adapter_info_type_id__volatile, dvb_adapter_info_type_id); + } + return dvb_adapter_info_type_id__volatile; +} + + /** * @adapter: Number of the device's adapter * @frontend: Number of the device's frontend @@ -183,6 +309,7 @@ * Get the object path of the channel scanner for this device. */ gboolean dvb_id_bus_manager_GetScannerForDevice (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetScannerForDevice (self, adapter, frontend, opath, dbusiface, error); } @@ -191,6 +318,7 @@ * @returns: Device groups' DBus path */ char** dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetRegisteredDeviceGroups (self, result_length1, error); } @@ -201,6 +329,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_manager_GetDeviceGroup (DVBIDBusManager* self, guint group_id, char** opath, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetDeviceGroup (self, group_id, opath, error); } @@ -219,6 +348,7 @@ * of the reference device). */ gboolean dvb_id_bus_manager_AddDeviceToNewGroup (DVBIDBusManager* self, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->AddDeviceToNewGroup (self, adapter, frontend, channels_conf, recordings_dir, name, error); } @@ -233,6 +363,7 @@ * is returned. */ gboolean dvb_id_bus_manager_GetNameOfRegisteredDevice (DVBIDBusManager* self, guint adapter, guint frontend, gchar** name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetNameOfRegisteredDevice (self, adapter, frontend, name, error); } @@ -241,6 +372,7 @@ * @returns: the numner of configured device groups */ gint dvb_id_bus_manager_GetDeviceGroupSize (DVBIDBusManager* self, GError** error) { + g_return_val_if_fail (self != NULL, 0); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetDeviceGroupSize (self, error); } @@ -249,6 +381,7 @@ * @returns: ID and name of each channel group */ DVBChannelGroupInfo* dvb_id_bus_manager_GetChannelGroups (DVBIDBusManager* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetChannelGroups (self, result_length1, error); } @@ -259,6 +392,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->AddChannelGroup (self, name, channel_group_id, error); } @@ -268,6 +402,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_manager_RemoveChannelGroup (DVBIDBusManager* self, gint channel_group_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->RemoveChannelGroup (self, channel_group_id, error); } @@ -277,1665 +412,18 @@ * devices retrieved via udev */ GHashTable** dvb_id_bus_manager_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetDevices (self, result_length1, error); } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_id_bus_manager_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_introspect (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_property_get_all (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.Manager") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetScannerForDevice (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint adapter = 0U; - dbus_uint32_t _tmp1_; - guint frontend = 0U; - dbus_uint32_t _tmp2_; - char* opath = NULL; - gchar* dbusiface = NULL; - gboolean result; - DBusMessage* reply; - const char* _tmp3_; - const char* _tmp4_; - dbus_bool_t _tmp5_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - adapter = _tmp1_; - dbus_message_iter_get_basic (&iter, &_tmp2_); - dbus_message_iter_next (&iter); - frontend = _tmp2_; - result = dvb_id_bus_manager_GetScannerForDevice (self, adapter, frontend, &opath, &dbusiface, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp3_ = opath; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_OBJECT_PATH, &_tmp3_); - _g_free0 (opath); - _tmp4_ = dbusiface; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp4_); - _g_free0 (dbusiface); - _tmp5_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp5_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - char** result; - int result_length1; - DBusMessage* reply; - char** _tmp6_; - DBusMessageIter _tmp7_; - int _tmp8_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; - result = dvb_id_bus_manager_GetRegisteredDeviceGroups (self, &result_length1, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp6_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "o", &_tmp7_); - for (_tmp8_ = 0; _tmp8_ < result_length1; _tmp8_++) { - const char* _tmp9_; - _tmp9_ = *_tmp6_; - dbus_message_iter_append_basic (&_tmp7_, DBUS_TYPE_OBJECT_PATH, &_tmp9_); - _tmp6_++; - } - dbus_message_iter_close_container (&iter, &_tmp7_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetDeviceGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint group_id = 0U; - dbus_uint32_t _tmp10_; - char* opath = NULL; - gboolean result; - DBusMessage* reply; - const char* _tmp11_; - dbus_bool_t _tmp12_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp10_); - dbus_message_iter_next (&iter); - group_id = _tmp10_; - result = dvb_id_bus_manager_GetDeviceGroup (self, group_id, &opath, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp11_ = opath; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_OBJECT_PATH, &_tmp11_); - _g_free0 (opath); - _tmp12_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp12_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_AddDeviceToNewGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint adapter = 0U; - dbus_uint32_t _tmp13_; - guint frontend = 0U; - dbus_uint32_t _tmp14_; - gchar* channels_conf = NULL; - const char* _tmp15_; - gchar* recordings_dir = NULL; - const char* _tmp16_; - gchar* name = NULL; - const char* _tmp17_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp18_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uusss")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp13_); - dbus_message_iter_next (&iter); - adapter = _tmp13_; - dbus_message_iter_get_basic (&iter, &_tmp14_); - dbus_message_iter_next (&iter); - frontend = _tmp14_; - dbus_message_iter_get_basic (&iter, &_tmp15_); - dbus_message_iter_next (&iter); - channels_conf = g_strdup (_tmp15_); - dbus_message_iter_get_basic (&iter, &_tmp16_); - dbus_message_iter_next (&iter); - recordings_dir = g_strdup (_tmp16_); - dbus_message_iter_get_basic (&iter, &_tmp17_); - dbus_message_iter_next (&iter); - name = g_strdup (_tmp17_); - result = dvb_id_bus_manager_AddDeviceToNewGroup (self, adapter, frontend, channels_conf, recordings_dir, name, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (channels_conf); - _g_free0 (recordings_dir); - _g_free0 (name); - _tmp18_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp18_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetNameOfRegisteredDevice (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint adapter = 0U; - dbus_uint32_t _tmp19_; - guint frontend = 0U; - dbus_uint32_t _tmp20_; - gchar* name = NULL; - gboolean result; - DBusMessage* reply; - const char* _tmp21_; - dbus_bool_t _tmp22_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp19_); - dbus_message_iter_next (&iter); - adapter = _tmp19_; - dbus_message_iter_get_basic (&iter, &_tmp20_); - dbus_message_iter_next (&iter); - frontend = _tmp20_; - result = dvb_id_bus_manager_GetNameOfRegisteredDevice (self, adapter, frontend, &name, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp21_ = name; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp21_); - _g_free0 (name); - _tmp22_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp22_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetDeviceGroupSize (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gint result; - DBusMessage* reply; - dbus_int32_t _tmp23_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result = dvb_id_bus_manager_GetDeviceGroupSize (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp23_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &_tmp23_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _vala_DVBChannelGroupInfo_array_free (DVBChannelGroupInfo* array, gint array_length) { - if (array != NULL) { - int i; - for (i = 0; i < array_length; i = i + 1) { - dvb_channel_group_info_destroy (&array[i]); - } - } - g_free (array); -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetChannelGroups (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - DVBChannelGroupInfo* result; - int result_length1; - DBusMessage* reply; - DVBChannelGroupInfo* _tmp24_; - DBusMessageIter _tmp25_; - int _tmp26_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; - result = dvb_id_bus_manager_GetChannelGroups (self, &result_length1, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp24_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(is)", &_tmp25_); - for (_tmp26_ = 0; _tmp26_ < result_length1; _tmp26_++) { - DBusMessageIter _tmp27_; - dbus_int32_t _tmp28_; - const char* _tmp29_; - dbus_message_iter_open_container (&_tmp25_, DBUS_TYPE_STRUCT, NULL, &_tmp27_); - _tmp28_ = (*_tmp24_).id; - dbus_message_iter_append_basic (&_tmp27_, DBUS_TYPE_INT32, &_tmp28_); - _tmp29_ = (*_tmp24_).name; - dbus_message_iter_append_basic (&_tmp27_, DBUS_TYPE_STRING, &_tmp29_); - dbus_message_iter_close_container (&_tmp25_, &_tmp27_); - _tmp24_++; - } - dbus_message_iter_close_container (&iter, &_tmp25_); - result = (_vala_DVBChannelGroupInfo_array_free (result, result_length1), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* name = NULL; - const char* _tmp30_; - gint channel_group_id = 0; - gboolean result; - DBusMessage* reply; - dbus_int32_t _tmp31_; - dbus_bool_t _tmp32_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp30_); - dbus_message_iter_next (&iter); - name = g_strdup (_tmp30_); - result = dvb_id_bus_manager_AddChannelGroup (self, name, &channel_group_id, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (name); - _tmp31_ = channel_group_id; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &_tmp31_); - _tmp32_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp32_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_RemoveChannelGroup (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gint channel_group_id = 0; - dbus_int32_t _tmp33_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp34_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "i")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp33_); - dbus_message_iter_next (&iter); - channel_group_id = _tmp33_; - result = dvb_id_bus_manager_RemoveChannelGroup (self, channel_group_id, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp34_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp34_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_manager_GetDevices (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - GHashTable** result; - int result_length1; - DBusMessage* reply; - GHashTable** _tmp35_; - DBusMessageIter _tmp36_; - int _tmp37_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; - result = dvb_id_bus_manager_GetDevices (self, &result_length1, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp35_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "a{ss}", &_tmp36_); - for (_tmp37_ = 0; _tmp37_ < result_length1; _tmp37_++) { - DBusMessageIter _tmp38_, _tmp39_; - GHashTableIter _tmp40_; - gpointer _tmp41_, _tmp42_; - dbus_message_iter_open_container (&_tmp36_, DBUS_TYPE_ARRAY, "{ss}", &_tmp38_); - g_hash_table_iter_init (&_tmp40_, *_tmp35_); - while (g_hash_table_iter_next (&_tmp40_, &_tmp41_, &_tmp42_)) { - gchar* _key; - gchar* _value; - const char* _tmp43_; - const char* _tmp44_; - dbus_message_iter_open_container (&_tmp38_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp39_); - _key = (gchar*) _tmp41_; - _value = (gchar*) _tmp42_; - _tmp43_ = _key; - dbus_message_iter_append_basic (&_tmp39_, DBUS_TYPE_STRING, &_tmp43_); - _tmp44_ = _value; - dbus_message_iter_append_basic (&_tmp39_, DBUS_TYPE_STRING, &_tmp44_); - dbus_message_iter_close_container (&_tmp38_, &_tmp39_); - } - dbus_message_iter_close_container (&_tmp36_, &_tmp38_); - _tmp35_++; - } - dbus_message_iter_close_container (&iter, &_tmp36_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_manager_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_manager_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_manager_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "GetScannerForDevice")) { - result = _dbus_dvb_id_bus_manager_GetScannerForDevice (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "GetRegisteredDeviceGroups")) { - result = _dbus_dvb_id_bus_manager_GetRegisteredDeviceGroups (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "GetDeviceGroup")) { - result = _dbus_dvb_id_bus_manager_GetDeviceGroup (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "AddDeviceToNewGroup")) { - result = _dbus_dvb_id_bus_manager_AddDeviceToNewGroup (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "GetNameOfRegisteredDevice")) { - result = _dbus_dvb_id_bus_manager_GetNameOfRegisteredDevice (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "GetDeviceGroupSize")) { - result = _dbus_dvb_id_bus_manager_GetDeviceGroupSize (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "GetChannelGroups")) { - result = _dbus_dvb_id_bus_manager_GetChannelGroups (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "AddChannelGroup")) { - result = _dbus_dvb_id_bus_manager_AddChannelGroup (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "RemoveChannelGroup")) { - result = _dbus_dvb_id_bus_manager_RemoveChannelGroup (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Manager", "GetDevices")) { - result = _dbus_dvb_id_bus_manager_GetDevices (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _dbus_dvb_id_bus_manager_group_added (GObject* _sender, guint group_id, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp45_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Manager", "GroupAdded"); - dbus_message_iter_init_append (_message, &_iter); - _tmp45_ = group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp45_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_manager_group_removed (GObject* _sender, guint group_id, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp46_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Manager", "GroupRemoved"); - dbus_message_iter_init_append (_message, &_iter); - _tmp46_ = group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp46_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_manager_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_manager_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "group-added", (GCallback) _dbus_dvb_id_bus_manager_group_added, connection); - g_signal_connect (object, "group-removed", (GCallback) _dbus_dvb_id_bus_manager_group_removed, connection); +/** + * @info: type and name of adapter + * @returns: TRUE on success + */ +gboolean dvb_id_bus_manager_GetAdapterInfo (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); + return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetAdapterInfo (self, adapter, frontend, info, error); } @@ -1945,7 +433,6 @@ initialized = TRUE; g_signal_new ("group_added", DVB_TYPE_ID_BUS_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); g_signal_new ("group_removed", DVB_TYPE_ID_BUS_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); - g_type_set_qdata (DVB_TYPE_ID_BUS_MANAGER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_manager_dbus_vtable)); } } @@ -1957,1397 +444,1113 @@ GType dvb_id_bus_manager_type_id; dvb_id_bus_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusManager", &g_define_type_info, 0); g_type_interface_add_prerequisite (dvb_id_bus_manager_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_manager_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_manager_dbus_proxy_get_type); + g_type_set_qdata (dvb_id_bus_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_manager_proxy_get_type); + g_type_set_qdata (dvb_id_bus_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.Manager"); + g_type_set_qdata (dvb_id_bus_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_manager_register_object); g_once_init_leave (&dvb_id_bus_manager_type_id__volatile, dvb_id_bus_manager_type_id); } return dvb_id_bus_manager_type_id__volatile; } -G_DEFINE_TYPE_EXTENDED (DVBIDBusManagerDBusProxy, dvb_id_bus_manager_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_MANAGER, dvb_id_bus_manager_dbus_proxy_dvb_id_bus_manager__interface_init) ); -DVBIDBusManager* dvb_id_bus_manager_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusManager* self; - self = g_object_new (dvb_id_bus_manager_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.Manager", NULL); - return self; +G_DEFINE_TYPE_EXTENDED (DVBIDBusManagerProxy, dvb_id_bus_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_MANAGER, dvb_id_bus_manager_proxy_dvb_id_bus_manager_interface_init) ) +static void dvb_id_bus_manager_proxy_class_init (DVBIDBusManagerProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_manager_proxy_g_signal; } -static GObject* dvb_id_bus_manager_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_manager_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_manager_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_dvb_id_bus_manager_group_added (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; +static void _dbus_handle_dvb_id_bus_manager_group_added (DVBIDBusManager* self, GVariant* parameters) { + GVariantIter _arguments_iter; guint group_id = 0U; - dbus_uint32_t _tmp181_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "u")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp181_); - dbus_message_iter_next (&iter); - group_id = _tmp181_; + GVariant* _tmp118_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp118_ = g_variant_iter_next_value (&_arguments_iter); + group_id = g_variant_get_uint32 (_tmp118_); + g_variant_unref (_tmp118_); g_signal_emit_by_name (self, "group-added", group_id); } -static void _dbus_handle_dvb_id_bus_manager_group_removed (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; +static void _dbus_handle_dvb_id_bus_manager_group_removed (DVBIDBusManager* self, GVariant* parameters) { + GVariantIter _arguments_iter; guint group_id = 0U; - dbus_uint32_t _tmp182_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "u")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp182_); - dbus_message_iter_next (&iter); - group_id = _tmp182_; + GVariant* _tmp119_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp119_ = g_variant_iter_next_value (&_arguments_iter); + group_id = g_variant_get_uint32 (_tmp119_); + g_variant_unref (_tmp119_); g_signal_emit_by_name (self, "group-removed", group_id); } -DBusHandlerResult dvb_id_bus_manager_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.Manager", "GroupAdded")) { - _dbus_handle_dvb_id_bus_manager_group_added (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Manager", "GroupRemoved")) { - _dbus_handle_dvb_id_bus_manager_group_removed (user_data, connection, message); - } +static void dvb_id_bus_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "GroupAdded") == 0) { + _dbus_handle_dvb_id_bus_manager_group_added ((DVBIDBusManager*) proxy, parameters); + } else if (strcmp (signal_name, "GroupRemoved") == 0) { + _dbus_handle_dvb_id_bus_manager_group_removed ((DVBIDBusManager*) proxy, parameters); } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -static void dvb_id_bus_manager_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - return; - } - ((DVBIDBusManagerDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_manager_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_manager_dbus_proxy_parent_class)->dispose (self); +static void dvb_id_bus_manager_proxy_init (DVBIDBusManagerProxy* self) { } -static void dvb_id_bus_manager_dbus_proxy_class_init (DVBIDBusManagerDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_manager_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_manager_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_manager_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_manager_dbus_proxy_set_property; -} - - -static void dvb_id_bus_manager_dbus_proxy_init (DVBIDBusManagerDBusProxy* self) { -} - - -static gboolean dvb_id_bus_manager_dbus_proxy_GetScannerForDevice (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp183_; - dbus_uint32_t _tmp184_; - char* _opath; - const char* _tmp185_; - gchar* _dbusiface; - const char* _tmp186_; +static gboolean dvb_id_bus_manager_proxy_GetScannerForDevice (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + char* _vala_opath; + GVariant* _tmp120_; + gchar* _vala_dbusiface; + GVariant* _tmp121_; gboolean _result; - dbus_bool_t _tmp187_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp122_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetScannerForDevice"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "GetScannerForDevice"); - dbus_message_iter_init_append (_message, &_iter); - _tmp183_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp183_); - _tmp184_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp184_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp188_; - _edomain = DBUS_GERROR; - _tmp188_ = _dbus_error.name + 27; - if (strcmp (_tmp188_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp188_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp188_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp188_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp188_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp188_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp188_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp188_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp188_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp188_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp188_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp188_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp188_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp188_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp188_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp188_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp188_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp188_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp188_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp188_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp188_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp188_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp188_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp188_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp188_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp188_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp188_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp188_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp188_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp188_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp188_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp188_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp188_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "osb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "osb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp185_); - dbus_message_iter_next (&_iter); - _opath = g_strdup (_tmp185_); - *opath = _opath; - dbus_message_iter_get_basic (&_iter, &_tmp186_); - dbus_message_iter_next (&_iter); - _dbusiface = g_strdup (_tmp186_); - *dbusiface = _dbusiface; - dbus_message_iter_get_basic (&_iter, &_tmp187_); - dbus_message_iter_next (&_iter); - _result = _tmp187_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp120_ = g_variant_iter_next_value (&_reply_iter); + _vala_opath = g_variant_dup_string (_tmp120_, NULL); + g_variant_unref (_tmp120_); + *opath = _vala_opath; + _tmp121_ = g_variant_iter_next_value (&_reply_iter); + _vala_dbusiface = g_variant_dup_string (_tmp121_, NULL); + g_variant_unref (_tmp121_); + *dbusiface = _vala_dbusiface; + _tmp122_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp122_); + g_variant_unref (_tmp122_); + g_object_unref (_reply_message); return _result; } -static char** dvb_id_bus_manager_dbus_proxy_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static char** dvb_id_bus_manager_proxy_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; char** _result; int _result_length1; - char** _tmp189_; - int _tmp189__length; - int _tmp189__size; - int _tmp189__length1; - DBusMessageIter _tmp190_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp123_; + char** _tmp124_; + int _tmp124__length; + int _tmp124__size; + int _tmp124__length1; + GVariantIter _tmp125_; + GVariant* _tmp126_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetRegisteredDeviceGroups"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "GetRegisteredDeviceGroups"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp192_; - _edomain = DBUS_GERROR; - _tmp192_ = _dbus_error.name + 27; - if (strcmp (_tmp192_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp192_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp192_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp192_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp192_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp192_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp192_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp192_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp192_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp192_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp192_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp192_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp192_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp192_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp192_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp192_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp192_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp192_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp192_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp192_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp192_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp192_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp192_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp192_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp192_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp192_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp192_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp192_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp192_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp192_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp192_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp192_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp192_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "ao")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ao", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); _result_length1 = 0; - _tmp189_ = g_new (char*, 5); - _tmp189__length = 0; - _tmp189__size = 4; - _tmp189__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp190_); - for (; dbus_message_iter_get_arg_type (&_tmp190_); _tmp189__length1++) { - const char* _tmp191_; - if (_tmp189__size == _tmp189__length) { - _tmp189__size = 2 * _tmp189__size; - _tmp189_ = g_renew (char*, _tmp189_, _tmp189__size + 1); - } - dbus_message_iter_get_basic (&_tmp190_, &_tmp191_); - dbus_message_iter_next (&_tmp190_); - _tmp189_[_tmp189__length++] = g_strdup (_tmp191_); - } - _result_length1 = _tmp189__length1; - _tmp189_[_tmp189__length] = NULL; - dbus_message_iter_next (&_iter); - _result = _tmp189_; + _tmp123_ = g_variant_iter_next_value (&_reply_iter); + _tmp124_ = g_new (char*, 5); + _tmp124__length = 0; + _tmp124__size = 4; + _tmp124__length1 = 0; + g_variant_iter_init (&_tmp125_, _tmp123_); + for (; (_tmp126_ = g_variant_iter_next_value (&_tmp125_)) != NULL; _tmp124__length1++) { + if (_tmp124__size == _tmp124__length) { + _tmp124__size = 2 * _tmp124__size; + _tmp124_ = g_renew (char*, _tmp124_, _tmp124__size + 1); + } + _tmp124_[_tmp124__length++] = g_variant_dup_string (_tmp126_, NULL); + g_variant_unref (_tmp126_); + } + _result_length1 = _tmp124__length1; + _tmp124_[_tmp124__length] = NULL; + _result = _tmp124_; + g_variant_unref (_tmp123_); *result_length1 = _result_length1; - dbus_message_unref (_reply); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_manager_dbus_proxy_GetDeviceGroup (DVBIDBusManager* self, guint group_id, char** opath, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp193_; - char* _opath; - const char* _tmp194_; +static gboolean dvb_id_bus_manager_proxy_GetDeviceGroup (DVBIDBusManager* self, guint group_id, char** opath, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + char* _vala_opath; + GVariant* _tmp127_; gboolean _result; - dbus_bool_t _tmp195_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "GetDeviceGroup"); - dbus_message_iter_init_append (_message, &_iter); - _tmp193_ = group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp193_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp196_; - _edomain = DBUS_GERROR; - _tmp196_ = _dbus_error.name + 27; - if (strcmp (_tmp196_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp196_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp196_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp196_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp196_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp196_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp196_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp196_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp196_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp196_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp196_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp196_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp196_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp196_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp196_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp196_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp196_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp196_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp196_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp196_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp196_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp196_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp196_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp196_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp196_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp196_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp196_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp196_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp196_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp196_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp196_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp196_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp196_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp128_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetDeviceGroup"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (group_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "ob")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ob", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp194_); - dbus_message_iter_next (&_iter); - _opath = g_strdup (_tmp194_); - *opath = _opath; - dbus_message_iter_get_basic (&_iter, &_tmp195_); - dbus_message_iter_next (&_iter); - _result = _tmp195_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp127_ = g_variant_iter_next_value (&_reply_iter); + _vala_opath = g_variant_dup_string (_tmp127_, NULL); + g_variant_unref (_tmp127_); + *opath = _vala_opath; + _tmp128_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp128_); + g_variant_unref (_tmp128_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_manager_dbus_proxy_AddDeviceToNewGroup (DVBIDBusManager* self, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp197_; - dbus_uint32_t _tmp198_; - const char* _tmp199_; - const char* _tmp200_; - const char* _tmp201_; +static gboolean dvb_id_bus_manager_proxy_AddDeviceToNewGroup (DVBIDBusManager* self, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp202_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp129_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "AddDeviceToNewGroup"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (channels_conf)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (recordings_dir)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "AddDeviceToNewGroup"); - dbus_message_iter_init_append (_message, &_iter); - _tmp197_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp197_); - _tmp198_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp198_); - _tmp199_ = channels_conf; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp199_); - _tmp200_ = recordings_dir; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp200_); - _tmp201_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp201_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp203_; - _edomain = DBUS_GERROR; - _tmp203_ = _dbus_error.name + 27; - if (strcmp (_tmp203_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp203_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp203_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp203_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp203_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp203_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp203_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp203_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp203_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp203_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp203_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp203_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp203_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp203_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp203_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp203_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp203_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp203_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp203_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp203_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp203_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp203_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp203_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp203_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp203_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp203_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp203_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp203_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp203_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp203_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp203_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp203_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp203_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp202_); - dbus_message_iter_next (&_iter); - _result = _tmp202_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp129_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp129_); + g_variant_unref (_tmp129_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_manager_dbus_proxy_GetNameOfRegisteredDevice (DVBIDBusManager* self, guint adapter, guint frontend, gchar** name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp204_; - dbus_uint32_t _tmp205_; - gchar* _name; - const char* _tmp206_; +static gboolean dvb_id_bus_manager_proxy_GetNameOfRegisteredDevice (DVBIDBusManager* self, guint adapter, guint frontend, gchar** name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_name; + GVariant* _tmp130_; gboolean _result; - dbus_bool_t _tmp207_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "GetNameOfRegisteredDevice"); - dbus_message_iter_init_append (_message, &_iter); - _tmp204_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp204_); - _tmp205_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp205_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp208_; - _edomain = DBUS_GERROR; - _tmp208_ = _dbus_error.name + 27; - if (strcmp (_tmp208_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp208_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp208_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp208_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp208_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp208_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp208_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp208_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp208_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp208_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp208_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp208_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp208_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp208_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp208_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp208_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp208_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp208_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp208_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp208_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp208_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp208_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp208_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp208_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp208_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp208_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp208_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp208_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp208_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp208_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp208_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp208_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp208_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp131_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetNameOfRegisteredDevice"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp206_); - dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp206_); - *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp207_); - dbus_message_iter_next (&_iter); - _result = _tmp207_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp130_ = g_variant_iter_next_value (&_reply_iter); + _vala_name = g_variant_dup_string (_tmp130_, NULL); + g_variant_unref (_tmp130_); + *name = _vala_name; + _tmp131_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp131_); + g_variant_unref (_tmp131_); + g_object_unref (_reply_message); return _result; } -static gint dvb_id_bus_manager_dbus_proxy_GetDeviceGroupSize (DVBIDBusManager* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static gint dvb_id_bus_manager_proxy_GetDeviceGroupSize (DVBIDBusManager* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gint _result; - dbus_int32_t _tmp209_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return 0; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "GetDeviceGroupSize"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp210_; - _edomain = DBUS_GERROR; - _tmp210_ = _dbus_error.name + 27; - if (strcmp (_tmp210_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp210_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp210_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp210_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp210_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp210_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp210_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp210_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp210_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp210_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp210_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp210_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp210_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp210_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp210_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp210_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp210_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp210_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp210_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp210_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp210_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp210_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp210_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp210_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp210_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp210_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp210_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp210_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp210_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp210_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp210_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp210_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp210_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp132_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetDeviceGroupSize"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return 0; } - if (strcmp (dbus_message_get_signature (_reply), "i")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "i", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return 0; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp209_); - dbus_message_iter_next (&_iter); - _result = _tmp209_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp132_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_int32 (_tmp132_); + g_variant_unref (_tmp132_); + g_object_unref (_reply_message); return _result; } -static DVBChannelGroupInfo* dvb_id_bus_manager_dbus_proxy_GetChannelGroups (DVBIDBusManager* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static DVBChannelGroupInfo* dvb_id_bus_manager_proxy_GetChannelGroups (DVBIDBusManager* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; DVBChannelGroupInfo* _result; int _result_length1; - DVBChannelGroupInfo* _tmp211_; - int _tmp211__length; - int _tmp211__size; - int _tmp211__length1; - DBusMessageIter _tmp212_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp133_; + DVBChannelGroupInfo* _tmp134_; + int _tmp134__length; + int _tmp134__size; + int _tmp134__length1; + GVariantIter _tmp135_; + GVariant* _tmp136_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetChannelGroups"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "GetChannelGroups"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp217_; - _edomain = DBUS_GERROR; - _tmp217_ = _dbus_error.name + 27; - if (strcmp (_tmp217_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp217_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp217_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp217_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp217_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp217_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp217_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp217_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp217_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp217_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp217_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp217_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp217_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp217_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp217_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp217_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp217_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp217_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp217_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp217_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp217_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp217_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp217_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp217_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp217_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp217_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp217_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp217_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp217_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp217_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp217_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp217_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp217_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "a(is)")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "a(is)", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); _result_length1 = 0; - _tmp211_ = g_new (DVBChannelGroupInfo, 5); - _tmp211__length = 0; - _tmp211__size = 4; - _tmp211__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp212_); - for (; dbus_message_iter_get_arg_type (&_tmp212_); _tmp211__length1++) { - DVBChannelGroupInfo _tmp213_; - DBusMessageIter _tmp214_; - dbus_int32_t _tmp215_; - const char* _tmp216_; - if (_tmp211__size == _tmp211__length) { - _tmp211__size = 2 * _tmp211__size; - _tmp211_ = g_renew (DVBChannelGroupInfo, _tmp211_, _tmp211__size + 1); - } - dbus_message_iter_recurse (&_tmp212_, &_tmp214_); - dbus_message_iter_get_basic (&_tmp214_, &_tmp215_); - dbus_message_iter_next (&_tmp214_); - _tmp213_.id = _tmp215_; - dbus_message_iter_get_basic (&_tmp214_, &_tmp216_); - dbus_message_iter_next (&_tmp214_); - _tmp213_.name = g_strdup (_tmp216_); - dbus_message_iter_next (&_tmp212_); - _tmp211_[_tmp211__length++] = _tmp213_; - } - _result_length1 = _tmp211__length1; - dbus_message_iter_next (&_iter); - _result = _tmp211_; + _tmp133_ = g_variant_iter_next_value (&_reply_iter); + _tmp134_ = g_new (DVBChannelGroupInfo, 5); + _tmp134__length = 0; + _tmp134__size = 4; + _tmp134__length1 = 0; + g_variant_iter_init (&_tmp135_, _tmp133_); + for (; (_tmp136_ = g_variant_iter_next_value (&_tmp135_)) != NULL; _tmp134__length1++) { + DVBChannelGroupInfo _tmp137_; + GVariantIter _tmp138_; + GVariant* _tmp139_; + GVariant* _tmp140_; + if (_tmp134__size == _tmp134__length) { + _tmp134__size = 2 * _tmp134__size; + _tmp134_ = g_renew (DVBChannelGroupInfo, _tmp134_, _tmp134__size + 1); + } + g_variant_iter_init (&_tmp138_, _tmp136_); + _tmp139_ = g_variant_iter_next_value (&_tmp138_); + _tmp137_.id = g_variant_get_int32 (_tmp139_); + g_variant_unref (_tmp139_); + _tmp140_ = g_variant_iter_next_value (&_tmp138_); + _tmp137_.name = g_variant_dup_string (_tmp140_, NULL); + g_variant_unref (_tmp140_); + _tmp134_[_tmp134__length++] = _tmp137_; + g_variant_unref (_tmp136_); + } + _result_length1 = _tmp134__length1; + _result = _tmp134_; + g_variant_unref (_tmp133_); *result_length1 = _result_length1; - dbus_message_unref (_reply); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_manager_dbus_proxy_AddChannelGroup (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp218_; - gint _channel_group_id; - dbus_int32_t _tmp219_; +static gboolean dvb_id_bus_manager_proxy_AddChannelGroup (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gint _vala_channel_group_id; + GVariant* _tmp141_; gboolean _result; - dbus_bool_t _tmp220_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp142_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "AddChannelGroup"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "AddChannelGroup"); - dbus_message_iter_init_append (_message, &_iter); - _tmp218_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp218_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp221_; - _edomain = DBUS_GERROR; - _tmp221_ = _dbus_error.name + 27; - if (strcmp (_tmp221_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp221_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp221_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp221_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp221_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp221_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp221_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp221_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp221_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp221_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp221_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp221_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp221_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp221_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp221_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp221_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp221_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp221_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp221_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp221_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp221_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp221_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp221_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp221_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp221_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp221_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp221_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp221_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp221_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp221_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp221_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp221_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp221_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "ib")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ib", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp219_); - dbus_message_iter_next (&_iter); - _channel_group_id = _tmp219_; - *channel_group_id = _channel_group_id; - dbus_message_iter_get_basic (&_iter, &_tmp220_); - dbus_message_iter_next (&_iter); - _result = _tmp220_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp141_ = g_variant_iter_next_value (&_reply_iter); + _vala_channel_group_id = g_variant_get_int32 (_tmp141_); + g_variant_unref (_tmp141_); + *channel_group_id = _vala_channel_group_id; + _tmp142_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp142_); + g_variant_unref (_tmp142_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_manager_dbus_proxy_RemoveChannelGroup (DVBIDBusManager* self, gint channel_group_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_int32_t _tmp222_; +static gboolean dvb_id_bus_manager_proxy_RemoveChannelGroup (DVBIDBusManager* self, gint channel_group_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp223_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "RemoveChannelGroup"); - dbus_message_iter_init_append (_message, &_iter); - _tmp222_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp222_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp224_; - _edomain = DBUS_GERROR; - _tmp224_ = _dbus_error.name + 27; - if (strcmp (_tmp224_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp224_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp224_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp224_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp224_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp224_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp224_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp224_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp224_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp224_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp224_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp224_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp224_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp224_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp224_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp224_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp224_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp224_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp224_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp224_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp224_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp224_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp224_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp224_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp224_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp224_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp224_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp224_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp224_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp224_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp224_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp224_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp224_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp143_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "RemoveChannelGroup"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (channel_group_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp223_); - dbus_message_iter_next (&_iter); - _result = _tmp223_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp143_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp143_); + g_variant_unref (_tmp143_); + g_object_unref (_reply_message); return _result; } -static GHashTable** dvb_id_bus_manager_dbus_proxy_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; +static GHashTable** dvb_id_bus_manager_proxy_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; GHashTable** _result; int _result_length1; - GHashTable** _tmp225_; - int _tmp225__length; - int _tmp225__size; - int _tmp225__length1; - DBusMessageIter _tmp226_; - if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp144_; + GHashTable** _tmp145_; + int _tmp145__length; + int _tmp145__size; + int _tmp145__length1; + GVariantIter _tmp146_; + GVariant* _tmp147_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetDevices"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Manager", "GetDevices"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp232_; - _edomain = DBUS_GERROR; - _tmp232_ = _dbus_error.name + 27; - if (strcmp (_tmp232_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp232_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp232_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp232_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp232_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp232_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp232_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp232_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp232_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp232_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp232_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp232_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp232_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp232_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp232_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp232_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp232_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp232_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp232_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp232_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp232_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp232_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp232_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp232_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp232_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp232_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp232_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp232_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp232_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp232_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp232_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp232_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp232_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "aa{ss}")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aa{ss}", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); _result_length1 = 0; - _tmp225_ = g_new (GHashTable*, 5); - _tmp225__length = 0; - _tmp225__size = 4; - _tmp225__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp226_); - for (; dbus_message_iter_get_arg_type (&_tmp226_); _tmp225__length1++) { - GHashTable* _tmp227_; - DBusMessageIter _tmp228_; - DBusMessageIter _tmp229_; - if (_tmp225__size == _tmp225__length) { - _tmp225__size = 2 * _tmp225__size; - _tmp225_ = g_renew (GHashTable*, _tmp225_, _tmp225__size + 1); + _tmp144_ = g_variant_iter_next_value (&_reply_iter); + _tmp145_ = g_new (GHashTable*, 5); + _tmp145__length = 0; + _tmp145__size = 4; + _tmp145__length1 = 0; + g_variant_iter_init (&_tmp146_, _tmp144_); + for (; (_tmp147_ = g_variant_iter_next_value (&_tmp146_)) != NULL; _tmp145__length1++) { + GHashTable* _tmp148_; + GVariantIter _tmp149_; + GVariant* _tmp150_; + GVariant* _tmp151_; + if (_tmp145__size == _tmp145__length) { + _tmp145__size = 2 * _tmp145__size; + _tmp145_ = g_renew (GHashTable*, _tmp145_, _tmp145__size + 1); + } + _tmp148_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + g_variant_iter_init (&_tmp149_, _tmp147_); + while (g_variant_iter_loop (&_tmp149_, "{?*}", &_tmp150_, &_tmp151_)) { + g_hash_table_insert (_tmp148_, g_variant_dup_string (_tmp150_, NULL), g_variant_dup_string (_tmp151_, NULL)); + } + _tmp145_[_tmp145__length++] = _tmp148_; + g_variant_unref (_tmp147_); + } + _result_length1 = _tmp145__length1; + _tmp145_[_tmp145__length] = NULL; + _result = _tmp145_; + g_variant_unref (_tmp144_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_manager_proxy_GetAdapterInfo (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + DVBAdapterInfo _vala_info; + GVariant* _tmp152_; + DVBAdapterInfo _tmp153_; + GVariantIter _tmp154_; + GVariant* _tmp155_; + GVariant* _tmp156_; + gboolean _result; + GVariant* _tmp157_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Manager", "GetAdapterInfo"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (adapter)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frontend)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp152_ = g_variant_iter_next_value (&_reply_iter); + g_variant_iter_init (&_tmp154_, _tmp152_); + _tmp155_ = g_variant_iter_next_value (&_tmp154_); + _tmp153_.name = g_variant_dup_string (_tmp155_, NULL); + g_variant_unref (_tmp155_); + _tmp156_ = g_variant_iter_next_value (&_tmp154_); + _tmp153_.type = g_variant_dup_string (_tmp156_, NULL); + g_variant_unref (_tmp156_); + _vala_info = _tmp153_; + g_variant_unref (_tmp152_); + *info = _vala_info; + _tmp157_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp157_); + g_variant_unref (_tmp157_); + g_object_unref (_reply_message); + return _result; +} + + +static void dvb_id_bus_manager_proxy_dvb_id_bus_manager_interface_init (DVBIDBusManagerIface* iface) { + iface->GetScannerForDevice = dvb_id_bus_manager_proxy_GetScannerForDevice; + iface->GetRegisteredDeviceGroups = dvb_id_bus_manager_proxy_GetRegisteredDeviceGroups; + iface->GetDeviceGroup = dvb_id_bus_manager_proxy_GetDeviceGroup; + iface->AddDeviceToNewGroup = dvb_id_bus_manager_proxy_AddDeviceToNewGroup; + iface->GetNameOfRegisteredDevice = dvb_id_bus_manager_proxy_GetNameOfRegisteredDevice; + iface->GetDeviceGroupSize = dvb_id_bus_manager_proxy_GetDeviceGroupSize; + iface->GetChannelGroups = dvb_id_bus_manager_proxy_GetChannelGroups; + iface->AddChannelGroup = dvb_id_bus_manager_proxy_AddChannelGroup; + iface->RemoveChannelGroup = dvb_id_bus_manager_proxy_RemoveChannelGroup; + iface->GetDevices = dvb_id_bus_manager_proxy_GetDevices; + iface->GetAdapterInfo = dvb_id_bus_manager_proxy_GetAdapterInfo; +} + + +static void _dbus_dvb_id_bus_manager_GetScannerForDevice (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint adapter = 0U; + GVariant* _tmp158_; + guint frontend = 0U; + GVariant* _tmp159_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + char* opath = NULL; + gchar* dbusiface = NULL; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp158_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp158_); + g_variant_unref (_tmp158_); + _tmp159_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp159_); + g_variant_unref (_tmp159_); + result = dvb_id_bus_manager_GetScannerForDevice (self, adapter, frontend, &opath, &dbusiface, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (opath)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (dbusiface)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (opath); + _g_free0 (dbusiface); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + char** result; + int result_length1 = 0; + char** _tmp160_; + GVariantBuilder _tmp161_; + int _tmp162_; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_manager_GetRegisteredDeviceGroups (self, &result_length1, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp160_ = result; + g_variant_builder_init (&_tmp161_, G_VARIANT_TYPE ("ao")); + for (_tmp162_ = 0; _tmp162_ < result_length1; _tmp162_++) { + g_variant_builder_add_value (&_tmp161_, g_variant_new_object_path (*_tmp160_)); + _tmp160_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp161_)); + result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_GetDeviceGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint group_id = 0U; + GVariant* _tmp163_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + char* opath = NULL; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp163_ = g_variant_iter_next_value (&_arguments_iter); + group_id = g_variant_get_uint32 (_tmp163_); + g_variant_unref (_tmp163_); + result = dvb_id_bus_manager_GetDeviceGroup (self, group_id, &opath, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (opath)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (opath); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_AddDeviceToNewGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint adapter = 0U; + GVariant* _tmp164_; + guint frontend = 0U; + GVariant* _tmp165_; + gchar* channels_conf = NULL; + GVariant* _tmp166_; + gchar* recordings_dir = NULL; + GVariant* _tmp167_; + gchar* name = NULL; + GVariant* _tmp168_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp164_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp164_); + g_variant_unref (_tmp164_); + _tmp165_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp165_); + g_variant_unref (_tmp165_); + _tmp166_ = g_variant_iter_next_value (&_arguments_iter); + channels_conf = g_variant_dup_string (_tmp166_, NULL); + g_variant_unref (_tmp166_); + _tmp167_ = g_variant_iter_next_value (&_arguments_iter); + recordings_dir = g_variant_dup_string (_tmp167_, NULL); + g_variant_unref (_tmp167_); + _tmp168_ = g_variant_iter_next_value (&_arguments_iter); + name = g_variant_dup_string (_tmp168_, NULL); + g_variant_unref (_tmp168_); + result = dvb_id_bus_manager_AddDeviceToNewGroup (self, adapter, frontend, channels_conf, recordings_dir, name, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (channels_conf); + _g_free0 (recordings_dir); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_GetNameOfRegisteredDevice (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint adapter = 0U; + GVariant* _tmp169_; + guint frontend = 0U; + GVariant* _tmp170_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gchar* name = NULL; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp169_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp169_); + g_variant_unref (_tmp169_); + _tmp170_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp170_); + g_variant_unref (_tmp170_); + result = dvb_id_bus_manager_GetNameOfRegisteredDevice (self, adapter, frontend, &name, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (name)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_GetDeviceGroupSize (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gint result; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_manager_GetDeviceGroupSize (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_int32 (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _vala_DVBChannelGroupInfo_array_free (DVBChannelGroupInfo* array, gint array_length) { + if (array != NULL) { + int i; + for (i = 0; i < array_length; i = i + 1) { + dvb_channel_group_info_destroy (&array[i]); } - _tmp227_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); - dbus_message_iter_recurse (&_tmp226_, &_tmp228_); - while (dbus_message_iter_get_arg_type (&_tmp228_)) { + } + g_free (array); +} + + +static void _dbus_dvb_id_bus_manager_GetChannelGroups (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + DVBChannelGroupInfo* result; + int result_length1 = 0; + DVBChannelGroupInfo* _tmp171_; + GVariantBuilder _tmp172_; + int _tmp173_; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_manager_GetChannelGroups (self, &result_length1, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp171_ = result; + g_variant_builder_init (&_tmp172_, G_VARIANT_TYPE ("a(is)")); + for (_tmp173_ = 0; _tmp173_ < result_length1; _tmp173_++) { + GVariantBuilder _tmp174_; + g_variant_builder_init (&_tmp174_, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_tmp174_, g_variant_new_int32 ((*_tmp171_).id)); + g_variant_builder_add_value (&_tmp174_, g_variant_new_string ((*_tmp171_).name)); + g_variant_builder_add_value (&_tmp172_, g_variant_builder_end (&_tmp174_)); + _tmp171_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp172_)); + result = (_vala_DVBChannelGroupInfo_array_free (result, result_length1), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gchar* name = NULL; + GVariant* _tmp175_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gint channel_group_id = 0; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp175_ = g_variant_iter_next_value (&_arguments_iter); + name = g_variant_dup_string (_tmp175_, NULL); + g_variant_unref (_tmp175_); + result = dvb_id_bus_manager_AddChannelGroup (self, name, &channel_group_id, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_int32 (channel_group_id)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_RemoveChannelGroup (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gint channel_group_id = 0; + GVariant* _tmp176_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp176_ = g_variant_iter_next_value (&_arguments_iter); + channel_group_id = g_variant_get_int32 (_tmp176_); + g_variant_unref (_tmp176_); + result = dvb_id_bus_manager_RemoveChannelGroup (self, channel_group_id, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_GetDevices (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + GHashTable** result; + int result_length1 = 0; + GHashTable** _tmp177_; + GVariantBuilder _tmp178_; + int _tmp179_; + g_variant_iter_init (&_arguments_iter, parameters); + result = dvb_id_bus_manager_GetDevices (self, &result_length1, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp177_ = result; + g_variant_builder_init (&_tmp178_, G_VARIANT_TYPE ("aa{ss}")); + for (_tmp179_ = 0; _tmp179_ < result_length1; _tmp179_++) { + GVariantBuilder _tmp180_; + GHashTableIter _tmp181_; + gpointer _tmp182_; + gpointer _tmp183_; + g_hash_table_iter_init (&_tmp181_, *_tmp177_); + g_variant_builder_init (&_tmp180_, G_VARIANT_TYPE ("a{ss}")); + while (g_hash_table_iter_next (&_tmp181_, &_tmp182_, &_tmp183_)) { gchar* _key; gchar* _value; - const char* _tmp230_; - const char* _tmp231_; - dbus_message_iter_recurse (&_tmp228_, &_tmp229_); - dbus_message_iter_get_basic (&_tmp229_, &_tmp230_); - dbus_message_iter_next (&_tmp229_); - _key = g_strdup (_tmp230_); - dbus_message_iter_get_basic (&_tmp229_, &_tmp231_); - dbus_message_iter_next (&_tmp229_); - _value = g_strdup (_tmp231_); - g_hash_table_insert (_tmp227_, _key, _value); - dbus_message_iter_next (&_tmp228_); - } - dbus_message_iter_next (&_tmp226_); - _tmp225_[_tmp225__length++] = _tmp227_; + _key = (gchar*) _tmp182_; + _value = (gchar*) _tmp183_; + g_variant_builder_add (&_tmp180_, "{?*}", g_variant_new_string (_key), g_variant_new_string (_value)); + } + g_variant_builder_add_value (&_tmp178_, g_variant_builder_end (&_tmp180_)); + _tmp177_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp178_)); + result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_manager_GetAdapterInfo (DVBIDBusManager* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint adapter = 0U; + GVariant* _tmp184_; + guint frontend = 0U; + GVariant* _tmp185_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + DVBAdapterInfo info = {0}; + GVariantBuilder _tmp186_; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp184_ = g_variant_iter_next_value (&_arguments_iter); + adapter = g_variant_get_uint32 (_tmp184_); + g_variant_unref (_tmp184_); + _tmp185_ = g_variant_iter_next_value (&_arguments_iter); + frontend = g_variant_get_uint32 (_tmp185_); + g_variant_unref (_tmp185_); + result = dvb_id_bus_manager_GetAdapterInfo (self, adapter, frontend, &info, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_init (&_tmp186_, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_tmp186_, g_variant_new_string (info.name)); + g_variant_builder_add_value (&_tmp186_, g_variant_new_string (info.type)); + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp186_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + dvb_adapter_info_destroy (&info); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void dvb_id_bus_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "GetScannerForDevice") == 0) { + _dbus_dvb_id_bus_manager_GetScannerForDevice (object, parameters, invocation); + } else if (strcmp (method_name, "GetRegisteredDeviceGroups") == 0) { + _dbus_dvb_id_bus_manager_GetRegisteredDeviceGroups (object, parameters, invocation); + } else if (strcmp (method_name, "GetDeviceGroup") == 0) { + _dbus_dvb_id_bus_manager_GetDeviceGroup (object, parameters, invocation); + } else if (strcmp (method_name, "AddDeviceToNewGroup") == 0) { + _dbus_dvb_id_bus_manager_AddDeviceToNewGroup (object, parameters, invocation); + } else if (strcmp (method_name, "GetNameOfRegisteredDevice") == 0) { + _dbus_dvb_id_bus_manager_GetNameOfRegisteredDevice (object, parameters, invocation); + } else if (strcmp (method_name, "GetDeviceGroupSize") == 0) { + _dbus_dvb_id_bus_manager_GetDeviceGroupSize (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelGroups") == 0) { + _dbus_dvb_id_bus_manager_GetChannelGroups (object, parameters, invocation); + } else if (strcmp (method_name, "AddChannelGroup") == 0) { + _dbus_dvb_id_bus_manager_AddChannelGroup (object, parameters, invocation); + } else if (strcmp (method_name, "RemoveChannelGroup") == 0) { + _dbus_dvb_id_bus_manager_RemoveChannelGroup (object, parameters, invocation); + } else if (strcmp (method_name, "GetDevices") == 0) { + _dbus_dvb_id_bus_manager_GetDevices (object, parameters, invocation); + } else if (strcmp (method_name, "GetAdapterInfo") == 0) { + _dbus_dvb_id_bus_manager_GetAdapterInfo (object, parameters, invocation); + } else { + g_object_unref (invocation); } - _result_length1 = _tmp225__length1; - _tmp225_[_tmp225__length] = NULL; - dbus_message_iter_next (&_iter); - _result = _tmp225_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; } -static void dvb_id_bus_manager_dbus_proxy_dvb_id_bus_manager__interface_init (DVBIDBusManagerIface* iface) { - iface->GetScannerForDevice = dvb_id_bus_manager_dbus_proxy_GetScannerForDevice; - iface->GetRegisteredDeviceGroups = dvb_id_bus_manager_dbus_proxy_GetRegisteredDeviceGroups; - iface->GetDeviceGroup = dvb_id_bus_manager_dbus_proxy_GetDeviceGroup; - iface->AddDeviceToNewGroup = dvb_id_bus_manager_dbus_proxy_AddDeviceToNewGroup; - iface->GetNameOfRegisteredDevice = dvb_id_bus_manager_dbus_proxy_GetNameOfRegisteredDevice; - iface->GetDeviceGroupSize = dvb_id_bus_manager_dbus_proxy_GetDeviceGroupSize; - iface->GetChannelGroups = dvb_id_bus_manager_dbus_proxy_GetChannelGroups; - iface->AddChannelGroup = dvb_id_bus_manager_dbus_proxy_AddChannelGroup; - iface->RemoveChannelGroup = dvb_id_bus_manager_dbus_proxy_RemoveChannelGroup; - iface->GetDevices = dvb_id_bus_manager_dbus_proxy_GetDevices; +static GVariant* dvb_id_bus_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; } -static void _vala_dvb_id_bus_manager_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +static gboolean dvb_id_bus_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; +} + + +static void _dbus_dvb_id_bus_manager_group_added (GObject* _sender, guint group_id, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (group_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Manager", "GroupAdded", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_manager_group_removed (GObject* _sender, guint group_id, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (group_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Manager", "GroupRemoved", _arguments, NULL); +} + + +guint dvb_id_bus_manager_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_manager_dbus_interface_info), &_dvb_id_bus_manager_dbus_interface_vtable, data, _dvb_id_bus_manager_unregister_object, error); + if (!result) { + return 0; + } + g_signal_connect (object, "group-added", (GCallback) _dbus_dvb_id_bus_manager_group_added, data); + g_signal_connect (object, "group-removed", (GCallback) _dbus_dvb_id_bus_manager_group_removed, data); + return result; } -static void _vala_dvb_id_bus_manager_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dvb_id_bus_manager_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_manager_group_added, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_manager_group_removed, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusManager.vala gnome-dvb-daemon-0.2.7/src/dbus/IDBusManager.vala --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusManager.vala 2010-05-12 13:47:32.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusManager.vala 2011-12-09 11:14:10.000000000 +0000 @@ -25,7 +25,12 @@ public int id; public string name; } - + + public struct AdapterInfo { + public string name; + public string type; + } + [DBus (name = "org.gnome.DVB.Manager")] public interface IDBusManager : GLib.Object { @@ -42,19 +47,19 @@ * Get the object path of the channel scanner for this device. */ public abstract bool GetScannerForDevice (uint adapter, uint frontend, - out DBus.ObjectPath opath, out string dbusiface) throws DBus.Error; + out ObjectPath opath, out string dbusiface) throws DBusError; /** * @returns: Device groups' DBus path */ - public abstract DBus.ObjectPath[] GetRegisteredDeviceGroups () throws DBus.Error; + public abstract ObjectPath[] GetRegisteredDeviceGroups () throws DBusError; /** * @group_id: A group ID * @opath: Device group's DBus path * @returns: TRUE on success */ - public abstract bool GetDeviceGroup (uint group_id, out DBus.ObjectPath opath) throws DBus.Error; + public abstract bool GetDeviceGroup (uint group_id, out ObjectPath opath) throws DBusError; /** * @adapter: Number of the device's adapter @@ -70,7 +75,7 @@ * of the reference device). */ public abstract bool AddDeviceToNewGroup (uint adapter, uint frontend, - string channels_conf, string recordings_dir, string name) throws DBus.Error; + string channels_conf, string recordings_dir, string name) throws DBusError; /** * @adapter: Adapter of device @@ -82,36 +87,43 @@ * is returned. */ public abstract bool GetNameOfRegisteredDevice (uint adapter, uint frontend, - out string name) throws DBus.Error; + out string name) throws DBusError; /** * @returns: the numner of configured device groups */ - public abstract int GetDeviceGroupSize () throws DBus.Error; + public abstract int GetDeviceGroupSize () throws DBusError; /** * @returns: ID and name of each channel group */ - public abstract ChannelGroupInfo[] GetChannelGroups () throws DBus.Error; + public abstract ChannelGroupInfo[] GetChannelGroups () throws DBusError; /** * @name: Name of the new group * @channel_group_id: ID of the ChannelGroup * @returns: TRUE on success */ - public abstract bool AddChannelGroup (string name, out int channel_group_id) throws DBus.Error; + public abstract bool AddChannelGroup (string name, out int channel_group_id) throws DBusError; /** * @channel_group_id: ID of the ChannelGroup * @returns: TRUE on success */ - public abstract bool RemoveChannelGroup (int channel_group_id) throws DBus.Error; + public abstract bool RemoveChannelGroup (int channel_group_id) throws DBusError; /** * @returns: informations about all connected * devices retrieved via udev */ - public abstract GLib.HashTable[] GetDevices () throws DBus.Error; + public abstract GLib.HashTable[] GetDevices () throws DBusError; + + /** + * @info: type and name of adapter + * @returns: TRUE on success + */ + public abstract bool GetAdapterInfo (uint adapter, uint frontend, + out AdapterInfo info) throws DBusError; } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecorder.c gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecorder.c --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecorder.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecorder.c 2011-12-09 11:14:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusRecorder.c generated by valac 0.11.3, the Vala compiler +/* IDBusRecorder.c generated by valac 0.14.0, the Vala compiler * generated from IDBusRecorder.vala, do not modify */ /* @@ -24,9 +24,7 @@ #include #include #include -#include -#include -#include +#include #define DVB_TYPE_TIMER_INFO (dvb_timer_info_get_type ()) @@ -41,10 +39,11 @@ typedef struct _DVBIDBusRecorder DVBIDBusRecorder; typedef struct _DVBIDBusRecorderIface DVBIDBusRecorderIface; +#define DVB_TYPE_ID_BUS_RECORDER_PROXY (dvb_id_bus_recorder_proxy_get_type ()) + #define DVB_TYPE_OVERLAP_TYPE (dvb_overlap_type_get_type ()) -typedef struct _DBusObjectVTable _DBusObjectVTable; -typedef struct _DVBIDBusRecorderDBusProxy DVBIDBusRecorderDBusProxy; -typedef DBusGProxyClass DVBIDBusRecorderDBusProxyClass; +typedef GDBusProxy DVBIDBusRecorderProxy; +typedef GDBusProxyClass DVBIDBusRecorderProxyClass; struct _DVBTimerInfo { guint32 id; @@ -82,15 +81,6 @@ DVBOverlapType (*HasTimerForEvent) (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusRecorderDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - GType dvb_timer_info_get_type (void) G_GNUC_CONST; @@ -98,7 +88,8 @@ void dvb_timer_info_free (DVBTimerInfo* self); void dvb_timer_info_copy (const DVBTimerInfo* self, DVBTimerInfo* dest); void dvb_timer_info_destroy (DVBTimerInfo* self); -DVBIDBusRecorder* dvb_id_bus_recorder_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_recorder_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_recorder_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_overlap_type_get_type (void) G_GNUC_CONST; GType dvb_id_bus_recorder_get_type (void) G_GNUC_CONST; gboolean dvb_id_bus_recorder_AddTimer (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); @@ -119,77 +110,214 @@ gboolean dvb_id_bus_recorder_HasTimer (DVBIDBusRecorder* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error); DVBOverlapType dvb_id_bus_recorder_HasTimerForEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error); static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_recorder_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_recorder_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_recorder_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_introspect (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_property_get_all (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_AddTimer (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_AddTimerWithMargin (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_AddTimerForEPGEvent (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_DeleteTimer (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetTimers (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetStartTime (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_SetStartTime (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetEndTime (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetDuration (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_SetDuration (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetChannelName (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetTitle (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetAllInformations (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetActiveTimers (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_HasTimer (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recorder_HasTimerForEvent (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_recorder_recording_started (GObject* _sender, guint32 timer_id, DBusConnection* _connection); -static void _dbus_dvb_id_bus_recorder_recording_finished (GObject* _sender, guint32 recording_id, DBusConnection* _connection); -static void _dbus_dvb_id_bus_recorder_changed (GObject* _sender, guint32 timer_id, guint type, DBusConnection* _connection); -GType dvb_id_bus_recorder_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_recorder_recording_started (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_recorder_recording_finished (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_recorder_changed (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_recorder_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_RECORDER_DBUS_PROXY_DUMMY_PROPERTY -}; -static gboolean dvb_id_bus_recorder_dbus_proxy_AddTimer (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_AddTimerWithMargin (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_AddTimerForEPGEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_DeleteTimer (DVBIDBusRecorder* self, guint32 timer_id, GError** error); -static guint32* dvb_id_bus_recorder_dbus_proxy_GetTimers (DVBIDBusRecorder* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_GetStartTime (DVBIDBusRecorder* self, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_SetStartTime (DVBIDBusRecorder* self, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_GetEndTime (DVBIDBusRecorder* self, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_GetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint* duration, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_SetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint duration, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_GetChannelName (DVBIDBusRecorder* self, guint32 timer_id, gchar** name, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_GetTitle (DVBIDBusRecorder* self, guint32 timer_id, gchar** title, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_GetAllInformations (DVBIDBusRecorder* self, guint32 timer_id, DVBTimerInfo* info, GError** error); -static guint32* dvb_id_bus_recorder_dbus_proxy_GetActiveTimers (DVBIDBusRecorder* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error); -static gboolean dvb_id_bus_recorder_dbus_proxy_HasTimer (DVBIDBusRecorder* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error); -static DVBOverlapType dvb_id_bus_recorder_dbus_proxy_HasTimerForEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error); -static void dvb_id_bus_recorder_dbus_proxy_dvb_id_bus_recorder__interface_init (DVBIDBusRecorderIface* iface); -static void _vala_dvb_id_bus_recorder_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_recorder_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); - -static const DBusObjectPathVTable _dvb_id_bus_recorder_dbus_path_vtable = {_dvb_id_bus_recorder_dbus_unregister, dvb_id_bus_recorder_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_recorder_dbus_vtable = {dvb_id_bus_recorder_dbus_register_object}; +static void dvb_id_bus_recorder_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_recorder_recording_started (DVBIDBusRecorder* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_recorder_recording_finished (DVBIDBusRecorder* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_recorder_changed (DVBIDBusRecorder* self, GVariant* parameters); +static gboolean dvb_id_bus_recorder_proxy_AddTimer (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); +static gboolean dvb_id_bus_recorder_proxy_AddTimerWithMargin (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); +static gboolean dvb_id_bus_recorder_proxy_AddTimerForEPGEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error); +static gboolean dvb_id_bus_recorder_proxy_DeleteTimer (DVBIDBusRecorder* self, guint32 timer_id, GError** error); +static guint32* dvb_id_bus_recorder_proxy_GetTimers (DVBIDBusRecorder* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_recorder_proxy_GetStartTime (DVBIDBusRecorder* self, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error); +static gboolean dvb_id_bus_recorder_proxy_SetStartTime (DVBIDBusRecorder* self, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error); +static gboolean dvb_id_bus_recorder_proxy_GetEndTime (DVBIDBusRecorder* self, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error); +static gboolean dvb_id_bus_recorder_proxy_GetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint* duration, GError** error); +static gboolean dvb_id_bus_recorder_proxy_SetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint duration, GError** error); +static gboolean dvb_id_bus_recorder_proxy_GetChannelName (DVBIDBusRecorder* self, guint32 timer_id, gchar** name, GError** error); +static gboolean dvb_id_bus_recorder_proxy_GetTitle (DVBIDBusRecorder* self, guint32 timer_id, gchar** title, GError** error); +static gboolean dvb_id_bus_recorder_proxy_GetAllInformations (DVBIDBusRecorder* self, guint32 timer_id, DVBTimerInfo* info, GError** error); +static guint32* dvb_id_bus_recorder_proxy_GetActiveTimers (DVBIDBusRecorder* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_recorder_proxy_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error); +static gboolean dvb_id_bus_recorder_proxy_HasTimer (DVBIDBusRecorder* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error); +static DVBOverlapType dvb_id_bus_recorder_proxy_HasTimerForEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error); +static void dvb_id_bus_recorder_proxy_dvb_id_bus_recorder_interface_init (DVBIDBusRecorderIface* iface); +static void _dbus_dvb_id_bus_recorder_AddTimer (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_AddTimerWithMargin (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_AddTimerForEPGEvent (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_DeleteTimer (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetTimers (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetStartTime (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_SetStartTime (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetEndTime (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetDuration (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_SetDuration (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetChannelName (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetTitle (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetAllInformations (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_GetActiveTimers (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_HasTimer (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recorder_HasTimerForEvent (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_recorder_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_recorder_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_recorder_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_dvb_id_bus_recorder_recording_started (GObject* _sender, guint32 timer_id, gpointer* _data); +static void _dbus_dvb_id_bus_recorder_recording_finished (GObject* _sender, guint32 recording_id, gpointer* _data); +static void _dbus_dvb_id_bus_recorder_changed (GObject* _sender, guint32 timer_id, guint type, gpointer* _data); +static void _dvb_id_bus_recorder_unregister_object (gpointer user_data); + +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_channel = {-1, "channel", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_year = {-1, "start_year", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_month = {-1, "start_month", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_day = {-1, "start_day", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_hour = {-1, "start_hour", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_minute = {-1, "start_minute", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_duration = {-1, "duration", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimer_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_AddTimer_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_AddTimer_channel, &_dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_year, &_dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_month, &_dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_day, &_dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_hour, &_dvb_id_bus_recorder_dbus_arg_info_AddTimer_start_minute, &_dvb_id_bus_recorder_dbus_arg_info_AddTimer_duration, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_AddTimer_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_AddTimer_timer_id, &_dvb_id_bus_recorder_dbus_arg_info_AddTimer_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_AddTimer = {-1, "AddTimer", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_AddTimer_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_AddTimer_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_channel = {-1, "channel", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_year = {-1, "start_year", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_month = {-1, "start_month", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_day = {-1, "start_day", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_hour = {-1, "start_hour", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_minute = {-1, "start_minute", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_duration = {-1, "duration", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_channel, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_year, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_month, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_day, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_hour, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_start_minute, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_duration, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_timer_id, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_AddTimerWithMargin = {-1, "AddTimerWithMargin", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_AddTimerWithMargin_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_channel_sid = {-1, "channel_sid", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_event_id, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_channel_sid, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_timer_id, &_dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_AddTimerForEPGEvent = {-1, "AddTimerForEPGEvent", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_AddTimerForEPGEvent_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_DeleteTimer = {-1, "DeleteTimer", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_DeleteTimer_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetTimers_result = {-1, "result", "au"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetTimers_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetTimers_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetTimers_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetTimers = {-1, "GetTimers", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetTimers_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetTimers_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetStartTime_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetStartTime_start_time = {-1, "start_time", "au"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetStartTime_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetStartTime_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetStartTime_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetStartTime_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetStartTime_start_time, &_dvb_id_bus_recorder_dbus_arg_info_GetStartTime_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetStartTime = {-1, "GetStartTime", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetStartTime_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetStartTime_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_year = {-1, "start_year", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_month = {-1, "start_month", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_day = {-1, "start_day", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_hour = {-1, "start_hour", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_minute = {-1, "start_minute", "i"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_timer_id, &_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_year, &_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_month, &_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_day, &_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_hour, &_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_start_minute, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_SetStartTime_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_SetStartTime = {-1, "SetStartTime", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_SetStartTime_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetEndTime_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetEndTime_end_time = {-1, "end_time", "au"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetEndTime_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetEndTime_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetEndTime_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetEndTime_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetEndTime_end_time, &_dvb_id_bus_recorder_dbus_arg_info_GetEndTime_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetEndTime = {-1, "GetEndTime", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetEndTime_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetEndTime_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetDuration_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetDuration_duration = {-1, "duration", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetDuration_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetDuration_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetDuration_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetDuration_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetDuration_duration, &_dvb_id_bus_recorder_dbus_arg_info_GetDuration_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetDuration = {-1, "GetDuration", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetDuration_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetDuration_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetDuration_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetDuration_duration = {-1, "duration", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_SetDuration_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_SetDuration_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_SetDuration_timer_id, &_dvb_id_bus_recorder_dbus_arg_info_SetDuration_duration, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_SetDuration_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_SetDuration_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_SetDuration = {-1, "SetDuration", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_SetDuration_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_SetDuration_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetChannelName_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetChannelName_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetChannelName_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetChannelName_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetChannelName_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetChannelName_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetChannelName_name, &_dvb_id_bus_recorder_dbus_arg_info_GetChannelName_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetChannelName = {-1, "GetChannelName", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetChannelName_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetChannelName_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetTitle_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetTitle_title = {-1, "title", "s"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetTitle_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetTitle_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetTitle_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetTitle_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetTitle_title, &_dvb_id_bus_recorder_dbus_arg_info_GetTitle_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetTitle = {-1, "GetTitle", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetTitle_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetTitle_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_info = {-1, "info", "(uubss)"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_info, &_dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetAllInformations = {-1, "GetAllInformations", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetAllInformations_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_GetActiveTimers_result = {-1, "result", "au"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetActiveTimers_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_GetActiveTimers_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_GetActiveTimers_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_GetActiveTimers = {-1, "GetActiveTimers", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetActiveTimers_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_GetActiveTimers_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_timer_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_IsTimerActive = {-1, "IsTimerActive", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_IsTimerActive_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_year = {-1, "start_year", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_month = {-1, "start_month", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_day = {-1, "start_day", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_hour = {-1, "start_hour", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_minute = {-1, "start_minute", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimer_duration = {-1, "duration", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimer_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_HasTimer_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_year, &_dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_month, &_dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_day, &_dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_hour, &_dvb_id_bus_recorder_dbus_arg_info_HasTimer_start_minute, &_dvb_id_bus_recorder_dbus_arg_info_HasTimer_duration, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_HasTimer_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_HasTimer_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_HasTimer = {-1, "HasTimer", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_HasTimer_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_HasTimer_out)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_channel_sid = {-1, "channel_sid", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_result = {-1, "result", "i"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_in[] = {&_dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_event_id, &_dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_channel_sid, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_out[] = {&_dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recorder_dbus_method_info_HasTimerForEvent = {-1, "HasTimerForEvent", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_in), (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_HasTimerForEvent_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_recorder_dbus_method_info[] = {&_dvb_id_bus_recorder_dbus_method_info_AddTimer, &_dvb_id_bus_recorder_dbus_method_info_AddTimerWithMargin, &_dvb_id_bus_recorder_dbus_method_info_AddTimerForEPGEvent, &_dvb_id_bus_recorder_dbus_method_info_DeleteTimer, &_dvb_id_bus_recorder_dbus_method_info_GetTimers, &_dvb_id_bus_recorder_dbus_method_info_GetStartTime, &_dvb_id_bus_recorder_dbus_method_info_SetStartTime, &_dvb_id_bus_recorder_dbus_method_info_GetEndTime, &_dvb_id_bus_recorder_dbus_method_info_GetDuration, &_dvb_id_bus_recorder_dbus_method_info_SetDuration, &_dvb_id_bus_recorder_dbus_method_info_GetChannelName, &_dvb_id_bus_recorder_dbus_method_info_GetTitle, &_dvb_id_bus_recorder_dbus_method_info_GetAllInformations, &_dvb_id_bus_recorder_dbus_method_info_GetActiveTimers, &_dvb_id_bus_recorder_dbus_method_info_IsTimerActive, &_dvb_id_bus_recorder_dbus_method_info_HasTimer, &_dvb_id_bus_recorder_dbus_method_info_HasTimerForEvent, NULL}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_recording_started_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_recording_started[] = {&_dvb_id_bus_recorder_dbus_arg_info_recording_started_timer_id, NULL}; +static const GDBusSignalInfo _dvb_id_bus_recorder_dbus_signal_info_recording_started = {-1, "RecordingStarted", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_recording_started)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_recording_finished_recording_id = {-1, "recording_id", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_recording_finished[] = {&_dvb_id_bus_recorder_dbus_arg_info_recording_finished_recording_id, NULL}; +static const GDBusSignalInfo _dvb_id_bus_recorder_dbus_signal_info_recording_finished = {-1, "RecordingFinished", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_recording_finished)}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_changed_timer_id = {-1, "timer_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recorder_dbus_arg_info_changed_type = {-1, "type", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_recorder_dbus_arg_info_changed[] = {&_dvb_id_bus_recorder_dbus_arg_info_changed_timer_id, &_dvb_id_bus_recorder_dbus_arg_info_changed_type, NULL}; +static const GDBusSignalInfo _dvb_id_bus_recorder_dbus_signal_info_changed = {-1, "Changed", (GDBusArgInfo **) (&_dvb_id_bus_recorder_dbus_arg_info_changed)}; +static const GDBusSignalInfo * const _dvb_id_bus_recorder_dbus_signal_info[] = {&_dvb_id_bus_recorder_dbus_signal_info_recording_started, &_dvb_id_bus_recorder_dbus_signal_info_recording_finished, &_dvb_id_bus_recorder_dbus_signal_info_changed, NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_recorder_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_recorder_dbus_interface_info = {-1, "org.gnome.DVB.Recorder", (GDBusMethodInfo **) (&_dvb_id_bus_recorder_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_recorder_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_recorder_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_recorder_dbus_interface_vtable = {dvb_id_bus_recorder_dbus_interface_method_call, dvb_id_bus_recorder_dbus_interface_get_property, dvb_id_bus_recorder_dbus_interface_set_property}; void dvb_timer_info_copy (const DVBTimerInfo* self, DVBTimerInfo* dest) { - dest->id = self->id; - dest->duration = self->duration; - dest->active = self->active; - dest->channel_name = g_strdup (self->channel_name); - dest->title = g_strdup (self->title); + guint32 _tmp0_; + guint _tmp1_; + gboolean _tmp2_; + const gchar* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + const gchar* _tmp6_; + _tmp0_ = (*self).id; + (*dest).id = _tmp0_; + _tmp1_ = (*self).duration; + (*dest).duration = _tmp1_; + _tmp2_ = (*self).active; + (*dest).active = _tmp2_; + _tmp3_ = (*self).channel_name; + _tmp4_ = g_strdup (_tmp3_); + _g_free0 ((*dest).channel_name); + (*dest).channel_name = _tmp4_; + _tmp5_ = (*self).title; + _tmp6_ = g_strdup (_tmp5_); + _g_free0 ((*dest).title); + (*dest).title = _tmp6_; } void dvb_timer_info_destroy (DVBTimerInfo* self) { - _g_free0 (self->channel_name); - _g_free0 (self->title); + _g_free0 ((*self).channel_name); + _g_free0 ((*self).title); } @@ -233,6 +361,7 @@ * Add a new timer */ gboolean dvb_id_bus_recorder_AddTimer (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->AddTimer (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration, timer_id, error); } @@ -242,6 +371,7 @@ * after the timer. */ gboolean dvb_id_bus_recorder_AddTimerWithMargin (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->AddTimerWithMargin (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration, timer_id, error); } @@ -254,6 +384,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_AddTimerForEPGEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->AddTimerForEPGEvent (self, event_id, channel_sid, timer_id, error); } @@ -266,6 +397,7 @@ * active timer recording is aborted. */ gboolean dvb_id_bus_recorder_DeleteTimer (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->DeleteTimer (self, timer_id, error); } @@ -275,6 +407,7 @@ * @returns: A list of all timer ids */ guint32* dvb_id_bus_recorder_GetTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetTimers (self, result_length1, error); } @@ -286,6 +419,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_GetStartTime (DVBIDBusRecorder* self, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetStartTime (self, timer_id, start_time, start_time_length1, error); } @@ -301,6 +435,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_SetStartTime (DVBIDBusRecorder* self, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->SetStartTime (self, timer_id, start_year, start_month, start_day, start_hour, start_minute, error); } @@ -311,6 +446,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_GetEndTime (DVBIDBusRecorder* self, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetEndTime (self, timer_id, end_time, end_time_length1, error); } @@ -322,6 +458,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_GetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint* duration, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetDuration (self, timer_id, duration, error); } @@ -332,6 +469,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_SetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint duration, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->SetDuration (self, timer_id, duration, error); } @@ -343,6 +481,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_GetChannelName (DVBIDBusRecorder* self, guint32 timer_id, gchar** name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetChannelName (self, timer_id, name, error); } @@ -355,6 +494,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recorder_GetTitle (DVBIDBusRecorder* self, guint32 timer_id, gchar** title, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetTitle (self, timer_id, title, error); } @@ -367,6 +507,7 @@ * about a particular timer at once */ gboolean dvb_id_bus_recorder_GetAllInformations (DVBIDBusRecorder* self, guint32 timer_id, DVBTimerInfo* info, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetAllInformations (self, timer_id, info, error); } @@ -375,6 +516,7 @@ * @returns: The currently active timers */ guint32* dvb_id_bus_recorder_GetActiveTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetActiveTimers (self, result_length1, error); } @@ -384,6 +526,7 @@ * @returns: TRUE if timer is currently active */ gboolean dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->IsTimerActive (self, timer_id, error); } @@ -393,6 +536,7 @@ * period of time */ gboolean dvb_id_bus_recorder_HasTimer (DVBIDBusRecorder* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->HasTimer (self, start_year, start_month, start_day, start_hour, start_minute, duration, error); } @@ -401,6 +545,7 @@ * Checks if a timer overlaps with the given event */ DVBOverlapType dvb_id_bus_recorder_HasTimerForEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error) { + g_return_val_if_fail (self != NULL, 0); return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->HasTimerForEvent (self, event_id, channel_sid, error); } @@ -409,7 +554,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint32 arg_1, guint arg_2, gpointer data2); register GMarshalFunc_VOID__UINT_UINT callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -424,5121 +570,1703 @@ } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); +static void dvb_id_bus_recorder_base_init (DVBIDBusRecorderIface * iface) { + static gboolean initialized = FALSE; + if (!initialized) { + initialized = TRUE; + g_signal_new ("recording_started", DVB_TYPE_ID_BUS_RECORDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); + g_signal_new ("recording_finished", DVB_TYPE_ID_BUS_RECORDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); + /** + * @type: 0: added, 1: deleted, 2: updated + */ + g_signal_new ("changed", DVB_TYPE_ID_BUS_RECORDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); + } +} + + +GType dvb_id_bus_recorder_get_type (void) { + static volatile gsize dvb_id_bus_recorder_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_recorder_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusRecorderIface), (GBaseInitFunc) dvb_id_bus_recorder_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_id_bus_recorder_type_id; + dvb_id_bus_recorder_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusRecorder", &g_define_type_info, 0); + g_type_interface_add_prerequisite (dvb_id_bus_recorder_type_id, G_TYPE_OBJECT); + g_type_set_qdata (dvb_id_bus_recorder_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_recorder_proxy_get_type); + g_type_set_qdata (dvb_id_bus_recorder_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.Recorder"); + g_type_set_qdata (dvb_id_bus_recorder_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_recorder_register_object); + g_once_init_leave (&dvb_id_bus_recorder_type_id__volatile, dvb_id_bus_recorder_type_id); } + return dvb_id_bus_recorder_type_id__volatile; +} + + +G_DEFINE_TYPE_EXTENDED (DVBIDBusRecorderProxy, dvb_id_bus_recorder_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_RECORDER, dvb_id_bus_recorder_proxy_dvb_id_bus_recorder_interface_init) ) +static void dvb_id_bus_recorder_proxy_class_init (DVBIDBusRecorderProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_recorder_proxy_g_signal; +} + + +static void _dbus_handle_dvb_id_bus_recorder_recording_started (DVBIDBusRecorder* self, GVariant* parameters) { + GVariantIter _arguments_iter; + guint32 timer_id = 0U; + GVariant* _tmp187_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp187_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp187_); + g_variant_unref (_tmp187_); + g_signal_emit_by_name (self, "recording-started", timer_id); } -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); +static void _dbus_handle_dvb_id_bus_recorder_recording_finished (DVBIDBusRecorder* self, GVariant* parameters) { + GVariantIter _arguments_iter; + guint32 recording_id = 0U; + GVariant* _tmp188_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp188_ = g_variant_iter_next_value (&_arguments_iter); + recording_id = g_variant_get_uint32 (_tmp188_); + g_variant_unref (_tmp188_); + g_signal_emit_by_name (self, "recording-finished", recording_id); } -void _dvb_id_bus_recorder_dbus_unregister (DBusConnection* connection, void* _user_data_) { +static void _dbus_handle_dvb_id_bus_recorder_changed (DVBIDBusRecorder* self, GVariant* parameters) { + GVariantIter _arguments_iter; + guint32 timer_id = 0U; + GVariant* _tmp189_; + guint type = 0U; + GVariant* _tmp190_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp189_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp189_); + g_variant_unref (_tmp189_); + _tmp190_ = g_variant_iter_next_value (&_arguments_iter); + type = g_variant_get_uint32 (_tmp190_); + g_variant_unref (_tmp190_); + g_signal_emit_by_name (self, "changed", timer_id, type); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_introspect (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); +static void dvb_id_bus_recorder_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "RecordingStarted") == 0) { + _dbus_handle_dvb_id_bus_recorder_recording_started ((DVBIDBusRecorder*) proxy, parameters); + } else if (strcmp (signal_name, "RecordingFinished") == 0) { + _dbus_handle_dvb_id_bus_recorder_recording_finished ((DVBIDBusRecorder*) proxy, parameters); + } else if (strcmp (signal_name, "Changed") == 0) { + _dbus_handle_dvb_id_bus_recorder_changed ((DVBIDBusRecorder*) proxy, parameters); } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + + +static void dvb_id_bus_recorder_proxy_init (DVBIDBusRecorderProxy* self) { +} + + +static gboolean dvb_id_bus_recorder_proxy_AddTimer (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32 _vala_timer_id; + GVariant* _tmp191_; + gboolean _result; + GVariant* _tmp192_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "AddTimer"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_year)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_month)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_day)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_hour)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_minute)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (duration)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp191_ = g_variant_iter_next_value (&_reply_iter); + _vala_timer_id = g_variant_get_uint32 (_tmp191_); + g_variant_unref (_tmp191_); + *timer_id = _vala_timer_id; + _tmp192_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp192_); + g_variant_unref (_tmp192_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_AddTimerWithMargin (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32 _vala_timer_id; + GVariant* _tmp193_; + gboolean _result; + GVariant* _tmp194_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "AddTimerWithMargin"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_year)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_month)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_day)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_hour)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_minute)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (duration)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp193_ = g_variant_iter_next_value (&_reply_iter); + _vala_timer_id = g_variant_get_uint32 (_tmp193_); + g_variant_unref (_tmp193_); + *timer_id = _vala_timer_id; + _tmp194_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp194_); + g_variant_unref (_tmp194_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_AddTimerForEPGEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32 _vala_timer_id; + GVariant* _tmp195_; + gboolean _result; + GVariant* _tmp196_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "AddTimerForEPGEvent"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_sid)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp195_ = g_variant_iter_next_value (&_reply_iter); + _vala_timer_id = g_variant_get_uint32 (_tmp195_); + g_variant_unref (_tmp195_); + *timer_id = _vala_timer_id; + _tmp196_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp196_); + g_variant_unref (_tmp196_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_DeleteTimer (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp197_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "DeleteTimer"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp197_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp197_); + g_variant_unref (_tmp197_); + g_object_unref (_reply_message); + return _result; +} + + +static guint32* dvb_id_bus_recorder_proxy_GetTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32* _result; + int _result_length1; + GVariant* _tmp198_; + guint32* _tmp199_; + int _tmp199__length; + int _tmp199__size; + int _tmp199__length1; + GVariantIter _tmp200_; + GVariant* _tmp201_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetTimers"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp198_ = g_variant_iter_next_value (&_reply_iter); + _tmp199_ = g_new (guint32, 5); + _tmp199__length = 0; + _tmp199__size = 4; + _tmp199__length1 = 0; + g_variant_iter_init (&_tmp200_, _tmp198_); + for (; (_tmp201_ = g_variant_iter_next_value (&_tmp200_)) != NULL; _tmp199__length1++) { + if (_tmp199__size == _tmp199__length) { + _tmp199__size = 2 * _tmp199__size; + _tmp199_ = g_renew (guint32, _tmp199_, _tmp199__size + 1); + } + _tmp199_[_tmp199__length++] = g_variant_get_uint32 (_tmp201_); + g_variant_unref (_tmp201_); + } + _result_length1 = _tmp199__length1; + _result = _tmp199_; + g_variant_unref (_tmp198_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_property_get_all (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.Recorder") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; +static gboolean dvb_id_bus_recorder_proxy_GetStartTime (DVBIDBusRecorder* self, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32* _vala_start_time; + int _vala_start_time_length1; + GVariant* _tmp202_; + guint32* _tmp203_; + int _tmp203__length; + int _tmp203__size; + int _tmp203__length1; + GVariantIter _tmp204_; + GVariant* _tmp205_; + gboolean _result; + GVariant* _tmp206_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetStartTime"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _vala_start_time_length1 = 0; + _tmp202_ = g_variant_iter_next_value (&_reply_iter); + _tmp203_ = g_new (guint32, 5); + _tmp203__length = 0; + _tmp203__size = 4; + _tmp203__length1 = 0; + g_variant_iter_init (&_tmp204_, _tmp202_); + for (; (_tmp205_ = g_variant_iter_next_value (&_tmp204_)) != NULL; _tmp203__length1++) { + if (_tmp203__size == _tmp203__length) { + _tmp203__size = 2 * _tmp203__size; + _tmp203_ = g_renew (guint32, _tmp203_, _tmp203__size + 1); + } + _tmp203_[_tmp203__length++] = g_variant_get_uint32 (_tmp205_); + g_variant_unref (_tmp205_); + } + _vala_start_time_length1 = _tmp203__length1; + _vala_start_time = _tmp203_; + g_variant_unref (_tmp202_); + *start_time = _vala_start_time; + *start_time_length1 = _vala_start_time_length1; + _tmp206_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp206_); + g_variant_unref (_tmp206_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_SetStartTime (DVBIDBusRecorder* self, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp207_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "SetStartTime"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_year)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_month)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_day)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_hour)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (start_minute)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp207_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp207_); + g_variant_unref (_tmp207_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_GetEndTime (DVBIDBusRecorder* self, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint* _vala_end_time; + int _vala_end_time_length1; + GVariant* _tmp208_; + guint* _tmp209_; + int _tmp209__length; + int _tmp209__size; + int _tmp209__length1; + GVariantIter _tmp210_; + GVariant* _tmp211_; + gboolean _result; + GVariant* _tmp212_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetEndTime"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _vala_end_time_length1 = 0; + _tmp208_ = g_variant_iter_next_value (&_reply_iter); + _tmp209_ = g_new (guint, 5); + _tmp209__length = 0; + _tmp209__size = 4; + _tmp209__length1 = 0; + g_variant_iter_init (&_tmp210_, _tmp208_); + for (; (_tmp211_ = g_variant_iter_next_value (&_tmp210_)) != NULL; _tmp209__length1++) { + if (_tmp209__size == _tmp209__length) { + _tmp209__size = 2 * _tmp209__size; + _tmp209_ = g_renew (guint, _tmp209_, _tmp209__size + 1); + } + _tmp209_[_tmp209__length++] = g_variant_get_uint32 (_tmp211_); + g_variant_unref (_tmp211_); + } + _vala_end_time_length1 = _tmp209__length1; + _vala_end_time = _tmp209_; + g_variant_unref (_tmp208_); + *end_time = _vala_end_time; + *end_time_length1 = _vala_end_time_length1; + _tmp212_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp212_); + g_variant_unref (_tmp212_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_GetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint* duration, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint _vala_duration; + GVariant* _tmp213_; + gboolean _result; + GVariant* _tmp214_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetDuration"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp213_ = g_variant_iter_next_value (&_reply_iter); + _vala_duration = g_variant_get_uint32 (_tmp213_); + g_variant_unref (_tmp213_); + *duration = _vala_duration; + _tmp214_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp214_); + g_variant_unref (_tmp214_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_SetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint duration, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp215_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "SetDuration"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (duration)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp215_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp215_); + g_variant_unref (_tmp215_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_GetChannelName (DVBIDBusRecorder* self, guint32 timer_id, gchar** name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_name; + GVariant* _tmp216_; + gboolean _result; + GVariant* _tmp217_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetChannelName"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp216_ = g_variant_iter_next_value (&_reply_iter); + _vala_name = g_variant_dup_string (_tmp216_, NULL); + g_variant_unref (_tmp216_); + *name = _vala_name; + _tmp217_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp217_); + g_variant_unref (_tmp217_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_GetTitle (DVBIDBusRecorder* self, guint32 timer_id, gchar** title, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_title; + GVariant* _tmp218_; + gboolean _result; + GVariant* _tmp219_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetTitle"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp218_ = g_variant_iter_next_value (&_reply_iter); + _vala_title = g_variant_dup_string (_tmp218_, NULL); + g_variant_unref (_tmp218_); + *title = _vala_title; + _tmp219_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp219_); + g_variant_unref (_tmp219_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_GetAllInformations (DVBIDBusRecorder* self, guint32 timer_id, DVBTimerInfo* info, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + DVBTimerInfo _vala_info; + GVariant* _tmp220_; + DVBTimerInfo _tmp221_; + GVariantIter _tmp222_; + GVariant* _tmp223_; + GVariant* _tmp224_; + GVariant* _tmp225_; + GVariant* _tmp226_; + GVariant* _tmp227_; + gboolean _result; + GVariant* _tmp228_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetAllInformations"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp220_ = g_variant_iter_next_value (&_reply_iter); + g_variant_iter_init (&_tmp222_, _tmp220_); + _tmp223_ = g_variant_iter_next_value (&_tmp222_); + _tmp221_.id = g_variant_get_uint32 (_tmp223_); + g_variant_unref (_tmp223_); + _tmp224_ = g_variant_iter_next_value (&_tmp222_); + _tmp221_.duration = g_variant_get_uint32 (_tmp224_); + g_variant_unref (_tmp224_); + _tmp225_ = g_variant_iter_next_value (&_tmp222_); + _tmp221_.active = g_variant_get_boolean (_tmp225_); + g_variant_unref (_tmp225_); + _tmp226_ = g_variant_iter_next_value (&_tmp222_); + _tmp221_.channel_name = g_variant_dup_string (_tmp226_, NULL); + g_variant_unref (_tmp226_); + _tmp227_ = g_variant_iter_next_value (&_tmp222_); + _tmp221_.title = g_variant_dup_string (_tmp227_, NULL); + g_variant_unref (_tmp227_); + _vala_info = _tmp221_; + g_variant_unref (_tmp220_); + *info = _vala_info; + _tmp228_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp228_); + g_variant_unref (_tmp228_); + g_object_unref (_reply_message); + return _result; +} + + +static guint32* dvb_id_bus_recorder_proxy_GetActiveTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32* _result; + int _result_length1; + GVariant* _tmp229_; + guint32* _tmp230_; + int _tmp230__length; + int _tmp230__size; + int _tmp230__length1; + GVariantIter _tmp231_; + GVariant* _tmp232_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "GetActiveTimers"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp229_ = g_variant_iter_next_value (&_reply_iter); + _tmp230_ = g_new (guint32, 5); + _tmp230__length = 0; + _tmp230__size = 4; + _tmp230__length1 = 0; + g_variant_iter_init (&_tmp231_, _tmp229_); + for (; (_tmp232_ = g_variant_iter_next_value (&_tmp231_)) != NULL; _tmp230__length1++) { + if (_tmp230__size == _tmp230__length) { + _tmp230__size = 2 * _tmp230__size; + _tmp230_ = g_renew (guint32, _tmp230_, _tmp230__size + 1); + } + _tmp230_[_tmp230__length++] = g_variant_get_uint32 (_tmp232_); + g_variant_unref (_tmp232_); + } + _result_length1 = _tmp230__length1; + _result = _tmp230_; + g_variant_unref (_tmp229_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp233_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "IsTimerActive"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp233_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp233_); + g_variant_unref (_tmp233_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recorder_proxy_HasTimer (DVBIDBusRecorder* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp234_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "HasTimer"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (start_year)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (start_month)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (start_day)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (start_hour)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (start_minute)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (duration)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp234_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp234_); + g_variant_unref (_tmp234_); + g_object_unref (_reply_message); + return _result; +} + + +static DVBOverlapType dvb_id_bus_recorder_proxy_HasTimerForEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + DVBOverlapType _result; + GVariant* _tmp235_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Recorder", "HasTimerForEvent"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (channel_sid)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return 0; } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return 0; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp235_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_int32 (_tmp235_); + g_variant_unref (_tmp235_); + g_object_unref (_reply_message); + return _result; +} + + +static void dvb_id_bus_recorder_proxy_dvb_id_bus_recorder_interface_init (DVBIDBusRecorderIface* iface) { + iface->AddTimer = dvb_id_bus_recorder_proxy_AddTimer; + iface->AddTimerWithMargin = dvb_id_bus_recorder_proxy_AddTimerWithMargin; + iface->AddTimerForEPGEvent = dvb_id_bus_recorder_proxy_AddTimerForEPGEvent; + iface->DeleteTimer = dvb_id_bus_recorder_proxy_DeleteTimer; + iface->GetTimers = dvb_id_bus_recorder_proxy_GetTimers; + iface->GetStartTime = dvb_id_bus_recorder_proxy_GetStartTime; + iface->SetStartTime = dvb_id_bus_recorder_proxy_SetStartTime; + iface->GetEndTime = dvb_id_bus_recorder_proxy_GetEndTime; + iface->GetDuration = dvb_id_bus_recorder_proxy_GetDuration; + iface->SetDuration = dvb_id_bus_recorder_proxy_SetDuration; + iface->GetChannelName = dvb_id_bus_recorder_proxy_GetChannelName; + iface->GetTitle = dvb_id_bus_recorder_proxy_GetTitle; + iface->GetAllInformations = dvb_id_bus_recorder_proxy_GetAllInformations; + iface->GetActiveTimers = dvb_id_bus_recorder_proxy_GetActiveTimers; + iface->IsTimerActive = dvb_id_bus_recorder_proxy_IsTimerActive; + iface->HasTimer = dvb_id_bus_recorder_proxy_HasTimer; + iface->HasTimerForEvent = dvb_id_bus_recorder_proxy_HasTimerForEvent; } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_AddTimer (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_AddTimer (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel = 0U; - dbus_uint32_t _tmp1_; + GVariant* _tmp236_; gint start_year = 0; - dbus_int32_t _tmp2_; + GVariant* _tmp237_; gint start_month = 0; - dbus_int32_t _tmp3_; + GVariant* _tmp238_; gint start_day = 0; - dbus_int32_t _tmp4_; + GVariant* _tmp239_; gint start_hour = 0; - dbus_int32_t _tmp5_; + GVariant* _tmp240_; gint start_minute = 0; - dbus_int32_t _tmp6_; + GVariant* _tmp241_; guint duration = 0U; - dbus_uint32_t _tmp7_; + GVariant* _tmp242_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32 timer_id = 0U; gboolean result; - DBusMessage* reply; - dbus_uint32_t _tmp8_; - dbus_bool_t _tmp9_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uiiiiiu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - channel = _tmp1_; - dbus_message_iter_get_basic (&iter, &_tmp2_); - dbus_message_iter_next (&iter); - start_year = _tmp2_; - dbus_message_iter_get_basic (&iter, &_tmp3_); - dbus_message_iter_next (&iter); - start_month = _tmp3_; - dbus_message_iter_get_basic (&iter, &_tmp4_); - dbus_message_iter_next (&iter); - start_day = _tmp4_; - dbus_message_iter_get_basic (&iter, &_tmp5_); - dbus_message_iter_next (&iter); - start_hour = _tmp5_; - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - start_minute = _tmp6_; - dbus_message_iter_get_basic (&iter, &_tmp7_); - dbus_message_iter_next (&iter); - duration = _tmp7_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp236_ = g_variant_iter_next_value (&_arguments_iter); + channel = g_variant_get_uint32 (_tmp236_); + g_variant_unref (_tmp236_); + _tmp237_ = g_variant_iter_next_value (&_arguments_iter); + start_year = g_variant_get_int32 (_tmp237_); + g_variant_unref (_tmp237_); + _tmp238_ = g_variant_iter_next_value (&_arguments_iter); + start_month = g_variant_get_int32 (_tmp238_); + g_variant_unref (_tmp238_); + _tmp239_ = g_variant_iter_next_value (&_arguments_iter); + start_day = g_variant_get_int32 (_tmp239_); + g_variant_unref (_tmp239_); + _tmp240_ = g_variant_iter_next_value (&_arguments_iter); + start_hour = g_variant_get_int32 (_tmp240_); + g_variant_unref (_tmp240_); + _tmp241_ = g_variant_iter_next_value (&_arguments_iter); + start_minute = g_variant_get_int32 (_tmp241_); + g_variant_unref (_tmp241_); + _tmp242_ = g_variant_iter_next_value (&_arguments_iter); + duration = g_variant_get_uint32 (_tmp242_); + g_variant_unref (_tmp242_); result = dvb_id_bus_recorder_AddTimer (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration, &timer_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp8_ = timer_id; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &_tmp8_); - _tmp9_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp9_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (timer_id)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_AddTimerWithMargin (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_AddTimerWithMargin (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint channel = 0U; - dbus_uint32_t _tmp10_; + GVariant* _tmp243_; gint start_year = 0; - dbus_int32_t _tmp11_; + GVariant* _tmp244_; gint start_month = 0; - dbus_int32_t _tmp12_; + GVariant* _tmp245_; gint start_day = 0; - dbus_int32_t _tmp13_; + GVariant* _tmp246_; gint start_hour = 0; - dbus_int32_t _tmp14_; + GVariant* _tmp247_; gint start_minute = 0; - dbus_int32_t _tmp15_; + GVariant* _tmp248_; guint duration = 0U; - dbus_uint32_t _tmp16_; + GVariant* _tmp249_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32 timer_id = 0U; gboolean result; - DBusMessage* reply; - dbus_uint32_t _tmp17_; - dbus_bool_t _tmp18_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uiiiiiu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp10_); - dbus_message_iter_next (&iter); - channel = _tmp10_; - dbus_message_iter_get_basic (&iter, &_tmp11_); - dbus_message_iter_next (&iter); - start_year = _tmp11_; - dbus_message_iter_get_basic (&iter, &_tmp12_); - dbus_message_iter_next (&iter); - start_month = _tmp12_; - dbus_message_iter_get_basic (&iter, &_tmp13_); - dbus_message_iter_next (&iter); - start_day = _tmp13_; - dbus_message_iter_get_basic (&iter, &_tmp14_); - dbus_message_iter_next (&iter); - start_hour = _tmp14_; - dbus_message_iter_get_basic (&iter, &_tmp15_); - dbus_message_iter_next (&iter); - start_minute = _tmp15_; - dbus_message_iter_get_basic (&iter, &_tmp16_); - dbus_message_iter_next (&iter); - duration = _tmp16_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp243_ = g_variant_iter_next_value (&_arguments_iter); + channel = g_variant_get_uint32 (_tmp243_); + g_variant_unref (_tmp243_); + _tmp244_ = g_variant_iter_next_value (&_arguments_iter); + start_year = g_variant_get_int32 (_tmp244_); + g_variant_unref (_tmp244_); + _tmp245_ = g_variant_iter_next_value (&_arguments_iter); + start_month = g_variant_get_int32 (_tmp245_); + g_variant_unref (_tmp245_); + _tmp246_ = g_variant_iter_next_value (&_arguments_iter); + start_day = g_variant_get_int32 (_tmp246_); + g_variant_unref (_tmp246_); + _tmp247_ = g_variant_iter_next_value (&_arguments_iter); + start_hour = g_variant_get_int32 (_tmp247_); + g_variant_unref (_tmp247_); + _tmp248_ = g_variant_iter_next_value (&_arguments_iter); + start_minute = g_variant_get_int32 (_tmp248_); + g_variant_unref (_tmp248_); + _tmp249_ = g_variant_iter_next_value (&_arguments_iter); + duration = g_variant_get_uint32 (_tmp249_); + g_variant_unref (_tmp249_); result = dvb_id_bus_recorder_AddTimerWithMargin (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration, &timer_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp17_ = timer_id; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &_tmp17_); - _tmp18_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp18_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (timer_id)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_AddTimerForEPGEvent (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_AddTimerForEPGEvent (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint event_id = 0U; - dbus_uint32_t _tmp19_; + GVariant* _tmp250_; guint channel_sid = 0U; - dbus_uint32_t _tmp20_; + GVariant* _tmp251_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32 timer_id = 0U; gboolean result; - DBusMessage* reply; - dbus_uint32_t _tmp21_; - dbus_bool_t _tmp22_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp19_); - dbus_message_iter_next (&iter); - event_id = _tmp19_; - dbus_message_iter_get_basic (&iter, &_tmp20_); - dbus_message_iter_next (&iter); - channel_sid = _tmp20_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp250_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp250_); + g_variant_unref (_tmp250_); + _tmp251_ = g_variant_iter_next_value (&_arguments_iter); + channel_sid = g_variant_get_uint32 (_tmp251_); + g_variant_unref (_tmp251_); result = dvb_id_bus_recorder_AddTimerForEPGEvent (self, event_id, channel_sid, &timer_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp21_ = timer_id; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &_tmp21_); - _tmp22_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp22_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (timer_id)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_DeleteTimer (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_DeleteTimer (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp23_; + GVariant* _tmp252_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp24_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp23_); - dbus_message_iter_next (&iter); - timer_id = _tmp23_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp252_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp252_); + g_variant_unref (_tmp252_); result = dvb_id_bus_recorder_DeleteTimer (self, timer_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp24_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp24_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetTimers (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetTimers (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32* result; - int result_length1; - DBusMessage* reply; - guint32* _tmp25_; - DBusMessageIter _tmp26_; - int _tmp27_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + int result_length1 = 0; + guint32* _tmp253_; + GVariantBuilder _tmp254_; + int _tmp255_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_recorder_GetTimers (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp25_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp26_); - for (_tmp27_ = 0; _tmp27_ < result_length1; _tmp27_++) { - dbus_uint32_t _tmp28_; - _tmp28_ = *_tmp25_; - dbus_message_iter_append_basic (&_tmp26_, DBUS_TYPE_UINT32, &_tmp28_); - _tmp25_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp26_); - result = (g_free (result), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp253_ = result; + g_variant_builder_init (&_tmp254_, G_VARIANT_TYPE ("au")); + for (_tmp255_ = 0; _tmp255_ < result_length1; _tmp255_++) { + g_variant_builder_add_value (&_tmp254_, g_variant_new_uint32 (*_tmp253_)); + _tmp253_++; } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp254_)); + result = (g_free (result), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetStartTime (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetStartTime (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp29_; + GVariant* _tmp256_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32* start_time = NULL; - int start_time_length1; + int start_time_length1 = 0; + guint32* _tmp257_; + GVariantBuilder _tmp258_; + int _tmp259_; gboolean result; - DBusMessage* reply; - guint32* _tmp30_; - DBusMessageIter _tmp31_; - int _tmp32_; - dbus_bool_t _tmp34_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp29_); - dbus_message_iter_next (&iter); - timer_id = _tmp29_; - start_time_length1 = 0; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp256_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp256_); + g_variant_unref (_tmp256_); result = dvb_id_bus_recorder_GetStartTime (self, timer_id, &start_time, &start_time_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp30_ = start_time; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp31_); - for (_tmp32_ = 0; _tmp32_ < start_time_length1; _tmp32_++) { - dbus_uint32_t _tmp33_; - _tmp33_ = *_tmp30_; - dbus_message_iter_append_basic (&_tmp31_, DBUS_TYPE_UINT32, &_tmp33_); - _tmp30_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp31_); + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp257_ = start_time; + g_variant_builder_init (&_tmp258_, G_VARIANT_TYPE ("au")); + for (_tmp259_ = 0; _tmp259_ < start_time_length1; _tmp259_++) { + g_variant_builder_add_value (&_tmp258_, g_variant_new_uint32 (*_tmp257_)); + _tmp257_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp258_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); start_time = (g_free (start_time), NULL); - _tmp34_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp34_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_SetStartTime (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_SetStartTime (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp35_; + GVariant* _tmp260_; gint start_year = 0; - dbus_int32_t _tmp36_; + GVariant* _tmp261_; gint start_month = 0; - dbus_int32_t _tmp37_; + GVariant* _tmp262_; gint start_day = 0; - dbus_int32_t _tmp38_; + GVariant* _tmp263_; gint start_hour = 0; - dbus_int32_t _tmp39_; + GVariant* _tmp264_; gint start_minute = 0; - dbus_int32_t _tmp40_; + GVariant* _tmp265_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp41_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uiiiii")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp35_); - dbus_message_iter_next (&iter); - timer_id = _tmp35_; - dbus_message_iter_get_basic (&iter, &_tmp36_); - dbus_message_iter_next (&iter); - start_year = _tmp36_; - dbus_message_iter_get_basic (&iter, &_tmp37_); - dbus_message_iter_next (&iter); - start_month = _tmp37_; - dbus_message_iter_get_basic (&iter, &_tmp38_); - dbus_message_iter_next (&iter); - start_day = _tmp38_; - dbus_message_iter_get_basic (&iter, &_tmp39_); - dbus_message_iter_next (&iter); - start_hour = _tmp39_; - dbus_message_iter_get_basic (&iter, &_tmp40_); - dbus_message_iter_next (&iter); - start_minute = _tmp40_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp260_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp260_); + g_variant_unref (_tmp260_); + _tmp261_ = g_variant_iter_next_value (&_arguments_iter); + start_year = g_variant_get_int32 (_tmp261_); + g_variant_unref (_tmp261_); + _tmp262_ = g_variant_iter_next_value (&_arguments_iter); + start_month = g_variant_get_int32 (_tmp262_); + g_variant_unref (_tmp262_); + _tmp263_ = g_variant_iter_next_value (&_arguments_iter); + start_day = g_variant_get_int32 (_tmp263_); + g_variant_unref (_tmp263_); + _tmp264_ = g_variant_iter_next_value (&_arguments_iter); + start_hour = g_variant_get_int32 (_tmp264_); + g_variant_unref (_tmp264_); + _tmp265_ = g_variant_iter_next_value (&_arguments_iter); + start_minute = g_variant_get_int32 (_tmp265_); + g_variant_unref (_tmp265_); result = dvb_id_bus_recorder_SetStartTime (self, timer_id, start_year, start_month, start_day, start_hour, start_minute, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp41_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp41_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetEndTime (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetEndTime (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp42_; + GVariant* _tmp266_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint* end_time = NULL; - int end_time_length1; + int end_time_length1 = 0; + guint* _tmp267_; + GVariantBuilder _tmp268_; + int _tmp269_; gboolean result; - DBusMessage* reply; - guint* _tmp43_; - DBusMessageIter _tmp44_; - int _tmp45_; - dbus_bool_t _tmp47_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp42_); - dbus_message_iter_next (&iter); - timer_id = _tmp42_; - end_time_length1 = 0; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp266_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp266_); + g_variant_unref (_tmp266_); result = dvb_id_bus_recorder_GetEndTime (self, timer_id, &end_time, &end_time_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp43_ = end_time; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp44_); - for (_tmp45_ = 0; _tmp45_ < end_time_length1; _tmp45_++) { - dbus_uint32_t _tmp46_; - _tmp46_ = *_tmp43_; - dbus_message_iter_append_basic (&_tmp44_, DBUS_TYPE_UINT32, &_tmp46_); - _tmp43_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp44_); + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp267_ = end_time; + g_variant_builder_init (&_tmp268_, G_VARIANT_TYPE ("au")); + for (_tmp269_ = 0; _tmp269_ < end_time_length1; _tmp269_++) { + g_variant_builder_add_value (&_tmp268_, g_variant_new_uint32 (*_tmp267_)); + _tmp267_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp268_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); end_time = (g_free (end_time), NULL); - _tmp47_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp47_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetDuration (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetDuration (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp48_; + GVariant* _tmp270_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint duration = 0U; gboolean result; - DBusMessage* reply; - dbus_uint32_t _tmp49_; - dbus_bool_t _tmp50_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp48_); - dbus_message_iter_next (&iter); - timer_id = _tmp48_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp270_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp270_); + g_variant_unref (_tmp270_); result = dvb_id_bus_recorder_GetDuration (self, timer_id, &duration, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp49_ = duration; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &_tmp49_); - _tmp50_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp50_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (duration)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_SetDuration (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_SetDuration (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp51_; + GVariant* _tmp271_; guint duration = 0U; - dbus_uint32_t _tmp52_; + GVariant* _tmp272_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp53_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp51_); - dbus_message_iter_next (&iter); - timer_id = _tmp51_; - dbus_message_iter_get_basic (&iter, &_tmp52_); - dbus_message_iter_next (&iter); - duration = _tmp52_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp271_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp271_); + g_variant_unref (_tmp271_); + _tmp272_ = g_variant_iter_next_value (&_arguments_iter); + duration = g_variant_get_uint32 (_tmp272_); + g_variant_unref (_tmp272_); result = dvb_id_bus_recorder_SetDuration (self, timer_id, duration, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp53_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp53_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetChannelName (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetChannelName (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp54_; + GVariant* _tmp273_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* name = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp55_; - dbus_bool_t _tmp56_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp54_); - dbus_message_iter_next (&iter); - timer_id = _tmp54_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp273_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp273_); + g_variant_unref (_tmp273_); result = dvb_id_bus_recorder_GetChannelName (self, timer_id, &name, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp55_ = name; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp55_); - _g_free0 (name); - _tmp56_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp56_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (name)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetTitle (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetTitle (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp57_; + GVariant* _tmp274_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* title = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp58_; - dbus_bool_t _tmp59_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp57_); - dbus_message_iter_next (&iter); - timer_id = _tmp57_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp274_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp274_); + g_variant_unref (_tmp274_); result = dvb_id_bus_recorder_GetTitle (self, timer_id, &title, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp58_ = title; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp58_); - _g_free0 (title); - _tmp59_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp59_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (title)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (title); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetAllInformations (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetAllInformations (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp60_; + GVariant* _tmp275_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; DVBTimerInfo info = {0}; + GVariantBuilder _tmp276_; gboolean result; - DBusMessage* reply; - DBusMessageIter _tmp61_; - dbus_uint32_t _tmp62_; - dbus_uint32_t _tmp63_; - dbus_bool_t _tmp64_; - const char* _tmp65_; - const char* _tmp66_; - dbus_bool_t _tmp67_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp60_); - dbus_message_iter_next (&iter); - timer_id = _tmp60_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp275_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp275_); + g_variant_unref (_tmp275_); result = dvb_id_bus_recorder_GetAllInformations (self, timer_id, &info, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - dbus_message_iter_open_container (&iter, DBUS_TYPE_STRUCT, NULL, &_tmp61_); - _tmp62_ = info.id; - dbus_message_iter_append_basic (&_tmp61_, DBUS_TYPE_UINT32, &_tmp62_); - _tmp63_ = info.duration; - dbus_message_iter_append_basic (&_tmp61_, DBUS_TYPE_UINT32, &_tmp63_); - _tmp64_ = info.active; - dbus_message_iter_append_basic (&_tmp61_, DBUS_TYPE_BOOLEAN, &_tmp64_); - _tmp65_ = info.channel_name; - dbus_message_iter_append_basic (&_tmp61_, DBUS_TYPE_STRING, &_tmp65_); - _tmp66_ = info.title; - dbus_message_iter_append_basic (&_tmp61_, DBUS_TYPE_STRING, &_tmp66_); - dbus_message_iter_close_container (&iter, &_tmp61_); - dvb_timer_info_destroy (&info); - _tmp67_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp67_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_init (&_tmp276_, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_tmp276_, g_variant_new_uint32 (info.id)); + g_variant_builder_add_value (&_tmp276_, g_variant_new_uint32 (info.duration)); + g_variant_builder_add_value (&_tmp276_, g_variant_new_boolean (info.active)); + g_variant_builder_add_value (&_tmp276_, g_variant_new_string (info.channel_name)); + g_variant_builder_add_value (&_tmp276_, g_variant_new_string (info.title)); + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp276_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + dvb_timer_info_destroy (&info); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_GetActiveTimers (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_GetActiveTimers (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32* result; - int result_length1; - DBusMessage* reply; - guint32* _tmp68_; - DBusMessageIter _tmp69_; - int _tmp70_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + int result_length1 = 0; + guint32* _tmp277_; + GVariantBuilder _tmp278_; + int _tmp279_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_recorder_GetActiveTimers (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp68_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp69_); - for (_tmp70_ = 0; _tmp70_ < result_length1; _tmp70_++) { - dbus_uint32_t _tmp71_; - _tmp71_ = *_tmp68_; - dbus_message_iter_append_basic (&_tmp69_, DBUS_TYPE_UINT32, &_tmp71_); - _tmp68_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp69_); - result = (g_free (result), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp277_ = result; + g_variant_builder_init (&_tmp278_, G_VARIANT_TYPE ("au")); + for (_tmp279_ = 0; _tmp279_ < result_length1; _tmp279_++) { + g_variant_builder_add_value (&_tmp278_, g_variant_new_uint32 (*_tmp277_)); + _tmp277_++; } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp278_)); + result = (g_free (result), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp72_; + GVariant* _tmp280_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp73_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp72_); - dbus_message_iter_next (&iter); - timer_id = _tmp72_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp280_ = g_variant_iter_next_value (&_arguments_iter); + timer_id = g_variant_get_uint32 (_tmp280_); + g_variant_unref (_tmp280_); result = dvb_id_bus_recorder_IsTimerActive (self, timer_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp73_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp73_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_HasTimer (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_HasTimer (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint start_year = 0U; - dbus_uint32_t _tmp74_; + GVariant* _tmp281_; guint start_month = 0U; - dbus_uint32_t _tmp75_; + GVariant* _tmp282_; guint start_day = 0U; - dbus_uint32_t _tmp76_; + GVariant* _tmp283_; guint start_hour = 0U; - dbus_uint32_t _tmp77_; + GVariant* _tmp284_; guint start_minute = 0U; - dbus_uint32_t _tmp78_; + GVariant* _tmp285_; guint duration = 0U; - dbus_uint32_t _tmp79_; + GVariant* _tmp286_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp80_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uuuuuu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp74_); - dbus_message_iter_next (&iter); - start_year = _tmp74_; - dbus_message_iter_get_basic (&iter, &_tmp75_); - dbus_message_iter_next (&iter); - start_month = _tmp75_; - dbus_message_iter_get_basic (&iter, &_tmp76_); - dbus_message_iter_next (&iter); - start_day = _tmp76_; - dbus_message_iter_get_basic (&iter, &_tmp77_); - dbus_message_iter_next (&iter); - start_hour = _tmp77_; - dbus_message_iter_get_basic (&iter, &_tmp78_); - dbus_message_iter_next (&iter); - start_minute = _tmp78_; - dbus_message_iter_get_basic (&iter, &_tmp79_); - dbus_message_iter_next (&iter); - duration = _tmp79_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp281_ = g_variant_iter_next_value (&_arguments_iter); + start_year = g_variant_get_uint32 (_tmp281_); + g_variant_unref (_tmp281_); + _tmp282_ = g_variant_iter_next_value (&_arguments_iter); + start_month = g_variant_get_uint32 (_tmp282_); + g_variant_unref (_tmp282_); + _tmp283_ = g_variant_iter_next_value (&_arguments_iter); + start_day = g_variant_get_uint32 (_tmp283_); + g_variant_unref (_tmp283_); + _tmp284_ = g_variant_iter_next_value (&_arguments_iter); + start_hour = g_variant_get_uint32 (_tmp284_); + g_variant_unref (_tmp284_); + _tmp285_ = g_variant_iter_next_value (&_arguments_iter); + start_minute = g_variant_get_uint32 (_tmp285_); + g_variant_unref (_tmp285_); + _tmp286_ = g_variant_iter_next_value (&_arguments_iter); + duration = g_variant_get_uint32 (_tmp286_); + g_variant_unref (_tmp286_); result = dvb_id_bus_recorder_HasTimer (self, start_year, start_month, start_day, start_hour, start_minute, duration, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp80_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp80_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recorder_HasTimerForEvent (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recorder_HasTimerForEvent (DVBIDBusRecorder* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint event_id = 0U; - dbus_uint32_t _tmp81_; + GVariant* _tmp287_; guint channel_sid = 0U; - dbus_uint32_t _tmp82_; + GVariant* _tmp288_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; DVBOverlapType result; - DBusMessage* reply; - dbus_int32_t _tmp83_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp81_); - dbus_message_iter_next (&iter); - event_id = _tmp81_; - dbus_message_iter_get_basic (&iter, &_tmp82_); - dbus_message_iter_next (&iter); - channel_sid = _tmp82_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp287_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp287_); + g_variant_unref (_tmp287_); + _tmp288_ = g_variant_iter_next_value (&_arguments_iter); + channel_sid = g_variant_get_uint32 (_tmp288_); + g_variant_unref (_tmp288_); result = dvb_id_bus_recorder_HasTimerForEvent (self, event_id, channel_sid, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp83_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &_tmp83_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_recorder_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_recorder_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_recorder_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "AddTimer")) { - result = _dbus_dvb_id_bus_recorder_AddTimer (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "AddTimerWithMargin")) { - result = _dbus_dvb_id_bus_recorder_AddTimerWithMargin (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "AddTimerForEPGEvent")) { - result = _dbus_dvb_id_bus_recorder_AddTimerForEPGEvent (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "DeleteTimer")) { - result = _dbus_dvb_id_bus_recorder_DeleteTimer (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetTimers")) { - result = _dbus_dvb_id_bus_recorder_GetTimers (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetStartTime")) { - result = _dbus_dvb_id_bus_recorder_GetStartTime (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "SetStartTime")) { - result = _dbus_dvb_id_bus_recorder_SetStartTime (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetEndTime")) { - result = _dbus_dvb_id_bus_recorder_GetEndTime (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetDuration")) { - result = _dbus_dvb_id_bus_recorder_GetDuration (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "SetDuration")) { - result = _dbus_dvb_id_bus_recorder_SetDuration (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetChannelName")) { - result = _dbus_dvb_id_bus_recorder_GetChannelName (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetTitle")) { - result = _dbus_dvb_id_bus_recorder_GetTitle (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetAllInformations")) { - result = _dbus_dvb_id_bus_recorder_GetAllInformations (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "GetActiveTimers")) { - result = _dbus_dvb_id_bus_recorder_GetActiveTimers (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "IsTimerActive")) { - result = _dbus_dvb_id_bus_recorder_IsTimerActive (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "HasTimer")) { - result = _dbus_dvb_id_bus_recorder_HasTimer (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Recorder", "HasTimerForEvent")) { - result = _dbus_dvb_id_bus_recorder_HasTimerForEvent (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } -} - - -static void _dbus_dvb_id_bus_recorder_recording_started (GObject* _sender, guint32 timer_id, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp84_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Recorder", "RecordingStarted"); - dbus_message_iter_init_append (_message, &_iter); - _tmp84_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp84_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_recorder_recording_finished (GObject* _sender, guint32 recording_id, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp85_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Recorder", "RecordingFinished"); - dbus_message_iter_init_append (_message, &_iter); - _tmp85_ = recording_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp85_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_recorder_changed (GObject* _sender, guint32 timer_id, guint type, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp86_; - dbus_uint32_t _tmp87_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Recorder", "Changed"); - dbus_message_iter_init_append (_message, &_iter); - _tmp86_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp86_); - _tmp87_ = type; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp87_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_recorder_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_recorder_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "recording-started", (GCallback) _dbus_dvb_id_bus_recorder_recording_started, connection); - g_signal_connect (object, "recording-finished", (GCallback) _dbus_dvb_id_bus_recorder_recording_finished, connection); - g_signal_connect (object, "changed", (GCallback) _dbus_dvb_id_bus_recorder_changed, connection); -} - - -static void dvb_id_bus_recorder_base_init (DVBIDBusRecorderIface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - g_signal_new ("recording_started", DVB_TYPE_ID_BUS_RECORDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); - g_signal_new ("recording_finished", DVB_TYPE_ID_BUS_RECORDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); - /** - * @type: 0: added, 1: deleted, 2: updated - */ - g_signal_new ("changed", DVB_TYPE_ID_BUS_RECORDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); - g_type_set_qdata (DVB_TYPE_ID_BUS_RECORDER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_recorder_dbus_vtable)); + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_int32 (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void dvb_id_bus_recorder_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "AddTimer") == 0) { + _dbus_dvb_id_bus_recorder_AddTimer (object, parameters, invocation); + } else if (strcmp (method_name, "AddTimerWithMargin") == 0) { + _dbus_dvb_id_bus_recorder_AddTimerWithMargin (object, parameters, invocation); + } else if (strcmp (method_name, "AddTimerForEPGEvent") == 0) { + _dbus_dvb_id_bus_recorder_AddTimerForEPGEvent (object, parameters, invocation); + } else if (strcmp (method_name, "DeleteTimer") == 0) { + _dbus_dvb_id_bus_recorder_DeleteTimer (object, parameters, invocation); + } else if (strcmp (method_name, "GetTimers") == 0) { + _dbus_dvb_id_bus_recorder_GetTimers (object, parameters, invocation); + } else if (strcmp (method_name, "GetStartTime") == 0) { + _dbus_dvb_id_bus_recorder_GetStartTime (object, parameters, invocation); + } else if (strcmp (method_name, "SetStartTime") == 0) { + _dbus_dvb_id_bus_recorder_SetStartTime (object, parameters, invocation); + } else if (strcmp (method_name, "GetEndTime") == 0) { + _dbus_dvb_id_bus_recorder_GetEndTime (object, parameters, invocation); + } else if (strcmp (method_name, "GetDuration") == 0) { + _dbus_dvb_id_bus_recorder_GetDuration (object, parameters, invocation); + } else if (strcmp (method_name, "SetDuration") == 0) { + _dbus_dvb_id_bus_recorder_SetDuration (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelName") == 0) { + _dbus_dvb_id_bus_recorder_GetChannelName (object, parameters, invocation); + } else if (strcmp (method_name, "GetTitle") == 0) { + _dbus_dvb_id_bus_recorder_GetTitle (object, parameters, invocation); + } else if (strcmp (method_name, "GetAllInformations") == 0) { + _dbus_dvb_id_bus_recorder_GetAllInformations (object, parameters, invocation); + } else if (strcmp (method_name, "GetActiveTimers") == 0) { + _dbus_dvb_id_bus_recorder_GetActiveTimers (object, parameters, invocation); + } else if (strcmp (method_name, "IsTimerActive") == 0) { + _dbus_dvb_id_bus_recorder_IsTimerActive (object, parameters, invocation); + } else if (strcmp (method_name, "HasTimer") == 0) { + _dbus_dvb_id_bus_recorder_HasTimer (object, parameters, invocation); + } else if (strcmp (method_name, "HasTimerForEvent") == 0) { + _dbus_dvb_id_bus_recorder_HasTimerForEvent (object, parameters, invocation); + } else { + g_object_unref (invocation); + } +} + + +static GVariant* dvb_id_bus_recorder_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; +} + + +static gboolean dvb_id_bus_recorder_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; +} + + +static void _dbus_dvb_id_bus_recorder_recording_started (GObject* _sender, guint32 timer_id, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Recorder", "RecordingStarted", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_recorder_recording_finished (GObject* _sender, guint32 recording_id, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (recording_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Recorder", "RecordingFinished", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_recorder_changed (GObject* _sender, guint32 timer_id, guint type, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timer_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (type)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Recorder", "Changed", _arguments, NULL); +} + + +guint dvb_id_bus_recorder_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_recorder_dbus_interface_info), &_dvb_id_bus_recorder_dbus_interface_vtable, data, _dvb_id_bus_recorder_unregister_object, error); + if (!result) { + return 0; } + g_signal_connect (object, "recording-started", (GCallback) _dbus_dvb_id_bus_recorder_recording_started, data); + g_signal_connect (object, "recording-finished", (GCallback) _dbus_dvb_id_bus_recorder_recording_finished, data); + g_signal_connect (object, "changed", (GCallback) _dbus_dvb_id_bus_recorder_changed, data); + return result; } -GType dvb_id_bus_recorder_get_type (void) { - static volatile gsize dvb_id_bus_recorder_type_id__volatile = 0; - if (g_once_init_enter (&dvb_id_bus_recorder_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusRecorderIface), (GBaseInitFunc) dvb_id_bus_recorder_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType dvb_id_bus_recorder_type_id; - dvb_id_bus_recorder_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusRecorder", &g_define_type_info, 0); - g_type_interface_add_prerequisite (dvb_id_bus_recorder_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_recorder_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_recorder_dbus_proxy_get_type); - g_once_init_leave (&dvb_id_bus_recorder_type_id__volatile, dvb_id_bus_recorder_type_id); - } - return dvb_id_bus_recorder_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (DVBIDBusRecorderDBusProxy, dvb_id_bus_recorder_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_RECORDER, dvb_id_bus_recorder_dbus_proxy_dvb_id_bus_recorder__interface_init) ); -DVBIDBusRecorder* dvb_id_bus_recorder_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusRecorder* self; - self = g_object_new (dvb_id_bus_recorder_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.Recorder", NULL); - return self; -} - - -static GObject* dvb_id_bus_recorder_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_recorder_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_recorder_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_dvb_id_bus_recorder_recording_started (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint32 timer_id = 0U; - dbus_uint32_t _tmp233_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "u")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp233_); - dbus_message_iter_next (&iter); - timer_id = _tmp233_; - g_signal_emit_by_name (self, "recording-started", timer_id); -} - - -static void _dbus_handle_dvb_id_bus_recorder_recording_finished (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint32 recording_id = 0U; - dbus_uint32_t _tmp234_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "u")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp234_); - dbus_message_iter_next (&iter); - recording_id = _tmp234_; - g_signal_emit_by_name (self, "recording-finished", recording_id); -} - - -static void _dbus_handle_dvb_id_bus_recorder_changed (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint32 timer_id = 0U; - dbus_uint32_t _tmp235_; - guint type = 0U; - dbus_uint32_t _tmp236_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp235_); - dbus_message_iter_next (&iter); - timer_id = _tmp235_; - dbus_message_iter_get_basic (&iter, &_tmp236_); - dbus_message_iter_next (&iter); - type = _tmp236_; - g_signal_emit_by_name (self, "changed", timer_id, type); -} - - -DBusHandlerResult dvb_id_bus_recorder_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.Recorder", "RecordingStarted")) { - _dbus_handle_dvb_id_bus_recorder_recording_started (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Recorder", "RecordingFinished")) { - _dbus_handle_dvb_id_bus_recorder_recording_finished (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Recorder", "Changed")) { - _dbus_handle_dvb_id_bus_recorder_changed (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void dvb_id_bus_recorder_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - return; - } - ((DVBIDBusRecorderDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_recorder_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_recorder_dbus_proxy_parent_class)->dispose (self); -} - - -static void dvb_id_bus_recorder_dbus_proxy_class_init (DVBIDBusRecorderDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_recorder_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_recorder_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_recorder_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_recorder_dbus_proxy_set_property; -} - - -static void dvb_id_bus_recorder_dbus_proxy_init (DVBIDBusRecorderDBusProxy* self) { -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_AddTimer (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp237_; - dbus_int32_t _tmp238_; - dbus_int32_t _tmp239_; - dbus_int32_t _tmp240_; - dbus_int32_t _tmp241_; - dbus_int32_t _tmp242_; - dbus_uint32_t _tmp243_; - guint32 _timer_id; - dbus_uint32_t _tmp244_; - gboolean _result; - dbus_bool_t _tmp245_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "AddTimer"); - dbus_message_iter_init_append (_message, &_iter); - _tmp237_ = channel; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp237_); - _tmp238_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp238_); - _tmp239_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp239_); - _tmp240_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp240_); - _tmp241_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp241_); - _tmp242_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp242_); - _tmp243_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp243_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp246_; - _edomain = DBUS_GERROR; - _tmp246_ = _dbus_error.name + 27; - if (strcmp (_tmp246_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp246_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp246_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp246_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp246_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp246_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp246_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp246_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp246_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp246_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp246_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp246_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp246_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp246_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp246_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp246_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp246_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp246_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp246_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp246_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp246_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp246_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp246_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp246_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp246_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp246_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp246_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp246_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp246_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp246_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp246_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp246_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp246_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "ub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp244_); - dbus_message_iter_next (&_iter); - _timer_id = _tmp244_; - *timer_id = _timer_id; - dbus_message_iter_get_basic (&_iter, &_tmp245_); - dbus_message_iter_next (&_iter); - _result = _tmp245_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_AddTimerWithMargin (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp247_; - dbus_int32_t _tmp248_; - dbus_int32_t _tmp249_; - dbus_int32_t _tmp250_; - dbus_int32_t _tmp251_; - dbus_int32_t _tmp252_; - dbus_uint32_t _tmp253_; - guint32 _timer_id; - dbus_uint32_t _tmp254_; - gboolean _result; - dbus_bool_t _tmp255_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "AddTimerWithMargin"); - dbus_message_iter_init_append (_message, &_iter); - _tmp247_ = channel; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp247_); - _tmp248_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp248_); - _tmp249_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp249_); - _tmp250_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp250_); - _tmp251_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp251_); - _tmp252_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp252_); - _tmp253_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp253_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp256_; - _edomain = DBUS_GERROR; - _tmp256_ = _dbus_error.name + 27; - if (strcmp (_tmp256_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp256_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp256_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp256_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp256_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp256_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp256_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp256_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp256_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp256_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp256_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp256_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp256_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp256_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp256_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp256_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp256_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp256_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp256_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp256_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp256_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp256_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp256_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp256_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp256_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp256_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp256_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp256_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp256_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp256_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp256_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp256_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp256_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "ub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp254_); - dbus_message_iter_next (&_iter); - _timer_id = _tmp254_; - *timer_id = _timer_id; - dbus_message_iter_get_basic (&_iter, &_tmp255_); - dbus_message_iter_next (&_iter); - _result = _tmp255_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_AddTimerForEPGEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp257_; - dbus_uint32_t _tmp258_; - guint32 _timer_id; - dbus_uint32_t _tmp259_; - gboolean _result; - dbus_bool_t _tmp260_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "AddTimerForEPGEvent"); - dbus_message_iter_init_append (_message, &_iter); - _tmp257_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp257_); - _tmp258_ = channel_sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp258_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp261_; - _edomain = DBUS_GERROR; - _tmp261_ = _dbus_error.name + 27; - if (strcmp (_tmp261_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp261_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp261_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp261_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp261_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp261_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp261_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp261_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp261_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp261_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp261_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp261_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp261_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp261_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp261_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp261_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp261_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp261_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp261_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp261_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp261_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp261_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp261_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp261_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp261_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp261_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp261_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp261_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp261_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp261_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp261_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp261_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp261_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "ub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp259_); - dbus_message_iter_next (&_iter); - _timer_id = _tmp259_; - *timer_id = _timer_id; - dbus_message_iter_get_basic (&_iter, &_tmp260_); - dbus_message_iter_next (&_iter); - _result = _tmp260_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_DeleteTimer (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp262_; - gboolean _result; - dbus_bool_t _tmp263_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "DeleteTimer"); - dbus_message_iter_init_append (_message, &_iter); - _tmp262_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp262_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp264_; - _edomain = DBUS_GERROR; - _tmp264_ = _dbus_error.name + 27; - if (strcmp (_tmp264_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp264_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp264_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp264_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp264_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp264_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp264_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp264_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp264_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp264_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp264_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp264_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp264_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp264_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp264_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp264_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp264_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp264_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp264_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp264_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp264_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp264_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp264_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp264_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp264_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp264_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp264_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp264_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp264_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp264_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp264_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp264_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp264_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp263_); - dbus_message_iter_next (&_iter); - _result = _tmp263_; - dbus_message_unref (_reply); - return _result; -} - - -static guint32* dvb_id_bus_recorder_dbus_proxy_GetTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint32* _result; - int _result_length1; - guint32* _tmp265_; - int _tmp265__length; - int _tmp265__size; - int _tmp265__length1; - DBusMessageIter _tmp266_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetTimers"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp268_; - _edomain = DBUS_GERROR; - _tmp268_ = _dbus_error.name + 27; - if (strcmp (_tmp268_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp268_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp268_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp268_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp268_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp268_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp268_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp268_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp268_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp268_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp268_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp268_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp268_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp268_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp268_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp268_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp268_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp268_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp268_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp268_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp268_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp268_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp268_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp268_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp268_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp268_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp268_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp268_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp268_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp268_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp268_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp268_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp268_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "au")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "au", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp265_ = g_new (guint32, 5); - _tmp265__length = 0; - _tmp265__size = 4; - _tmp265__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp266_); - for (; dbus_message_iter_get_arg_type (&_tmp266_); _tmp265__length1++) { - dbus_uint32_t _tmp267_; - if (_tmp265__size == _tmp265__length) { - _tmp265__size = 2 * _tmp265__size; - _tmp265_ = g_renew (guint32, _tmp265_, _tmp265__size + 1); - } - dbus_message_iter_get_basic (&_tmp266_, &_tmp267_); - dbus_message_iter_next (&_tmp266_); - _tmp265_[_tmp265__length++] = _tmp267_; - } - _result_length1 = _tmp265__length1; - dbus_message_iter_next (&_iter); - _result = _tmp265_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_GetStartTime (DVBIDBusRecorder* self, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp269_; - guint32* _start_time; - int _start_time_length1; - guint32* _tmp270_; - int _tmp270__length; - int _tmp270__size; - int _tmp270__length1; - DBusMessageIter _tmp271_; - gboolean _result; - dbus_bool_t _tmp273_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetStartTime"); - dbus_message_iter_init_append (_message, &_iter); - _tmp269_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp269_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp274_; - _edomain = DBUS_GERROR; - _tmp274_ = _dbus_error.name + 27; - if (strcmp (_tmp274_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp274_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp274_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp274_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp274_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp274_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp274_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp274_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp274_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp274_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp274_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp274_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp274_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp274_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp274_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp274_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp274_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp274_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp274_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp274_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp274_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp274_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp274_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp274_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp274_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp274_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp274_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp274_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp274_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp274_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp274_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp274_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp274_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "aub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - _start_time_length1 = 0; - _tmp270_ = g_new (guint32, 5); - _tmp270__length = 0; - _tmp270__size = 4; - _tmp270__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp271_); - for (; dbus_message_iter_get_arg_type (&_tmp271_); _tmp270__length1++) { - dbus_uint32_t _tmp272_; - if (_tmp270__size == _tmp270__length) { - _tmp270__size = 2 * _tmp270__size; - _tmp270_ = g_renew (guint32, _tmp270_, _tmp270__size + 1); - } - dbus_message_iter_get_basic (&_tmp271_, &_tmp272_); - dbus_message_iter_next (&_tmp271_); - _tmp270_[_tmp270__length++] = _tmp272_; - } - _start_time_length1 = _tmp270__length1; - dbus_message_iter_next (&_iter); - _start_time = _tmp270_; - *start_time = _start_time; - *start_time_length1 = _start_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp273_); - dbus_message_iter_next (&_iter); - _result = _tmp273_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_SetStartTime (DVBIDBusRecorder* self, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp275_; - dbus_int32_t _tmp276_; - dbus_int32_t _tmp277_; - dbus_int32_t _tmp278_; - dbus_int32_t _tmp279_; - dbus_int32_t _tmp280_; - gboolean _result; - dbus_bool_t _tmp281_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "SetStartTime"); - dbus_message_iter_init_append (_message, &_iter); - _tmp275_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp275_); - _tmp276_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp276_); - _tmp277_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp277_); - _tmp278_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp278_); - _tmp279_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp279_); - _tmp280_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp280_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp282_; - _edomain = DBUS_GERROR; - _tmp282_ = _dbus_error.name + 27; - if (strcmp (_tmp282_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp282_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp282_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp282_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp282_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp282_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp282_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp282_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp282_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp282_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp282_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp282_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp282_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp282_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp282_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp282_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp282_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp282_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp282_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp282_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp282_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp282_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp282_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp282_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp282_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp282_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp282_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp282_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp282_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp282_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp282_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp282_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp282_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp281_); - dbus_message_iter_next (&_iter); - _result = _tmp281_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_GetEndTime (DVBIDBusRecorder* self, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp283_; - guint* _end_time; - int _end_time_length1; - guint* _tmp284_; - int _tmp284__length; - int _tmp284__size; - int _tmp284__length1; - DBusMessageIter _tmp285_; - gboolean _result; - dbus_bool_t _tmp287_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetEndTime"); - dbus_message_iter_init_append (_message, &_iter); - _tmp283_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp283_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp288_; - _edomain = DBUS_GERROR; - _tmp288_ = _dbus_error.name + 27; - if (strcmp (_tmp288_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp288_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp288_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp288_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp288_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp288_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp288_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp288_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp288_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp288_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp288_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp288_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp288_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp288_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp288_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp288_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp288_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp288_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp288_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp288_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp288_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp288_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp288_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp288_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp288_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp288_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp288_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp288_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp288_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp288_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp288_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp288_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp288_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "aub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - _end_time_length1 = 0; - _tmp284_ = g_new (guint, 5); - _tmp284__length = 0; - _tmp284__size = 4; - _tmp284__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp285_); - for (; dbus_message_iter_get_arg_type (&_tmp285_); _tmp284__length1++) { - dbus_uint32_t _tmp286_; - if (_tmp284__size == _tmp284__length) { - _tmp284__size = 2 * _tmp284__size; - _tmp284_ = g_renew (guint, _tmp284_, _tmp284__size + 1); - } - dbus_message_iter_get_basic (&_tmp285_, &_tmp286_); - dbus_message_iter_next (&_tmp285_); - _tmp284_[_tmp284__length++] = _tmp286_; - } - _end_time_length1 = _tmp284__length1; - dbus_message_iter_next (&_iter); - _end_time = _tmp284_; - *end_time = _end_time; - *end_time_length1 = _end_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp287_); - dbus_message_iter_next (&_iter); - _result = _tmp287_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_GetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint* duration, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp289_; - guint _duration; - dbus_uint32_t _tmp290_; - gboolean _result; - dbus_bool_t _tmp291_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetDuration"); - dbus_message_iter_init_append (_message, &_iter); - _tmp289_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp289_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp292_; - _edomain = DBUS_GERROR; - _tmp292_ = _dbus_error.name + 27; - if (strcmp (_tmp292_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp292_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp292_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp292_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp292_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp292_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp292_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp292_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp292_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp292_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp292_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp292_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp292_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp292_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp292_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp292_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp292_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp292_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp292_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp292_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp292_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp292_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp292_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp292_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp292_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp292_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp292_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp292_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp292_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp292_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp292_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp292_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp292_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "ub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp290_); - dbus_message_iter_next (&_iter); - _duration = _tmp290_; - *duration = _duration; - dbus_message_iter_get_basic (&_iter, &_tmp291_); - dbus_message_iter_next (&_iter); - _result = _tmp291_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_SetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint duration, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp293_; - dbus_uint32_t _tmp294_; - gboolean _result; - dbus_bool_t _tmp295_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "SetDuration"); - dbus_message_iter_init_append (_message, &_iter); - _tmp293_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp293_); - _tmp294_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp294_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp296_; - _edomain = DBUS_GERROR; - _tmp296_ = _dbus_error.name + 27; - if (strcmp (_tmp296_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp296_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp296_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp296_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp296_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp296_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp296_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp296_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp296_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp296_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp296_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp296_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp296_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp296_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp296_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp296_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp296_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp296_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp296_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp296_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp296_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp296_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp296_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp296_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp296_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp296_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp296_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp296_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp296_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp296_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp296_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp296_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp296_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp295_); - dbus_message_iter_next (&_iter); - _result = _tmp295_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_GetChannelName (DVBIDBusRecorder* self, guint32 timer_id, gchar** name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp297_; - gchar* _name; - const char* _tmp298_; - gboolean _result; - dbus_bool_t _tmp299_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetChannelName"); - dbus_message_iter_init_append (_message, &_iter); - _tmp297_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp297_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp300_; - _edomain = DBUS_GERROR; - _tmp300_ = _dbus_error.name + 27; - if (strcmp (_tmp300_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp300_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp300_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp300_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp300_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp300_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp300_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp300_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp300_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp300_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp300_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp300_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp300_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp300_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp300_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp300_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp300_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp300_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp300_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp300_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp300_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp300_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp300_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp300_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp300_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp300_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp300_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp300_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp300_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp300_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp300_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp300_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp300_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp298_); - dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp298_); - *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp299_); - dbus_message_iter_next (&_iter); - _result = _tmp299_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_GetTitle (DVBIDBusRecorder* self, guint32 timer_id, gchar** title, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp301_; - gchar* _title; - const char* _tmp302_; - gboolean _result; - dbus_bool_t _tmp303_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetTitle"); - dbus_message_iter_init_append (_message, &_iter); - _tmp301_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp301_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp304_; - _edomain = DBUS_GERROR; - _tmp304_ = _dbus_error.name + 27; - if (strcmp (_tmp304_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp304_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp304_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp304_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp304_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp304_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp304_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp304_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp304_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp304_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp304_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp304_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp304_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp304_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp304_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp304_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp304_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp304_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp304_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp304_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp304_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp304_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp304_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp304_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp304_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp304_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp304_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp304_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp304_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp304_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp304_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp304_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp304_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp302_); - dbus_message_iter_next (&_iter); - _title = g_strdup (_tmp302_); - *title = _title; - dbus_message_iter_get_basic (&_iter, &_tmp303_); - dbus_message_iter_next (&_iter); - _result = _tmp303_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_GetAllInformations (DVBIDBusRecorder* self, guint32 timer_id, DVBTimerInfo* info, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp305_; - DVBTimerInfo _info; - DVBTimerInfo _tmp306_; - DBusMessageIter _tmp307_; - dbus_uint32_t _tmp308_; - dbus_uint32_t _tmp309_; - dbus_bool_t _tmp310_; - const char* _tmp311_; - const char* _tmp312_; - gboolean _result; - dbus_bool_t _tmp313_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetAllInformations"); - dbus_message_iter_init_append (_message, &_iter); - _tmp305_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp305_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp314_; - _edomain = DBUS_GERROR; - _tmp314_ = _dbus_error.name + 27; - if (strcmp (_tmp314_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp314_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp314_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp314_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp314_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp314_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp314_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp314_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp314_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp314_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp314_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp314_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp314_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp314_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp314_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp314_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp314_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp314_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp314_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp314_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp314_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp314_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp314_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp314_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp314_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp314_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp314_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp314_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp314_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp314_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp314_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp314_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp314_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "(uubss)b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "(uubss)b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_tmp307_); - dbus_message_iter_get_basic (&_tmp307_, &_tmp308_); - dbus_message_iter_next (&_tmp307_); - _tmp306_.id = _tmp308_; - dbus_message_iter_get_basic (&_tmp307_, &_tmp309_); - dbus_message_iter_next (&_tmp307_); - _tmp306_.duration = _tmp309_; - dbus_message_iter_get_basic (&_tmp307_, &_tmp310_); - dbus_message_iter_next (&_tmp307_); - _tmp306_.active = _tmp310_; - dbus_message_iter_get_basic (&_tmp307_, &_tmp311_); - dbus_message_iter_next (&_tmp307_); - _tmp306_.channel_name = g_strdup (_tmp311_); - dbus_message_iter_get_basic (&_tmp307_, &_tmp312_); - dbus_message_iter_next (&_tmp307_); - _tmp306_.title = g_strdup (_tmp312_); - dbus_message_iter_next (&_iter); - _info = _tmp306_; - *info = _info; - dbus_message_iter_get_basic (&_iter, &_tmp313_); - dbus_message_iter_next (&_iter); - _result = _tmp313_; - dbus_message_unref (_reply); - return _result; -} - - -static guint32* dvb_id_bus_recorder_dbus_proxy_GetActiveTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint32* _result; - int _result_length1; - guint32* _tmp315_; - int _tmp315__length; - int _tmp315__size; - int _tmp315__length1; - DBusMessageIter _tmp316_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "GetActiveTimers"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp318_; - _edomain = DBUS_GERROR; - _tmp318_ = _dbus_error.name + 27; - if (strcmp (_tmp318_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp318_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp318_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp318_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp318_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp318_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp318_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp318_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp318_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp318_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp318_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp318_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp318_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp318_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp318_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp318_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp318_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp318_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp318_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp318_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp318_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp318_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp318_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp318_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp318_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp318_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp318_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp318_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp318_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp318_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp318_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp318_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp318_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "au")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "au", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp315_ = g_new (guint32, 5); - _tmp315__length = 0; - _tmp315__size = 4; - _tmp315__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp316_); - for (; dbus_message_iter_get_arg_type (&_tmp316_); _tmp315__length1++) { - dbus_uint32_t _tmp317_; - if (_tmp315__size == _tmp315__length) { - _tmp315__size = 2 * _tmp315__size; - _tmp315_ = g_renew (guint32, _tmp315_, _tmp315__size + 1); - } - dbus_message_iter_get_basic (&_tmp316_, &_tmp317_); - dbus_message_iter_next (&_tmp316_); - _tmp315_[_tmp315__length++] = _tmp317_; - } - _result_length1 = _tmp315__length1; - dbus_message_iter_next (&_iter); - _result = _tmp315_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp319_; - gboolean _result; - dbus_bool_t _tmp320_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "IsTimerActive"); - dbus_message_iter_init_append (_message, &_iter); - _tmp319_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp319_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp321_; - _edomain = DBUS_GERROR; - _tmp321_ = _dbus_error.name + 27; - if (strcmp (_tmp321_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp321_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp321_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp321_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp321_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp321_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp321_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp321_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp321_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp321_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp321_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp321_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp321_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp321_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp321_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp321_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp321_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp321_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp321_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp321_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp321_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp321_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp321_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp321_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp321_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp321_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp321_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp321_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp321_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp321_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp321_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp321_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp321_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp320_); - dbus_message_iter_next (&_iter); - _result = _tmp320_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recorder_dbus_proxy_HasTimer (DVBIDBusRecorder* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp322_; - dbus_uint32_t _tmp323_; - dbus_uint32_t _tmp324_; - dbus_uint32_t _tmp325_; - dbus_uint32_t _tmp326_; - dbus_uint32_t _tmp327_; - gboolean _result; - dbus_bool_t _tmp328_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "HasTimer"); - dbus_message_iter_init_append (_message, &_iter); - _tmp322_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp322_); - _tmp323_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp323_); - _tmp324_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp324_); - _tmp325_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp325_); - _tmp326_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp326_); - _tmp327_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp327_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp329_; - _edomain = DBUS_GERROR; - _tmp329_ = _dbus_error.name + 27; - if (strcmp (_tmp329_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp329_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp329_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp329_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp329_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp329_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp329_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp329_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp329_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp329_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp329_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp329_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp329_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp329_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp329_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp329_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp329_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp329_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp329_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp329_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp329_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp329_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp329_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp329_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp329_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp329_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp329_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp329_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp329_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp329_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp329_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp329_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp329_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp328_); - dbus_message_iter_next (&_iter); - _result = _tmp328_; - dbus_message_unref (_reply); - return _result; -} - - -static DVBOverlapType dvb_id_bus_recorder_dbus_proxy_HasTimerForEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp330_; - dbus_uint32_t _tmp331_; - DVBOverlapType _result; - dbus_int32_t _tmp332_; - if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return 0; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Recorder", "HasTimerForEvent"); - dbus_message_iter_init_append (_message, &_iter); - _tmp330_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp330_); - _tmp331_ = channel_sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp331_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp333_; - _edomain = DBUS_GERROR; - _tmp333_ = _dbus_error.name + 27; - if (strcmp (_tmp333_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp333_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp333_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp333_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp333_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp333_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp333_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp333_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp333_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp333_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp333_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp333_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp333_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp333_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp333_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp333_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp333_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp333_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp333_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp333_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp333_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp333_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp333_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp333_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp333_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp333_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp333_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp333_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp333_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp333_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp333_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp333_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp333_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return 0; - } - if (strcmp (dbus_message_get_signature (_reply), "i")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "i", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp332_); - dbus_message_iter_next (&_iter); - _result = _tmp332_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_recorder_dbus_proxy_dvb_id_bus_recorder__interface_init (DVBIDBusRecorderIface* iface) { - iface->AddTimer = dvb_id_bus_recorder_dbus_proxy_AddTimer; - iface->AddTimerWithMargin = dvb_id_bus_recorder_dbus_proxy_AddTimerWithMargin; - iface->AddTimerForEPGEvent = dvb_id_bus_recorder_dbus_proxy_AddTimerForEPGEvent; - iface->DeleteTimer = dvb_id_bus_recorder_dbus_proxy_DeleteTimer; - iface->GetTimers = dvb_id_bus_recorder_dbus_proxy_GetTimers; - iface->GetStartTime = dvb_id_bus_recorder_dbus_proxy_GetStartTime; - iface->SetStartTime = dvb_id_bus_recorder_dbus_proxy_SetStartTime; - iface->GetEndTime = dvb_id_bus_recorder_dbus_proxy_GetEndTime; - iface->GetDuration = dvb_id_bus_recorder_dbus_proxy_GetDuration; - iface->SetDuration = dvb_id_bus_recorder_dbus_proxy_SetDuration; - iface->GetChannelName = dvb_id_bus_recorder_dbus_proxy_GetChannelName; - iface->GetTitle = dvb_id_bus_recorder_dbus_proxy_GetTitle; - iface->GetAllInformations = dvb_id_bus_recorder_dbus_proxy_GetAllInformations; - iface->GetActiveTimers = dvb_id_bus_recorder_dbus_proxy_GetActiveTimers; - iface->IsTimerActive = dvb_id_bus_recorder_dbus_proxy_IsTimerActive; - iface->HasTimer = dvb_id_bus_recorder_dbus_proxy_HasTimer; - iface->HasTimerForEvent = dvb_id_bus_recorder_dbus_proxy_HasTimerForEvent; -} - - -static void _vala_dvb_id_bus_recorder_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { -} - - -static void _vala_dvb_id_bus_recorder_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dvb_id_bus_recorder_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_recorder_recording_started, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_recorder_recording_finished, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_recorder_changed, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecorder.vala gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecorder.vala --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecorder.vala 2010-04-01 09:50:34.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecorder.vala 2011-04-19 20:46:24.000000000 +0000 @@ -54,7 +54,7 @@ */ public abstract bool AddTimer (uint channel, int start_year, int start_month, int start_day, - int start_hour, int start_minute, uint duration, out uint32 timer_id) throws DBus.Error; + int start_hour, int start_minute, uint duration, out uint32 timer_id) throws DBusError; /** * Works the same way as AddTimer() but adds a margin before and @@ -62,7 +62,7 @@ */ public abstract bool AddTimerWithMargin (uint channel, int start_year, int start_month, int start_day, - int start_hour, int start_minute, uint duration, out uint32 timer_id) throws DBus.Error; + int start_hour, int start_minute, uint duration, out uint32 timer_id) throws DBusError; /** * @event_id: id of the EPG event @@ -72,7 +72,7 @@ * @returns: TRUE on success */ public abstract bool AddTimerForEPGEvent (uint event_id, - uint channel_sid, out uint32 timer_id) throws DBus.Error; + uint channel_sid, out uint32 timer_id) throws DBusError; /** * @timer_id: The id of the timer you want to delete @@ -81,13 +81,13 @@ * Delete timer. If the id belongs to the currently * active timer recording is aborted. */ - public abstract bool DeleteTimer (uint32 timer_id) throws DBus.Error; + public abstract bool DeleteTimer (uint32 timer_id) throws DBusError; /** * dvb_recorder_GetTimers * @returns: A list of all timer ids */ - public abstract uint32[] GetTimers () throws DBus.Error; + public abstract uint32[] GetTimers () throws DBusError; /** * @timer_id: Timer's id @@ -95,7 +95,7 @@ * 2 = day, 3 = hour and 4 = minute. * @returns: TRUE on success */ - public abstract bool GetStartTime (uint32 timer_id, out uint32[] start_time) throws DBus.Error; + public abstract bool GetStartTime (uint32 timer_id, out uint32[] start_time) throws DBusError; /** * @timer_id: The new timer's id on success, or 0 if timer couldn't @@ -108,14 +108,14 @@ * @returns: TRUE on success */ public abstract bool SetStartTime (uint32 timer_id, int start_year, - int start_month, int start_day, int start_hour, int start_minute) throws DBus.Error; + int start_month, int start_day, int start_hour, int start_minute) throws DBusError; /** * @timer_id: Timer's id * @end_time: Same as dvb_recorder_GetStartTime() * @returns: TRUE on success */ - public abstract bool GetEndTime (uint32 timer_id, out uint[] end_time) throws DBus.Error; + public abstract bool GetEndTime (uint32 timer_id, out uint[] end_time) throws DBusError; /** * @timer_id: Timer's id @@ -123,14 +123,14 @@ * the given id * @returns: TRUE on success */ - public abstract bool GetDuration (uint32 timer_id, out uint duration) throws DBus.Error; + public abstract bool GetDuration (uint32 timer_id, out uint duration) throws DBusError; /** * @timer_id: Timer's id * @duration: Duration in minutes * @returns: TRUE on success */ - public abstract bool SetDuration (uint32 timer_id, uint duration) throws DBus.Error; + public abstract bool SetDuration (uint32 timer_id, uint duration) throws DBusError; /** * @timer_id: Timer's id @@ -138,7 +138,7 @@ * empty string when a timer with the given id doesn't exist * @returns: TRUE on success */ - public abstract bool GetChannelName (uint32 timer_id, out string name) throws DBus.Error; + public abstract bool GetChannelName (uint32 timer_id, out string name) throws DBusError; /** * @timer_id: Timer's id @@ -147,7 +147,7 @@ * about the title of the show * @returns: TRUE on success */ - public abstract bool GetTitle (uint32 timer_id, out string title) throws DBus.Error; + public abstract bool GetTitle (uint32 timer_id, out string title) throws DBusError; /** * @timer_id: Timer's id @@ -156,30 +156,30 @@ * This method can be used to retrieve all informations * about a particular timer at once */ - public abstract bool GetAllInformations (uint32 timer_id, out TimerInfo info) throws DBus.Error; + public abstract bool GetAllInformations (uint32 timer_id, out TimerInfo info) throws DBusError; /** * @returns: The currently active timers */ - public abstract uint32[] GetActiveTimers () throws DBus.Error; + public abstract uint32[] GetActiveTimers () throws DBusError; /** * @timer_id: Timer's id * @returns: TRUE if timer is currently active */ - public abstract bool IsTimerActive (uint32 timer_id) throws DBus.Error; + public abstract bool IsTimerActive (uint32 timer_id) throws DBusError; /** * @returns: TRUE if a timer is already scheduled in the given * period of time */ public abstract bool HasTimer (uint start_year, uint start_month, - uint start_day, uint start_hour, uint start_minute, uint duration) throws DBus.Error; + uint start_day, uint start_hour, uint start_minute, uint duration) throws DBusError; /** * Checks if a timer overlaps with the given event */ - public abstract OverlapType HasTimerForEvent (uint event_id, uint channel_sid) throws DBus.Error; + public abstract OverlapType HasTimerForEvent (uint event_id, uint channel_sid) throws DBusError; } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecordingsStore.c gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecordingsStore.c --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecordingsStore.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecordingsStore.c 2011-12-09 11:14:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusRecordingsStore.c generated by valac 0.11.3, the Vala compiler +/* IDBusRecordingsStore.c generated by valac 0.14.0, the Vala compiler * generated from IDBusRecordingsStore.vala, do not modify */ /* @@ -24,9 +24,7 @@ #include #include #include -#include -#include -#include +#include #define DVB_TYPE_RECORDING_INFO (dvb_recording_info_get_type ()) @@ -40,9 +38,10 @@ typedef struct _DVBIDBusRecordingsStore DVBIDBusRecordingsStore; typedef struct _DVBIDBusRecordingsStoreIface DVBIDBusRecordingsStoreIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; -typedef struct _DVBIDBusRecordingsStoreDBusProxy DVBIDBusRecordingsStoreDBusProxy; -typedef DBusGProxyClass DVBIDBusRecordingsStoreDBusProxyClass; + +#define DVB_TYPE_ID_BUS_RECORDINGS_STORE_PROXY (dvb_id_bus_recordings_store_proxy_get_type ()) +typedef GDBusProxy DVBIDBusRecordingsStoreProxy; +typedef GDBusProxyClass DVBIDBusRecordingsStoreProxyClass; struct _DVBRecordingInfo { guint32 id; @@ -68,15 +67,6 @@ gboolean (*GetAllInformations) (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusRecordingsStoreDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - GType dvb_recording_info_get_type (void) G_GNUC_CONST; @@ -84,7 +74,8 @@ void dvb_recording_info_free (DVBRecordingInfo* self); void dvb_recording_info_copy (const DVBRecordingInfo* self, DVBRecordingInfo* dest); void dvb_recording_info_destroy (DVBRecordingInfo* self); -DVBIDBusRecordingsStore* dvb_id_bus_recordings_store_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_recordings_store_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_recordings_store_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_recordings_store_get_type (void) G_GNUC_CONST; guint32* dvb_id_bus_recordings_store_GetRecordings (DVBIDBusRecordingsStore* self, int* result_length1, GError** error); gboolean dvb_id_bus_recordings_store_GetLocation (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** location, GError** error); @@ -97,63 +88,144 @@ gboolean dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error); gboolean dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error); static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_recordings_store_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_recordings_store_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_recordings_store_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_introspect (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_property_get_all (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetRecordings (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetLocation (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetName (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetDescription (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetStartTime (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetStartTimestamp (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetLength (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_Delete (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_recordings_store_changed (GObject* _sender, guint32 rec_id, guint type, DBusConnection* _connection); -GType dvb_id_bus_recordings_store_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_recordings_store_changed (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_recordings_store_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_RECORDINGS_STORE_DBUS_PROXY_DUMMY_PROPERTY -}; -static guint32* dvb_id_bus_recordings_store_dbus_proxy_GetRecordings (DVBIDBusRecordingsStore* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetLocation (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** location, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetDescription (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** description, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetStartTime (DVBIDBusRecordingsStore* self, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetStartTimestamp (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* timestamp, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetLength (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* length, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_Delete (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error); -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error); -static void dvb_id_bus_recordings_store_dbus_proxy_dvb_id_bus_recordings_store__interface_init (DVBIDBusRecordingsStoreIface* iface); -static void _vala_dvb_id_bus_recordings_store_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_recordings_store_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); - -static const DBusObjectPathVTable _dvb_id_bus_recordings_store_dbus_path_vtable = {_dvb_id_bus_recordings_store_dbus_unregister, dvb_id_bus_recordings_store_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_recordings_store_dbus_vtable = {dvb_id_bus_recordings_store_dbus_register_object}; +static void dvb_id_bus_recordings_store_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_recordings_store_changed (DVBIDBusRecordingsStore* self, GVariant* parameters); +static guint32* dvb_id_bus_recordings_store_proxy_GetRecordings (DVBIDBusRecordingsStore* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetLocation (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** location, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetDescription (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** description, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetStartTime (DVBIDBusRecordingsStore* self, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetStartTimestamp (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* timestamp, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetLength (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* length, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_Delete (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error); +static gboolean dvb_id_bus_recordings_store_proxy_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error); +static void dvb_id_bus_recordings_store_proxy_dvb_id_bus_recordings_store_interface_init (DVBIDBusRecordingsStoreIface* iface); +static void _dbus_dvb_id_bus_recordings_store_GetRecordings (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetLocation (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetName (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetDescription (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetStartTime (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetStartTimestamp (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetLength (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_Delete (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_recordings_store_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_recordings_store_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_recordings_store_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_dvb_id_bus_recordings_store_changed (GObject* _sender, guint32 rec_id, guint type, gpointer* _data); +static void _dvb_id_bus_recordings_store_unregister_object (gpointer user_data); + +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetRecordings_result = {-1, "result", "au"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetRecordings_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetRecordings_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetRecordings_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetRecordings = {-1, "GetRecordings", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetRecordings_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetRecordings_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_location = {-1, "location", "s"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_location, &_dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetLocation = {-1, "GetLocation", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetLocation_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetName_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetName_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetName_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetName_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetName_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetName_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetName_name, &_dvb_id_bus_recordings_store_dbus_arg_info_GetName_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetName = {-1, "GetName", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetName_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetName_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_description = {-1, "description", "s"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_description, &_dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetDescription = {-1, "GetDescription", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetDescription_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_start_time = {-1, "start_time", "au"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_start_time, &_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetStartTime = {-1, "GetStartTime", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTime_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_timestamp = {-1, "timestamp", "x"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_timestamp, &_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetStartTimestamp = {-1, "GetStartTimestamp", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetStartTimestamp_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetLength_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetLength_length = {-1, "length", "x"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetLength_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetLength_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetLength_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetLength_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetLength_length, &_dvb_id_bus_recordings_store_dbus_arg_info_GetLength_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetLength = {-1, "GetLength", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetLength_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetLength_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_Delete_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_Delete_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_Delete_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_Delete_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_Delete_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_Delete_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_Delete = {-1, "Delete", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_Delete_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_Delete_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_name, &_dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetChannelName = {-1, "GetChannelName", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetChannelName_out)}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_infos = {-1, "infos", "(ussxxss)"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_in[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_rec_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_out[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_infos, &_dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_recordings_store_dbus_method_info_GetAllInformations = {-1, "GetAllInformations", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_in), (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_GetAllInformations_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_recordings_store_dbus_method_info[] = {&_dvb_id_bus_recordings_store_dbus_method_info_GetRecordings, &_dvb_id_bus_recordings_store_dbus_method_info_GetLocation, &_dvb_id_bus_recordings_store_dbus_method_info_GetName, &_dvb_id_bus_recordings_store_dbus_method_info_GetDescription, &_dvb_id_bus_recordings_store_dbus_method_info_GetStartTime, &_dvb_id_bus_recordings_store_dbus_method_info_GetStartTimestamp, &_dvb_id_bus_recordings_store_dbus_method_info_GetLength, &_dvb_id_bus_recordings_store_dbus_method_info_Delete, &_dvb_id_bus_recordings_store_dbus_method_info_GetChannelName, &_dvb_id_bus_recordings_store_dbus_method_info_GetAllInformations, NULL}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_changed_rec_id = {-1, "rec_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_recordings_store_dbus_arg_info_changed_type = {-1, "type", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_recordings_store_dbus_arg_info_changed[] = {&_dvb_id_bus_recordings_store_dbus_arg_info_changed_rec_id, &_dvb_id_bus_recordings_store_dbus_arg_info_changed_type, NULL}; +static const GDBusSignalInfo _dvb_id_bus_recordings_store_dbus_signal_info_changed = {-1, "Changed", (GDBusArgInfo **) (&_dvb_id_bus_recordings_store_dbus_arg_info_changed)}; +static const GDBusSignalInfo * const _dvb_id_bus_recordings_store_dbus_signal_info[] = {&_dvb_id_bus_recordings_store_dbus_signal_info_changed, NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_recordings_store_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_recordings_store_dbus_interface_info = {-1, "org.gnome.DVB.RecordingsStore", (GDBusMethodInfo **) (&_dvb_id_bus_recordings_store_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_recordings_store_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_recordings_store_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_recordings_store_dbus_interface_vtable = {dvb_id_bus_recordings_store_dbus_interface_method_call, dvb_id_bus_recordings_store_dbus_interface_get_property, dvb_id_bus_recordings_store_dbus_interface_set_property}; void dvb_recording_info_copy (const DVBRecordingInfo* self, DVBRecordingInfo* dest) { - dest->id = self->id; - dest->name = g_strdup (self->name); - dest->description = g_strdup (self->description); - dest->length = self->length; - dest->start_timestamp = self->start_timestamp; - dest->channel = g_strdup (self->channel); - dest->location = g_strdup (self->location); + guint32 _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; + const gchar* _tmp4_; + gint64 _tmp5_; + gint64 _tmp6_; + const gchar* _tmp7_; + const gchar* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; + _tmp0_ = (*self).id; + (*dest).id = _tmp0_; + _tmp1_ = (*self).name; + _tmp2_ = g_strdup (_tmp1_); + _g_free0 ((*dest).name); + (*dest).name = _tmp2_; + _tmp3_ = (*self).description; + _tmp4_ = g_strdup (_tmp3_); + _g_free0 ((*dest).description); + (*dest).description = _tmp4_; + _tmp5_ = (*self).length; + (*dest).length = _tmp5_; + _tmp6_ = (*self).start_timestamp; + (*dest).start_timestamp = _tmp6_; + _tmp7_ = (*self).channel; + _tmp8_ = g_strdup (_tmp7_); + _g_free0 ((*dest).channel); + (*dest).channel = _tmp8_; + _tmp9_ = (*self).location; + _tmp10_ = g_strdup (_tmp9_); + _g_free0 ((*dest).location); + (*dest).location = _tmp10_; } void dvb_recording_info_destroy (DVBRecordingInfo* self) { - _g_free0 (self->name); - _g_free0 (self->description); - _g_free0 (self->channel); - _g_free0 (self->location); + _g_free0 ((*self).name); + _g_free0 ((*self).description); + _g_free0 ((*self).channel); + _g_free0 ((*self).location); } @@ -186,6 +258,7 @@ * @returns: A list of ids for all recordings */ guint32* dvb_id_bus_recordings_store_GetRecordings (DVBIDBusRecordingsStore* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetRecordings (self, result_length1, error); } @@ -196,6 +269,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recordings_store_GetLocation (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** location, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetLocation (self, rec_id, location, error); } @@ -207,6 +281,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recordings_store_GetName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetName (self, rec_id, name, error); } @@ -218,6 +293,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recordings_store_GetDescription (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** description, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetDescription (self, rec_id, description, error); } @@ -228,6 +304,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recordings_store_GetStartTime (DVBIDBusRecordingsStore* self, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetStartTime (self, rec_id, start_time, start_time_length1, error); } @@ -238,6 +315,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recordings_store_GetStartTimestamp (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* timestamp, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetStartTimestamp (self, rec_id, timestamp, error); } @@ -248,6 +326,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recordings_store_GetLength (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* length, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetLength (self, rec_id, length, error); } @@ -260,6 +339,7 @@ * created by the Recorder */ gboolean dvb_id_bus_recordings_store_Delete (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->Delete (self, rec_id, error); } @@ -271,6 +351,7 @@ * @returns: TRUE on success */ gboolean dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetChannelName (self, rec_id, name, error); } @@ -283,6 +364,7 @@ * about a particular recording at once */ gboolean dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetAllInformations (self, rec_id, infos, error); } @@ -291,7 +373,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint32 arg_1, guint arg_2, gpointer data2); register GMarshalFunc_VOID__UINT_UINT callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -306,3005 +389,971 @@ } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); +static void dvb_id_bus_recordings_store_base_init (DVBIDBusRecordingsStoreIface * iface) { + static gboolean initialized = FALSE; + if (!initialized) { + initialized = TRUE; + /** + * @type: 0: added, 1: deleted, 2: updated + */ + g_signal_new ("changed", DVB_TYPE_ID_BUS_RECORDINGS_STORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); + } +} + + +GType dvb_id_bus_recordings_store_get_type (void) { + static volatile gsize dvb_id_bus_recordings_store_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_recordings_store_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusRecordingsStoreIface), (GBaseInitFunc) dvb_id_bus_recordings_store_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_id_bus_recordings_store_type_id; + dvb_id_bus_recordings_store_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusRecordingsStore", &g_define_type_info, 0); + g_type_interface_add_prerequisite (dvb_id_bus_recordings_store_type_id, G_TYPE_OBJECT); + g_type_set_qdata (dvb_id_bus_recordings_store_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_recordings_store_proxy_get_type); + g_type_set_qdata (dvb_id_bus_recordings_store_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.RecordingsStore"); + g_type_set_qdata (dvb_id_bus_recordings_store_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_recordings_store_register_object); + g_once_init_leave (&dvb_id_bus_recordings_store_type_id__volatile, dvb_id_bus_recordings_store_type_id); } + return dvb_id_bus_recordings_store_type_id__volatile; } -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); +G_DEFINE_TYPE_EXTENDED (DVBIDBusRecordingsStoreProxy, dvb_id_bus_recordings_store_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_RECORDINGS_STORE, dvb_id_bus_recordings_store_proxy_dvb_id_bus_recordings_store_interface_init) ) +static void dvb_id_bus_recordings_store_proxy_class_init (DVBIDBusRecordingsStoreProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_recordings_store_proxy_g_signal; } -void _dvb_id_bus_recordings_store_dbus_unregister (DBusConnection* connection, void* _user_data_) { +static void _dbus_handle_dvb_id_bus_recordings_store_changed (DVBIDBusRecordingsStore* self, GVariant* parameters) { + GVariantIter _arguments_iter; + guint32 rec_id = 0U; + GVariant* _tmp289_; + guint type = 0U; + GVariant* _tmp290_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp289_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp289_); + g_variant_unref (_tmp289_); + _tmp290_ = g_variant_iter_next_value (&_arguments_iter); + type = g_variant_get_uint32 (_tmp290_); + g_variant_unref (_tmp290_); + g_signal_emit_by_name (self, "changed", rec_id, type); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_introspect (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +static void dvb_id_bus_recordings_store_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "Changed") == 0) { + _dbus_handle_dvb_id_bus_recordings_store_changed ((DVBIDBusRecordingsStore*) proxy, parameters); } } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_property_get_all (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.RecordingsStore") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; +static void dvb_id_bus_recordings_store_proxy_init (DVBIDBusRecordingsStoreProxy* self) { +} + + +static guint32* dvb_id_bus_recordings_store_proxy_GetRecordings (DVBIDBusRecordingsStore* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32* _result; + int _result_length1; + GVariant* _tmp291_; + guint32* _tmp292_; + int _tmp292__length; + int _tmp292__size; + int _tmp292__length1; + GVariantIter _tmp293_; + GVariant* _tmp294_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetRecordings"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp291_ = g_variant_iter_next_value (&_reply_iter); + _tmp292_ = g_new (guint32, 5); + _tmp292__length = 0; + _tmp292__size = 4; + _tmp292__length1 = 0; + g_variant_iter_init (&_tmp293_, _tmp291_); + for (; (_tmp294_ = g_variant_iter_next_value (&_tmp293_)) != NULL; _tmp292__length1++) { + if (_tmp292__size == _tmp292__length) { + _tmp292__size = 2 * _tmp292__size; + _tmp292_ = g_renew (guint32, _tmp292_, _tmp292__size + 1); + } + _tmp292_[_tmp292__length++] = g_variant_get_uint32 (_tmp294_); + g_variant_unref (_tmp294_); + } + _result_length1 = _tmp292__length1; + _result = _tmp292_; + g_variant_unref (_tmp291_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetLocation (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** location, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_location; + GVariant* _tmp295_; + gboolean _result; + GVariant* _tmp296_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetLocation"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp295_ = g_variant_iter_next_value (&_reply_iter); + _vala_location = g_variant_dup_string (_tmp295_, NULL); + g_variant_unref (_tmp295_); + *location = _vala_location; + _tmp296_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp296_); + g_variant_unref (_tmp296_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_name; + GVariant* _tmp297_; + gboolean _result; + GVariant* _tmp298_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetName"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp297_ = g_variant_iter_next_value (&_reply_iter); + _vala_name = g_variant_dup_string (_tmp297_, NULL); + g_variant_unref (_tmp297_); + *name = _vala_name; + _tmp298_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp298_); + g_variant_unref (_tmp298_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetDescription (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** description, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_description; + GVariant* _tmp299_; + gboolean _result; + GVariant* _tmp300_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetDescription"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp299_ = g_variant_iter_next_value (&_reply_iter); + _vala_description = g_variant_dup_string (_tmp299_, NULL); + g_variant_unref (_tmp299_); + *description = _vala_description; + _tmp300_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp300_); + g_variant_unref (_tmp300_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetStartTime (DVBIDBusRecordingsStore* self, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint* _vala_start_time; + int _vala_start_time_length1; + GVariant* _tmp301_; + guint* _tmp302_; + int _tmp302__length; + int _tmp302__size; + int _tmp302__length1; + GVariantIter _tmp303_; + GVariant* _tmp304_; + gboolean _result; + GVariant* _tmp305_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetStartTime"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _vala_start_time_length1 = 0; + _tmp301_ = g_variant_iter_next_value (&_reply_iter); + _tmp302_ = g_new (guint, 5); + _tmp302__length = 0; + _tmp302__size = 4; + _tmp302__length1 = 0; + g_variant_iter_init (&_tmp303_, _tmp301_); + for (; (_tmp304_ = g_variant_iter_next_value (&_tmp303_)) != NULL; _tmp302__length1++) { + if (_tmp302__size == _tmp302__length) { + _tmp302__size = 2 * _tmp302__size; + _tmp302_ = g_renew (guint, _tmp302_, _tmp302__size + 1); + } + _tmp302_[_tmp302__length++] = g_variant_get_uint32 (_tmp304_); + g_variant_unref (_tmp304_); + } + _vala_start_time_length1 = _tmp302__length1; + _vala_start_time = _tmp302_; + g_variant_unref (_tmp301_); + *start_time = _vala_start_time; + *start_time_length1 = _vala_start_time_length1; + _tmp305_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp305_); + g_variant_unref (_tmp305_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetStartTimestamp (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* timestamp, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gint64 _vala_timestamp; + GVariant* _tmp306_; + gboolean _result; + GVariant* _tmp307_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetStartTimestamp"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp306_ = g_variant_iter_next_value (&_reply_iter); + _vala_timestamp = g_variant_get_int64 (_tmp306_); + g_variant_unref (_tmp306_); + *timestamp = _vala_timestamp; + _tmp307_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp307_); + g_variant_unref (_tmp307_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetLength (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* length, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gint64 _vala_length; + GVariant* _tmp308_; + gboolean _result; + GVariant* _tmp309_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetLength"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp308_ = g_variant_iter_next_value (&_reply_iter); + _vala_length = g_variant_get_int64 (_tmp308_); + g_variant_unref (_tmp308_); + *length = _vala_length; + _tmp309_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp309_); + g_variant_unref (_tmp309_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_Delete (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp310_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "Delete"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp310_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp310_); + g_variant_unref (_tmp310_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_name; + GVariant* _tmp311_; + gboolean _result; + GVariant* _tmp312_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetChannelName"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp311_ = g_variant_iter_next_value (&_reply_iter); + _vala_name = g_variant_dup_string (_tmp311_, NULL); + g_variant_unref (_tmp311_); + *name = _vala_name; + _tmp312_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp312_); + g_variant_unref (_tmp312_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_recordings_store_proxy_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + DVBRecordingInfo _vala_infos; + GVariant* _tmp313_; + DVBRecordingInfo _tmp314_; + GVariantIter _tmp315_; + GVariant* _tmp316_; + GVariant* _tmp317_; + GVariant* _tmp318_; + GVariant* _tmp319_; + GVariant* _tmp320_; + GVariant* _tmp321_; + GVariant* _tmp322_; + gboolean _result; + GVariant* _tmp323_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.RecordingsStore", "GetAllInformations"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp313_ = g_variant_iter_next_value (&_reply_iter); + g_variant_iter_init (&_tmp315_, _tmp313_); + _tmp316_ = g_variant_iter_next_value (&_tmp315_); + _tmp314_.id = g_variant_get_uint32 (_tmp316_); + g_variant_unref (_tmp316_); + _tmp317_ = g_variant_iter_next_value (&_tmp315_); + _tmp314_.name = g_variant_dup_string (_tmp317_, NULL); + g_variant_unref (_tmp317_); + _tmp318_ = g_variant_iter_next_value (&_tmp315_); + _tmp314_.description = g_variant_dup_string (_tmp318_, NULL); + g_variant_unref (_tmp318_); + _tmp319_ = g_variant_iter_next_value (&_tmp315_); + _tmp314_.length = g_variant_get_int64 (_tmp319_); + g_variant_unref (_tmp319_); + _tmp320_ = g_variant_iter_next_value (&_tmp315_); + _tmp314_.start_timestamp = g_variant_get_int64 (_tmp320_); + g_variant_unref (_tmp320_); + _tmp321_ = g_variant_iter_next_value (&_tmp315_); + _tmp314_.channel = g_variant_dup_string (_tmp321_, NULL); + g_variant_unref (_tmp321_); + _tmp322_ = g_variant_iter_next_value (&_tmp315_); + _tmp314_.location = g_variant_dup_string (_tmp322_, NULL); + g_variant_unref (_tmp322_); + _vala_infos = _tmp314_; + g_variant_unref (_tmp313_); + *infos = _vala_infos; + _tmp323_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp323_); + g_variant_unref (_tmp323_); + g_object_unref (_reply_message); + return _result; } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetRecordings (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void dvb_id_bus_recordings_store_proxy_dvb_id_bus_recordings_store_interface_init (DVBIDBusRecordingsStoreIface* iface) { + iface->GetRecordings = dvb_id_bus_recordings_store_proxy_GetRecordings; + iface->GetLocation = dvb_id_bus_recordings_store_proxy_GetLocation; + iface->GetName = dvb_id_bus_recordings_store_proxy_GetName; + iface->GetDescription = dvb_id_bus_recordings_store_proxy_GetDescription; + iface->GetStartTime = dvb_id_bus_recordings_store_proxy_GetStartTime; + iface->GetStartTimestamp = dvb_id_bus_recordings_store_proxy_GetStartTimestamp; + iface->GetLength = dvb_id_bus_recordings_store_proxy_GetLength; + iface->Delete = dvb_id_bus_recordings_store_proxy_Delete; + iface->GetChannelName = dvb_id_bus_recordings_store_proxy_GetChannelName; + iface->GetAllInformations = dvb_id_bus_recordings_store_proxy_GetAllInformations; +} + + +static void _dbus_dvb_id_bus_recordings_store_GetRecordings (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32* result; - int result_length1; - DBusMessage* reply; - guint32* _tmp1_; - DBusMessageIter _tmp2_; - int _tmp3_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + int result_length1 = 0; + guint32* _tmp324_; + GVariantBuilder _tmp325_; + int _tmp326_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_recordings_store_GetRecordings (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp1_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp2_); - for (_tmp3_ = 0; _tmp3_ < result_length1; _tmp3_++) { - dbus_uint32_t _tmp4_; - _tmp4_ = *_tmp1_; - dbus_message_iter_append_basic (&_tmp2_, DBUS_TYPE_UINT32, &_tmp4_); - _tmp1_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp2_); - result = (g_free (result), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp324_ = result; + g_variant_builder_init (&_tmp325_, G_VARIANT_TYPE ("au")); + for (_tmp326_ = 0; _tmp326_ < result_length1; _tmp326_++) { + g_variant_builder_add_value (&_tmp325_, g_variant_new_uint32 (*_tmp324_)); + _tmp324_++; } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp325_)); + result = (g_free (result), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetLocation (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetLocation (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp5_; + GVariant* _tmp327_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* location = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp6_; - dbus_bool_t _tmp7_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp5_); - dbus_message_iter_next (&iter); - rec_id = _tmp5_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp327_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp327_); + g_variant_unref (_tmp327_); result = dvb_id_bus_recordings_store_GetLocation (self, rec_id, &location, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp6_ = location; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp6_); - _g_free0 (location); - _tmp7_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp7_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (location)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (location); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetName (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetName (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp8_; + GVariant* _tmp328_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* name = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp9_; - dbus_bool_t _tmp10_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp8_); - dbus_message_iter_next (&iter); - rec_id = _tmp8_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp328_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp328_); + g_variant_unref (_tmp328_); result = dvb_id_bus_recordings_store_GetName (self, rec_id, &name, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp9_ = name; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp9_); - _g_free0 (name); - _tmp10_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp10_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (name)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetDescription (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetDescription (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp11_; + GVariant* _tmp329_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* description = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp12_; - dbus_bool_t _tmp13_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp11_); - dbus_message_iter_next (&iter); - rec_id = _tmp11_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp329_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp329_); + g_variant_unref (_tmp329_); result = dvb_id_bus_recordings_store_GetDescription (self, rec_id, &description, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp12_ = description; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp12_); - _g_free0 (description); - _tmp13_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp13_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (description)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (description); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetStartTime (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetStartTime (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp14_; + GVariant* _tmp330_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint* start_time = NULL; - int start_time_length1; + int start_time_length1 = 0; + guint* _tmp331_; + GVariantBuilder _tmp332_; + int _tmp333_; gboolean result; - DBusMessage* reply; - guint* _tmp15_; - DBusMessageIter _tmp16_; - int _tmp17_; - dbus_bool_t _tmp19_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp14_); - dbus_message_iter_next (&iter); - rec_id = _tmp14_; - start_time_length1 = 0; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp330_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp330_); + g_variant_unref (_tmp330_); result = dvb_id_bus_recordings_store_GetStartTime (self, rec_id, &start_time, &start_time_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp15_ = start_time; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp16_); - for (_tmp17_ = 0; _tmp17_ < start_time_length1; _tmp17_++) { - dbus_uint32_t _tmp18_; - _tmp18_ = *_tmp15_; - dbus_message_iter_append_basic (&_tmp16_, DBUS_TYPE_UINT32, &_tmp18_); - _tmp15_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp16_); + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp331_ = start_time; + g_variant_builder_init (&_tmp332_, G_VARIANT_TYPE ("au")); + for (_tmp333_ = 0; _tmp333_ < start_time_length1; _tmp333_++) { + g_variant_builder_add_value (&_tmp332_, g_variant_new_uint32 (*_tmp331_)); + _tmp331_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp332_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); start_time = (g_free (start_time), NULL); - _tmp19_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp19_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetStartTimestamp (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetStartTimestamp (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp20_; + GVariant* _tmp334_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gint64 timestamp = 0LL; gboolean result; - DBusMessage* reply; - dbus_int64_t _tmp21_; - dbus_bool_t _tmp22_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp20_); - dbus_message_iter_next (&iter); - rec_id = _tmp20_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp334_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp334_); + g_variant_unref (_tmp334_); result = dvb_id_bus_recordings_store_GetStartTimestamp (self, rec_id, ×tamp, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp21_ = timestamp; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT64, &_tmp21_); - _tmp22_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp22_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_int64 (timestamp)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetLength (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetLength (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp23_; + GVariant* _tmp335_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gint64 length = 0LL; gboolean result; - DBusMessage* reply; - dbus_int64_t _tmp24_; - dbus_bool_t _tmp25_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp23_); - dbus_message_iter_next (&iter); - rec_id = _tmp23_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp335_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp335_); + g_variant_unref (_tmp335_); result = dvb_id_bus_recordings_store_GetLength (self, rec_id, &length, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp24_ = length; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT64, &_tmp24_); - _tmp25_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp25_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_int64 (length)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_Delete (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_Delete (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp26_; + GVariant* _tmp336_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp27_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp26_); - dbus_message_iter_next (&iter); - rec_id = _tmp26_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp336_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp336_); + g_variant_unref (_tmp336_); result = dvb_id_bus_recordings_store_Delete (self, rec_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp27_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp27_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp28_; + GVariant* _tmp337_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* name = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp29_; - dbus_bool_t _tmp30_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp28_); - dbus_message_iter_next (&iter); - rec_id = _tmp28_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp337_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp337_); + g_variant_unref (_tmp337_); result = dvb_id_bus_recordings_store_GetChannelName (self, rec_id, &name, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp29_ = name; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp29_); - _g_free0 (name); - _tmp30_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp30_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (name)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 rec_id = 0U; - dbus_uint32_t _tmp31_; + GVariant* _tmp338_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; DVBRecordingInfo infos = {0}; + GVariantBuilder _tmp339_; gboolean result; - DBusMessage* reply; - DBusMessageIter _tmp32_; - dbus_uint32_t _tmp33_; - const char* _tmp34_; - const char* _tmp35_; - dbus_int64_t _tmp36_; - dbus_int64_t _tmp37_; - const char* _tmp38_; - const char* _tmp39_; - dbus_bool_t _tmp40_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp31_); - dbus_message_iter_next (&iter); - rec_id = _tmp31_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp338_ = g_variant_iter_next_value (&_arguments_iter); + rec_id = g_variant_get_uint32 (_tmp338_); + g_variant_unref (_tmp338_); result = dvb_id_bus_recordings_store_GetAllInformations (self, rec_id, &infos, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - dbus_message_iter_open_container (&iter, DBUS_TYPE_STRUCT, NULL, &_tmp32_); - _tmp33_ = infos.id; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_UINT32, &_tmp33_); - _tmp34_ = infos.name; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_STRING, &_tmp34_); - _tmp35_ = infos.description; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_STRING, &_tmp35_); - _tmp36_ = infos.length; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_INT64, &_tmp36_); - _tmp37_ = infos.start_timestamp; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_INT64, &_tmp37_); - _tmp38_ = infos.channel; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_STRING, &_tmp38_); - _tmp39_ = infos.location; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_STRING, &_tmp39_); - dbus_message_iter_close_container (&iter, &_tmp32_); - dvb_recording_info_destroy (&infos); - _tmp40_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp40_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_recordings_store_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_recordings_store_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_recordings_store_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetRecordings")) { - result = _dbus_dvb_id_bus_recordings_store_GetRecordings (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetLocation")) { - result = _dbus_dvb_id_bus_recordings_store_GetLocation (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetName")) { - result = _dbus_dvb_id_bus_recordings_store_GetName (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetDescription")) { - result = _dbus_dvb_id_bus_recordings_store_GetDescription (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetStartTime")) { - result = _dbus_dvb_id_bus_recordings_store_GetStartTime (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetStartTimestamp")) { - result = _dbus_dvb_id_bus_recordings_store_GetStartTimestamp (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetLength")) { - result = _dbus_dvb_id_bus_recordings_store_GetLength (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "Delete")) { - result = _dbus_dvb_id_bus_recordings_store_Delete (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetChannelName")) { - result = _dbus_dvb_id_bus_recordings_store_GetChannelName (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.RecordingsStore", "GetAllInformations")) { - result = _dbus_dvb_id_bus_recordings_store_GetAllInformations (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _dbus_dvb_id_bus_recordings_store_changed (GObject* _sender, guint32 rec_id, guint type, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp41_; - dbus_uint32_t _tmp42_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.RecordingsStore", "Changed"); - dbus_message_iter_init_append (_message, &_iter); - _tmp41_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp41_); - _tmp42_ = type; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp42_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_recordings_store_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_recordings_store_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "changed", (GCallback) _dbus_dvb_id_bus_recordings_store_changed, connection); -} - - -static void dvb_id_bus_recordings_store_base_init (DVBIDBusRecordingsStoreIface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - /** - * @type: 0: added, 1: deleted, 2: updated - */ - g_signal_new ("changed", DVB_TYPE_ID_BUS_RECORDINGS_STORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); - g_type_set_qdata (DVB_TYPE_ID_BUS_RECORDINGS_STORE, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_recordings_store_dbus_vtable)); - } -} - - -GType dvb_id_bus_recordings_store_get_type (void) { - static volatile gsize dvb_id_bus_recordings_store_type_id__volatile = 0; - if (g_once_init_enter (&dvb_id_bus_recordings_store_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusRecordingsStoreIface), (GBaseInitFunc) dvb_id_bus_recordings_store_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType dvb_id_bus_recordings_store_type_id; - dvb_id_bus_recordings_store_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusRecordingsStore", &g_define_type_info, 0); - g_type_interface_add_prerequisite (dvb_id_bus_recordings_store_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_recordings_store_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_recordings_store_dbus_proxy_get_type); - g_once_init_leave (&dvb_id_bus_recordings_store_type_id__volatile, dvb_id_bus_recordings_store_type_id); - } - return dvb_id_bus_recordings_store_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (DVBIDBusRecordingsStoreDBusProxy, dvb_id_bus_recordings_store_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_RECORDINGS_STORE, dvb_id_bus_recordings_store_dbus_proxy_dvb_id_bus_recordings_store__interface_init) ); -DVBIDBusRecordingsStore* dvb_id_bus_recordings_store_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusRecordingsStore* self; - self = g_object_new (dvb_id_bus_recordings_store_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.RecordingsStore", NULL); - return self; -} - - -static GObject* dvb_id_bus_recordings_store_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_recordings_store_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_recordings_store_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_dvb_id_bus_recordings_store_changed (DVBIDBusRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint32 rec_id = 0U; - dbus_uint32_t _tmp334_; - guint type = 0U; - dbus_uint32_t _tmp335_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp334_); - dbus_message_iter_next (&iter); - rec_id = _tmp334_; - dbus_message_iter_get_basic (&iter, &_tmp335_); - dbus_message_iter_next (&iter); - type = _tmp335_; - g_signal_emit_by_name (self, "changed", rec_id, type); -} - - -DBusHandlerResult dvb_id_bus_recordings_store_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.RecordingsStore", "Changed")) { - _dbus_handle_dvb_id_bus_recordings_store_changed (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void dvb_id_bus_recordings_store_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { + g_dbus_method_invocation_return_gerror (invocation, error); return; } - ((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_recordings_store_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_recordings_store_dbus_proxy_parent_class)->dispose (self); -} - - -static void dvb_id_bus_recordings_store_dbus_proxy_class_init (DVBIDBusRecordingsStoreDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_recordings_store_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_recordings_store_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_recordings_store_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_recordings_store_dbus_proxy_set_property; -} - - -static void dvb_id_bus_recordings_store_dbus_proxy_init (DVBIDBusRecordingsStoreDBusProxy* self) { -} - - -static guint32* dvb_id_bus_recordings_store_dbus_proxy_GetRecordings (DVBIDBusRecordingsStore* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint32* _result; - int _result_length1; - guint32* _tmp336_; - int _tmp336__length; - int _tmp336__size; - int _tmp336__length1; - DBusMessageIter _tmp337_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetRecordings"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp339_; - _edomain = DBUS_GERROR; - _tmp339_ = _dbus_error.name + 27; - if (strcmp (_tmp339_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp339_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp339_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp339_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp339_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp339_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp339_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp339_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp339_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp339_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp339_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp339_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp339_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp339_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp339_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp339_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp339_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp339_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp339_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp339_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp339_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp339_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp339_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp339_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp339_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp339_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp339_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp339_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp339_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp339_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp339_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp339_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp339_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "au")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "au", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp336_ = g_new (guint32, 5); - _tmp336__length = 0; - _tmp336__size = 4; - _tmp336__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp337_); - for (; dbus_message_iter_get_arg_type (&_tmp337_); _tmp336__length1++) { - dbus_uint32_t _tmp338_; - if (_tmp336__size == _tmp336__length) { - _tmp336__size = 2 * _tmp336__size; - _tmp336_ = g_renew (guint32, _tmp336_, _tmp336__size + 1); - } - dbus_message_iter_get_basic (&_tmp337_, &_tmp338_); - dbus_message_iter_next (&_tmp337_); - _tmp336_[_tmp336__length++] = _tmp338_; - } - _result_length1 = _tmp336__length1; - dbus_message_iter_next (&_iter); - _result = _tmp336_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetLocation (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** location, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp340_; - gchar* _location; - const char* _tmp341_; - gboolean _result; - dbus_bool_t _tmp342_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetLocation"); - dbus_message_iter_init_append (_message, &_iter); - _tmp340_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp340_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp343_; - _edomain = DBUS_GERROR; - _tmp343_ = _dbus_error.name + 27; - if (strcmp (_tmp343_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp343_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp343_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp343_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp343_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp343_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp343_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp343_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp343_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp343_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp343_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp343_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp343_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp343_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp343_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp343_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp343_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp343_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp343_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp343_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp343_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp343_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp343_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp343_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp343_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp343_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp343_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp343_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp343_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp343_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp343_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp343_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp343_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp341_); - dbus_message_iter_next (&_iter); - _location = g_strdup (_tmp341_); - *location = _location; - dbus_message_iter_get_basic (&_iter, &_tmp342_); - dbus_message_iter_next (&_iter); - _result = _tmp342_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp344_; - gchar* _name; - const char* _tmp345_; - gboolean _result; - dbus_bool_t _tmp346_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetName"); - dbus_message_iter_init_append (_message, &_iter); - _tmp344_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp344_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp347_; - _edomain = DBUS_GERROR; - _tmp347_ = _dbus_error.name + 27; - if (strcmp (_tmp347_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp347_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp347_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp347_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp347_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp347_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp347_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp347_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp347_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp347_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp347_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp347_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp347_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp347_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp347_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp347_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp347_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp347_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp347_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp347_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp347_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp347_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp347_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp347_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp347_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp347_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp347_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp347_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp347_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp347_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp347_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp347_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp347_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp345_); - dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp345_); - *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp346_); - dbus_message_iter_next (&_iter); - _result = _tmp346_; - dbus_message_unref (_reply); - return _result; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_init (&_tmp339_, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_tmp339_, g_variant_new_uint32 (infos.id)); + g_variant_builder_add_value (&_tmp339_, g_variant_new_string (infos.name)); + g_variant_builder_add_value (&_tmp339_, g_variant_new_string (infos.description)); + g_variant_builder_add_value (&_tmp339_, g_variant_new_int64 (infos.length)); + g_variant_builder_add_value (&_tmp339_, g_variant_new_int64 (infos.start_timestamp)); + g_variant_builder_add_value (&_tmp339_, g_variant_new_string (infos.channel)); + g_variant_builder_add_value (&_tmp339_, g_variant_new_string (infos.location)); + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp339_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + dvb_recording_info_destroy (&infos); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetDescription (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** description, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp348_; - gchar* _description; - const char* _tmp349_; - gboolean _result; - dbus_bool_t _tmp350_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetDescription"); - dbus_message_iter_init_append (_message, &_iter); - _tmp348_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp348_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp351_; - _edomain = DBUS_GERROR; - _tmp351_ = _dbus_error.name + 27; - if (strcmp (_tmp351_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp351_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp351_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp351_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp351_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp351_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp351_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp351_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp351_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp351_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp351_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp351_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp351_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp351_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp351_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp351_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp351_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp351_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp351_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp351_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp351_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp351_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp351_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp351_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp351_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp351_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp351_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp351_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp351_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp351_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp351_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp351_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp351_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; +static void dvb_id_bus_recordings_store_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "GetRecordings") == 0) { + _dbus_dvb_id_bus_recordings_store_GetRecordings (object, parameters, invocation); + } else if (strcmp (method_name, "GetLocation") == 0) { + _dbus_dvb_id_bus_recordings_store_GetLocation (object, parameters, invocation); + } else if (strcmp (method_name, "GetName") == 0) { + _dbus_dvb_id_bus_recordings_store_GetName (object, parameters, invocation); + } else if (strcmp (method_name, "GetDescription") == 0) { + _dbus_dvb_id_bus_recordings_store_GetDescription (object, parameters, invocation); + } else if (strcmp (method_name, "GetStartTime") == 0) { + _dbus_dvb_id_bus_recordings_store_GetStartTime (object, parameters, invocation); + } else if (strcmp (method_name, "GetStartTimestamp") == 0) { + _dbus_dvb_id_bus_recordings_store_GetStartTimestamp (object, parameters, invocation); + } else if (strcmp (method_name, "GetLength") == 0) { + _dbus_dvb_id_bus_recordings_store_GetLength (object, parameters, invocation); + } else if (strcmp (method_name, "Delete") == 0) { + _dbus_dvb_id_bus_recordings_store_Delete (object, parameters, invocation); + } else if (strcmp (method_name, "GetChannelName") == 0) { + _dbus_dvb_id_bus_recordings_store_GetChannelName (object, parameters, invocation); + } else if (strcmp (method_name, "GetAllInformations") == 0) { + _dbus_dvb_id_bus_recordings_store_GetAllInformations (object, parameters, invocation); + } else { + g_object_unref (invocation); } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp349_); - dbus_message_iter_next (&_iter); - _description = g_strdup (_tmp349_); - *description = _description; - dbus_message_iter_get_basic (&_iter, &_tmp350_); - dbus_message_iter_next (&_iter); - _result = _tmp350_; - dbus_message_unref (_reply); - return _result; } -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetStartTime (DVBIDBusRecordingsStore* self, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp352_; - guint* _start_time; - int _start_time_length1; - guint* _tmp353_; - int _tmp353__length; - int _tmp353__size; - int _tmp353__length1; - DBusMessageIter _tmp354_; - gboolean _result; - dbus_bool_t _tmp356_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetStartTime"); - dbus_message_iter_init_append (_message, &_iter); - _tmp352_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp352_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp357_; - _edomain = DBUS_GERROR; - _tmp357_ = _dbus_error.name + 27; - if (strcmp (_tmp357_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp357_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp357_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp357_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp357_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp357_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp357_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp357_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp357_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp357_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp357_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp357_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp357_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp357_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp357_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp357_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp357_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp357_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp357_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp357_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp357_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp357_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp357_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp357_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp357_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp357_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp357_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp357_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp357_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp357_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp357_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp357_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp357_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "aub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - _start_time_length1 = 0; - _tmp353_ = g_new (guint, 5); - _tmp353__length = 0; - _tmp353__size = 4; - _tmp353__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp354_); - for (; dbus_message_iter_get_arg_type (&_tmp354_); _tmp353__length1++) { - dbus_uint32_t _tmp355_; - if (_tmp353__size == _tmp353__length) { - _tmp353__size = 2 * _tmp353__size; - _tmp353_ = g_renew (guint, _tmp353_, _tmp353__size + 1); - } - dbus_message_iter_get_basic (&_tmp354_, &_tmp355_); - dbus_message_iter_next (&_tmp354_); - _tmp353_[_tmp353__length++] = _tmp355_; - } - _start_time_length1 = _tmp353__length1; - dbus_message_iter_next (&_iter); - _start_time = _tmp353_; - *start_time = _start_time; - *start_time_length1 = _start_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp356_); - dbus_message_iter_next (&_iter); - _result = _tmp356_; - dbus_message_unref (_reply); - return _result; +static GVariant* dvb_id_bus_recordings_store_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; } -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetStartTimestamp (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* timestamp, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp358_; - gint64 _timestamp; - dbus_int64_t _tmp359_; - gboolean _result; - dbus_bool_t _tmp360_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetStartTimestamp"); - dbus_message_iter_init_append (_message, &_iter); - _tmp358_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp358_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp361_; - _edomain = DBUS_GERROR; - _tmp361_ = _dbus_error.name + 27; - if (strcmp (_tmp361_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp361_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp361_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp361_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp361_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp361_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp361_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp361_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp361_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp361_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp361_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp361_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp361_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp361_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp361_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp361_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp361_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp361_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp361_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp361_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp361_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp361_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp361_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp361_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp361_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp361_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp361_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp361_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp361_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp361_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp361_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp361_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp361_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "xb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "xb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp359_); - dbus_message_iter_next (&_iter); - _timestamp = _tmp359_; - *timestamp = _timestamp; - dbus_message_iter_get_basic (&_iter, &_tmp360_); - dbus_message_iter_next (&_iter); - _result = _tmp360_; - dbus_message_unref (_reply); - return _result; +static gboolean dvb_id_bus_recordings_store_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; } -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetLength (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* length, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp362_; - gint64 _length; - dbus_int64_t _tmp363_; - gboolean _result; - dbus_bool_t _tmp364_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetLength"); - dbus_message_iter_init_append (_message, &_iter); - _tmp362_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp362_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp365_; - _edomain = DBUS_GERROR; - _tmp365_ = _dbus_error.name + 27; - if (strcmp (_tmp365_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp365_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp365_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp365_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp365_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp365_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp365_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp365_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp365_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp365_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp365_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp365_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp365_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp365_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp365_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp365_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp365_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp365_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp365_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp365_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp365_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp365_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp365_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp365_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp365_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp365_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp365_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp365_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp365_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp365_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp365_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp365_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp365_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "xb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "xb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp363_); - dbus_message_iter_next (&_iter); - _length = _tmp363_; - *length = _length; - dbus_message_iter_get_basic (&_iter, &_tmp364_); - dbus_message_iter_next (&_iter); - _result = _tmp364_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recordings_store_dbus_proxy_Delete (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp366_; - gboolean _result; - dbus_bool_t _tmp367_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "Delete"); - dbus_message_iter_init_append (_message, &_iter); - _tmp366_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp366_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp368_; - _edomain = DBUS_GERROR; - _tmp368_ = _dbus_error.name + 27; - if (strcmp (_tmp368_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp368_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp368_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp368_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp368_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp368_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp368_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp368_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp368_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp368_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp368_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp368_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp368_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp368_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp368_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp368_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp368_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp368_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp368_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp368_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp368_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp368_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp368_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp368_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp368_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp368_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp368_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp368_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp368_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp368_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp368_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp368_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp368_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp367_); - dbus_message_iter_next (&_iter); - _result = _tmp367_; - dbus_message_unref (_reply); - return _result; +static void _dbus_dvb_id_bus_recordings_store_changed (GObject* _sender, guint32 rec_id, guint type, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (rec_id)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (type)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.RecordingsStore", "Changed", _arguments, NULL); } -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp369_; - gchar* _name; - const char* _tmp370_; - gboolean _result; - dbus_bool_t _tmp371_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetChannelName"); - dbus_message_iter_init_append (_message, &_iter); - _tmp369_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp369_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp372_; - _edomain = DBUS_GERROR; - _tmp372_ = _dbus_error.name + 27; - if (strcmp (_tmp372_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp372_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp372_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp372_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp372_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp372_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp372_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp372_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp372_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp372_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp372_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp372_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp372_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp372_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp372_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp372_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp372_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp372_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp372_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp372_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp372_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp372_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp372_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp372_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp372_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp372_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp372_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp372_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp372_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp372_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp372_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp372_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp372_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; +guint dvb_id_bus_recordings_store_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_recordings_store_dbus_interface_info), &_dvb_id_bus_recordings_store_dbus_interface_vtable, data, _dvb_id_bus_recordings_store_unregister_object, error); + if (!result) { + return 0; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp370_); - dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp370_); - *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp371_); - dbus_message_iter_next (&_iter); - _result = _tmp371_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_recordings_store_dbus_proxy_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp373_; - DVBRecordingInfo _infos; - DVBRecordingInfo _tmp374_; - DBusMessageIter _tmp375_; - dbus_uint32_t _tmp376_; - const char* _tmp377_; - const char* _tmp378_; - dbus_int64_t _tmp379_; - dbus_int64_t _tmp380_; - const char* _tmp381_; - const char* _tmp382_; - gboolean _result; - dbus_bool_t _tmp383_; - if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.RecordingsStore", "GetAllInformations"); - dbus_message_iter_init_append (_message, &_iter); - _tmp373_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp373_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp384_; - _edomain = DBUS_GERROR; - _tmp384_ = _dbus_error.name + 27; - if (strcmp (_tmp384_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp384_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp384_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp384_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp384_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp384_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp384_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp384_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp384_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp384_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp384_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp384_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp384_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp384_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp384_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp384_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp384_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp384_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp384_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp384_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp384_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp384_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp384_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp384_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp384_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp384_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp384_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp384_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp384_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp384_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp384_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp384_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp384_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "(ussxxss)b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "(ussxxss)b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_tmp375_); - dbus_message_iter_get_basic (&_tmp375_, &_tmp376_); - dbus_message_iter_next (&_tmp375_); - _tmp374_.id = _tmp376_; - dbus_message_iter_get_basic (&_tmp375_, &_tmp377_); - dbus_message_iter_next (&_tmp375_); - _tmp374_.name = g_strdup (_tmp377_); - dbus_message_iter_get_basic (&_tmp375_, &_tmp378_); - dbus_message_iter_next (&_tmp375_); - _tmp374_.description = g_strdup (_tmp378_); - dbus_message_iter_get_basic (&_tmp375_, &_tmp379_); - dbus_message_iter_next (&_tmp375_); - _tmp374_.length = _tmp379_; - dbus_message_iter_get_basic (&_tmp375_, &_tmp380_); - dbus_message_iter_next (&_tmp375_); - _tmp374_.start_timestamp = _tmp380_; - dbus_message_iter_get_basic (&_tmp375_, &_tmp381_); - dbus_message_iter_next (&_tmp375_); - _tmp374_.channel = g_strdup (_tmp381_); - dbus_message_iter_get_basic (&_tmp375_, &_tmp382_); - dbus_message_iter_next (&_tmp375_); - _tmp374_.location = g_strdup (_tmp382_); - dbus_message_iter_next (&_iter); - _infos = _tmp374_; - *infos = _infos; - dbus_message_iter_get_basic (&_iter, &_tmp383_); - dbus_message_iter_next (&_iter); - _result = _tmp383_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_recordings_store_dbus_proxy_dvb_id_bus_recordings_store__interface_init (DVBIDBusRecordingsStoreIface* iface) { - iface->GetRecordings = dvb_id_bus_recordings_store_dbus_proxy_GetRecordings; - iface->GetLocation = dvb_id_bus_recordings_store_dbus_proxy_GetLocation; - iface->GetName = dvb_id_bus_recordings_store_dbus_proxy_GetName; - iface->GetDescription = dvb_id_bus_recordings_store_dbus_proxy_GetDescription; - iface->GetStartTime = dvb_id_bus_recordings_store_dbus_proxy_GetStartTime; - iface->GetStartTimestamp = dvb_id_bus_recordings_store_dbus_proxy_GetStartTimestamp; - iface->GetLength = dvb_id_bus_recordings_store_dbus_proxy_GetLength; - iface->Delete = dvb_id_bus_recordings_store_dbus_proxy_Delete; - iface->GetChannelName = dvb_id_bus_recordings_store_dbus_proxy_GetChannelName; - iface->GetAllInformations = dvb_id_bus_recordings_store_dbus_proxy_GetAllInformations; -} - - -static void _vala_dvb_id_bus_recordings_store_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + g_signal_connect (object, "changed", (GCallback) _dbus_dvb_id_bus_recordings_store_changed, data); + return result; } -static void _vala_dvb_id_bus_recordings_store_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dvb_id_bus_recordings_store_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_recordings_store_changed, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecordingsStore.vala gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecordingsStore.vala --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusRecordingsStore.vala 2010-04-01 09:50:34.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusRecordingsStore.vala 2011-04-19 20:46:24.000000000 +0000 @@ -40,14 +40,14 @@ /** * @returns: A list of ids for all recordings */ - public abstract uint32[] GetRecordings () throws DBus.Error; + public abstract uint32[] GetRecordings () throws DBusError; /** * @rec_id: The id of the recording * @location: The location of the recording on the filesystem * @returns: TRUE on success */ - public abstract bool GetLocation (uint32 rec_id, out string location) throws DBus.Error; + public abstract bool GetLocation (uint32 rec_id, out string location) throws DBusError; /** * @rec_id: The id of the recording @@ -55,7 +55,7 @@ * a TV show) * @returns: TRUE on success */ - public abstract bool GetName (uint32 rec_id, out string name) throws DBus.Error; + public abstract bool GetName (uint32 rec_id, out string name) throws DBusError; /** * @rec_id: The id of the recording @@ -63,28 +63,28 @@ * (e.g. the description from EPG) * @returns: TRUE on success */ - public abstract bool GetDescription (uint32 rec_id, out string description) throws DBus.Error; + public abstract bool GetDescription (uint32 rec_id, out string description) throws DBusError; /** * @rec_id: The id of the recording * @start_time: The starting time of the recording * @returns: TRUE on success */ - public abstract bool GetStartTime (uint32 rec_id, out uint[] start_time) throws DBus.Error; + public abstract bool GetStartTime (uint32 rec_id, out uint[] start_time) throws DBusError; /** * @rec_id: The id of the recording * @timestamp: Start time as UNIX timestamp * @returns: TRUE on success */ - public abstract bool GetStartTimestamp (uint32 rec_id, out int64 timestamp) throws DBus.Error; + public abstract bool GetStartTimestamp (uint32 rec_id, out int64 timestamp) throws DBusError; /** * @rec_id: The id of the recording * @length: The length of the recording in seconds * @returns: TRUE on success */ - public abstract bool GetLength (uint32 rec_id, out int64 length) throws DBus.Error; + public abstract bool GetLength (uint32 rec_id, out int64 length) throws DBusError; /** * @rec_id: The id of the recording @@ -93,7 +93,7 @@ * Delete the recording. This deletes all files in the directory * created by the Recorder */ - public abstract bool Delete (uint32 rec_id) throws DBus.Error; + public abstract bool Delete (uint32 rec_id) throws DBusError; /** * @rec_id: The id of the recording @@ -101,7 +101,7 @@ * rec_id doesn't exist * @returns: TRUE on success */ - public abstract bool GetChannelName (uint32 rec_id, out string name) throws DBus.Error; + public abstract bool GetChannelName (uint32 rec_id, out string name) throws DBusError; /** * @rec_id: The id of the recording @@ -110,7 +110,7 @@ * This method can be used to retrieve all informations * about a particular recording at once */ - public abstract bool GetAllInformations (uint32 rec_id, out RecordingInfo infos) throws DBus.Error; + public abstract bool GetAllInformations (uint32 rec_id, out RecordingInfo infos) throws DBusError; } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusScanner.c gnome-dvb-daemon-0.2.7/src/dbus/IDBusScanner.c --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusScanner.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusScanner.c 2011-12-09 11:14:14.000000000 +0000 @@ -0,0 +1,933 @@ +/* IDBusScanner.c generated by valac 0.14.0, the Vala compiler + * generated from IDBusScanner.vala, do not modify */ + +/* + * Copyright (C) 2008-2011 Sebastian Pölsterl + * + * This file is part of GNOME DVB Daemon. + * + * GNOME DVB Daemon is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GNOME DVB Daemon is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNOME DVB Daemon. If not, see . + */ + +#include +#include +#include +#include +#include +#include +#include + + +#define DVB_TYPE_ID_BUS_SCANNER (dvb_id_bus_scanner_get_type ()) +#define DVB_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScanner)) +#define DVB_IS_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_SCANNER)) +#define DVB_ID_BUS_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScannerIface)) + +typedef struct _DVBIDBusScanner DVBIDBusScanner; +typedef struct _DVBIDBusScannerIface DVBIDBusScannerIface; + +#define DVB_TYPE_ID_BUS_SCANNER_PROXY (dvb_id_bus_scanner_proxy_get_type ()) +typedef GDBusProxy DVBIDBusScannerProxy; +typedef GDBusProxyClass DVBIDBusScannerProxyClass; +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) + +struct _DVBIDBusScannerIface { + GTypeInterface parent_iface; + void (*Run) (DVBIDBusScanner* self, GError** error); + void (*Destroy) (DVBIDBusScanner* self, GError** error); + gboolean (*WriteAllChannelsToFile) (DVBIDBusScanner* self, const gchar* path, GError** error); + gboolean (*WriteChannelsToFile) (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); + gboolean (*AddScanningData) (DVBIDBusScanner* self, GHashTable* data, GError** error); + gboolean (*AddScanningDataFromFile) (DVBIDBusScanner* self, const gchar* path, GError** error); +}; + + + +GType dvb_id_bus_scanner_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_scanner_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_id_bus_scanner_get_type (void) G_GNUC_CONST; +void dvb_id_bus_scanner_Run (DVBIDBusScanner* self, GError** error); +void dvb_id_bus_scanner_Destroy (DVBIDBusScanner* self, GError** error); +gboolean dvb_id_bus_scanner_WriteAllChannelsToFile (DVBIDBusScanner* self, const gchar* path, GError** error); +gboolean dvb_id_bus_scanner_WriteChannelsToFile (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); +gboolean dvb_id_bus_scanner_AddScanningData (DVBIDBusScanner* self, GHashTable* data, GError** error); +gboolean dvb_id_bus_scanner_AddScanningDataFromFile (DVBIDBusScanner* self, const gchar* path, GError** error); +static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void dvb_id_bus_scanner_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_scanner_frequency_scanned (DVBIDBusScanner* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_scanner_finished (DVBIDBusScanner* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_scanner_channel_added (DVBIDBusScanner* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_scanner_frontend_stats (DVBIDBusScanner* self, GVariant* parameters); +static void dvb_id_bus_scanner_proxy_Run (DVBIDBusScanner* self, GError** error); +static void dvb_id_bus_scanner_proxy_Destroy (DVBIDBusScanner* self, GError** error); +static gboolean dvb_id_bus_scanner_proxy_WriteAllChannelsToFile (DVBIDBusScanner* self, const gchar* path, GError** error); +static gboolean dvb_id_bus_scanner_proxy_WriteChannelsToFile (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); +static gboolean dvb_id_bus_scanner_proxy_AddScanningData (DVBIDBusScanner* self, GHashTable* data, GError** error); +static gboolean dvb_id_bus_scanner_proxy_AddScanningDataFromFile (DVBIDBusScanner* self, const gchar* path, GError** error); +static void dvb_id_bus_scanner_proxy_dvb_id_bus_scanner_interface_init (DVBIDBusScannerIface* iface); +static void _dbus_dvb_id_bus_scanner_Run (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_scanner_Destroy (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_scanner_WriteAllChannelsToFile (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_scanner_WriteChannelsToFile (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_scanner_AddScanningData (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_scanner_AddScanningDataFromFile (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_scanner_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_scanner_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_scanner_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_dvb_id_bus_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, gpointer* _data); +static void _dbus_dvb_id_bus_scanner_finished (GObject* _sender, gpointer* _data); +static void _dbus_dvb_id_bus_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, gpointer* _data); +static void _dbus_dvb_id_bus_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, gpointer* _data); +static void _dvb_id_bus_scanner_unregister_object (gpointer user_data); + +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_Run_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_Run_out[] = {NULL}; +static const GDBusMethodInfo _dvb_id_bus_scanner_dbus_method_info_Run = {-1, "Run", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_Run_in), (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_Run_out)}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_Destroy_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_Destroy_out[] = {NULL}; +static const GDBusMethodInfo _dvb_id_bus_scanner_dbus_method_info_Destroy = {-1, "Destroy", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_Destroy_in), (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_Destroy_out)}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_path = {-1, "path", "s"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_in[] = {&_dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_path, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_out[] = {&_dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_scanner_dbus_method_info_WriteAllChannelsToFile = {-1, "WriteAllChannelsToFile", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_in), (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_WriteAllChannelsToFile_out)}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_channel_sids = {-1, "channel_sids", "au"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_path = {-1, "path", "s"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_in[] = {&_dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_channel_sids, &_dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_path, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_out[] = {&_dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_scanner_dbus_method_info_WriteChannelsToFile = {-1, "WriteChannelsToFile", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_in), (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_WriteChannelsToFile_out)}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_AddScanningData_data = {-1, "data", "a{sv}"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_AddScanningData_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_AddScanningData_in[] = {&_dvb_id_bus_scanner_dbus_arg_info_AddScanningData_data, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_AddScanningData_out[] = {&_dvb_id_bus_scanner_dbus_arg_info_AddScanningData_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_scanner_dbus_method_info_AddScanningData = {-1, "AddScanningData", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_AddScanningData_in), (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_AddScanningData_out)}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_path = {-1, "path", "s"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_in[] = {&_dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_path, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_out[] = {&_dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_scanner_dbus_method_info_AddScanningDataFromFile = {-1, "AddScanningDataFromFile", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_in), (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_AddScanningDataFromFile_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_scanner_dbus_method_info[] = {&_dvb_id_bus_scanner_dbus_method_info_Run, &_dvb_id_bus_scanner_dbus_method_info_Destroy, &_dvb_id_bus_scanner_dbus_method_info_WriteAllChannelsToFile, &_dvb_id_bus_scanner_dbus_method_info_WriteChannelsToFile, &_dvb_id_bus_scanner_dbus_method_info_AddScanningData, &_dvb_id_bus_scanner_dbus_method_info_AddScanningDataFromFile, NULL}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_frequency_scanned_frequency = {-1, "frequency", "u"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_frequency_scanned_freq_left = {-1, "freq_left", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_frequency_scanned[] = {&_dvb_id_bus_scanner_dbus_arg_info_frequency_scanned_frequency, &_dvb_id_bus_scanner_dbus_arg_info_frequency_scanned_freq_left, NULL}; +static const GDBusSignalInfo _dvb_id_bus_scanner_dbus_signal_info_frequency_scanned = {-1, "FrequencyScanned", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_frequency_scanned)}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_finished[] = {NULL}; +static const GDBusSignalInfo _dvb_id_bus_scanner_dbus_signal_info_finished = {-1, "Finished", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_finished)}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_channel_added_frequency = {-1, "frequency", "u"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_channel_added_sid = {-1, "sid", "u"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_channel_added_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_channel_added_network = {-1, "network", "s"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_channel_added_type = {-1, "type", "s"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_channel_added_scrambled = {-1, "scrambled", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_channel_added[] = {&_dvb_id_bus_scanner_dbus_arg_info_channel_added_frequency, &_dvb_id_bus_scanner_dbus_arg_info_channel_added_sid, &_dvb_id_bus_scanner_dbus_arg_info_channel_added_name, &_dvb_id_bus_scanner_dbus_arg_info_channel_added_network, &_dvb_id_bus_scanner_dbus_arg_info_channel_added_type, &_dvb_id_bus_scanner_dbus_arg_info_channel_added_scrambled, NULL}; +static const GDBusSignalInfo _dvb_id_bus_scanner_dbus_signal_info_channel_added = {-1, "ChannelAdded", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_channel_added)}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_frontend_stats_signal_strength = {-1, "signal_strength", "d"}; +static const GDBusArgInfo _dvb_id_bus_scanner_dbus_arg_info_frontend_stats_signal_noise_ratio = {-1, "signal_noise_ratio", "d"}; +static const GDBusArgInfo * const _dvb_id_bus_scanner_dbus_arg_info_frontend_stats[] = {&_dvb_id_bus_scanner_dbus_arg_info_frontend_stats_signal_strength, &_dvb_id_bus_scanner_dbus_arg_info_frontend_stats_signal_noise_ratio, NULL}; +static const GDBusSignalInfo _dvb_id_bus_scanner_dbus_signal_info_frontend_stats = {-1, "FrontendStats", (GDBusArgInfo **) (&_dvb_id_bus_scanner_dbus_arg_info_frontend_stats)}; +static const GDBusSignalInfo * const _dvb_id_bus_scanner_dbus_signal_info[] = {&_dvb_id_bus_scanner_dbus_signal_info_frequency_scanned, &_dvb_id_bus_scanner_dbus_signal_info_finished, &_dvb_id_bus_scanner_dbus_signal_info_channel_added, &_dvb_id_bus_scanner_dbus_signal_info_frontend_stats, NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_scanner_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_scanner_dbus_interface_info = {-1, "org.gnome.DVB.Scanner", (GDBusMethodInfo **) (&_dvb_id_bus_scanner_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_scanner_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_scanner_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_scanner_dbus_interface_vtable = {dvb_id_bus_scanner_dbus_interface_method_call, dvb_id_bus_scanner_dbus_interface_get_property, dvb_id_bus_scanner_dbus_interface_set_property}; + +void dvb_id_bus_scanner_Run (DVBIDBusScanner* self, GError** error) { + g_return_if_fail (self != NULL); + DVB_ID_BUS_SCANNER_GET_INTERFACE (self)->Run (self, error); +} + + +void dvb_id_bus_scanner_Destroy (DVBIDBusScanner* self, GError** error) { + g_return_if_fail (self != NULL); + DVB_ID_BUS_SCANNER_GET_INTERFACE (self)->Destroy (self, error); +} + + +gboolean dvb_id_bus_scanner_WriteAllChannelsToFile (DVBIDBusScanner* self, const gchar* path, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); + return DVB_ID_BUS_SCANNER_GET_INTERFACE (self)->WriteAllChannelsToFile (self, path, error); +} + + +gboolean dvb_id_bus_scanner_WriteChannelsToFile (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); + return DVB_ID_BUS_SCANNER_GET_INTERFACE (self)->WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, error); +} + + +gboolean dvb_id_bus_scanner_AddScanningData (DVBIDBusScanner* self, GHashTable* data, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); + return DVB_ID_BUS_SCANNER_GET_INTERFACE (self)->AddScanningData (self, data, error); +} + + +/** + * @path: Path to file containing scanning data + * @returns: TRUE when the file has been parsed successfully + * + * Parses initial tuning data from a file as provided by dvb-apps + */ +gboolean dvb_id_bus_scanner_AddScanningDataFromFile (DVBIDBusScanner* self, const gchar* path, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); + return DVB_ID_BUS_SCANNER_GET_INTERFACE (self)->AddScanningDataFromFile (self, path, error); +} + + +static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2); + register GMarshalFunc_VOID__UINT_UINT callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; + g_return_if_fail (n_param_values == 3); + if (G_CCLOSURE_SWAP_DATA (closure)) { + data1 = closure->data; + data2 = param_values->data[0].v_pointer; + } else { + data1 = param_values->data[0].v_pointer; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback); + callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), data2); +} + + +static void g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (gpointer data1, guint arg_1, guint arg_2, const char* arg_3, const char* arg_4, const char* arg_5, gboolean arg_6, gpointer data2); + register GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; + g_return_if_fail (n_param_values == 7); + if (G_CCLOSURE_SWAP_DATA (closure)) { + data1 = closure->data; + data2 = param_values->data[0].v_pointer; + } else { + data1 = param_values->data[0].v_pointer; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback); + callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), g_value_get_string (param_values + 3), g_value_get_string (param_values + 4), g_value_get_string (param_values + 5), g_value_get_boolean (param_values + 6), data2); +} + + +static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE) (gpointer data1, gdouble arg_1, gdouble arg_2, gpointer data2); + register GMarshalFunc_VOID__DOUBLE_DOUBLE callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; + g_return_if_fail (n_param_values == 3); + if (G_CCLOSURE_SWAP_DATA (closure)) { + data1 = closure->data; + data2 = param_values->data[0].v_pointer; + } else { + data1 = param_values->data[0].v_pointer; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__DOUBLE_DOUBLE) (marshal_data ? marshal_data : cc->callback); + callback (data1, g_value_get_double (param_values + 1), g_value_get_double (param_values + 2), data2); +} + + +static void dvb_id_bus_scanner_base_init (DVBIDBusScannerIface * iface) { + static gboolean initialized = FALSE; + if (!initialized) { + initialized = TRUE; + g_signal_new ("frequency_scanned", DVB_TYPE_ID_BUS_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); + g_signal_new ("finished", DVB_TYPE_ID_BUS_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + g_signal_new ("channel_added", DVB_TYPE_ID_BUS_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN, G_TYPE_NONE, 6, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); + g_signal_new ("frontend_stats", DVB_TYPE_ID_BUS_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); + } +} + + +GType dvb_id_bus_scanner_get_type (void) { + static volatile gsize dvb_id_bus_scanner_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_scanner_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusScannerIface), (GBaseInitFunc) dvb_id_bus_scanner_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_id_bus_scanner_type_id; + dvb_id_bus_scanner_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusScanner", &g_define_type_info, 0); + g_type_interface_add_prerequisite (dvb_id_bus_scanner_type_id, G_TYPE_OBJECT); + g_type_set_qdata (dvb_id_bus_scanner_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_scanner_proxy_get_type); + g_type_set_qdata (dvb_id_bus_scanner_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.Scanner"); + g_type_set_qdata (dvb_id_bus_scanner_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_scanner_register_object); + g_once_init_leave (&dvb_id_bus_scanner_type_id__volatile, dvb_id_bus_scanner_type_id); + } + return dvb_id_bus_scanner_type_id__volatile; +} + + +G_DEFINE_TYPE_EXTENDED (DVBIDBusScannerProxy, dvb_id_bus_scanner_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_SCANNER, dvb_id_bus_scanner_proxy_dvb_id_bus_scanner_interface_init) ) +static void dvb_id_bus_scanner_proxy_class_init (DVBIDBusScannerProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_scanner_proxy_g_signal; +} + + +static void _dbus_handle_dvb_id_bus_scanner_frequency_scanned (DVBIDBusScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; + guint frequency = 0U; + GVariant* _tmp340_; + guint freq_left = 0U; + GVariant* _tmp341_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp340_ = g_variant_iter_next_value (&_arguments_iter); + frequency = g_variant_get_uint32 (_tmp340_); + g_variant_unref (_tmp340_); + _tmp341_ = g_variant_iter_next_value (&_arguments_iter); + freq_left = g_variant_get_uint32 (_tmp341_); + g_variant_unref (_tmp341_); + g_signal_emit_by_name (self, "frequency-scanned", frequency, freq_left); +} + + +static void _dbus_handle_dvb_id_bus_scanner_finished (DVBIDBusScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; + g_variant_iter_init (&_arguments_iter, parameters); + g_signal_emit_by_name (self, "finished"); +} + + +static void _dbus_handle_dvb_id_bus_scanner_channel_added (DVBIDBusScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; + guint frequency = 0U; + GVariant* _tmp342_; + guint sid = 0U; + GVariant* _tmp343_; + gchar* name = NULL; + GVariant* _tmp344_; + gchar* network = NULL; + GVariant* _tmp345_; + gchar* type = NULL; + GVariant* _tmp346_; + gboolean scrambled = FALSE; + GVariant* _tmp347_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp342_ = g_variant_iter_next_value (&_arguments_iter); + frequency = g_variant_get_uint32 (_tmp342_); + g_variant_unref (_tmp342_); + _tmp343_ = g_variant_iter_next_value (&_arguments_iter); + sid = g_variant_get_uint32 (_tmp343_); + g_variant_unref (_tmp343_); + _tmp344_ = g_variant_iter_next_value (&_arguments_iter); + name = g_variant_dup_string (_tmp344_, NULL); + g_variant_unref (_tmp344_); + _tmp345_ = g_variant_iter_next_value (&_arguments_iter); + network = g_variant_dup_string (_tmp345_, NULL); + g_variant_unref (_tmp345_); + _tmp346_ = g_variant_iter_next_value (&_arguments_iter); + type = g_variant_dup_string (_tmp346_, NULL); + g_variant_unref (_tmp346_); + _tmp347_ = g_variant_iter_next_value (&_arguments_iter); + scrambled = g_variant_get_boolean (_tmp347_); + g_variant_unref (_tmp347_); + g_signal_emit_by_name (self, "channel-added", frequency, sid, name, network, type, scrambled); + _g_free0 (name); + _g_free0 (network); + _g_free0 (type); +} + + +static void _dbus_handle_dvb_id_bus_scanner_frontend_stats (DVBIDBusScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; + gdouble signal_strength = 0.0; + GVariant* _tmp348_; + gdouble signal_noise_ratio = 0.0; + GVariant* _tmp349_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp348_ = g_variant_iter_next_value (&_arguments_iter); + signal_strength = g_variant_get_double (_tmp348_); + g_variant_unref (_tmp348_); + _tmp349_ = g_variant_iter_next_value (&_arguments_iter); + signal_noise_ratio = g_variant_get_double (_tmp349_); + g_variant_unref (_tmp349_); + g_signal_emit_by_name (self, "frontend-stats", signal_strength, signal_noise_ratio); +} + + +static void dvb_id_bus_scanner_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "FrequencyScanned") == 0) { + _dbus_handle_dvb_id_bus_scanner_frequency_scanned ((DVBIDBusScanner*) proxy, parameters); + } else if (strcmp (signal_name, "Finished") == 0) { + _dbus_handle_dvb_id_bus_scanner_finished ((DVBIDBusScanner*) proxy, parameters); + } else if (strcmp (signal_name, "ChannelAdded") == 0) { + _dbus_handle_dvb_id_bus_scanner_channel_added ((DVBIDBusScanner*) proxy, parameters); + } else if (strcmp (signal_name, "FrontendStats") == 0) { + _dbus_handle_dvb_id_bus_scanner_frontend_stats ((DVBIDBusScanner*) proxy, parameters); + } +} + + +static void dvb_id_bus_scanner_proxy_init (DVBIDBusScannerProxy* self) { +} + + +static void dvb_id_bus_scanner_proxy_Run (DVBIDBusScanner* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner", "Run"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return; + } + g_object_unref (_reply_message); +} + + +static void dvb_id_bus_scanner_proxy_Destroy (DVBIDBusScanner* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner", "Destroy"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return; + } + g_object_unref (_reply_message); +} + + +static gboolean dvb_id_bus_scanner_proxy_WriteAllChannelsToFile (DVBIDBusScanner* self, const gchar* path, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp350_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner", "WriteAllChannelsToFile"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp350_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp350_); + g_variant_unref (_tmp350_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_scanner_proxy_WriteChannelsToFile (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + guint* _tmp351_; + GVariantBuilder _tmp352_; + int _tmp353_; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp354_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner", "WriteChannelsToFile"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _tmp351_ = channel_sids; + g_variant_builder_init (&_tmp352_, G_VARIANT_TYPE ("au")); + for (_tmp353_ = 0; _tmp353_ < channel_sids_length1; _tmp353_++) { + g_variant_builder_add_value (&_tmp352_, g_variant_new_uint32 (*_tmp351_)); + _tmp351_++; + } + g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp352_)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp354_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp354_); + g_variant_unref (_tmp354_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_scanner_proxy_AddScanningData (DVBIDBusScanner* self, GHashTable* data, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GVariantBuilder _tmp355_; + GHashTableIter _tmp356_; + gpointer _tmp357_; + gpointer _tmp358_; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp359_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner", "AddScanningData"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_hash_table_iter_init (&_tmp356_, data); + g_variant_builder_init (&_tmp355_, G_VARIANT_TYPE ("a{sv}")); + while (g_hash_table_iter_next (&_tmp356_, &_tmp357_, &_tmp358_)) { + gchar* _key; + GVariant* _value; + _key = (gchar*) _tmp357_; + _value = (GVariant*) _tmp358_; + g_variant_builder_add (&_tmp355_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value)); + } + g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp355_)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp359_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp359_); + g_variant_unref (_tmp359_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_scanner_proxy_AddScanningDataFromFile (DVBIDBusScanner* self, const gchar* path, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _result; + GVariant* _tmp360_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner", "AddScanningDataFromFile"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp360_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp360_); + g_variant_unref (_tmp360_); + g_object_unref (_reply_message); + return _result; +} + + +static void dvb_id_bus_scanner_proxy_dvb_id_bus_scanner_interface_init (DVBIDBusScannerIface* iface) { + iface->Run = dvb_id_bus_scanner_proxy_Run; + iface->Destroy = dvb_id_bus_scanner_proxy_Destroy; + iface->WriteAllChannelsToFile = dvb_id_bus_scanner_proxy_WriteAllChannelsToFile; + iface->WriteChannelsToFile = dvb_id_bus_scanner_proxy_WriteChannelsToFile; + iface->AddScanningData = dvb_id_bus_scanner_proxy_AddScanningData; + iface->AddScanningDataFromFile = dvb_id_bus_scanner_proxy_AddScanningDataFromFile; +} + + +static void _dbus_dvb_id_bus_scanner_Run (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + g_variant_iter_init (&_arguments_iter, parameters); + dvb_id_bus_scanner_Run (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_scanner_Destroy (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + g_variant_iter_init (&_arguments_iter, parameters); + dvb_id_bus_scanner_Destroy (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_scanner_WriteAllChannelsToFile (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gchar* path = NULL; + GVariant* _tmp361_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp361_ = g_variant_iter_next_value (&_arguments_iter); + path = g_variant_dup_string (_tmp361_, NULL); + g_variant_unref (_tmp361_); + result = dvb_id_bus_scanner_WriteAllChannelsToFile (self, path, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (path); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_scanner_WriteChannelsToFile (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint* channel_sids = NULL; + int channel_sids_length1 = 0; + GVariant* _tmp362_; + guint* _tmp363_; + int _tmp363__length; + int _tmp363__size; + int _tmp363__length1; + GVariantIter _tmp364_; + GVariant* _tmp365_; + gchar* path = NULL; + GVariant* _tmp366_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp362_ = g_variant_iter_next_value (&_arguments_iter); + _tmp363_ = g_new (guint, 5); + _tmp363__length = 0; + _tmp363__size = 4; + _tmp363__length1 = 0; + g_variant_iter_init (&_tmp364_, _tmp362_); + for (; (_tmp365_ = g_variant_iter_next_value (&_tmp364_)) != NULL; _tmp363__length1++) { + if (_tmp363__size == _tmp363__length) { + _tmp363__size = 2 * _tmp363__size; + _tmp363_ = g_renew (guint, _tmp363_, _tmp363__size + 1); + } + _tmp363_[_tmp363__length++] = g_variant_get_uint32 (_tmp365_); + g_variant_unref (_tmp365_); + } + channel_sids_length1 = _tmp363__length1; + channel_sids = _tmp363_; + g_variant_unref (_tmp362_); + _tmp366_ = g_variant_iter_next_value (&_arguments_iter); + path = g_variant_dup_string (_tmp366_, NULL); + g_variant_unref (_tmp366_); + result = dvb_id_bus_scanner_WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + channel_sids = (g_free (channel_sids), NULL); + _g_free0 (path); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_scanner_AddScanningData (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GHashTable* data = NULL; + GVariant* _tmp367_; + GHashTable* _tmp368_; + GVariantIter _tmp369_; + GVariant* _tmp370_; + GVariant* _tmp371_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp367_ = g_variant_iter_next_value (&_arguments_iter); + _tmp368_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + g_variant_iter_init (&_tmp369_, _tmp367_); + while (g_variant_iter_loop (&_tmp369_, "{?*}", &_tmp370_, &_tmp371_)) { + g_hash_table_insert (_tmp368_, g_variant_dup_string (_tmp370_, NULL), g_variant_get_variant (_tmp371_)); + } + data = _tmp368_; + g_variant_unref (_tmp367_); + result = dvb_id_bus_scanner_AddScanningData (self, data, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_hash_table_unref0 (data); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_scanner_AddScanningDataFromFile (DVBIDBusScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gchar* path = NULL; + GVariant* _tmp372_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp372_ = g_variant_iter_next_value (&_arguments_iter); + path = g_variant_dup_string (_tmp372_, NULL); + g_variant_unref (_tmp372_); + result = dvb_id_bus_scanner_AddScanningDataFromFile (self, path, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (path); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void dvb_id_bus_scanner_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "Run") == 0) { + _dbus_dvb_id_bus_scanner_Run (object, parameters, invocation); + } else if (strcmp (method_name, "Destroy") == 0) { + _dbus_dvb_id_bus_scanner_Destroy (object, parameters, invocation); + } else if (strcmp (method_name, "WriteAllChannelsToFile") == 0) { + _dbus_dvb_id_bus_scanner_WriteAllChannelsToFile (object, parameters, invocation); + } else if (strcmp (method_name, "WriteChannelsToFile") == 0) { + _dbus_dvb_id_bus_scanner_WriteChannelsToFile (object, parameters, invocation); + } else if (strcmp (method_name, "AddScanningData") == 0) { + _dbus_dvb_id_bus_scanner_AddScanningData (object, parameters, invocation); + } else if (strcmp (method_name, "AddScanningDataFromFile") == 0) { + _dbus_dvb_id_bus_scanner_AddScanningDataFromFile (object, parameters, invocation); + } else { + g_object_unref (invocation); + } +} + + +static GVariant* dvb_id_bus_scanner_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; +} + + +static gboolean dvb_id_bus_scanner_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; +} + + +static void _dbus_dvb_id_bus_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frequency)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (freq_left)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner", "FrequencyScanned", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_scanner_finished (GObject* _sender, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner", "Finished", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frequency)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (sid)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (network)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (type)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (scrambled)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner", "ChannelAdded", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_double (signal_strength)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_double (signal_noise_ratio)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner", "FrontendStats", _arguments, NULL); +} + + +guint dvb_id_bus_scanner_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_scanner_dbus_interface_info), &_dvb_id_bus_scanner_dbus_interface_vtable, data, _dvb_id_bus_scanner_unregister_object, error); + if (!result) { + return 0; + } + g_signal_connect (object, "frequency-scanned", (GCallback) _dbus_dvb_id_bus_scanner_frequency_scanned, data); + g_signal_connect (object, "finished", (GCallback) _dbus_dvb_id_bus_scanner_finished, data); + g_signal_connect (object, "channel-added", (GCallback) _dbus_dvb_id_bus_scanner_channel_added, data); + g_signal_connect (object, "frontend-stats", (GCallback) _dbus_dvb_id_bus_scanner_frontend_stats, data); + return result; +} + + +static void _dvb_id_bus_scanner_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_scanner_frequency_scanned, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_scanner_finished, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_scanner_channel_added, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_scanner_frontend_stats, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); +} + + + diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusScanner.vala gnome-dvb-daemon-0.2.7/src/dbus/IDBusScanner.vala --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusScanner.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusScanner.vala 2011-04-19 20:46:24.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2008-2011 Sebastian Pölsterl + * + * This file is part of GNOME DVB Daemon. + * + * GNOME DVB Daemon is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GNOME DVB Daemon is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNOME DVB Daemon. If not, see . + */ + +using GLib; + +namespace DVB { + + [DBus (name = "org.gnome.DVB.Scanner")] + public interface IDBusScanner : GLib.Object { + + public abstract signal void frequency_scanned (uint frequency, uint freq_left); + public abstract signal void finished (); + public abstract signal void channel_added (uint frequency, uint sid, + string name, string network, string type, bool scrambled); + public abstract signal void frontend_stats (double signal_strength, + double signal_noise_ratio); + + public abstract void Run () throws DBusError; + public abstract void Destroy () throws DBusError; + public abstract bool WriteAllChannelsToFile (string path) throws DBusError; + public abstract bool WriteChannelsToFile (uint[] channel_sids, string path) throws DBusError; + public abstract bool AddScanningData (GLib.HashTable data) throws DBusError; + + /** + * @path: Path to file containing scanning data + * @returns: TRUE when the file has been parsed successfully + * + * Parses initial tuning data from a file as provided by dvb-apps + */ + public abstract bool AddScanningDataFromFile (string path) throws DBusError; + } +} diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusSchedule.c gnome-dvb-daemon-0.2.7/src/dbus/IDBusSchedule.c --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusSchedule.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusSchedule.c 2011-12-09 11:14:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusSchedule.c generated by valac 0.11.3, the Vala compiler +/* IDBusSchedule.c generated by valac 0.14.0, the Vala compiler * generated from IDBusSchedule.vala, do not modify */ /* @@ -24,9 +24,7 @@ #include #include #include -#include -#include -#include +#include #define DVB_TYPE_EVENT_INFO (dvb_event_info_get_type ()) @@ -40,9 +38,10 @@ typedef struct _DVBIDBusSchedule DVBIDBusSchedule; typedef struct _DVBIDBusScheduleIface DVBIDBusScheduleIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; -typedef struct _DVBIDBusScheduleDBusProxy DVBIDBusScheduleDBusProxy; -typedef DBusGProxyClass DVBIDBusScheduleDBusProxyClass; + +#define DVB_TYPE_ID_BUS_SCHEDULE_PROXY (dvb_id_bus_schedule_proxy_get_type ()) +typedef GDBusProxy DVBIDBusScheduleProxy; +typedef GDBusProxyClass DVBIDBusScheduleProxyClass; struct _DVBEventInfo { guint32 id; @@ -69,15 +68,6 @@ gboolean (*IsScrambled) (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusScheduleDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - GType dvb_event_info_get_type (void) G_GNUC_CONST; @@ -85,7 +75,8 @@ void dvb_event_info_free (DVBEventInfo* self); void dvb_event_info_copy (const DVBEventInfo* self, DVBEventInfo* dest); void dvb_event_info_destroy (DVBEventInfo* self); -DVBIDBusSchedule* dvb_id_bus_schedule_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_schedule_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_schedule_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_schedule_get_type (void) G_GNUC_CONST; guint32* dvb_id_bus_schedule_GetAllEvents (DVBIDBusSchedule* self, int* result_length1, GError** error); DVBEventInfo* dvb_id_bus_schedule_GetAllEventInfos (DVBIDBusSchedule* self, int* result_length1, GError** error); @@ -100,64 +91,145 @@ gboolean dvb_id_bus_schedule_GetLocalStartTimestamp (DVBIDBusSchedule* self, guint32 event_id, gint64* timestamp, GError** error); gboolean dvb_id_bus_schedule_IsRunning (DVBIDBusSchedule* self, guint32 event_id, gboolean* running, GError** error); gboolean dvb_id_bus_schedule_IsScrambled (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_schedule_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_schedule_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_schedule_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_introspect (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_property_get_all (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetAllEvents (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); +static void dvb_id_bus_schedule_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static guint32* dvb_id_bus_schedule_proxy_GetAllEvents (DVBIDBusSchedule* self, int* result_length1, GError** error); +static DVBEventInfo* dvb_id_bus_schedule_proxy_GetAllEventInfos (DVBIDBusSchedule* self, int* result_length1, GError** error); +static gboolean dvb_id_bus_schedule_proxy_GetInformations (DVBIDBusSchedule* self, guint32 event_id, DVBEventInfo* event_info, GError** error); +static guint32 dvb_id_bus_schedule_proxy_NowPlaying (DVBIDBusSchedule* self, GError** error); +static guint32 dvb_id_bus_schedule_proxy_Next (DVBIDBusSchedule* self, guint32 event_id, GError** error); +static gboolean dvb_id_bus_schedule_proxy_GetName (DVBIDBusSchedule* self, guint32 event_id, gchar** name, GError** error); +static gboolean dvb_id_bus_schedule_proxy_GetShortDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error); +static gboolean dvb_id_bus_schedule_proxy_GetExtendedDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error); +static gboolean dvb_id_bus_schedule_proxy_GetDuration (DVBIDBusSchedule* self, guint32 event_id, guint* duration, GError** error); +static gboolean dvb_id_bus_schedule_proxy_GetLocalStartTime (DVBIDBusSchedule* self, guint32 event_id, guint** start_time, int* start_time_length1, GError** error); +static gboolean dvb_id_bus_schedule_proxy_GetLocalStartTimestamp (DVBIDBusSchedule* self, guint32 event_id, gint64* timestamp, GError** error); +static gboolean dvb_id_bus_schedule_proxy_IsRunning (DVBIDBusSchedule* self, guint32 event_id, gboolean* running, GError** error); +static gboolean dvb_id_bus_schedule_proxy_IsScrambled (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error); +static void dvb_id_bus_schedule_proxy_dvb_id_bus_schedule_interface_init (DVBIDBusScheduleIface* iface); +static void _dbus_dvb_id_bus_schedule_GetAllEvents (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); static void _vala_DVBEventInfo_array_free (DVBEventInfo* array, gint array_length); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetAllEventInfos (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetInformations (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_NowPlaying (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_Next (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetName (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetShortDescription (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetExtendedDescription (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetDuration (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetLocalStartTime (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetLocalStartTimestamp (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_IsRunning (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_schedule_IsScrambled (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message); -GType dvb_id_bus_schedule_dbus_proxy_get_type (void) G_GNUC_CONST; -DBusHandlerResult dvb_id_bus_schedule_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_SCHEDULE_DBUS_PROXY_DUMMY_PROPERTY -}; -static guint32* dvb_id_bus_schedule_dbus_proxy_GetAllEvents (DVBIDBusSchedule* self, int* result_length1, GError** error); -static DVBEventInfo* dvb_id_bus_schedule_dbus_proxy_GetAllEventInfos (DVBIDBusSchedule* self, int* result_length1, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_GetInformations (DVBIDBusSchedule* self, guint32 event_id, DVBEventInfo* event_info, GError** error); -static guint32 dvb_id_bus_schedule_dbus_proxy_NowPlaying (DVBIDBusSchedule* self, GError** error); -static guint32 dvb_id_bus_schedule_dbus_proxy_Next (DVBIDBusSchedule* self, guint32 event_id, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_GetName (DVBIDBusSchedule* self, guint32 event_id, gchar** name, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_GetShortDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_GetExtendedDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_GetDuration (DVBIDBusSchedule* self, guint32 event_id, guint* duration, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_GetLocalStartTime (DVBIDBusSchedule* self, guint32 event_id, guint** start_time, int* start_time_length1, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_GetLocalStartTimestamp (DVBIDBusSchedule* self, guint32 event_id, gint64* timestamp, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_IsRunning (DVBIDBusSchedule* self, guint32 event_id, gboolean* running, GError** error); -static gboolean dvb_id_bus_schedule_dbus_proxy_IsScrambled (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error); -static void dvb_id_bus_schedule_dbus_proxy_dvb_id_bus_schedule__interface_init (DVBIDBusScheduleIface* iface); -static void _vala_dvb_id_bus_schedule_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_schedule_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); - -static const DBusObjectPathVTable _dvb_id_bus_schedule_dbus_path_vtable = {_dvb_id_bus_schedule_dbus_unregister, dvb_id_bus_schedule_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_schedule_dbus_vtable = {dvb_id_bus_schedule_dbus_register_object}; +static void _dbus_dvb_id_bus_schedule_GetAllEventInfos (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_GetInformations (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_NowPlaying (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_Next (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_GetName (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_GetShortDescription (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_GetExtendedDescription (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_GetDuration (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_GetLocalStartTime (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_GetLocalStartTimestamp (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_IsRunning (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_schedule_IsScrambled (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_schedule_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_schedule_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_schedule_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dvb_id_bus_schedule_unregister_object (gpointer user_data); + +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetAllEvents_result = {-1, "result", "au"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetAllEvents_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetAllEvents_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetAllEvents_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetAllEvents = {-1, "GetAllEvents", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetAllEvents_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetAllEvents_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetAllEventInfos_result = {-1, "result", "a(uusus)"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetAllEventInfos_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetAllEventInfos_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetAllEventInfos_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetAllEventInfos = {-1, "GetAllEventInfos", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetAllEventInfos_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetAllEventInfos_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetInformations_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetInformations_event_info = {-1, "event_info", "(uusus)"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetInformations_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetInformations_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetInformations_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetInformations_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetInformations_event_info, &_dvb_id_bus_schedule_dbus_arg_info_GetInformations_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetInformations = {-1, "GetInformations", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetInformations_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetInformations_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_NowPlaying_result = {-1, "result", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_NowPlaying_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_NowPlaying_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_NowPlaying_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_NowPlaying = {-1, "NowPlaying", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_NowPlaying_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_NowPlaying_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_Next_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_Next_result = {-1, "result", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_Next_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_Next_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_Next_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_Next_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_Next = {-1, "Next", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_Next_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_Next_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetName_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetName_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetName_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetName_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetName_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetName_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetName_name, &_dvb_id_bus_schedule_dbus_arg_info_GetName_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetName = {-1, "GetName", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetName_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetName_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_description = {-1, "description", "s"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_description, &_dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetShortDescription = {-1, "GetShortDescription", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetShortDescription_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_description = {-1, "description", "s"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_description, &_dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetExtendedDescription = {-1, "GetExtendedDescription", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetExtendedDescription_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetDuration_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetDuration_duration = {-1, "duration", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetDuration_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetDuration_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetDuration_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetDuration_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetDuration_duration, &_dvb_id_bus_schedule_dbus_arg_info_GetDuration_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetDuration = {-1, "GetDuration", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetDuration_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetDuration_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_start_time = {-1, "start_time", "au"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_start_time, &_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetLocalStartTime = {-1, "GetLocalStartTime", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTime_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_timestamp = {-1, "timestamp", "x"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_timestamp, &_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_GetLocalStartTimestamp = {-1, "GetLocalStartTimestamp", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_GetLocalStartTimestamp_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_IsRunning_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_IsRunning_running = {-1, "running", "b"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_IsRunning_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_IsRunning_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_IsRunning_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_IsRunning_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_IsRunning_running, &_dvb_id_bus_schedule_dbus_arg_info_IsRunning_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_IsRunning = {-1, "IsRunning", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_IsRunning_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_IsRunning_out)}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_IsScrambled_event_id = {-1, "event_id", "u"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_IsScrambled_scrambled = {-1, "scrambled", "b"}; +static const GDBusArgInfo _dvb_id_bus_schedule_dbus_arg_info_IsScrambled_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_IsScrambled_in[] = {&_dvb_id_bus_schedule_dbus_arg_info_IsScrambled_event_id, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_schedule_dbus_arg_info_IsScrambled_out[] = {&_dvb_id_bus_schedule_dbus_arg_info_IsScrambled_scrambled, &_dvb_id_bus_schedule_dbus_arg_info_IsScrambled_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_schedule_dbus_method_info_IsScrambled = {-1, "IsScrambled", (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_IsScrambled_in), (GDBusArgInfo **) (&_dvb_id_bus_schedule_dbus_arg_info_IsScrambled_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_schedule_dbus_method_info[] = {&_dvb_id_bus_schedule_dbus_method_info_GetAllEvents, &_dvb_id_bus_schedule_dbus_method_info_GetAllEventInfos, &_dvb_id_bus_schedule_dbus_method_info_GetInformations, &_dvb_id_bus_schedule_dbus_method_info_NowPlaying, &_dvb_id_bus_schedule_dbus_method_info_Next, &_dvb_id_bus_schedule_dbus_method_info_GetName, &_dvb_id_bus_schedule_dbus_method_info_GetShortDescription, &_dvb_id_bus_schedule_dbus_method_info_GetExtendedDescription, &_dvb_id_bus_schedule_dbus_method_info_GetDuration, &_dvb_id_bus_schedule_dbus_method_info_GetLocalStartTime, &_dvb_id_bus_schedule_dbus_method_info_GetLocalStartTimestamp, &_dvb_id_bus_schedule_dbus_method_info_IsRunning, &_dvb_id_bus_schedule_dbus_method_info_IsScrambled, NULL}; +static const GDBusSignalInfo * const _dvb_id_bus_schedule_dbus_signal_info[] = {NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_schedule_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_schedule_dbus_interface_info = {-1, "org.gnome.DVB.Schedule", (GDBusMethodInfo **) (&_dvb_id_bus_schedule_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_schedule_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_schedule_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_schedule_dbus_interface_vtable = {dvb_id_bus_schedule_dbus_interface_method_call, dvb_id_bus_schedule_dbus_interface_get_property, dvb_id_bus_schedule_dbus_interface_set_property}; void dvb_event_info_copy (const DVBEventInfo* self, DVBEventInfo* dest) { - dest->id = self->id; - dest->next = self->next; - dest->name = g_strdup (self->name); - dest->duration = self->duration; - dest->short_description = g_strdup (self->short_description); + guint32 _tmp0_; + guint32 _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; + guint _tmp4_; + const gchar* _tmp5_; + const gchar* _tmp6_; + _tmp0_ = (*self).id; + (*dest).id = _tmp0_; + _tmp1_ = (*self).next; + (*dest).next = _tmp1_; + _tmp2_ = (*self).name; + _tmp3_ = g_strdup (_tmp2_); + _g_free0 ((*dest).name); + (*dest).name = _tmp3_; + _tmp4_ = (*self).duration; + (*dest).duration = _tmp4_; + _tmp5_ = (*self).short_description; + _tmp6_ = g_strdup (_tmp5_); + _g_free0 ((*dest).short_description); + (*dest).short_description = _tmp6_; } void dvb_event_info_destroy (DVBEventInfo* self) { - _g_free0 (self->name); - _g_free0 (self->short_description); + _g_free0 ((*self).name); + _g_free0 ((*self).short_description); } @@ -187,16 +259,19 @@ guint32* dvb_id_bus_schedule_GetAllEvents (DVBIDBusSchedule* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetAllEvents (self, result_length1, error); } DVBEventInfo* dvb_id_bus_schedule_GetAllEventInfos (DVBIDBusSchedule* self, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetAllEventInfos (self, result_length1, error); } gboolean dvb_id_bus_schedule_GetInformations (DVBIDBusSchedule* self, guint32 event_id, DVBEventInfo* event_info, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetInformations (self, event_id, event_info, error); } @@ -205,6 +280,7 @@ * @returns: ID of currently running event */ guint32 dvb_id_bus_schedule_NowPlaying (DVBIDBusSchedule* self, GError** error) { + g_return_val_if_fail (self != NULL, 0U); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->NowPlaying (self, error); } @@ -213,276 +289,754 @@ * @returnns: ID of event that follows the given event */ guint32 dvb_id_bus_schedule_Next (DVBIDBusSchedule* self, guint32 event_id, GError** error) { + g_return_val_if_fail (self != NULL, 0U); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->Next (self, event_id, error); } gboolean dvb_id_bus_schedule_GetName (DVBIDBusSchedule* self, guint32 event_id, gchar** name, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetName (self, event_id, name, error); } gboolean dvb_id_bus_schedule_GetShortDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetShortDescription (self, event_id, description, error); } gboolean dvb_id_bus_schedule_GetExtendedDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetExtendedDescription (self, event_id, description, error); } gboolean dvb_id_bus_schedule_GetDuration (DVBIDBusSchedule* self, guint32 event_id, guint* duration, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetDuration (self, event_id, duration, error); } gboolean dvb_id_bus_schedule_GetLocalStartTime (DVBIDBusSchedule* self, guint32 event_id, guint** start_time, int* start_time_length1, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetLocalStartTime (self, event_id, start_time, start_time_length1, error); } gboolean dvb_id_bus_schedule_GetLocalStartTimestamp (DVBIDBusSchedule* self, guint32 event_id, gint64* timestamp, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->GetLocalStartTimestamp (self, event_id, timestamp, error); } gboolean dvb_id_bus_schedule_IsRunning (DVBIDBusSchedule* self, guint32 event_id, gboolean* running, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->IsRunning (self, event_id, running, error); } gboolean dvb_id_bus_schedule_IsScrambled (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->IsScrambled (self, event_id, scrambled, error); } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); +static void dvb_id_bus_schedule_base_init (DVBIDBusScheduleIface * iface) { + static gboolean initialized = FALSE; + if (!initialized) { + initialized = TRUE; } } -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); +GType dvb_id_bus_schedule_get_type (void) { + static volatile gsize dvb_id_bus_schedule_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_schedule_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusScheduleIface), (GBaseInitFunc) dvb_id_bus_schedule_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_id_bus_schedule_type_id; + dvb_id_bus_schedule_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusSchedule", &g_define_type_info, 0); + g_type_interface_add_prerequisite (dvb_id_bus_schedule_type_id, G_TYPE_OBJECT); + g_type_set_qdata (dvb_id_bus_schedule_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_schedule_proxy_get_type); + g_type_set_qdata (dvb_id_bus_schedule_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.Schedule"); + g_type_set_qdata (dvb_id_bus_schedule_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_schedule_register_object); + g_once_init_leave (&dvb_id_bus_schedule_type_id__volatile, dvb_id_bus_schedule_type_id); + } + return dvb_id_bus_schedule_type_id__volatile; } -void _dvb_id_bus_schedule_dbus_unregister (DBusConnection* connection, void* _user_data_) { +G_DEFINE_TYPE_EXTENDED (DVBIDBusScheduleProxy, dvb_id_bus_schedule_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_SCHEDULE, dvb_id_bus_schedule_proxy_dvb_id_bus_schedule_interface_init) ) +static void dvb_id_bus_schedule_proxy_class_init (DVBIDBusScheduleProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_schedule_proxy_g_signal; } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_introspect (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); +static void dvb_id_bus_schedule_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { +} + + +static void dvb_id_bus_schedule_proxy_init (DVBIDBusScheduleProxy* self) { +} + + +static guint32* dvb_id_bus_schedule_proxy_GetAllEvents (DVBIDBusSchedule* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32* _result; + int _result_length1; + GVariant* _tmp373_; + guint32* _tmp374_; + int _tmp374__length; + int _tmp374__size; + int _tmp374__length1; + GVariantIter _tmp375_; + GVariant* _tmp376_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetAllEvents"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp373_ = g_variant_iter_next_value (&_reply_iter); + _tmp374_ = g_new (guint32, 5); + _tmp374__length = 0; + _tmp374__size = 4; + _tmp374__length1 = 0; + g_variant_iter_init (&_tmp375_, _tmp373_); + for (; (_tmp376_ = g_variant_iter_next_value (&_tmp375_)) != NULL; _tmp374__length1++) { + if (_tmp374__size == _tmp374__length) { + _tmp374__size = 2 * _tmp374__size; + _tmp374_ = g_renew (guint32, _tmp374_, _tmp374__size + 1); + } + _tmp374_[_tmp374__length++] = g_variant_get_uint32 (_tmp376_); + g_variant_unref (_tmp376_); + } + _result_length1 = _tmp374__length1; + _result = _tmp374_; + g_variant_unref (_tmp373_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_property_get_all (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.Schedule") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; +static DVBEventInfo* dvb_id_bus_schedule_proxy_GetAllEventInfos (DVBIDBusSchedule* self, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + DVBEventInfo* _result; + int _result_length1; + GVariant* _tmp377_; + DVBEventInfo* _tmp378_; + int _tmp378__length; + int _tmp378__size; + int _tmp378__length1; + GVariantIter _tmp379_; + GVariant* _tmp380_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetAllEventInfos"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return NULL; } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return NULL; } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _result_length1 = 0; + _tmp377_ = g_variant_iter_next_value (&_reply_iter); + _tmp378_ = g_new (DVBEventInfo, 5); + _tmp378__length = 0; + _tmp378__size = 4; + _tmp378__length1 = 0; + g_variant_iter_init (&_tmp379_, _tmp377_); + for (; (_tmp380_ = g_variant_iter_next_value (&_tmp379_)) != NULL; _tmp378__length1++) { + DVBEventInfo _tmp381_; + GVariantIter _tmp382_; + GVariant* _tmp383_; + GVariant* _tmp384_; + GVariant* _tmp385_; + GVariant* _tmp386_; + GVariant* _tmp387_; + if (_tmp378__size == _tmp378__length) { + _tmp378__size = 2 * _tmp378__size; + _tmp378_ = g_renew (DVBEventInfo, _tmp378_, _tmp378__size + 1); + } + g_variant_iter_init (&_tmp382_, _tmp380_); + _tmp383_ = g_variant_iter_next_value (&_tmp382_); + _tmp381_.id = g_variant_get_uint32 (_tmp383_); + g_variant_unref (_tmp383_); + _tmp384_ = g_variant_iter_next_value (&_tmp382_); + _tmp381_.next = g_variant_get_uint32 (_tmp384_); + g_variant_unref (_tmp384_); + _tmp385_ = g_variant_iter_next_value (&_tmp382_); + _tmp381_.name = g_variant_dup_string (_tmp385_, NULL); + g_variant_unref (_tmp385_); + _tmp386_ = g_variant_iter_next_value (&_tmp382_); + _tmp381_.duration = g_variant_get_uint32 (_tmp386_); + g_variant_unref (_tmp386_); + _tmp387_ = g_variant_iter_next_value (&_tmp382_); + _tmp381_.short_description = g_variant_dup_string (_tmp387_, NULL); + g_variant_unref (_tmp387_); + _tmp378_[_tmp378__length++] = _tmp381_; + g_variant_unref (_tmp380_); + } + _result_length1 = _tmp378__length1; + _result = _tmp378_; + g_variant_unref (_tmp377_); + *result_length1 = _result_length1; + g_object_unref (_reply_message); + return _result; } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetAllEvents (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint32* result; - int result_length1; - DBusMessage* reply; - guint32* _tmp1_; - DBusMessageIter _tmp2_; - int _tmp3_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +static gboolean dvb_id_bus_schedule_proxy_GetInformations (DVBIDBusSchedule* self, guint32 event_id, DVBEventInfo* event_info, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + DVBEventInfo _vala_event_info; + GVariant* _tmp388_; + DVBEventInfo _tmp389_; + GVariantIter _tmp390_; + GVariant* _tmp391_; + GVariant* _tmp392_; + GVariant* _tmp393_; + GVariant* _tmp394_; + GVariant* _tmp395_; + gboolean _result; + GVariant* _tmp396_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetInformations"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp388_ = g_variant_iter_next_value (&_reply_iter); + g_variant_iter_init (&_tmp390_, _tmp388_); + _tmp391_ = g_variant_iter_next_value (&_tmp390_); + _tmp389_.id = g_variant_get_uint32 (_tmp391_); + g_variant_unref (_tmp391_); + _tmp392_ = g_variant_iter_next_value (&_tmp390_); + _tmp389_.next = g_variant_get_uint32 (_tmp392_); + g_variant_unref (_tmp392_); + _tmp393_ = g_variant_iter_next_value (&_tmp390_); + _tmp389_.name = g_variant_dup_string (_tmp393_, NULL); + g_variant_unref (_tmp393_); + _tmp394_ = g_variant_iter_next_value (&_tmp390_); + _tmp389_.duration = g_variant_get_uint32 (_tmp394_); + g_variant_unref (_tmp394_); + _tmp395_ = g_variant_iter_next_value (&_tmp390_); + _tmp389_.short_description = g_variant_dup_string (_tmp395_, NULL); + g_variant_unref (_tmp395_); + _vala_event_info = _tmp389_; + g_variant_unref (_tmp388_); + *event_info = _vala_event_info; + _tmp396_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp396_); + g_variant_unref (_tmp396_); + g_object_unref (_reply_message); + return _result; +} + + +static guint32 dvb_id_bus_schedule_proxy_NowPlaying (DVBIDBusSchedule* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32 _result; + GVariant* _tmp397_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "NowPlaying"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return 0U; } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return 0U; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp397_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_uint32 (_tmp397_); + g_variant_unref (_tmp397_); + g_object_unref (_reply_message); + return _result; +} + + +static guint32 dvb_id_bus_schedule_proxy_Next (DVBIDBusSchedule* self, guint32 event_id, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint32 _result; + GVariant* _tmp398_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "Next"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return 0U; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return 0U; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp398_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_uint32 (_tmp398_); + g_variant_unref (_tmp398_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_GetName (DVBIDBusSchedule* self, guint32 event_id, gchar** name, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_name; + GVariant* _tmp399_; + gboolean _result; + GVariant* _tmp400_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetName"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp399_ = g_variant_iter_next_value (&_reply_iter); + _vala_name = g_variant_dup_string (_tmp399_, NULL); + g_variant_unref (_tmp399_); + *name = _vala_name; + _tmp400_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp400_); + g_variant_unref (_tmp400_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_GetShortDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_description; + GVariant* _tmp401_; + gboolean _result; + GVariant* _tmp402_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetShortDescription"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp401_ = g_variant_iter_next_value (&_reply_iter); + _vala_description = g_variant_dup_string (_tmp401_, NULL); + g_variant_unref (_tmp401_); + *description = _vala_description; + _tmp402_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp402_); + g_variant_unref (_tmp402_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_GetExtendedDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gchar* _vala_description; + GVariant* _tmp403_; + gboolean _result; + GVariant* _tmp404_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetExtendedDescription"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp403_ = g_variant_iter_next_value (&_reply_iter); + _vala_description = g_variant_dup_string (_tmp403_, NULL); + g_variant_unref (_tmp403_); + *description = _vala_description; + _tmp404_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp404_); + g_variant_unref (_tmp404_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_GetDuration (DVBIDBusSchedule* self, guint32 event_id, guint* duration, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint _vala_duration; + GVariant* _tmp405_; + gboolean _result; + GVariant* _tmp406_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetDuration"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp405_ = g_variant_iter_next_value (&_reply_iter); + _vala_duration = g_variant_get_uint32 (_tmp405_); + g_variant_unref (_tmp405_); + *duration = _vala_duration; + _tmp406_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp406_); + g_variant_unref (_tmp406_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_GetLocalStartTime (DVBIDBusSchedule* self, guint32 event_id, guint** start_time, int* start_time_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + guint* _vala_start_time; + int _vala_start_time_length1; + GVariant* _tmp407_; + guint* _tmp408_; + int _tmp408__length; + int _tmp408__size; + int _tmp408__length1; + GVariantIter _tmp409_; + GVariant* _tmp410_; + gboolean _result; + GVariant* _tmp411_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetLocalStartTime"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _vala_start_time_length1 = 0; + _tmp407_ = g_variant_iter_next_value (&_reply_iter); + _tmp408_ = g_new (guint, 5); + _tmp408__length = 0; + _tmp408__size = 4; + _tmp408__length1 = 0; + g_variant_iter_init (&_tmp409_, _tmp407_); + for (; (_tmp410_ = g_variant_iter_next_value (&_tmp409_)) != NULL; _tmp408__length1++) { + if (_tmp408__size == _tmp408__length) { + _tmp408__size = 2 * _tmp408__size; + _tmp408_ = g_renew (guint, _tmp408_, _tmp408__size + 1); + } + _tmp408_[_tmp408__length++] = g_variant_get_uint32 (_tmp410_); + g_variant_unref (_tmp410_); + } + _vala_start_time_length1 = _tmp408__length1; + _vala_start_time = _tmp408_; + g_variant_unref (_tmp407_); + *start_time = _vala_start_time; + *start_time_length1 = _vala_start_time_length1; + _tmp411_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp411_); + g_variant_unref (_tmp411_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_GetLocalStartTimestamp (DVBIDBusSchedule* self, guint32 event_id, gint64* timestamp, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gint64 _vala_timestamp; + GVariant* _tmp412_; + gboolean _result; + GVariant* _tmp413_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "GetLocalStartTimestamp"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp412_ = g_variant_iter_next_value (&_reply_iter); + _vala_timestamp = g_variant_get_int64 (_tmp412_); + g_variant_unref (_tmp412_); + *timestamp = _vala_timestamp; + _tmp413_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp413_); + g_variant_unref (_tmp413_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_IsRunning (DVBIDBusSchedule* self, guint32 event_id, gboolean* running, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _vala_running; + GVariant* _tmp414_; + gboolean _result; + GVariant* _tmp415_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "IsRunning"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp414_ = g_variant_iter_next_value (&_reply_iter); + _vala_running = g_variant_get_boolean (_tmp414_); + g_variant_unref (_tmp414_); + *running = _vala_running; + _tmp415_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp415_); + g_variant_unref (_tmp415_); + g_object_unref (_reply_message); + return _result; +} + + +static gboolean dvb_id_bus_schedule_proxy_IsScrambled (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; + gboolean _vala_scrambled; + GVariant* _tmp416_; + gboolean _result; + GVariant* _tmp417_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Schedule", "IsScrambled"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (event_id)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { + return FALSE; + } + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); + return FALSE; + } + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp416_ = g_variant_iter_next_value (&_reply_iter); + _vala_scrambled = g_variant_get_boolean (_tmp416_); + g_variant_unref (_tmp416_); + *scrambled = _vala_scrambled; + _tmp417_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp417_); + g_variant_unref (_tmp417_); + g_object_unref (_reply_message); + return _result; +} + + +static void dvb_id_bus_schedule_proxy_dvb_id_bus_schedule_interface_init (DVBIDBusScheduleIface* iface) { + iface->GetAllEvents = dvb_id_bus_schedule_proxy_GetAllEvents; + iface->GetAllEventInfos = dvb_id_bus_schedule_proxy_GetAllEventInfos; + iface->GetInformations = dvb_id_bus_schedule_proxy_GetInformations; + iface->NowPlaying = dvb_id_bus_schedule_proxy_NowPlaying; + iface->Next = dvb_id_bus_schedule_proxy_Next; + iface->GetName = dvb_id_bus_schedule_proxy_GetName; + iface->GetShortDescription = dvb_id_bus_schedule_proxy_GetShortDescription; + iface->GetExtendedDescription = dvb_id_bus_schedule_proxy_GetExtendedDescription; + iface->GetDuration = dvb_id_bus_schedule_proxy_GetDuration; + iface->GetLocalStartTime = dvb_id_bus_schedule_proxy_GetLocalStartTime; + iface->GetLocalStartTimestamp = dvb_id_bus_schedule_proxy_GetLocalStartTimestamp; + iface->IsRunning = dvb_id_bus_schedule_proxy_IsRunning; + iface->IsScrambled = dvb_id_bus_schedule_proxy_IsScrambled; +} + + +static void _dbus_dvb_id_bus_schedule_GetAllEvents (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + guint32* result; + int result_length1 = 0; + guint32* _tmp418_; + GVariantBuilder _tmp419_; + int _tmp420_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_schedule_GetAllEvents (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp1_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp2_); - for (_tmp3_ = 0; _tmp3_ < result_length1; _tmp3_++) { - dbus_uint32_t _tmp4_; - _tmp4_ = *_tmp1_; - dbus_message_iter_append_basic (&_tmp2_, DBUS_TYPE_UINT32, &_tmp4_); - _tmp1_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp2_); - result = (g_free (result), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp418_ = result; + g_variant_builder_init (&_tmp419_, G_VARIANT_TYPE ("au")); + for (_tmp420_ = 0; _tmp420_ < result_length1; _tmp420_++) { + g_variant_builder_add_value (&_tmp419_, g_variant_new_uint32 (*_tmp418_)); + _tmp418_++; } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp419_)); + result = (g_free (result), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } @@ -497,3546 +1051,479 @@ } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetAllEventInfos (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetAllEventInfos (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; DVBEventInfo* result; - int result_length1; - DBusMessage* reply; - DVBEventInfo* _tmp5_; - DBusMessageIter _tmp6_; - int _tmp7_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - result_length1 = 0; + int result_length1 = 0; + DVBEventInfo* _tmp421_; + GVariantBuilder _tmp422_; + int _tmp423_; + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_schedule_GetAllEventInfos (self, &result_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp5_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(uusus)", &_tmp6_); - for (_tmp7_ = 0; _tmp7_ < result_length1; _tmp7_++) { - DBusMessageIter _tmp8_; - dbus_uint32_t _tmp9_; - dbus_uint32_t _tmp10_; - const char* _tmp11_; - dbus_uint32_t _tmp12_; - const char* _tmp13_; - dbus_message_iter_open_container (&_tmp6_, DBUS_TYPE_STRUCT, NULL, &_tmp8_); - _tmp9_ = (*_tmp5_).id; - dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_UINT32, &_tmp9_); - _tmp10_ = (*_tmp5_).next; - dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_UINT32, &_tmp10_); - _tmp11_ = (*_tmp5_).name; - dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_STRING, &_tmp11_); - _tmp12_ = (*_tmp5_).duration; - dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_UINT32, &_tmp12_); - _tmp13_ = (*_tmp5_).short_description; - dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_STRING, &_tmp13_); - dbus_message_iter_close_container (&_tmp6_, &_tmp8_); - _tmp5_++; - } - dbus_message_iter_close_container (&iter, &_tmp6_); - result = (_vala_DVBEventInfo_array_free (result, result_length1), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp421_ = result; + g_variant_builder_init (&_tmp422_, G_VARIANT_TYPE ("a(uusus)")); + for (_tmp423_ = 0; _tmp423_ < result_length1; _tmp423_++) { + GVariantBuilder _tmp424_; + g_variant_builder_init (&_tmp424_, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_tmp424_, g_variant_new_uint32 ((*_tmp421_).id)); + g_variant_builder_add_value (&_tmp424_, g_variant_new_uint32 ((*_tmp421_).next)); + g_variant_builder_add_value (&_tmp424_, g_variant_new_string ((*_tmp421_).name)); + g_variant_builder_add_value (&_tmp424_, g_variant_new_uint32 ((*_tmp421_).duration)); + g_variant_builder_add_value (&_tmp424_, g_variant_new_string ((*_tmp421_).short_description)); + g_variant_builder_add_value (&_tmp422_, g_variant_builder_end (&_tmp424_)); + _tmp421_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp422_)); + result = (_vala_DVBEventInfo_array_free (result, result_length1), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetInformations (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetInformations (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp14_; + GVariant* _tmp425_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; DVBEventInfo event_info = {0}; + GVariantBuilder _tmp426_; gboolean result; - DBusMessage* reply; - DBusMessageIter _tmp15_; - dbus_uint32_t _tmp16_; - dbus_uint32_t _tmp17_; - const char* _tmp18_; - dbus_uint32_t _tmp19_; - const char* _tmp20_; - dbus_bool_t _tmp21_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp14_); - dbus_message_iter_next (&iter); - event_id = _tmp14_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp425_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp425_); + g_variant_unref (_tmp425_); result = dvb_id_bus_schedule_GetInformations (self, event_id, &event_info, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - dbus_message_iter_open_container (&iter, DBUS_TYPE_STRUCT, NULL, &_tmp15_); - _tmp16_ = event_info.id; - dbus_message_iter_append_basic (&_tmp15_, DBUS_TYPE_UINT32, &_tmp16_); - _tmp17_ = event_info.next; - dbus_message_iter_append_basic (&_tmp15_, DBUS_TYPE_UINT32, &_tmp17_); - _tmp18_ = event_info.name; - dbus_message_iter_append_basic (&_tmp15_, DBUS_TYPE_STRING, &_tmp18_); - _tmp19_ = event_info.duration; - dbus_message_iter_append_basic (&_tmp15_, DBUS_TYPE_UINT32, &_tmp19_); - _tmp20_ = event_info.short_description; - dbus_message_iter_append_basic (&_tmp15_, DBUS_TYPE_STRING, &_tmp20_); - dbus_message_iter_close_container (&iter, &_tmp15_); - dvb_event_info_destroy (&event_info); - _tmp21_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp21_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_init (&_tmp426_, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_tmp426_, g_variant_new_uint32 (event_info.id)); + g_variant_builder_add_value (&_tmp426_, g_variant_new_uint32 (event_info.next)); + g_variant_builder_add_value (&_tmp426_, g_variant_new_string (event_info.name)); + g_variant_builder_add_value (&_tmp426_, g_variant_new_uint32 (event_info.duration)); + g_variant_builder_add_value (&_tmp426_, g_variant_new_string (event_info.short_description)); + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp426_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + dvb_event_info_destroy (&event_info); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_NowPlaying (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_NowPlaying (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32 result; - DBusMessage* reply; - dbus_uint32_t _tmp22_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); + g_variant_iter_init (&_arguments_iter, parameters); result = dvb_id_bus_schedule_NowPlaying (self, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp22_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &_tmp22_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_Next (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_Next (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp23_; + GVariant* _tmp427_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint32 result; - DBusMessage* reply; - dbus_uint32_t _tmp24_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp23_); - dbus_message_iter_next (&iter); - event_id = _tmp23_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp427_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp427_); + g_variant_unref (_tmp427_); result = dvb_id_bus_schedule_Next (self, event_id, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp24_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &_tmp24_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetName (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetName (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp25_; + GVariant* _tmp428_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* name = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp26_; - dbus_bool_t _tmp27_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp25_); - dbus_message_iter_next (&iter); - event_id = _tmp25_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp428_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp428_); + g_variant_unref (_tmp428_); result = dvb_id_bus_schedule_GetName (self, event_id, &name, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp26_ = name; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp26_); - _g_free0 (name); - _tmp27_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp27_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (name)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (name); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetShortDescription (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetShortDescription (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp28_; + GVariant* _tmp429_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* description = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp29_; - dbus_bool_t _tmp30_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp28_); - dbus_message_iter_next (&iter); - event_id = _tmp28_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp429_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp429_); + g_variant_unref (_tmp429_); result = dvb_id_bus_schedule_GetShortDescription (self, event_id, &description, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp29_ = description; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp29_); - _g_free0 (description); - _tmp30_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp30_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (description)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (description); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetExtendedDescription (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetExtendedDescription (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp31_; + GVariant* _tmp430_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gchar* description = NULL; gboolean result; - DBusMessage* reply; - const char* _tmp32_; - dbus_bool_t _tmp33_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp31_); - dbus_message_iter_next (&iter); - event_id = _tmp31_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp430_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp430_); + g_variant_unref (_tmp430_); result = dvb_id_bus_schedule_GetExtendedDescription (self, event_id, &description, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp32_ = description; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &_tmp32_); - _g_free0 (description); - _tmp33_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp33_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_string (description)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (description); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetDuration (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetDuration (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp34_; + GVariant* _tmp431_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint duration = 0U; gboolean result; - DBusMessage* reply; - dbus_uint32_t _tmp35_; - dbus_bool_t _tmp36_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp34_); - dbus_message_iter_next (&iter); - event_id = _tmp34_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp431_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp431_); + g_variant_unref (_tmp431_); result = dvb_id_bus_schedule_GetDuration (self, event_id, &duration, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp35_ = duration; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &_tmp35_); - _tmp36_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp36_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (duration)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetLocalStartTime (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetLocalStartTime (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp37_; + GVariant* _tmp432_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; guint* start_time = NULL; - int start_time_length1; + int start_time_length1 = 0; + guint* _tmp433_; + GVariantBuilder _tmp434_; + int _tmp435_; gboolean result; - DBusMessage* reply; - guint* _tmp38_; - DBusMessageIter _tmp39_; - int _tmp40_; - dbus_bool_t _tmp42_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp37_); - dbus_message_iter_next (&iter); - event_id = _tmp37_; - start_time_length1 = 0; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp432_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp432_); + g_variant_unref (_tmp432_); result = dvb_id_bus_schedule_GetLocalStartTime (self, event_id, &start_time, &start_time_length1, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp38_ = start_time; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "u", &_tmp39_); - for (_tmp40_ = 0; _tmp40_ < start_time_length1; _tmp40_++) { - dbus_uint32_t _tmp41_; - _tmp41_ = *_tmp38_; - dbus_message_iter_append_basic (&_tmp39_, DBUS_TYPE_UINT32, &_tmp41_); - _tmp38_++; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - dbus_message_iter_close_container (&iter, &_tmp39_); + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp433_ = start_time; + g_variant_builder_init (&_tmp434_, G_VARIANT_TYPE ("au")); + for (_tmp435_ = 0; _tmp435_ < start_time_length1; _tmp435_++) { + g_variant_builder_add_value (&_tmp434_, g_variant_new_uint32 (*_tmp433_)); + _tmp433_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp434_)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); start_time = (g_free (start_time), NULL); - _tmp42_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp42_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_GetLocalStartTimestamp (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_GetLocalStartTimestamp (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp43_; + GVariant* _tmp436_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gint64 timestamp = 0LL; gboolean result; - DBusMessage* reply; - dbus_int64_t _tmp44_; - dbus_bool_t _tmp45_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp43_); - dbus_message_iter_next (&iter); - event_id = _tmp43_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp436_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp436_); + g_variant_unref (_tmp436_); result = dvb_id_bus_schedule_GetLocalStartTimestamp (self, event_id, ×tamp, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp44_ = timestamp; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT64, &_tmp44_); - _tmp45_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp45_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_int64 (timestamp)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_IsRunning (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_IsRunning (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp46_; + GVariant* _tmp437_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean running = FALSE; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp47_; - dbus_bool_t _tmp48_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp46_); - dbus_message_iter_next (&iter); - event_id = _tmp46_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp437_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp437_); + g_variant_unref (_tmp437_); result = dvb_id_bus_schedule_IsRunning (self, event_id, &running, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp47_ = running; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp47_); - _tmp48_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp48_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (running)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_id_bus_schedule_IsScrambled (DVBIDBusSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; +static void _dbus_dvb_id_bus_schedule_IsScrambled (DVBIDBusSchedule* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; guint32 event_id = 0U; - dbus_uint32_t _tmp49_; + GVariant* _tmp438_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; gboolean scrambled = FALSE; gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp50_; - dbus_bool_t _tmp51_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "u")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp49_); - dbus_message_iter_next (&iter); - event_id = _tmp49_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp438_ = g_variant_iter_next_value (&_arguments_iter); + event_id = g_variant_get_uint32 (_tmp438_); + g_variant_unref (_tmp438_); result = dvb_id_bus_schedule_IsScrambled (self, event_id, &scrambled, &error); if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _tmp50_ = scrambled; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp50_); - _tmp51_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp51_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_schedule_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_schedule_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_schedule_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetAllEvents")) { - result = _dbus_dvb_id_bus_schedule_GetAllEvents (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetAllEventInfos")) { - result = _dbus_dvb_id_bus_schedule_GetAllEventInfos (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetInformations")) { - result = _dbus_dvb_id_bus_schedule_GetInformations (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "NowPlaying")) { - result = _dbus_dvb_id_bus_schedule_NowPlaying (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "Next")) { - result = _dbus_dvb_id_bus_schedule_Next (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetName")) { - result = _dbus_dvb_id_bus_schedule_GetName (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetShortDescription")) { - result = _dbus_dvb_id_bus_schedule_GetShortDescription (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetExtendedDescription")) { - result = _dbus_dvb_id_bus_schedule_GetExtendedDescription (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetDuration")) { - result = _dbus_dvb_id_bus_schedule_GetDuration (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetLocalStartTime")) { - result = _dbus_dvb_id_bus_schedule_GetLocalStartTime (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "GetLocalStartTimestamp")) { - result = _dbus_dvb_id_bus_schedule_GetLocalStartTimestamp (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "IsRunning")) { - result = _dbus_dvb_id_bus_schedule_IsRunning (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Schedule", "IsScrambled")) { - result = _dbus_dvb_id_bus_schedule_IsScrambled (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_id_bus_schedule_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_schedule_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } -} - - -static void dvb_id_bus_schedule_base_init (DVBIDBusScheduleIface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - g_type_set_qdata (DVB_TYPE_ID_BUS_SCHEDULE, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_schedule_dbus_vtable)); - } -} - - -GType dvb_id_bus_schedule_get_type (void) { - static volatile gsize dvb_id_bus_schedule_type_id__volatile = 0; - if (g_once_init_enter (&dvb_id_bus_schedule_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusScheduleIface), (GBaseInitFunc) dvb_id_bus_schedule_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType dvb_id_bus_schedule_type_id; - dvb_id_bus_schedule_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusSchedule", &g_define_type_info, 0); - g_type_interface_add_prerequisite (dvb_id_bus_schedule_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_schedule_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_schedule_dbus_proxy_get_type); - g_once_init_leave (&dvb_id_bus_schedule_type_id__volatile, dvb_id_bus_schedule_type_id); - } - return dvb_id_bus_schedule_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (DVBIDBusScheduleDBusProxy, dvb_id_bus_schedule_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_SCHEDULE, dvb_id_bus_schedule_dbus_proxy_dvb_id_bus_schedule__interface_init) ); -DVBIDBusSchedule* dvb_id_bus_schedule_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusSchedule* self; - self = g_object_new (dvb_id_bus_schedule_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.Schedule", NULL); - return self; -} - - -static GObject* dvb_id_bus_schedule_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_schedule_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_schedule_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -DBusHandlerResult dvb_id_bus_schedule_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void dvb_id_bus_schedule_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { + g_dbus_method_invocation_return_gerror (invocation, error); return; } - ((DVBIDBusScheduleDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_schedule_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_schedule_dbus_proxy_parent_class)->dispose (self); -} - - -static void dvb_id_bus_schedule_dbus_proxy_class_init (DVBIDBusScheduleDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_schedule_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_schedule_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_schedule_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_schedule_dbus_proxy_set_property; -} - - -static void dvb_id_bus_schedule_dbus_proxy_init (DVBIDBusScheduleDBusProxy* self) { -} - - -static guint32* dvb_id_bus_schedule_dbus_proxy_GetAllEvents (DVBIDBusSchedule* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint32* _result; - int _result_length1; - guint32* _tmp385_; - int _tmp385__length; - int _tmp385__size; - int _tmp385__length1; - DBusMessageIter _tmp386_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetAllEvents"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp388_; - _edomain = DBUS_GERROR; - _tmp388_ = _dbus_error.name + 27; - if (strcmp (_tmp388_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp388_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp388_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp388_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp388_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp388_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp388_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp388_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp388_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp388_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp388_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp388_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp388_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp388_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp388_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp388_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp388_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp388_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp388_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp388_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp388_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp388_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp388_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp388_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp388_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp388_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp388_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp388_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp388_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp388_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp388_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp388_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp388_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "au")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "au", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp385_ = g_new (guint32, 5); - _tmp385__length = 0; - _tmp385__size = 4; - _tmp385__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp386_); - for (; dbus_message_iter_get_arg_type (&_tmp386_); _tmp385__length1++) { - dbus_uint32_t _tmp387_; - if (_tmp385__size == _tmp385__length) { - _tmp385__size = 2 * _tmp385__size; - _tmp385_ = g_renew (guint32, _tmp385_, _tmp385__size + 1); - } - dbus_message_iter_get_basic (&_tmp386_, &_tmp387_); - dbus_message_iter_next (&_tmp386_); - _tmp385_[_tmp385__length++] = _tmp387_; - } - _result_length1 = _tmp385__length1; - dbus_message_iter_next (&_iter); - _result = _tmp385_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static DVBEventInfo* dvb_id_bus_schedule_dbus_proxy_GetAllEventInfos (DVBIDBusSchedule* self, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - DVBEventInfo* _result; - int _result_length1; - DVBEventInfo* _tmp389_; - int _tmp389__length; - int _tmp389__size; - int _tmp389__length1; - DBusMessageIter _tmp390_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetAllEventInfos"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp398_; - _edomain = DBUS_GERROR; - _tmp398_ = _dbus_error.name + 27; - if (strcmp (_tmp398_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp398_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp398_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp398_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp398_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp398_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp398_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp398_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp398_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp398_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp398_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp398_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp398_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp398_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp398_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp398_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp398_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp398_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp398_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp398_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp398_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp398_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp398_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp398_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp398_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp398_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp398_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp398_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp398_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp398_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp398_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp398_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp398_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "a(uusus)")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "a(uusus)", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - _result_length1 = 0; - _tmp389_ = g_new (DVBEventInfo, 5); - _tmp389__length = 0; - _tmp389__size = 4; - _tmp389__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp390_); - for (; dbus_message_iter_get_arg_type (&_tmp390_); _tmp389__length1++) { - DVBEventInfo _tmp391_; - DBusMessageIter _tmp392_; - dbus_uint32_t _tmp393_; - dbus_uint32_t _tmp394_; - const char* _tmp395_; - dbus_uint32_t _tmp396_; - const char* _tmp397_; - if (_tmp389__size == _tmp389__length) { - _tmp389__size = 2 * _tmp389__size; - _tmp389_ = g_renew (DVBEventInfo, _tmp389_, _tmp389__size + 1); - } - dbus_message_iter_recurse (&_tmp390_, &_tmp392_); - dbus_message_iter_get_basic (&_tmp392_, &_tmp393_); - dbus_message_iter_next (&_tmp392_); - _tmp391_.id = _tmp393_; - dbus_message_iter_get_basic (&_tmp392_, &_tmp394_); - dbus_message_iter_next (&_tmp392_); - _tmp391_.next = _tmp394_; - dbus_message_iter_get_basic (&_tmp392_, &_tmp395_); - dbus_message_iter_next (&_tmp392_); - _tmp391_.name = g_strdup (_tmp395_); - dbus_message_iter_get_basic (&_tmp392_, &_tmp396_); - dbus_message_iter_next (&_tmp392_); - _tmp391_.duration = _tmp396_; - dbus_message_iter_get_basic (&_tmp392_, &_tmp397_); - dbus_message_iter_next (&_tmp392_); - _tmp391_.short_description = g_strdup (_tmp397_); - dbus_message_iter_next (&_tmp390_); - _tmp389_[_tmp389__length++] = _tmp391_; - } - _result_length1 = _tmp389__length1; - dbus_message_iter_next (&_iter); - _result = _tmp389_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_schedule_dbus_proxy_GetInformations (DVBIDBusSchedule* self, guint32 event_id, DVBEventInfo* event_info, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp399_; - DVBEventInfo _event_info; - DVBEventInfo _tmp400_; - DBusMessageIter _tmp401_; - dbus_uint32_t _tmp402_; - dbus_uint32_t _tmp403_; - const char* _tmp404_; - dbus_uint32_t _tmp405_; - const char* _tmp406_; - gboolean _result; - dbus_bool_t _tmp407_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetInformations"); - dbus_message_iter_init_append (_message, &_iter); - _tmp399_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp399_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp408_; - _edomain = DBUS_GERROR; - _tmp408_ = _dbus_error.name + 27; - if (strcmp (_tmp408_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp408_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp408_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp408_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp408_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp408_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp408_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp408_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp408_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp408_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp408_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp408_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp408_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp408_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp408_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp408_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp408_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp408_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp408_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp408_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp408_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp408_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp408_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp408_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp408_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp408_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp408_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp408_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp408_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp408_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp408_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp408_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp408_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "(uusus)b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "(uusus)b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_tmp401_); - dbus_message_iter_get_basic (&_tmp401_, &_tmp402_); - dbus_message_iter_next (&_tmp401_); - _tmp400_.id = _tmp402_; - dbus_message_iter_get_basic (&_tmp401_, &_tmp403_); - dbus_message_iter_next (&_tmp401_); - _tmp400_.next = _tmp403_; - dbus_message_iter_get_basic (&_tmp401_, &_tmp404_); - dbus_message_iter_next (&_tmp401_); - _tmp400_.name = g_strdup (_tmp404_); - dbus_message_iter_get_basic (&_tmp401_, &_tmp405_); - dbus_message_iter_next (&_tmp401_); - _tmp400_.duration = _tmp405_; - dbus_message_iter_get_basic (&_tmp401_, &_tmp406_); - dbus_message_iter_next (&_tmp401_); - _tmp400_.short_description = g_strdup (_tmp406_); - dbus_message_iter_next (&_iter); - _event_info = _tmp400_; - *event_info = _event_info; - dbus_message_iter_get_basic (&_iter, &_tmp407_); - dbus_message_iter_next (&_iter); - _result = _tmp407_; - dbus_message_unref (_reply); - return _result; -} - - -static guint32 dvb_id_bus_schedule_dbus_proxy_NowPlaying (DVBIDBusSchedule* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint32 _result; - dbus_uint32_t _tmp409_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return 0U; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "NowPlaying"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp410_; - _edomain = DBUS_GERROR; - _tmp410_ = _dbus_error.name + 27; - if (strcmp (_tmp410_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp410_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp410_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp410_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp410_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp410_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp410_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp410_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp410_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp410_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp410_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp410_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp410_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp410_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp410_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp410_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp410_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp410_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp410_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp410_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp410_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp410_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp410_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp410_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp410_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp410_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp410_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp410_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp410_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp410_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp410_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp410_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp410_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return 0U; - } - if (strcmp (dbus_message_get_signature (_reply), "u")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "u", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp409_); - dbus_message_iter_next (&_iter); - _result = _tmp409_; - dbus_message_unref (_reply); - return _result; -} - - -static guint32 dvb_id_bus_schedule_dbus_proxy_Next (DVBIDBusSchedule* self, guint32 event_id, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp411_; - guint32 _result; - dbus_uint32_t _tmp412_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return 0U; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "Next"); - dbus_message_iter_init_append (_message, &_iter); - _tmp411_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp411_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp413_; - _edomain = DBUS_GERROR; - _tmp413_ = _dbus_error.name + 27; - if (strcmp (_tmp413_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp413_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp413_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp413_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp413_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp413_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp413_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp413_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp413_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp413_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp413_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp413_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp413_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp413_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp413_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp413_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp413_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp413_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp413_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp413_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp413_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp413_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp413_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp413_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp413_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp413_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp413_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp413_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp413_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp413_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp413_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp413_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp413_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return 0U; - } - if (strcmp (dbus_message_get_signature (_reply), "u")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "u", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp412_); - dbus_message_iter_next (&_iter); - _result = _tmp412_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_schedule_dbus_proxy_GetName (DVBIDBusSchedule* self, guint32 event_id, gchar** name, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp414_; - gchar* _name; - const char* _tmp415_; - gboolean _result; - dbus_bool_t _tmp416_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetName"); - dbus_message_iter_init_append (_message, &_iter); - _tmp414_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp414_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp417_; - _edomain = DBUS_GERROR; - _tmp417_ = _dbus_error.name + 27; - if (strcmp (_tmp417_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp417_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp417_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp417_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp417_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp417_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp417_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp417_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp417_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp417_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp417_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp417_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp417_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp417_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp417_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp417_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp417_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp417_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp417_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp417_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp417_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp417_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp417_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp417_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp417_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp417_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp417_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp417_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp417_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp417_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp417_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp417_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp417_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp415_); - dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp415_); - *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp416_); - dbus_message_iter_next (&_iter); - _result = _tmp416_; - dbus_message_unref (_reply); - return _result; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (scrambled)); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static gboolean dvb_id_bus_schedule_dbus_proxy_GetShortDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp418_; - gchar* _description; - const char* _tmp419_; - gboolean _result; - dbus_bool_t _tmp420_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetShortDescription"); - dbus_message_iter_init_append (_message, &_iter); - _tmp418_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp418_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp421_; - _edomain = DBUS_GERROR; - _tmp421_ = _dbus_error.name + 27; - if (strcmp (_tmp421_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp421_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp421_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp421_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp421_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp421_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp421_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp421_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp421_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp421_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp421_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp421_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp421_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp421_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp421_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp421_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp421_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp421_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp421_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp421_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp421_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp421_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp421_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp421_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp421_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp421_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp421_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp421_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp421_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp421_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp421_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp421_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp421_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp419_); - dbus_message_iter_next (&_iter); - _description = g_strdup (_tmp419_); - *description = _description; - dbus_message_iter_get_basic (&_iter, &_tmp420_); - dbus_message_iter_next (&_iter); - _result = _tmp420_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_schedule_dbus_proxy_GetExtendedDescription (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp422_; - gchar* _description; - const char* _tmp423_; - gboolean _result; - dbus_bool_t _tmp424_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetExtendedDescription"); - dbus_message_iter_init_append (_message, &_iter); - _tmp422_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp422_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp425_; - _edomain = DBUS_GERROR; - _tmp425_ = _dbus_error.name + 27; - if (strcmp (_tmp425_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp425_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp425_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp425_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp425_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp425_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp425_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp425_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp425_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp425_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp425_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp425_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp425_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp425_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp425_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp425_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp425_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp425_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp425_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp425_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp425_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp425_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp425_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp425_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp425_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp425_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp425_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp425_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp425_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp425_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp425_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp425_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp425_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "sb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "sb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp423_); - dbus_message_iter_next (&_iter); - _description = g_strdup (_tmp423_); - *description = _description; - dbus_message_iter_get_basic (&_iter, &_tmp424_); - dbus_message_iter_next (&_iter); - _result = _tmp424_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_schedule_dbus_proxy_GetDuration (DVBIDBusSchedule* self, guint32 event_id, guint* duration, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp426_; - guint _duration; - dbus_uint32_t _tmp427_; - gboolean _result; - dbus_bool_t _tmp428_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetDuration"); - dbus_message_iter_init_append (_message, &_iter); - _tmp426_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp426_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp429_; - _edomain = DBUS_GERROR; - _tmp429_ = _dbus_error.name + 27; - if (strcmp (_tmp429_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp429_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp429_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp429_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp429_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp429_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp429_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp429_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp429_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp429_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp429_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp429_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp429_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp429_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp429_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp429_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp429_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp429_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp429_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp429_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp429_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp429_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp429_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp429_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp429_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp429_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp429_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp429_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp429_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp429_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp429_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp429_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp429_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "ub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "ub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp427_); - dbus_message_iter_next (&_iter); - _duration = _tmp427_; - *duration = _duration; - dbus_message_iter_get_basic (&_iter, &_tmp428_); - dbus_message_iter_next (&_iter); - _result = _tmp428_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_schedule_dbus_proxy_GetLocalStartTime (DVBIDBusSchedule* self, guint32 event_id, guint** start_time, int* start_time_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp430_; - guint* _start_time; - int _start_time_length1; - guint* _tmp431_; - int _tmp431__length; - int _tmp431__size; - int _tmp431__length1; - DBusMessageIter _tmp432_; - gboolean _result; - dbus_bool_t _tmp434_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetLocalStartTime"); - dbus_message_iter_init_append (_message, &_iter); - _tmp430_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp430_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp435_; - _edomain = DBUS_GERROR; - _tmp435_ = _dbus_error.name + 27; - if (strcmp (_tmp435_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp435_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp435_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp435_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp435_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp435_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp435_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp435_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp435_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp435_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp435_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp435_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp435_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp435_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp435_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp435_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp435_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp435_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp435_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp435_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp435_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp435_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp435_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp435_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp435_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp435_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp435_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp435_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp435_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp435_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp435_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp435_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp435_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "aub")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aub", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; +static void dvb_id_bus_schedule_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "GetAllEvents") == 0) { + _dbus_dvb_id_bus_schedule_GetAllEvents (object, parameters, invocation); + } else if (strcmp (method_name, "GetAllEventInfos") == 0) { + _dbus_dvb_id_bus_schedule_GetAllEventInfos (object, parameters, invocation); + } else if (strcmp (method_name, "GetInformations") == 0) { + _dbus_dvb_id_bus_schedule_GetInformations (object, parameters, invocation); + } else if (strcmp (method_name, "NowPlaying") == 0) { + _dbus_dvb_id_bus_schedule_NowPlaying (object, parameters, invocation); + } else if (strcmp (method_name, "Next") == 0) { + _dbus_dvb_id_bus_schedule_Next (object, parameters, invocation); + } else if (strcmp (method_name, "GetName") == 0) { + _dbus_dvb_id_bus_schedule_GetName (object, parameters, invocation); + } else if (strcmp (method_name, "GetShortDescription") == 0) { + _dbus_dvb_id_bus_schedule_GetShortDescription (object, parameters, invocation); + } else if (strcmp (method_name, "GetExtendedDescription") == 0) { + _dbus_dvb_id_bus_schedule_GetExtendedDescription (object, parameters, invocation); + } else if (strcmp (method_name, "GetDuration") == 0) { + _dbus_dvb_id_bus_schedule_GetDuration (object, parameters, invocation); + } else if (strcmp (method_name, "GetLocalStartTime") == 0) { + _dbus_dvb_id_bus_schedule_GetLocalStartTime (object, parameters, invocation); + } else if (strcmp (method_name, "GetLocalStartTimestamp") == 0) { + _dbus_dvb_id_bus_schedule_GetLocalStartTimestamp (object, parameters, invocation); + } else if (strcmp (method_name, "IsRunning") == 0) { + _dbus_dvb_id_bus_schedule_IsRunning (object, parameters, invocation); + } else if (strcmp (method_name, "IsScrambled") == 0) { + _dbus_dvb_id_bus_schedule_IsScrambled (object, parameters, invocation); + } else { + g_object_unref (invocation); } - dbus_message_iter_init (_reply, &_iter); - _start_time_length1 = 0; - _tmp431_ = g_new (guint, 5); - _tmp431__length = 0; - _tmp431__size = 4; - _tmp431__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp432_); - for (; dbus_message_iter_get_arg_type (&_tmp432_); _tmp431__length1++) { - dbus_uint32_t _tmp433_; - if (_tmp431__size == _tmp431__length) { - _tmp431__size = 2 * _tmp431__size; - _tmp431_ = g_renew (guint, _tmp431_, _tmp431__size + 1); - } - dbus_message_iter_get_basic (&_tmp432_, &_tmp433_); - dbus_message_iter_next (&_tmp432_); - _tmp431_[_tmp431__length++] = _tmp433_; - } - _start_time_length1 = _tmp431__length1; - dbus_message_iter_next (&_iter); - _start_time = _tmp431_; - *start_time = _start_time; - *start_time_length1 = _start_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp434_); - dbus_message_iter_next (&_iter); - _result = _tmp434_; - dbus_message_unref (_reply); - return _result; } -static gboolean dvb_id_bus_schedule_dbus_proxy_GetLocalStartTimestamp (DVBIDBusSchedule* self, guint32 event_id, gint64* timestamp, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp436_; - gint64 _timestamp; - dbus_int64_t _tmp437_; - gboolean _result; - dbus_bool_t _tmp438_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "GetLocalStartTimestamp"); - dbus_message_iter_init_append (_message, &_iter); - _tmp436_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp436_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp439_; - _edomain = DBUS_GERROR; - _tmp439_ = _dbus_error.name + 27; - if (strcmp (_tmp439_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp439_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp439_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp439_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp439_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp439_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp439_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp439_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp439_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp439_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp439_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp439_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp439_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp439_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp439_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp439_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp439_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp439_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp439_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp439_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp439_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp439_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp439_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp439_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp439_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp439_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp439_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp439_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp439_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp439_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp439_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp439_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp439_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "xb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "xb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp437_); - dbus_message_iter_next (&_iter); - _timestamp = _tmp437_; - *timestamp = _timestamp; - dbus_message_iter_get_basic (&_iter, &_tmp438_); - dbus_message_iter_next (&_iter); - _result = _tmp438_; - dbus_message_unref (_reply); - return _result; +static GVariant* dvb_id_bus_schedule_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; } -static gboolean dvb_id_bus_schedule_dbus_proxy_IsRunning (DVBIDBusSchedule* self, guint32 event_id, gboolean* running, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp440_; - gboolean _running; - dbus_bool_t _tmp441_; - gboolean _result; - dbus_bool_t _tmp442_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "IsRunning"); - dbus_message_iter_init_append (_message, &_iter); - _tmp440_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp440_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp443_; - _edomain = DBUS_GERROR; - _tmp443_ = _dbus_error.name + 27; - if (strcmp (_tmp443_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp443_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp443_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp443_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp443_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp443_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp443_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp443_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp443_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp443_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp443_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp443_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp443_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp443_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp443_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp443_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp443_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp443_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp443_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp443_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp443_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp443_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp443_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp443_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp443_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp443_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp443_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp443_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp443_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp443_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp443_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp443_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp443_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "bb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "bb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp441_); - dbus_message_iter_next (&_iter); - _running = _tmp441_; - *running = _running; - dbus_message_iter_get_basic (&_iter, &_tmp442_); - dbus_message_iter_next (&_iter); - _result = _tmp442_; - dbus_message_unref (_reply); - return _result; +static gboolean dvb_id_bus_schedule_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; } -static gboolean dvb_id_bus_schedule_dbus_proxy_IsScrambled (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp444_; - gboolean _scrambled; - dbus_bool_t _tmp445_; - gboolean _result; - dbus_bool_t _tmp446_; - if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; +guint dvb_id_bus_schedule_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_schedule_dbus_interface_info), &_dvb_id_bus_schedule_dbus_interface_vtable, data, _dvb_id_bus_schedule_unregister_object, error); + if (!result) { + return 0; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Schedule", "IsScrambled"); - dbus_message_iter_init_append (_message, &_iter); - _tmp444_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp444_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp447_; - _edomain = DBUS_GERROR; - _tmp447_ = _dbus_error.name + 27; - if (strcmp (_tmp447_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp447_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp447_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp447_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp447_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp447_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp447_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp447_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp447_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp447_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp447_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp447_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp447_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp447_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp447_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp447_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp447_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp447_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp447_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp447_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp447_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp447_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp447_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp447_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp447_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp447_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp447_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp447_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp447_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp447_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp447_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp447_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp447_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "bb")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "bb", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp445_); - dbus_message_iter_next (&_iter); - _scrambled = _tmp445_; - *scrambled = _scrambled; - dbus_message_iter_get_basic (&_iter, &_tmp446_); - dbus_message_iter_next (&_iter); - _result = _tmp446_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_schedule_dbus_proxy_dvb_id_bus_schedule__interface_init (DVBIDBusScheduleIface* iface) { - iface->GetAllEvents = dvb_id_bus_schedule_dbus_proxy_GetAllEvents; - iface->GetAllEventInfos = dvb_id_bus_schedule_dbus_proxy_GetAllEventInfos; - iface->GetInformations = dvb_id_bus_schedule_dbus_proxy_GetInformations; - iface->NowPlaying = dvb_id_bus_schedule_dbus_proxy_NowPlaying; - iface->Next = dvb_id_bus_schedule_dbus_proxy_Next; - iface->GetName = dvb_id_bus_schedule_dbus_proxy_GetName; - iface->GetShortDescription = dvb_id_bus_schedule_dbus_proxy_GetShortDescription; - iface->GetExtendedDescription = dvb_id_bus_schedule_dbus_proxy_GetExtendedDescription; - iface->GetDuration = dvb_id_bus_schedule_dbus_proxy_GetDuration; - iface->GetLocalStartTime = dvb_id_bus_schedule_dbus_proxy_GetLocalStartTime; - iface->GetLocalStartTimestamp = dvb_id_bus_schedule_dbus_proxy_GetLocalStartTimestamp; - iface->IsRunning = dvb_id_bus_schedule_dbus_proxy_IsRunning; - iface->IsScrambled = dvb_id_bus_schedule_dbus_proxy_IsScrambled; -} - - -static void _vala_dvb_id_bus_schedule_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + return result; } -static void _vala_dvb_id_bus_schedule_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dvb_id_bus_schedule_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } diff -Nru gnome-dvb-daemon-0.1.23/src/dbus/IDBusSchedule.vala gnome-dvb-daemon-0.2.7/src/dbus/IDBusSchedule.vala --- gnome-dvb-daemon-0.1.23/src/dbus/IDBusSchedule.vala 2010-04-01 09:50:34.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/dbus/IDBusSchedule.vala 2011-04-19 20:46:24.000000000 +0000 @@ -33,37 +33,37 @@ [DBus (name = "org.gnome.DVB.Schedule")] public interface IDBusSchedule : GLib.Object { - public abstract uint32[] GetAllEvents () throws DBus.Error; + public abstract uint32[] GetAllEvents () throws DBusError; - public abstract EventInfo[] GetAllEventInfos () throws DBus.Error; + public abstract EventInfo[] GetAllEventInfos () throws DBusError; - public abstract bool GetInformations (uint32 event_id, out EventInfo event_info) throws DBus.Error; + public abstract bool GetInformations (uint32 event_id, out EventInfo event_info) throws DBusError; /** * @returns: ID of currently running event */ - public abstract uint32 NowPlaying () throws DBus.Error; + public abstract uint32 NowPlaying () throws DBusError; /** * @returnns: ID of event that follows the given event */ - public abstract uint32 Next (uint32 event_id) throws DBus.Error; + public abstract uint32 Next (uint32 event_id) throws DBusError; - public abstract bool GetName (uint32 event_id, out string name) throws DBus.Error; + public abstract bool GetName (uint32 event_id, out string name) throws DBusError; - public abstract bool GetShortDescription (uint32 event_id, out string description) throws DBus.Error; + public abstract bool GetShortDescription (uint32 event_id, out string description) throws DBusError; - public abstract bool GetExtendedDescription (uint32 event_id, out string description) throws DBus.Error; + public abstract bool GetExtendedDescription (uint32 event_id, out string description) throws DBusError; - public abstract bool GetDuration (uint32 event_id, out uint duration) throws DBus.Error; + public abstract bool GetDuration (uint32 event_id, out uint duration) throws DBusError; - public abstract bool GetLocalStartTime (uint32 event_id, out uint[] start_time) throws DBus.Error; + public abstract bool GetLocalStartTime (uint32 event_id, out uint[] start_time) throws DBusError; - public abstract bool GetLocalStartTimestamp (uint32 event_id, out int64 timestamp) throws DBus.Error; + public abstract bool GetLocalStartTimestamp (uint32 event_id, out int64 timestamp) throws DBusError; - public abstract bool IsRunning (uint32 event_id, out bool running) throws DBus.Error; + public abstract bool IsRunning (uint32 event_id, out bool running) throws DBusError; - public abstract bool IsScrambled (uint32 event_id, out bool scrambled) throws DBus.Error; + public abstract bool IsScrambled (uint32 event_id, out bool scrambled) throws DBusError; /* public abstract bool IsHighDefinition (uint32 event_id); diff -Nru gnome-dvb-daemon-0.1.23/src/Device.c gnome-dvb-daemon-0.2.7/src/Device.c --- gnome-dvb-daemon-0.1.23/src/Device.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Device.c 2011-09-29 18:32:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* Device.c generated by valac 0.11.3, the Vala compiler +/* Device.c generated by valac 0.14.0, the Vala compiler * generated from Device.vala, do not modify */ /* @@ -50,6 +50,26 @@ typedef struct _DVBChannelList DVBChannelList; typedef struct _DVBChannelListClass DVBChannelListClass; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) #define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) @@ -87,6 +107,8 @@ static gpointer dvb_device_parent_class = NULL; +static DVBLoggingLogger* dvb_device_log; +static DVBLoggingLogger* dvb_device_log = NULL; GQuark dvb_device_error_quark (void); GType dvb_adapter_type_get_type (void) G_GNUC_CONST; @@ -102,23 +124,31 @@ DVB_DEVICE_CHANNELS, DVB_DEVICE_RECORDINGS_DIRECTORY }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_DEVICE_PRIME 31 DVBDevice* dvb_device_new (guint adapter, guint frontend); DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend); -DVBDevice* dvb_device_new_with_type (guint adapter, guint frontend); -static gboolean dvb_device_setAdapterTypeAndName (DVBDevice* self, guint adapter, guint frontend); -DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, guint group_id, GError** error); -DVBAdapterType dvb_device_get_Type (DVBDevice* self); +DVBDevice* dvb_device_new_set_type (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, const gchar* name, DVBAdapterType type); void dvb_device_set_RecordingsDirectory (DVBDevice* self, GFile* value); DVBChannelList* dvb_channel_list_new (GFile* channels); DVBChannelList* dvb_channel_list_construct (GType object_type, GFile* channels); void dvb_device_set_Channels (DVBDevice* self, DVBChannelList* value); +DVBDevice* dvb_device_new_with_type (guint adapter, guint frontend); +static gboolean dvb_device_setAdapterTypeAndName (DVBDevice* self, guint adapter, guint frontend); +DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, GError** error); +DVBAdapterType dvb_device_get_Type (DVBDevice* self); gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2); guint dvb_device_get_Adapter (DVBDevice* self); guint dvb_device_get_Frontend (DVBDevice* self); guint dvb_device_hash (DVBDevice* device); guint dvb_device_hash_without_device (guint adapter, guint frontend); gboolean dvb_device_is_busy (DVBDevice* self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); +DVBAdapterType dvb_device_get_type_from_string (const gchar* adapter_type); static void dvb_device_set_Adapter (DVBDevice* self, guint value); static void dvb_device_set_Frontend (DVBDevice* self, guint value); const gchar* dvb_device_get_Name (DVBDevice* self); @@ -148,7 +178,11 @@ DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend) { DVBDevice * self = NULL; - self = (DVBDevice*) g_object_new (object_type, "Adapter", adapter, "Frontend", frontend, NULL); + guint _tmp0_; + guint _tmp1_; + _tmp0_ = adapter; + _tmp1_ = frontend; + self = (DVBDevice*) g_object_new (object_type, "Adapter", _tmp0_, "Frontend", _tmp1_, NULL); return self; } @@ -158,35 +192,97 @@ } +DVBDevice* dvb_device_new_set_type (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, const gchar* name, DVBAdapterType type) { + DVBDevice* result = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_; + DVBDevice* dev; + const gchar* _tmp3_; + gchar* _tmp4_; + DVBAdapterType _tmp5_; + GFile* _tmp6_; + GFile* _tmp7_; + DVBChannelList* _tmp8_; + DVBChannelList* _tmp9_; + g_return_val_if_fail (channels_conf != NULL, NULL); + g_return_val_if_fail (recordings_dir != NULL, NULL); + g_return_val_if_fail (name != NULL, NULL); + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_device_new (_tmp0_, _tmp1_); + dev = _tmp2_; + _tmp3_ = name; + _tmp4_ = g_strdup (_tmp3_); + _g_free0 (dev->priv->adapter_name); + dev->priv->adapter_name = _tmp4_; + _tmp5_ = type; + dev->priv->adapter_type = _tmp5_; + _tmp6_ = recordings_dir; + dvb_device_set_RecordingsDirectory (dev, _tmp6_); + _tmp7_ = channels_conf; + _tmp8_ = dvb_channel_list_new (_tmp7_); + _tmp9_ = _tmp8_; + dvb_device_set_Channels (dev, _tmp9_); + _g_object_unref0 (_tmp9_); + result = dev; + return result; +} + + DVBDevice* dvb_device_new_with_type (guint adapter, guint frontend) { DVBDevice* result = NULL; - DVBDevice* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_; DVBDevice* device; - _tmp0_ = dvb_device_new (adapter, frontend); - device = _tmp0_; - dvb_device_setAdapterTypeAndName (device, adapter, frontend); + guint _tmp3_; + guint _tmp4_; + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_device_new (_tmp0_, _tmp1_); + device = _tmp2_; + _tmp3_ = adapter; + _tmp4_ = frontend; + dvb_device_setAdapterTypeAndName (device, _tmp3_, _tmp4_); result = device; return result; } -DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, guint group_id, GError** error) { +DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, GError** error) { DVBDevice* result = NULL; - DVBDevice* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_ = NULL; DVBDevice* device; - DVBAdapterType _tmp1_; - DVBChannelList* _tmp3_ = NULL; - DVBChannelList* _tmp4_; + DVBDevice* _tmp3_; + DVBAdapterType _tmp4_; + DVBAdapterType _tmp5_; + DVBDevice* _tmp9_; + GFile* _tmp10_; + DVBDevice* _tmp11_; + GFile* _tmp12_; + DVBChannelList* _tmp13_; + DVBChannelList* _tmp14_; GError * _inner_error_ = NULL; g_return_val_if_fail (channels_conf != NULL, NULL); g_return_val_if_fail (recordings_dir != NULL, NULL); - _tmp0_ = dvb_device_new_with_type (adapter, frontend); - device = _tmp0_; - _tmp1_ = dvb_device_get_Type (device); - if (_tmp1_ == DVB_ADAPTER_TYPE_UNKNOWN) { - GError* _tmp2_ = NULL; - _tmp2_ = g_error_new (DVB_DEVICE_ERROR, DVB_DEVICE_ERROR_UNKNOWN_TYPE, "device %u,%u has unknown type", adapter, frontend); - _inner_error_ = _tmp2_; + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_device_new_with_type (_tmp0_, _tmp1_); + device = _tmp2_; + _tmp3_ = device; + _tmp4_ = dvb_device_get_Type (_tmp3_); + _tmp5_ = _tmp4_; + if (_tmp5_ == DVB_ADAPTER_TYPE_UNKNOWN) { + guint _tmp6_; + guint _tmp7_; + GError* _tmp8_; + _tmp6_ = adapter; + _tmp7_ = frontend; + _tmp8_ = g_error_new (DVB_DEVICE_ERROR, DVB_DEVICE_ERROR_UNKNOWN_TYPE, "device %u,%u has unknown type", _tmp6_, _tmp7_); + _inner_error_ = _tmp8_; if (_inner_error_->domain == DVB_DEVICE_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (device); @@ -198,11 +294,15 @@ return NULL; } } - dvb_device_set_RecordingsDirectory (device, recordings_dir); - _tmp3_ = dvb_channel_list_new (channels_conf); - _tmp4_ = _tmp3_; - dvb_device_set_Channels (device, _tmp4_); - _g_object_unref0 (_tmp4_); + _tmp9_ = device; + _tmp10_ = recordings_dir; + dvb_device_set_RecordingsDirectory (_tmp9_, _tmp10_); + _tmp11_ = device; + _tmp12_ = channels_conf; + _tmp13_ = dvb_channel_list_new (_tmp12_); + _tmp14_ = _tmp13_; + dvb_device_set_Channels (_tmp11_, _tmp14_); + _g_object_unref0 (_tmp14_); result = device; return result; } @@ -211,42 +311,80 @@ gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - if (dev1 == NULL) { + DVBDevice* _tmp1_; + gboolean _tmp3_; + gboolean _tmp4_ = FALSE; + DVBDevice* _tmp5_; + guint _tmp6_; + DVBDevice* _tmp7_; + guint _tmp8_; + gboolean _tmp13_; + _tmp1_ = dev1; + if (_tmp1_ == NULL) { _tmp0_ = TRUE; } else { - _tmp0_ = dev2 == NULL; + DVBDevice* _tmp2_; + _tmp2_ = dev2; + _tmp0_ = _tmp2_ == NULL; } - if (_tmp0_) { + _tmp3_ = _tmp0_; + if (_tmp3_) { result = FALSE; return result; } - if (dev1->priv->_Adapter == dev2->priv->_Adapter) { - _tmp1_ = dev2->priv->_Frontend == dev2->priv->_Frontend; + _tmp5_ = dev1; + _tmp6_ = _tmp5_->priv->_Adapter; + _tmp7_ = dev2; + _tmp8_ = _tmp7_->priv->_Adapter; + if (_tmp6_ == _tmp8_) { + DVBDevice* _tmp9_; + guint _tmp10_; + DVBDevice* _tmp11_; + guint _tmp12_; + _tmp9_ = dev2; + _tmp10_ = _tmp9_->priv->_Frontend; + _tmp11_ = dev2; + _tmp12_ = _tmp11_->priv->_Frontend; + _tmp4_ = _tmp10_ == _tmp12_; } else { - _tmp1_ = FALSE; + _tmp4_ = FALSE; } - result = _tmp1_; + _tmp13_ = _tmp4_; + result = _tmp13_; return result; } guint dvb_device_hash (DVBDevice* device) { guint result = 0U; - guint _tmp0_; - if (device == NULL) { + DVBDevice* _tmp0_; + DVBDevice* _tmp1_; + guint _tmp2_; + DVBDevice* _tmp3_; + guint _tmp4_; + guint _tmp5_ = 0U; + _tmp0_ = device; + if (_tmp0_ == NULL) { result = (guint) 0; return result; } - _tmp0_ = dvb_device_hash_without_device (device->priv->_Adapter, device->priv->_Frontend); - result = _tmp0_; + _tmp1_ = device; + _tmp2_ = _tmp1_->priv->_Adapter; + _tmp3_ = device; + _tmp4_ = _tmp3_->priv->_Frontend; + _tmp5_ = dvb_device_hash_without_device (_tmp2_, _tmp4_); + result = _tmp5_; return result; } guint dvb_device_hash_without_device (guint adapter, guint frontend) { guint result = 0U; - result = ((2 * DVB_DEVICE_PRIME) + (DVB_DEVICE_PRIME * adapter)) + frontend; + guint _tmp0_; + guint _tmp1_; + _tmp0_ = adapter; + _tmp1_ = frontend; + result = ((2 * DVB_DEVICE_PRIME) + (DVB_DEVICE_PRIME * _tmp0_)) + _tmp1_; return result; } @@ -260,67 +398,114 @@ gboolean result = FALSE; GstElement* _tmp0_ = NULL; GstElement* dvbsrc; - GstPipeline* _tmp1_ = NULL; + GstElement* _tmp1_; + GstElement* _tmp3_; + guint _tmp4_; + GstElement* _tmp5_; + guint _tmp6_; + GstPipeline* _tmp7_; GstElement* pipeline; - GstElement* _tmp2_; - GstBus* _tmp3_ = NULL; + GstElement* _tmp8_; + GstElement* _tmp9_; + GstElement* _tmp10_; + GstElement* _tmp11_; + GstElement* _tmp12_; + GstBus* _tmp13_ = NULL; GstBus* bus; gboolean busy_val; + GstElement* _tmp32_; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = gst_element_factory_make ("dvbsrc", "text_dvbsrc"); dvbsrc = _tmp0_; - if (dvbsrc == NULL) { - g_critical ("Device.vala:106: Could not create dvbsrc element"); + _tmp1_ = dvbsrc; + if (_tmp1_ == NULL) { + DVBLoggingLogger* _tmp2_; + _tmp2_ = dvb_device_log; + dvb_logging_logger_error (_tmp2_, "Device.vala:121: Could not create dvbsrc element"); result = TRUE; _gst_object_unref0 (dvbsrc); return result; } - g_object_set ((GObject*) dvbsrc, "adapter", self->priv->_Adapter, NULL); - g_object_set ((GObject*) dvbsrc, "frontend", self->priv->_Frontend, NULL); - _tmp1_ = (GstPipeline*) gst_pipeline_new (""); - pipeline = (GstElement*) _tmp1_; - _tmp2_ = _gst_object_ref0 (dvbsrc); - gst_bin_add (GST_BIN (pipeline), _tmp2_); - gst_element_set_state (pipeline, GST_STATE_READY); - _tmp3_ = gst_element_get_bus (pipeline); - bus = _tmp3_; + _tmp3_ = dvbsrc; + _tmp4_ = self->priv->_Adapter; + g_object_set ((GObject*) _tmp3_, "adapter", _tmp4_, NULL); + _tmp5_ = dvbsrc; + _tmp6_ = self->priv->_Frontend; + g_object_set ((GObject*) _tmp5_, "frontend", _tmp6_, NULL); + _tmp7_ = (GstPipeline*) gst_pipeline_new (""); + gst_object_ref_sink (_tmp7_); + pipeline = (GstElement*) _tmp7_; + _tmp8_ = pipeline; + _tmp9_ = dvbsrc; + _tmp10_ = _gst_object_ref0 (_tmp9_); + gst_bin_add (GST_BIN (_tmp8_), _tmp10_); + _tmp11_ = pipeline; + gst_element_set_state (_tmp11_, GST_STATE_READY); + _tmp12_ = pipeline; + _tmp13_ = gst_element_get_bus (_tmp12_); + bus = _tmp13_; busy_val = FALSE; while (TRUE) { - gboolean _tmp4_; - GstMessage* _tmp5_ = NULL; + GstBus* _tmp14_; + gboolean _tmp15_ = FALSE; + GstBus* _tmp16_; + GstMessage* _tmp17_ = NULL; GstMessage* msg; - gboolean _tmp6_ = FALSE; - _tmp4_ = gst_bus_have_pending (bus); - if (!_tmp4_) { + gboolean _tmp18_ = FALSE; + GstMessage* _tmp19_; + GstMessageType _tmp20_; + gboolean _tmp24_; + _tmp14_ = bus; + _tmp15_ = gst_bus_have_pending (_tmp14_); + if (!_tmp15_) { break; } - _tmp5_ = gst_bus_pop (bus); - msg = _tmp5_; - if (msg->type == GST_MESSAGE_ERROR) { - _tmp6_ = msg->src == GST_OBJECT (dvbsrc); + _tmp16_ = bus; + _tmp17_ = gst_bus_pop (_tmp16_); + msg = _tmp17_; + _tmp19_ = msg; + _tmp20_ = _tmp19_->type; + if (_tmp20_ == GST_MESSAGE_ERROR) { + GstMessage* _tmp21_; + GstObject* _tmp22_; + GstElement* _tmp23_; + _tmp21_ = msg; + _tmp22_ = _tmp21_->src; + _tmp23_ = dvbsrc; + _tmp18_ = _tmp22_ == GST_OBJECT (_tmp23_); } else { - _tmp6_ = FALSE; + _tmp18_ = FALSE; } - if (_tmp6_) { - GError* gerror; - gchar* debug_text; - GError* _tmp7_ = NULL; - gchar* _tmp8_ = NULL; - gerror = NULL; - debug_text = NULL; - gst_message_parse_error (msg, &_tmp7_, &_tmp8_); + _tmp24_ = _tmp18_; + if (_tmp24_) { + GError* gerror = NULL; + gchar* debug_text = NULL; + GstMessage* _tmp25_; + GError* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + DVBLoggingLogger* _tmp28_; + GError* _tmp29_; + const gchar* _tmp30_; + const gchar* _tmp31_; + _tmp25_ = msg; + gst_message_parse_error (_tmp25_, &_tmp26_, &_tmp27_); _g_error_free0 (gerror); - gerror = _tmp7_; + gerror = _tmp26_; _g_free0 (debug_text); - debug_text = _tmp8_; - g_debug ("Device.vala:128: Error tuning: %s; %s", gerror->message, debug_text); + debug_text = _tmp27_; + _tmp28_ = dvb_device_log; + _tmp29_ = gerror; + _tmp30_ = _tmp29_->message; + _tmp31_ = debug_text; + dvb_logging_logger_debug (_tmp28_, "Device.vala:143: Error tuning: %s; %s", _tmp30_, _tmp31_); busy_val = TRUE; _g_free0 (debug_text); _g_error_free0 (gerror); } _gst_message_unref0 (msg); } - gst_element_set_state (pipeline, GST_STATE_NULL); + _tmp32_ = pipeline; + gst_element_set_state (_tmp32_, GST_STATE_NULL); result = busy_val; _gst_object_unref0 (bus); _gst_object_unref0 (pipeline); @@ -333,170 +518,262 @@ gboolean result = FALSE; GstElement* _tmp0_ = NULL; GstElement* dvbsrc; - GstPipeline* _tmp1_ = NULL; + GstElement* _tmp1_; + GstElement* _tmp3_; + guint _tmp4_; + GstElement* _tmp5_; + guint _tmp6_; + GstPipeline* _tmp7_; GstElement* pipeline; - GstElement* _tmp2_; - GstBus* _tmp3_ = NULL; + GstElement* _tmp8_; + GstElement* _tmp9_; + GstElement* _tmp10_; + GstElement* _tmp11_; + GstElement* _tmp12_; + GstBus* _tmp13_ = NULL; GstBus* bus; gboolean success; gchar* adapter_type; + GstElement* _tmp43_; + const gchar* _tmp44_; + DVBAdapterType _tmp45_ = 0; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = gst_element_factory_make ("dvbsrc", "test_dvbsrc"); dvbsrc = _tmp0_; - if (dvbsrc == NULL) { - g_critical ("Device.vala:142: Could not create dvbsrc element"); + _tmp1_ = dvbsrc; + if (_tmp1_ == NULL) { + DVBLoggingLogger* _tmp2_; + _tmp2_ = dvb_device_log; + dvb_logging_logger_error (_tmp2_, "Device.vala:157: Could not create dvbsrc element"); result = FALSE; _gst_object_unref0 (dvbsrc); return result; } - g_object_set ((GObject*) dvbsrc, "adapter", adapter, NULL); - g_object_set ((GObject*) dvbsrc, "frontend", frontend, NULL); - _tmp1_ = (GstPipeline*) gst_pipeline_new ("type_name"); - pipeline = (GstElement*) _tmp1_; - _tmp2_ = _gst_object_ref0 (dvbsrc); - gst_bin_add (GST_BIN (pipeline), _tmp2_); - gst_element_set_state (pipeline, GST_STATE_READY); - _tmp3_ = gst_element_get_bus (pipeline); - bus = _tmp3_; + _tmp3_ = dvbsrc; + _tmp4_ = adapter; + g_object_set ((GObject*) _tmp3_, "adapter", _tmp4_, NULL); + _tmp5_ = dvbsrc; + _tmp6_ = frontend; + g_object_set ((GObject*) _tmp5_, "frontend", _tmp6_, NULL); + _tmp7_ = (GstPipeline*) gst_pipeline_new ("type_name"); + gst_object_ref_sink (_tmp7_); + pipeline = (GstElement*) _tmp7_; + _tmp8_ = pipeline; + _tmp9_ = dvbsrc; + _tmp10_ = _gst_object_ref0 (_tmp9_); + gst_bin_add (GST_BIN (_tmp8_), _tmp10_); + _tmp11_ = pipeline; + gst_element_set_state (_tmp11_, GST_STATE_READY); + _tmp12_ = pipeline; + _tmp13_ = gst_element_get_bus (_tmp12_); + bus = _tmp13_; success = FALSE; adapter_type = NULL; while (TRUE) { - gboolean _tmp4_; - GstMessage* _tmp5_ = NULL; + GstBus* _tmp14_; + gboolean _tmp15_ = FALSE; + GstBus* _tmp16_; + GstMessage* _tmp17_ = NULL; GstMessage* msg; - gboolean _tmp6_ = FALSE; - _tmp4_ = gst_bus_have_pending (bus); - if (!_tmp4_) { + gboolean _tmp18_ = FALSE; + GstMessage* _tmp19_; + GstMessageType _tmp20_; + gboolean _tmp24_; + _tmp14_ = bus; + _tmp15_ = gst_bus_have_pending (_tmp14_); + if (!_tmp15_) { break; } - _tmp5_ = gst_bus_pop (bus); - msg = _tmp5_; - if (msg->type == GST_MESSAGE_ELEMENT) { - _tmp6_ = msg->src == GST_OBJECT (dvbsrc); + _tmp16_ = bus; + _tmp17_ = gst_bus_pop (_tmp16_); + msg = _tmp17_; + _tmp19_ = msg; + _tmp20_ = _tmp19_->type; + if (_tmp20_ == GST_MESSAGE_ELEMENT) { + GstMessage* _tmp21_; + GstObject* _tmp22_; + GstElement* _tmp23_; + _tmp21_ = msg; + _tmp22_ = _tmp21_->src; + _tmp23_ = dvbsrc; + _tmp18_ = _tmp22_ == GST_OBJECT (_tmp23_); } else { - _tmp6_ = FALSE; + _tmp18_ = FALSE; } - if (_tmp6_) { - const GstStructure* _tmp7_ = NULL; + _tmp24_ = _tmp18_; + if (_tmp24_) { + GstMessage* _tmp25_; + const GstStructure* _tmp26_ = NULL; const GstStructure* structure; - const gchar* _tmp8_ = NULL; - _tmp7_ = gst_message_get_structure (msg); - structure = _tmp7_; - _tmp8_ = gst_structure_get_name (structure); - if (g_strcmp0 (_tmp8_, "dvb-adapter") == 0) { - const gchar* _tmp9_ = NULL; - gchar* _tmp10_ = NULL; - gchar* _tmp11_; - const gchar* _tmp12_ = NULL; - gchar* _tmp13_ = NULL; - gchar* _tmp14_; - _tmp9_ = gst_structure_get_string (structure, "type"); - _tmp10_ = g_strdup_printf ("%s", _tmp9_); - _tmp11_ = _tmp10_; + const GstStructure* _tmp27_; + const gchar* _tmp28_ = NULL; + _tmp25_ = msg; + _tmp26_ = gst_message_get_structure (_tmp25_); + structure = _tmp26_; + _tmp27_ = structure; + _tmp28_ = gst_structure_get_name (_tmp27_); + if (g_strcmp0 (_tmp28_, "dvb-adapter") == 0) { + const GstStructure* _tmp29_; + const gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + const GstStructure* _tmp32_; + const gchar* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; + _tmp29_ = structure; + _tmp30_ = gst_structure_get_string (_tmp29_, "type"); + _tmp31_ = g_strdup_printf ("%s", _tmp30_); _g_free0 (adapter_type); - adapter_type = _tmp11_; - _tmp12_ = gst_structure_get_string (structure, "name"); - _tmp13_ = g_strdup_printf ("%s", _tmp12_); - _tmp14_ = _tmp13_; + adapter_type = _tmp31_; + _tmp32_ = structure; + _tmp33_ = gst_structure_get_string (_tmp32_, "name"); + _tmp34_ = g_strdup_printf ("%s", _tmp33_); _g_free0 (self->priv->adapter_name); - self->priv->adapter_name = _tmp14_; + self->priv->adapter_name = _tmp34_; success = TRUE; _gst_message_unref0 (msg); break; } } else { - if (msg->type == GST_MESSAGE_ERROR) { - GError* gerror; - gchar* debug; - GError* _tmp15_ = NULL; - gchar* _tmp16_ = NULL; - gerror = NULL; - debug = NULL; - gst_message_parse_error (msg, &_tmp15_, &_tmp16_); + GstMessage* _tmp35_; + GstMessageType _tmp36_; + _tmp35_ = msg; + _tmp36_ = _tmp35_->type; + if (_tmp36_ == GST_MESSAGE_ERROR) { + GError* gerror = NULL; + gchar* debug = NULL; + GstMessage* _tmp37_; + GError* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; + GError* _tmp40_; + const gchar* _tmp41_; + const gchar* _tmp42_; + _tmp37_ = msg; + gst_message_parse_error (_tmp37_, &_tmp38_, &_tmp39_); _g_error_free0 (gerror); - gerror = _tmp15_; + gerror = _tmp38_; _g_free0 (debug); - debug = _tmp16_; - g_warning ("Device.vala:173: %s %s", gerror->message, debug); + debug = _tmp39_; + _tmp40_ = gerror; + _tmp41_ = _tmp40_->message; + _tmp42_ = debug; + g_warning ("Device.vala:188: %s %s", _tmp41_, _tmp42_); _g_free0 (debug); _g_error_free0 (gerror); } } _gst_message_unref0 (msg); } - gst_element_set_state (pipeline, GST_STATE_NULL); - if (g_strcmp0 (adapter_type, "DVB-T") == 0) { - self->priv->adapter_type = DVB_ADAPTER_TYPE_DVB_T; + _tmp43_ = pipeline; + gst_element_set_state (_tmp43_, GST_STATE_NULL); + _tmp44_ = adapter_type; + _tmp45_ = dvb_device_get_type_from_string (_tmp44_); + self->priv->adapter_type = _tmp45_; + result = success; + _g_free0 (adapter_type); + _gst_object_unref0 (bus); + _gst_object_unref0 (pipeline); + _gst_object_unref0 (dvbsrc); + return result; +} + + +DVBAdapterType dvb_device_get_type_from_string (const gchar* adapter_type) { + DVBAdapterType result = 0; + const gchar* _tmp0_; + DVBAdapterType type = 0; + const gchar* _tmp1_; + _tmp0_ = adapter_type; + if (_tmp0_ == NULL) { + result = DVB_ADAPTER_TYPE_UNKNOWN; + return result; + } + _tmp1_ = adapter_type; + if (g_strcmp0 (_tmp1_, "DVB-T") == 0) { + type = DVB_ADAPTER_TYPE_DVB_T; } else { - if (g_strcmp0 (adapter_type, "DVB-S") == 0) { - self->priv->adapter_type = DVB_ADAPTER_TYPE_DVB_S; + const gchar* _tmp2_; + _tmp2_ = adapter_type; + if (g_strcmp0 (_tmp2_, "DVB-S") == 0) { + type = DVB_ADAPTER_TYPE_DVB_S; } else { - if (g_strcmp0 (adapter_type, "DVB-C") == 0) { - self->priv->adapter_type = DVB_ADAPTER_TYPE_DVB_C; + const gchar* _tmp3_; + _tmp3_ = adapter_type; + if (g_strcmp0 (_tmp3_, "DVB-C") == 0) { + type = DVB_ADAPTER_TYPE_DVB_C; } else { - self->priv->adapter_type = DVB_ADAPTER_TYPE_UNKNOWN; + type = DVB_ADAPTER_TYPE_UNKNOWN; } } } - result = success; - _g_free0 (adapter_type); - _gst_object_unref0 (bus); - _gst_object_unref0 (pipeline); - _gst_object_unref0 (dvbsrc); + result = type; return result; } guint dvb_device_get_Adapter (DVBDevice* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Adapter; + _tmp0_ = self->priv->_Adapter; + result = _tmp0_; return result; } static void dvb_device_set_Adapter (DVBDevice* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Adapter = value; + _tmp0_ = value; + self->priv->_Adapter = _tmp0_; g_object_notify ((GObject *) self, "Adapter"); } guint dvb_device_get_Frontend (DVBDevice* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Frontend; + _tmp0_ = self->priv->_Frontend; + result = _tmp0_; return result; } static void dvb_device_set_Frontend (DVBDevice* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Frontend = value; + _tmp0_ = value; + self->priv->_Frontend = _tmp0_; g_object_notify ((GObject *) self, "Frontend"); } DVBAdapterType dvb_device_get_Type (DVBDevice* self) { DVBAdapterType result; + DVBAdapterType _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->adapter_type; + _tmp0_ = self->priv->adapter_type; + result = _tmp0_; return result; } const gchar* dvb_device_get_Name (DVBDevice* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->adapter_name; + _tmp0_ = self->priv->adapter_name; + result = _tmp0_; return result; } DVBChannelList* dvb_device_get_Channels (DVBDevice* self) { DVBChannelList* result; + DVBChannelList* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Channels; + _tmp0_ = self->priv->_Channels; + result = _tmp0_; return result; } @@ -510,8 +787,8 @@ DVBChannelList* _tmp0_; DVBChannelList* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_Channels); self->priv->_Channels = _tmp1_; g_object_notify ((GObject *) self, "Channels"); @@ -520,8 +797,10 @@ GFile* dvb_device_get_RecordingsDirectory (DVBDevice* self) { GFile* result; + GFile* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_RecordingsDirectory; + _tmp0_ = self->priv->_RecordingsDirectory; + result = _tmp0_; return result; } @@ -530,8 +809,8 @@ GFile* _tmp0_; GFile* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_RecordingsDirectory); self->priv->_RecordingsDirectory = _tmp1_; g_object_notify ((GObject *) self, "RecordingsDirectory"); @@ -539,6 +818,8 @@ static void dvb_device_class_init (DVBDeviceClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_device_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBDevicePrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_device_get_property; @@ -550,6 +831,9 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_DEVICE_NAME, g_param_spec_string ("Name", "Name", "Name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_DEVICE_CHANNELS, g_param_spec_object ("Channels", "Channels", "Channels", DVB_TYPE_CHANNEL_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_DEVICE_RECORDINGS_DIRECTORY, g_param_spec_object ("RecordingsDirectory", "RecordingsDirectory", "RecordingsDirectory", G_TYPE_FILE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_device_log = _tmp1_; } diff -Nru gnome-dvb-daemon-0.1.23/src/DeviceGroup.c gnome-dvb-daemon-0.2.7/src/DeviceGroup.c --- gnome-dvb-daemon-0.1.23/src/DeviceGroup.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/DeviceGroup.c 2011-09-29 19:59:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* DeviceGroup.c generated by valac 0.11.3, the Vala compiler +/* DeviceGroup.c generated by valac 0.14.0, the Vala compiler * generated from DeviceGroup.vala, do not modify */ /* @@ -22,13 +22,10 @@ #include #include -#include +#include #include #include -#include #include -#include -#include #define DVB_TYPE_ID_BUS_DEVICE_GROUP (dvb_id_bus_device_group_get_type ()) @@ -39,6 +36,8 @@ typedef struct _DVBIDBusDeviceGroup DVBIDBusDeviceGroup; typedef struct _DVBIDBusDeviceGroupIface DVBIDBusDeviceGroupIface; +#define DVB_TYPE_ID_BUS_DEVICE_GROUP_PROXY (dvb_id_bus_device_group_proxy_get_type ()) + #define DVB_TYPE_DEVICE_GROUP (dvb_device_group_get_type ()) #define DVB_DEVICE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_DEVICE_GROUP, DVBDeviceGroup)) #define DVB_DEVICE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_DEVICE_GROUP, DVBDeviceGroupClass)) @@ -89,7 +88,26 @@ typedef struct _DVBChannelFactory DVBChannelFactory; typedef struct _DVBChannelFactoryClass DVBChannelFactoryClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_free0(var) (var = (g_free (var), NULL)) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) @@ -115,6 +133,16 @@ typedef struct _DVBManager DVBManager; typedef struct _DVBManagerClass DVBManagerClass; +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + #define DVB_DATABASE_TYPE_CONFIG_STORE (dvb_database_config_store_get_type ()) #define DVB_DATABASE_CONFIG_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_CONFIG_STORE, DVBdatabaseConfigStore)) #define DVB_DATABASE_IS_CONFIG_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_TYPE_CONFIG_STORE)) @@ -143,7 +171,34 @@ typedef struct _DVBChannel DVBChannel; typedef struct _DVBChannelClass DVBChannelClass; #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) + +#define DVB_TYPE_ID_BUS_RECORDER (dvb_id_bus_recorder_get_type ()) +#define DVB_ID_BUS_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_RECORDER, DVBIDBusRecorder)) +#define DVB_IS_ID_BUS_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_RECORDER)) +#define DVB_ID_BUS_RECORDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_RECORDER, DVBIDBusRecorderIface)) + +typedef struct _DVBIDBusRecorder DVBIDBusRecorder; +typedef struct _DVBIDBusRecorderIface DVBIDBusRecorderIface; + +#define DVB_TYPE_ID_BUS_RECORDER_PROXY (dvb_id_bus_recorder_proxy_get_type ()) + +#define DVB_TYPE_TIMER_INFO (dvb_timer_info_get_type ()) +typedef struct _DVBTimerInfo DVBTimerInfo; + +#define DVB_TYPE_OVERLAP_TYPE (dvb_overlap_type_get_type ()) + +#define DVB_TYPE_ID_BUS_CHANNEL_LIST (dvb_id_bus_channel_list_get_type ()) +#define DVB_ID_BUS_CHANNEL_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_CHANNEL_LIST, DVBIDBusChannelList)) +#define DVB_IS_ID_BUS_CHANNEL_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_CHANNEL_LIST)) +#define DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_CHANNEL_LIST, DVBIDBusChannelListIface)) + +typedef struct _DVBIDBusChannelList DVBIDBusChannelList; +typedef struct _DVBIDBusChannelListIface DVBIDBusChannelListIface; + +#define DVB_TYPE_ID_BUS_CHANNEL_LIST_PROXY (dvb_id_bus_channel_list_proxy_get_type ()) + +#define DVB_TYPE_CHANNEL_INFO (dvb_channel_info_get_type ()) +typedef struct _DVBChannelInfo DVBChannelInfo; #define DVB_TYPE_SCHEDULE (dvb_schedule_get_type ()) #define DVB_SCHEDULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCHEDULE, DVBSchedule)) @@ -155,6 +210,19 @@ typedef struct _DVBSchedule DVBSchedule; typedef struct _DVBScheduleClass DVBScheduleClass; +#define DVB_TYPE_ID_BUS_SCHEDULE (dvb_id_bus_schedule_get_type ()) +#define DVB_ID_BUS_SCHEDULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_SCHEDULE, DVBIDBusSchedule)) +#define DVB_IS_ID_BUS_SCHEDULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_SCHEDULE)) +#define DVB_ID_BUS_SCHEDULE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_SCHEDULE, DVBIDBusScheduleIface)) + +typedef struct _DVBIDBusSchedule DVBIDBusSchedule; +typedef struct _DVBIDBusScheduleIface DVBIDBusScheduleIface; + +#define DVB_TYPE_ID_BUS_SCHEDULE_PROXY (dvb_id_bus_schedule_proxy_get_type ()) + +#define DVB_TYPE_EVENT_INFO (dvb_event_info_get_type ()) +typedef struct _DVBEventInfo DVBEventInfo; + struct _DVBIDBusDeviceGroupIface { GTypeInterface parent_iface; gchar* (*GetType) (DVBIDBusDeviceGroup* self, GError** error); @@ -191,10 +259,6 @@ GeeHashSet* schedules; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - typedef enum { DVB_ADAPTER_TYPE_UNKNOWN, DVB_ADAPTER_TYPE_DVB_T, @@ -248,12 +312,98 @@ gboolean (*remove_channel_from_group) (DVBdatabaseConfigStore* self, DVBChannel* channel, gint group_id, GError** error); }; +struct _DVBTimerInfo { + guint32 id; + guint duration; + gboolean active; + gchar* channel_name; + gchar* title; +}; + +typedef enum { + DVB_OVERLAP_TYPE_UNKNOWN, + DVB_OVERLAP_TYPE_NONE, + DVB_OVERLAP_TYPE_PARTIAL, + DVB_OVERLAP_TYPE_COMPLETE +} DVBOverlapType; + +struct _DVBIDBusRecorderIface { + GTypeInterface parent_iface; + gboolean (*AddTimer) (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); + gboolean (*AddTimerWithMargin) (DVBIDBusRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); + gboolean (*AddTimerForEPGEvent) (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error); + gboolean (*DeleteTimer) (DVBIDBusRecorder* self, guint32 timer_id, GError** error); + guint32* (*GetTimers) (DVBIDBusRecorder* self, int* result_length1, GError** error); + gboolean (*GetStartTime) (DVBIDBusRecorder* self, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error); + gboolean (*SetStartTime) (DVBIDBusRecorder* self, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error); + gboolean (*GetEndTime) (DVBIDBusRecorder* self, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error); + gboolean (*GetDuration) (DVBIDBusRecorder* self, guint32 timer_id, guint* duration, GError** error); + gboolean (*SetDuration) (DVBIDBusRecorder* self, guint32 timer_id, guint duration, GError** error); + gboolean (*GetChannelName) (DVBIDBusRecorder* self, guint32 timer_id, gchar** name, GError** error); + gboolean (*GetTitle) (DVBIDBusRecorder* self, guint32 timer_id, gchar** title, GError** error); + gboolean (*GetAllInformations) (DVBIDBusRecorder* self, guint32 timer_id, DVBTimerInfo* info, GError** error); + guint32* (*GetActiveTimers) (DVBIDBusRecorder* self, int* result_length1, GError** error); + gboolean (*IsTimerActive) (DVBIDBusRecorder* self, guint32 timer_id, GError** error); + gboolean (*HasTimer) (DVBIDBusRecorder* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error); + DVBOverlapType (*HasTimerForEvent) (DVBIDBusRecorder* self, guint event_id, guint channel_sid, GError** error); +}; + +struct _DVBChannelInfo { + guint id; + gchar* name; + gboolean is_radio; +}; + +struct _DVBIDBusChannelListIface { + GTypeInterface parent_iface; + guint* (*GetChannels) (DVBIDBusChannelList* self, int* result_length1, GError** error); + guint* (*GetRadioChannels) (DVBIDBusChannelList* self, int* result_length1, GError** error); + guint* (*GetTVChannels) (DVBIDBusChannelList* self, int* result_length1, GError** error); + gboolean (*GetChannelName) (DVBIDBusChannelList* self, guint channel_id, gchar** channel_name, GError** error); + gboolean (*GetChannelNetwork) (DVBIDBusChannelList* self, guint channel_id, gchar** network, GError** error); + gboolean (*IsRadioChannel) (DVBIDBusChannelList* self, guint channel_id, gboolean* radio, GError** error); + gboolean (*GetChannelURL) (DVBIDBusChannelList* self, guint channel_id, gchar** url, GError** error); + DVBChannelInfo* (*GetChannelInfos) (DVBIDBusChannelList* self, int* result_length1, GError** error); + gboolean (*GetChannelsOfGroup) (DVBIDBusChannelList* self, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error); + gboolean (*AddChannelToGroup) (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); + gboolean (*RemoveChannelFromGroup) (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error); +}; + +struct _DVBEventInfo { + guint32 id; + guint32 next; + gchar* name; + guint duration; + gchar* short_description; +}; + +struct _DVBIDBusScheduleIface { + GTypeInterface parent_iface; + guint32* (*GetAllEvents) (DVBIDBusSchedule* self, int* result_length1, GError** error); + DVBEventInfo* (*GetAllEventInfos) (DVBIDBusSchedule* self, int* result_length1, GError** error); + gboolean (*GetInformations) (DVBIDBusSchedule* self, guint32 event_id, DVBEventInfo* event_info, GError** error); + guint32 (*NowPlaying) (DVBIDBusSchedule* self, GError** error); + guint32 (*Next) (DVBIDBusSchedule* self, guint32 event_id, GError** error); + gboolean (*GetName) (DVBIDBusSchedule* self, guint32 event_id, gchar** name, GError** error); + gboolean (*GetShortDescription) (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error); + gboolean (*GetExtendedDescription) (DVBIDBusSchedule* self, guint32 event_id, gchar** description, GError** error); + gboolean (*GetDuration) (DVBIDBusSchedule* self, guint32 event_id, guint* duration, GError** error); + gboolean (*GetLocalStartTime) (DVBIDBusSchedule* self, guint32 event_id, guint** start_time, int* start_time_length1, GError** error); + gboolean (*GetLocalStartTimestamp) (DVBIDBusSchedule* self, guint32 event_id, gint64* timestamp, GError** error); + gboolean (*IsRunning) (DVBIDBusSchedule* self, guint32 event_id, gboolean* running, GError** error); + gboolean (*IsScrambled) (DVBIDBusSchedule* self, guint32 event_id, gboolean* scrambled, GError** error); +}; + static gpointer dvb_device_group_parent_class = NULL; +static DVBLoggingLogger* dvb_device_group_log; +static DVBLoggingLogger* dvb_device_group_log = NULL; +extern GDBusConnection* main_conn; static DVBIDBusDeviceGroupIface* dvb_device_group_dvb_id_bus_device_group_parent_iface = NULL; static GeeIterableIface* dvb_device_group_gee_iterable_parent_iface = NULL; -DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_device_group_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_device_group_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_device_group_get_type (void) G_GNUC_CONST; GType dvb_device_group_get_type (void) G_GNUC_CONST; GType dvb_device_get_type (void) G_GNUC_CONST; @@ -275,12 +425,10 @@ DVB_DEVICE_GROUP_REFERENCE_DEVICE, DVB_DEVICE_GROUP_ELEMENT_TYPE }; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_device_group_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_device_group_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_device_group_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_device_group_introspect (DVBDeviceGroup* self, DBusConnection* connection, DBusMessage* message); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBDeviceGroup* dvb_device_group_new (guint id, DVBDevice* reference_device, gboolean with_epg_scanner); DVBDeviceGroup* dvb_device_group_construct (GType object_type, guint id, DVBDevice* reference_device, gboolean with_epg_scanner); DVBDevice* dvb_device_group_get_reference_device (DVBDeviceGroup* self); @@ -292,6 +440,7 @@ gboolean dvb_device_group_register_channel_list (DVBDeviceGroup* self); gboolean dvb_device_group_register_recorder (DVBDeviceGroup* self); void dvb_device_group_destroy (DVBDeviceGroup* self); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); guint dvb_device_group_get_Id (DVBDeviceGroup* self); void dvb_device_group_stop_epg_scanner (DVBDeviceGroup* self); void dvb_recorder_stop (DVBRecorder* self); @@ -323,16 +472,29 @@ GType dvb_manager_get_type (void) G_GNUC_CONST; DVBManager* dvb_manager_get_instance (void); gboolean dvb_manager_device_is_in_any_group (DVBManager* self, DVBDevice* device); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); GType dvb_channel_group_get_type (void) G_GNUC_CONST; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_database_config_store_get_type (void) G_GNUC_CONST; -DVBdatabaseConfigStore* dvb_factory_get_config_store (void); +DVBdatabaseConfigStore* dvb_factory_get_config_store (DVBFactory* self); gboolean dvb_database_config_store_add_device_to_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); static char* dvb_device_group_real_GetRecorder (DVBIDBusDeviceGroup* base, GError** error); #define DVB_CONSTANTS_DBUS_RECORDER_PATH "/org/gnome/DVB/DeviceGroup/%u/Recorder" DVBRecorder* dvb_device_group_get_recorder (DVBDeviceGroup* self); -DBusGConnection* dvb_utils_get_dbus_connection (void); +void dvb_utils_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* conn, const gchar* object_path, gconstpointer obj); +GType dvb_id_bus_recorder_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_recorder_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_timer_info_get_type (void) G_GNUC_CONST; +DVBTimerInfo* dvb_timer_info_dup (const DVBTimerInfo* self); +void dvb_timer_info_free (DVBTimerInfo* self); +void dvb_timer_info_copy (const DVBTimerInfo* self, DVBTimerInfo* dest); +void dvb_timer_info_destroy (DVBTimerInfo* self); +GType dvb_overlap_type_get_type (void) G_GNUC_CONST; +GType dvb_id_bus_recorder_get_type (void) G_GNUC_CONST; static gboolean dvb_device_group_real_RemoveDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error); DVBDevice* dvb_device_new (guint adapter, guint frontend); DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend); @@ -346,6 +508,14 @@ static char* dvb_device_group_real_GetChannelList (DVBIDBusDeviceGroup* base, GError** error); #define DVB_CONSTANTS_DBUS_CHANNEL_LIST_PATH "/org/gnome/DVB/DeviceGroup/%u/ChannelList" DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); +GType dvb_id_bus_channel_list_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_channel_list_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_channel_info_get_type (void) G_GNUC_CONST; +DVBChannelInfo* dvb_channel_info_dup (const DVBChannelInfo* self); +void dvb_channel_info_free (DVBChannelInfo* self); +void dvb_channel_info_copy (const DVBChannelInfo* self, DVBChannelInfo* dest); +void dvb_channel_info_destroy (DVBChannelInfo* self); +GType dvb_id_bus_channel_list_get_type (void) G_GNUC_CONST; static gchar** dvb_device_group_real_GetMembers (DVBIDBusDeviceGroup* base, int* result_length1, GError** error); #define DVB_CONSTANTS_DVB_DEVICE_PATH "/dev/dvb/adapter%u/frontend%u" static gboolean dvb_device_group_real_GetSchedule (DVBIDBusDeviceGroup* base, guint channel_sid, char** opath, GError** error); @@ -354,6 +524,14 @@ DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); GType dvb_schedule_get_type (void) G_GNUC_CONST; DVBSchedule* dvb_channel_get_Schedule (DVBChannel* self); +GType dvb_id_bus_schedule_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_schedule_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_event_info_get_type (void) G_GNUC_CONST; +DVBEventInfo* dvb_event_info_dup (const DVBEventInfo* self); +void dvb_event_info_free (DVBEventInfo* self); +void dvb_event_info_copy (const DVBEventInfo* self, DVBEventInfo* dest); +void dvb_event_info_destroy (DVBEventInfo* self); +GType dvb_id_bus_schedule_get_type (void) G_GNUC_CONST; static gchar* dvb_device_group_real_GetRecordingsDirectory (DVBIDBusDeviceGroup* base, GError** error); GFile* dvb_device_group_get_RecordingsDirectory (DVBDeviceGroup* self); static gboolean dvb_device_group_real_SetRecordingsDirectory (DVBIDBusDeviceGroup* base, const gchar* location, GError** error); @@ -377,85 +555,6 @@ static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static const DBusObjectPathVTable _dvb_device_group_dbus_path_vtable = {_dvb_device_group_dbus_unregister, dvb_device_group_dbus_message}; -static const _DBusObjectVTable _dvb_device_group_dbus_vtable = {dvb_device_group_dbus_register_object}; - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_device_group_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_device_group_introspect (DVBDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_device_group_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_device_group_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_device_group_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_device_group_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_device_group_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - dvb_id_bus_device_group_dbus_register_object (connection, path, object); -} - /** * @id: ID of group @@ -465,23 +564,31 @@ */ DVBDeviceGroup* dvb_device_group_construct (GType object_type, guint id, DVBDevice* reference_device, gboolean with_epg_scanner) { DVBDeviceGroup * self = NULL; - DVBChannelList* _tmp0_ = NULL; + guint _tmp0_; + DVBDevice* _tmp1_; + DVBDevice* _tmp2_; + DVBChannelList* _tmp3_; + DVBChannelList* _tmp4_; + guint _tmp5_; + gboolean _tmp6_; g_return_val_if_fail (reference_device != NULL, NULL); - self = (DVBDeviceGroup*) g_object_new (object_type, "Id", id, "reference-device", reference_device, NULL); - _tmp0_ = dvb_device_get_Channels (self->priv->_reference_device); - dvb_channel_list_set_GroupId (_tmp0_, id); - if (with_epg_scanner) { - DVBEPGScanner* _tmp1_ = NULL; - DVBEPGScanner* _tmp2_; - _tmp1_ = dvb_epg_scanner_new (self); - _tmp2_ = _tmp1_; + _tmp0_ = id; + _tmp1_ = reference_device; + self = (DVBDeviceGroup*) g_object_new (object_type, "Id", _tmp0_, "reference-device", _tmp1_, NULL); + _tmp2_ = self->priv->_reference_device; + _tmp3_ = dvb_device_get_Channels (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = id; + dvb_channel_list_set_GroupId (_tmp4_, _tmp5_); + _tmp6_ = with_epg_scanner; + if (_tmp6_) { + DVBEPGScanner* _tmp7_; + _tmp7_ = dvb_epg_scanner_new (self); _g_object_unref0 (self->priv->_epgscanner); - self->priv->_epgscanner = _tmp2_; + self->priv->_epgscanner = _tmp7_; } else { - DVBEPGScanner* _tmp3_; - _tmp3_ = NULL; _g_object_unref0 (self->priv->_epgscanner); - self->priv->_epgscanner = _tmp3_; + self->priv->_epgscanner = NULL; } dvb_device_group_register_channel_list (self); dvb_device_group_register_recorder (self); @@ -495,18 +602,38 @@ void dvb_device_group_destroy (DVBDeviceGroup* self) { + DVBLoggingLogger* _tmp0_; + guint _tmp1_; + DVBRecorder* _tmp2_; + DVBChannelFactory* _tmp3_; + GeeHashSet* _tmp4_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_debug ("DeviceGroup.vala:104: Destroying group %u", self->priv->_Id); + _tmp0_ = dvb_device_group_log; + _tmp1_ = self->priv->_Id; + dvb_logging_logger_debug (_tmp0_, "DeviceGroup.vala:107: Destroying group %u", _tmp1_); dvb_device_group_stop_epg_scanner (self); - dvb_recorder_stop (self->priv->_recorder); - dvb_channel_factory_destroy (self->priv->_channelfactory); - gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->schedules); + _tmp2_ = self->priv->_recorder; + dvb_recorder_stop (_tmp2_); + _tmp3_ = self->priv->_channelfactory; + dvb_channel_factory_destroy (_tmp3_); + _tmp4_ = self->priv->schedules; + gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp4_); { + GeeSet* _tmp5_; + _tmp5_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - gee_collection_clear ((GeeCollection*) self->priv->devices); + { + GeeSet* _tmp6_; + _tmp6_ = self->priv->devices; + gee_collection_clear ((GeeCollection*) _tmp6_); + } __finally49: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeSet* _tmp7_; + _tmp7_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -517,17 +644,25 @@ void dvb_device_group_start_epg_scanner (DVBDeviceGroup* self) { + DVBEPGScanner* _tmp0_; g_return_if_fail (self != NULL); - if (self->priv->_epgscanner != NULL) { - dvb_epg_scanner_start (self->priv->_epgscanner); + _tmp0_ = self->priv->_epgscanner; + if (_tmp0_ != NULL) { + DVBEPGScanner* _tmp1_; + _tmp1_ = self->priv->_epgscanner; + dvb_epg_scanner_start (_tmp1_); } } void dvb_device_group_stop_epg_scanner (DVBDeviceGroup* self) { + DVBEPGScanner* _tmp0_; g_return_if_fail (self != NULL); - if (self->priv->_epgscanner != NULL) { - dvb_epg_scanner_stop (self->priv->_epgscanner); + _tmp0_ = self->priv->_epgscanner; + if (_tmp0_ != NULL) { + DVBEPGScanner* _tmp1_; + _tmp1_ = self->priv->_epgscanner; + dvb_epg_scanner_stop (_tmp1_); } } @@ -541,11 +676,15 @@ * device. */ void dvb_device_group_create_and_add_device (DVBDeviceGroup* self, guint adapter, guint frontend) { - DVBDevice* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_ = NULL; DVBDevice* new_dev; g_return_if_fail (self != NULL); - _tmp0_ = dvb_device_new_with_type (adapter, frontend); - new_dev = _tmp0_; + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_device_new_with_type (_tmp0_, _tmp1_); + new_dev = _tmp2_; dvb_device_group_add (self, new_dev); _g_object_unref0 (new_dev); } @@ -557,33 +696,63 @@ */ gboolean dvb_device_group_add (DVBDeviceGroup* self, DVBDevice* device) { gboolean result = FALSE; - DVBAdapterType _tmp0_; + DVBDevice* _tmp0_; DVBAdapterType _tmp1_; + DVBAdapterType _tmp2_; + DVBAdapterType _tmp3_; + DVBAdapterType _tmp4_; gboolean _result_ = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); - _tmp0_ = dvb_device_get_Type (device); - _tmp1_ = dvb_device_group_get_Type (self); - if (_tmp0_ != _tmp1_) { - g_warning ("DeviceGroup.vala:143: Cannot add device, because it is not of same typ" \ + _tmp0_ = device; + _tmp1_ = dvb_device_get_Type (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_device_group_get_Type (self); + _tmp4_ = _tmp3_; + if (_tmp2_ != _tmp4_) { + g_warning ("DeviceGroup.vala:146: Cannot add device, because it is not of same typ" \ "e"); result = FALSE; return result; } { - DVBChannelList* _tmp2_ = NULL; - GFile* _tmp3_ = NULL; - gboolean _tmp4_; + GeeSet* _tmp5_; + _tmp5_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - _tmp2_ = dvb_device_get_Channels (self->priv->_reference_device); - dvb_device_set_Channels (device, _tmp2_); - _tmp3_ = dvb_device_get_RecordingsDirectory (self->priv->_reference_device); - dvb_device_set_RecordingsDirectory (device, _tmp3_); - _tmp4_ = gee_collection_add ((GeeCollection*) self->priv->devices, device); - _result_ = _tmp4_; + { + DVBDevice* _tmp6_; + DVBDevice* _tmp7_; + DVBChannelList* _tmp8_; + DVBChannelList* _tmp9_; + DVBDevice* _tmp10_; + DVBDevice* _tmp11_; + GFile* _tmp12_; + GFile* _tmp13_; + GeeSet* _tmp14_; + DVBDevice* _tmp15_; + gboolean _tmp16_ = FALSE; + _tmp6_ = device; + _tmp7_ = self->priv->_reference_device; + _tmp8_ = dvb_device_get_Channels (_tmp7_); + _tmp9_ = _tmp8_; + dvb_device_set_Channels (_tmp6_, _tmp9_); + _tmp10_ = device; + _tmp11_ = self->priv->_reference_device; + _tmp12_ = dvb_device_get_RecordingsDirectory (_tmp11_); + _tmp13_ = _tmp12_; + dvb_device_set_RecordingsDirectory (_tmp10_, _tmp13_); + _tmp14_ = self->priv->devices; + _tmp15_ = device; + _tmp16_ = gee_collection_add ((GeeCollection*) _tmp14_, _tmp15_); + _result_ = _tmp16_; + } __finally50: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeSet* _tmp17_; + _tmp17_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -597,16 +766,26 @@ gboolean dvb_device_group_add_and_emit (DVBDeviceGroup* self, DVBDevice* device) { gboolean result = FALSE; - gboolean _tmp0_; + DVBDevice* _tmp0_; + gboolean _tmp1_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); - _tmp0_ = dvb_device_group_add (self, device); - if (_tmp0_) { - guint _tmp1_; - guint _tmp2_; - _tmp1_ = dvb_device_get_Adapter (device); - _tmp2_ = dvb_device_get_Frontend (device); - g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-added", _tmp1_, _tmp2_); + _tmp0_ = device; + _tmp1_ = dvb_device_group_add (self, _tmp0_); + if (_tmp1_) { + DVBDevice* _tmp2_; + guint _tmp3_; + guint _tmp4_; + DVBDevice* _tmp5_; + guint _tmp6_; + guint _tmp7_; + _tmp2_ = device; + _tmp3_ = dvb_device_get_Adapter (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = device; + _tmp6_ = dvb_device_get_Frontend (_tmp5_); + _tmp7_ = _tmp6_; + g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-added", _tmp4_, _tmp7_); result = TRUE; return result; } @@ -622,12 +801,24 @@ g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); { - gboolean _tmp0_; + GeeSet* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - _tmp0_ = gee_collection_contains ((GeeCollection*) self->priv->devices, device); - _result_ = _tmp0_; + { + GeeSet* _tmp1_; + DVBDevice* _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->devices; + _tmp2_ = device; + _tmp3_ = gee_collection_contains ((GeeCollection*) _tmp1_, _tmp2_); + _result_ = _tmp3_; + } __finally51: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeSet* _tmp4_; + _tmp4_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -646,38 +837,64 @@ g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); { - gboolean _tmp0_; - gboolean _tmp1_; + GeeSet* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - _tmp0_ = gee_collection_remove ((GeeCollection*) self->priv->devices, device); - _result_ = _tmp0_; - _tmp1_ = dvb_device_equal (device, self->priv->_reference_device); - if (_tmp1_) { - { - GeeIterator* _tmp2_ = NULL; - GeeIterator* _dev_it; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - _dev_it = _tmp2_; - while (TRUE) { - gboolean _tmp3_; - gpointer _tmp4_ = NULL; - DVBDevice* dev; - _tmp3_ = gee_iterator_next (_dev_it); - if (!_tmp3_) { + { + GeeSet* _tmp1_; + DVBDevice* _tmp2_; + gboolean _tmp3_ = FALSE; + DVBDevice* _tmp4_; + DVBDevice* _tmp5_; + gboolean _tmp6_ = FALSE; + _tmp1_ = self->priv->devices; + _tmp2_ = device; + _tmp3_ = gee_collection_remove ((GeeCollection*) _tmp1_, _tmp2_); + _result_ = _tmp3_; + _tmp4_ = device; + _tmp5_ = self->priv->_reference_device; + _tmp6_ = dvb_device_equal (_tmp4_, _tmp5_); + if (_tmp6_) { + { + GeeSet* _tmp7_; + GeeIterator* _tmp8_ = NULL; + GeeIterator* _dev_it; + _tmp7_ = self->priv->devices; + _tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_); + _dev_it = _tmp8_; + while (TRUE) { + GeeIterator* _tmp9_; + gboolean _tmp10_ = FALSE; + GeeIterator* _tmp11_; + gpointer _tmp12_ = NULL; + DVBDevice* dev; + DVBLoggingLogger* _tmp13_; + DVBDevice* _tmp14_; + _tmp9_ = _dev_it; + _tmp10_ = gee_iterator_next (_tmp9_); + if (!_tmp10_) { + break; + } + _tmp11_ = _dev_it; + _tmp12_ = gee_iterator_get (_tmp11_); + dev = (DVBDevice*) _tmp12_; + _tmp13_ = dvb_device_group_log; + dvb_logging_logger_debug (_tmp13_, "DeviceGroup.vala:183: Assigning new reference device"); + _tmp14_ = dev; + dvb_device_group_set_reference_device (self, _tmp14_); + _g_object_unref0 (dev); break; } - _tmp4_ = gee_iterator_get (_dev_it); - dev = (DVBDevice*) _tmp4_; - g_debug ("DeviceGroup.vala:180: Assigning new reference device"); - dvb_device_group_set_reference_device (self, dev); - _g_object_unref0 (dev); - break; + _g_object_unref0 (_dev_it); } - _g_object_unref0 (_dev_it); } } __finally52: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeSet* _tmp15_; + _tmp15_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -691,16 +908,26 @@ gboolean dvb_device_group_remove_and_emit (DVBDeviceGroup* self, DVBDevice* device) { gboolean result = FALSE; - gboolean _tmp0_; + DVBDevice* _tmp0_; + gboolean _tmp1_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); - _tmp0_ = dvb_device_group_remove (self, device); - if (_tmp0_) { - guint _tmp1_; - guint _tmp2_; - _tmp1_ = dvb_device_get_Adapter (device); - _tmp2_ = dvb_device_get_Frontend (device); - g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-removed", _tmp1_, _tmp2_); + _tmp0_ = device; + _tmp1_ = dvb_device_group_remove (self, _tmp0_); + if (_tmp1_) { + DVBDevice* _tmp2_; + guint _tmp3_; + guint _tmp4_; + DVBDevice* _tmp5_; + guint _tmp6_; + guint _tmp7_; + _tmp2_ = device; + _tmp3_ = dvb_device_get_Adapter (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = device; + _tmp6_ = dvb_device_get_Frontend (_tmp5_); + _tmp7_ = _tmp6_; + g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-removed", _tmp4_, _tmp7_); result = TRUE; return result; } @@ -725,40 +952,56 @@ g_return_val_if_fail (self != NULL, NULL); _result_ = NULL; { + GeeSet* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeIterator* _tmp0_ = NULL; - GeeIterator* _dev_it; - _tmp0_ = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - _dev_it = _tmp0_; - while (TRUE) { - gboolean _tmp1_; - gpointer _tmp2_ = NULL; - DVBDevice* dev; - gboolean _tmp3_; - _tmp1_ = gee_iterator_next (_dev_it); - if (!_tmp1_) { - break; - } - _tmp2_ = gee_iterator_get (_dev_it); - dev = (DVBDevice*) _tmp2_; - _tmp3_ = dvb_device_is_busy (dev); - if (!_tmp3_) { - DVBDevice* _tmp4_; - DVBDevice* _tmp5_; - _tmp4_ = _g_object_ref0 (dev); - _tmp5_ = _tmp4_; - _g_object_unref0 (_result_); - _result_ = _tmp5_; + { + GeeSet* _tmp1_; + GeeIterator* _tmp2_ = NULL; + GeeIterator* _dev_it; + _tmp1_ = self->priv->devices; + _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); + _dev_it = _tmp2_; + while (TRUE) { + GeeIterator* _tmp3_; + gboolean _tmp4_ = FALSE; + GeeIterator* _tmp5_; + gpointer _tmp6_ = NULL; + DVBDevice* dev; + DVBDevice* _tmp7_; + gboolean _tmp8_ = FALSE; + _tmp3_ = _dev_it; + _tmp4_ = gee_iterator_next (_tmp3_); + if (!_tmp4_) { + break; + } + _tmp5_ = _dev_it; + _tmp6_ = gee_iterator_get (_tmp5_); + dev = (DVBDevice*) _tmp6_; + _tmp7_ = dev; + _tmp8_ = dvb_device_is_busy (_tmp7_); + if (!_tmp8_) { + DVBDevice* _tmp9_; + DVBDevice* _tmp10_; + _tmp9_ = dev; + _tmp10_ = _g_object_ref0 (_tmp9_); + _g_object_unref0 (_result_); + _result_ = _tmp10_; + _g_object_unref0 (dev); + break; + } _g_object_unref0 (dev); - break; } - _g_object_unref0 (dev); + _g_object_unref0 (_dev_it); } - _g_object_unref0 (_dev_it); } __finally53: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeSet* _tmp11_; + _tmp11_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { _g_object_unref0 (_result_); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -778,18 +1021,17 @@ static gchar* dvb_device_group_real_GetType (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; gchar* result = NULL; - gchar* type_str; + gchar* type_str = NULL; DVBAdapterType _tmp0_; + DVBAdapterType _tmp1_; self = (DVBDeviceGroup*) base; - type_str = NULL; _tmp0_ = dvb_device_group_get_Type (self); - switch (_tmp0_) { + _tmp1_ = _tmp0_; + switch (_tmp1_) { case DVB_ADAPTER_TYPE_DVB_T: { - gchar* _tmp1_; gchar* _tmp2_; - _tmp1_ = g_strdup ("DVB-T"); - _tmp2_ = _tmp1_; + _tmp2_ = g_strdup ("DVB-T"); _g_free0 (type_str); type_str = _tmp2_; break; @@ -797,31 +1039,25 @@ case DVB_ADAPTER_TYPE_DVB_S: { gchar* _tmp3_; - gchar* _tmp4_; _tmp3_ = g_strdup ("DVB-S"); - _tmp4_ = _tmp3_; _g_free0 (type_str); - type_str = _tmp4_; + type_str = _tmp3_; break; } case DVB_ADAPTER_TYPE_DVB_C: { - gchar* _tmp5_; - gchar* _tmp6_; - _tmp5_ = g_strdup ("DVB-C"); - _tmp6_ = _tmp5_; + gchar* _tmp4_; + _tmp4_ = g_strdup ("DVB-C"); _g_free0 (type_str); - type_str = _tmp6_; + type_str = _tmp4_; break; } default: { - gchar* _tmp7_; - gchar* _tmp8_; - _tmp7_ = g_strdup (""); - _tmp8_ = _tmp7_; + gchar* _tmp5_; + _tmp5_ = g_strdup (""); _g_free0 (type_str); - type_str = _tmp8_; + type_str = _tmp5_; break; } } @@ -842,62 +1078,107 @@ static gboolean dvb_device_group_real_AddDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error) { DVBDeviceGroup * self; gboolean result = FALSE; - DVBDevice* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_ = NULL; DVBDevice* device; - DVBManager* _tmp1_ = NULL; - DVBManager* _tmp2_; + DVBDevice* _tmp3_; + DVBManager* _tmp4_ = NULL; + DVBManager* _tmp5_; DVBManager* manager; - gboolean _tmp3_; + DVBManager* _tmp6_; + DVBDevice* _tmp7_; + gboolean _tmp8_ = FALSE; + guint _tmp12_; guint group_id; - gboolean _tmp4_; + DVBLoggingLogger* _tmp13_; + guint _tmp14_; + guint _tmp15_; + guint _tmp16_; + DVBDevice* _tmp17_; + gboolean _tmp18_ = FALSE; GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; - _tmp0_ = dvb_device_new_with_type (adapter, frontend); - device = _tmp0_; - if (device == NULL) { + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_device_new_with_type (_tmp0_, _tmp1_); + device = _tmp2_; + _tmp3_ = device; + if (_tmp3_ == NULL) { result = FALSE; _g_object_unref0 (device); return result; } - _tmp1_ = dvb_manager_get_instance (); - _tmp2_ = _g_object_ref0 (_tmp1_); - manager = _tmp2_; - _tmp3_ = dvb_manager_device_is_in_any_group (manager, device); - if (_tmp3_) { - g_debug ("Device with adapter %u, frontend %u is" "already part of a group", adapter, frontend); + _tmp4_ = dvb_manager_get_instance (); + _tmp5_ = _g_object_ref0 (_tmp4_); + manager = _tmp5_; + _tmp6_ = manager; + _tmp7_ = device; + _tmp8_ = dvb_manager_device_is_in_any_group (_tmp6_, _tmp7_); + if (_tmp8_) { + DVBLoggingLogger* _tmp9_; + guint _tmp10_; + guint _tmp11_; + _tmp9_ = dvb_device_group_log; + _tmp10_ = adapter; + _tmp11_ = frontend; + dvb_logging_logger_debug (_tmp9_, "Device with adapter %u, frontend %u is" "already part of a group", _tmp10_, _tmp11_); result = FALSE; _g_object_unref0 (manager); _g_object_unref0 (device); return result; } - group_id = self->priv->_Id; - g_debug ("DeviceGroup.vala:255: Adding device with adapter %u, frontend %u to gr" \ -"oup %u", adapter, frontend, group_id); - _tmp4_ = dvb_device_group_add (self, device); - if (_tmp4_) { - DVBdatabaseConfigStore* _tmp5_ = NULL; - DVBdatabaseConfigStore* _tmp6_; - _tmp5_ = dvb_factory_get_config_store (); - _tmp6_ = _tmp5_; - dvb_database_config_store_add_device_to_group (_tmp6_, device, self, &_inner_error_); - _g_object_unref0 (_tmp6_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch54_dvb_database_sql_error; + _tmp12_ = self->priv->_Id; + group_id = _tmp12_; + _tmp13_ = dvb_device_group_log; + _tmp14_ = adapter; + _tmp15_ = frontend; + _tmp16_ = group_id; + dvb_logging_logger_debug (_tmp13_, "DeviceGroup.vala:258: Adding device with adapter %u, frontend %u to gr" \ +"oup %u", _tmp14_, _tmp15_, _tmp16_); + _tmp17_ = device; + _tmp18_ = dvb_device_group_add (self, _tmp17_); + if (_tmp18_) { + guint _tmp27_; + guint _tmp28_; + { + DVBFactory* _tmp19_; + DVBFactory* _tmp20_; + DVBdatabaseConfigStore* _tmp21_ = NULL; + DVBdatabaseConfigStore* _tmp22_; + DVBDevice* _tmp23_; + _tmp19_ = dvb_factory_new (); + _tmp20_ = _tmp19_; + _tmp21_ = dvb_factory_get_config_store (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = device; + dvb_database_config_store_add_device_to_group (_tmp22_, _tmp23_, self, &_inner_error_); + _g_object_unref0 (_tmp22_); + _g_object_unref0 (_tmp20_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch54_dvb_database_sql_error; + } + _g_object_unref0 (manager); + _g_object_unref0 (device); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - _g_object_unref0 (manager); - _g_object_unref0 (device); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } goto __finally54; __catch54_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp24_; + GError* _tmp25_; + const gchar* _tmp26_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("DeviceGroup.vala:263: %s", e->message); + _tmp24_ = dvb_device_group_log; + _tmp25_ = e; + _tmp26_ = _tmp25_->message; + dvb_logging_logger_error (_tmp24_, "DeviceGroup.vala:266: %s", _tmp26_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (manager); @@ -906,7 +1187,7 @@ } __finally54: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (manager); _g_object_unref0 (device); @@ -919,7 +1200,9 @@ return FALSE; } } - g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-added", adapter, frontend); + _tmp27_ = adapter; + _tmp28_ = frontend; + g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-added", _tmp27_, _tmp28_); result = TRUE; _g_object_unref0 (manager); _g_object_unref0 (device); @@ -934,53 +1217,56 @@ /** * @returns: Object path of the device's recorder - * + * * Returns the object path to the device's recorder. */ static char* dvb_device_group_real_GetRecorder (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; char* result = NULL; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - char* _tmp2_ = NULL; + guint _tmp0_; + gchar* _tmp1_ = NULL; + gchar* _tmp2_; char* _tmp3_; + char* _tmp4_; self = (DVBDeviceGroup*) base; - _tmp0_ = g_strdup_printf (DVB_CONSTANTS_DBUS_RECORDER_PATH, self->priv->_Id); - _tmp1_ = _tmp0_; - _tmp2_ = g_strdup (_tmp1_); - result = (_tmp3_ = _tmp2_, _g_free0 (_tmp1_), _tmp3_); + _tmp0_ = self->priv->_Id; + _tmp1_ = g_strdup_printf (DVB_CONSTANTS_DBUS_RECORDER_PATH, _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = g_strdup (_tmp2_); + _tmp4_ = _tmp3_; + _g_free0 (_tmp2_); + result = _tmp4_; return result; } gboolean dvb_device_group_register_recorder (DVBDeviceGroup* self) { gboolean result = FALSE; - DVBRecorder* _tmp0_ = NULL; - DVBRecorder* _tmp1_; + DVBLoggingLogger* _tmp0_; + guint _tmp1_; + DVBRecorder* _tmp2_; + DVBRecorder* _tmp3_; + DVBRecorder* _tmp4_; DVBRecorder* recorder; - DBusGConnection* _tmp2_ = NULL; - DBusGConnection* conn; - gchar* _tmp3_ = NULL; + guint _tmp5_; + gchar* _tmp6_ = NULL; gchar* path; + GDBusConnection* _tmp7_; g_return_val_if_fail (self != NULL, FALSE); - g_debug ("DeviceGroup.vala:286: Creating new Recorder D-Bus service for group %u", self->priv->_Id); - _tmp0_ = dvb_device_group_get_recorder (self); - _tmp1_ = _g_object_ref0 (_tmp0_); - recorder = _tmp1_; - _tmp2_ = dvb_utils_get_dbus_connection (); - conn = _tmp2_; - if (conn == NULL) { - result = FALSE; - _dbus_g_connection_unref0 (conn); - _g_object_unref0 (recorder); - return result; - } - _tmp3_ = g_strdup_printf (DVB_CONSTANTS_DBUS_RECORDER_PATH, self->priv->_Id); - path = _tmp3_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) recorder); + _tmp0_ = dvb_device_group_log; + _tmp1_ = self->priv->_Id; + dvb_logging_logger_debug (_tmp0_, "DeviceGroup.vala:289: Creating new Recorder D-Bus service for group %u", _tmp1_); + _tmp2_ = dvb_device_group_get_recorder (self); + _tmp3_ = _tmp2_; + _tmp4_ = _g_object_ref0 (_tmp3_); + recorder = _tmp4_; + _tmp5_ = self->priv->_Id; + _tmp6_ = g_strdup_printf (DVB_CONSTANTS_DBUS_RECORDER_PATH, _tmp5_); + path = _tmp6_; + _tmp7_ = main_conn; + dvb_utils_dbus_register_object (DVB_TYPE_ID_BUS_RECORDER, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp7_, path, (DVBIDBusRecorder*) recorder); result = TRUE; _g_free0 (path); - _dbus_g_connection_unref0 (conn); _g_object_unref0 (recorder); return result; } @@ -997,42 +1283,68 @@ static gboolean dvb_device_group_real_RemoveDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error) { DVBDeviceGroup * self; gboolean result = FALSE; - DVBDevice* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_; DVBDevice* dev; - gboolean _tmp1_; + DVBDevice* _tmp3_; + gboolean _tmp4_ = FALSE; GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; - _tmp0_ = dvb_device_new (adapter, frontend); - dev = _tmp0_; - _tmp1_ = dvb_device_group_contains (self, dev); - if (_tmp1_) { - gboolean _tmp2_; - _tmp2_ = dvb_device_group_remove (self, dev); - if (_tmp2_) { - DVBdatabaseConfigStore* _tmp3_ = NULL; - DVBdatabaseConfigStore* _tmp4_; - gint _tmp5_; + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_device_new (_tmp0_, _tmp1_); + dev = _tmp2_; + _tmp3_ = dev; + _tmp4_ = dvb_device_group_contains (self, _tmp3_); + if (_tmp4_) { + DVBDevice* _tmp5_; + gboolean _tmp6_ = FALSE; + _tmp5_ = dev; + _tmp6_ = dvb_device_group_remove (self, _tmp5_); + if (_tmp6_) { + gint _tmp15_; + gint _tmp16_; + guint _tmp17_; + guint _tmp18_; dvb_device_group_stop_epg_scanner (self); - _tmp3_ = dvb_factory_get_config_store (); - _tmp4_ = _tmp3_; - dvb_database_config_store_remove_device_from_group (_tmp4_, dev, self, &_inner_error_); - _g_object_unref0 (_tmp4_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch55_dvb_database_sql_error; + { + DVBFactory* _tmp7_; + DVBFactory* _tmp8_; + DVBdatabaseConfigStore* _tmp9_ = NULL; + DVBdatabaseConfigStore* _tmp10_; + DVBDevice* _tmp11_; + _tmp7_ = dvb_factory_new (); + _tmp8_ = _tmp7_; + _tmp9_ = dvb_factory_get_config_store (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = dev; + dvb_database_config_store_remove_device_from_group (_tmp10_, _tmp11_, self, &_inner_error_); + _g_object_unref0 (_tmp10_); + _g_object_unref0 (_tmp8_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch55_dvb_database_sql_error; + } + _g_object_unref0 (dev); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - _g_object_unref0 (dev); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } goto __finally55; __catch55_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp12_; + GError* _tmp13_; + const gchar* _tmp14_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("DeviceGroup.vala:323: %s", e->message); + _tmp12_ = dvb_device_group_log; + _tmp13_ = e; + _tmp14_ = _tmp13_->message; + dvb_logging_logger_error (_tmp12_, "DeviceGroup.vala:322: %s", _tmp14_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (dev); @@ -1040,7 +1352,7 @@ } __finally55: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (dev); return FALSE; @@ -1051,11 +1363,14 @@ return FALSE; } } - _tmp5_ = dvb_device_group_get_size (self); - if (_tmp5_ > 0) { + _tmp15_ = dvb_device_group_get_size (self); + _tmp16_ = _tmp15_; + if (_tmp16_ > 0) { dvb_device_group_start_epg_scanner (self); } - g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-removed", adapter, frontend); + _tmp17_ = adapter; + _tmp18_ = frontend; + g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-removed", _tmp17_, _tmp18_); result = TRUE; _g_object_unref0 (dev); return result; @@ -1073,10 +1388,12 @@ static gchar* dvb_device_group_real_GetName (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; gchar* result = NULL; - gchar* _tmp0_; + const gchar* _tmp0_; + gchar* _tmp1_; self = (DVBDeviceGroup*) base; - _tmp0_ = g_strdup (self->priv->_Name); - result = _tmp0_; + _tmp0_ = self->priv->_Name; + _tmp1_ = g_strdup (_tmp0_); + result = _tmp1_; return result; } @@ -1088,40 +1405,59 @@ static gboolean dvb_device_group_real_SetName (DVBIDBusDeviceGroup* base, const gchar* name, GError** error) { DVBDeviceGroup * self; gboolean result = FALSE; - DVBdatabaseConfigStore* _tmp0_ = NULL; - DVBdatabaseConfigStore* config; + const gchar* _tmp0_; GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; g_return_val_if_fail (name != NULL, FALSE); - dvb_device_group_set_Name (self, name); - _tmp0_ = dvb_factory_get_config_store (); - config = _tmp0_; - dvb_database_config_store_update_from_group (config, self, &_inner_error_); - if (_inner_error_ != NULL) { - _g_object_unref0 (config); - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch56_dvb_database_sql_error; + _tmp0_ = name; + dvb_device_group_set_Name (self, _tmp0_); + { + DVBFactory* _tmp1_; + DVBFactory* _tmp2_; + DVBdatabaseConfigStore* _tmp3_ = NULL; + DVBdatabaseConfigStore* _tmp4_; + DVBdatabaseConfigStore* config; + DVBdatabaseConfigStore* _tmp5_; + _tmp1_ = dvb_factory_new (); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_factory_get_config_store (_tmp2_); + _tmp4_ = _tmp3_; + _g_object_unref0 (_tmp2_); + config = _tmp4_; + _tmp5_ = config; + dvb_database_config_store_update_from_group (_tmp5_, self, &_inner_error_); + if (_inner_error_ != NULL) { + _g_object_unref0 (config); + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch56_dvb_database_sql_error; + } + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } - _g_object_unref0 (config); goto __finally56; __catch56_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp6_; + GError* _tmp7_; + const gchar* _tmp8_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("DeviceGroup.vala:358: %s", e->message); + _tmp6_ = dvb_device_group_log; + _tmp7_ = e; + _tmp8_ = _tmp7_->message; + dvb_logging_logger_error (_tmp6_, "DeviceGroup.vala:357: %s", _tmp8_); result = FALSE; _g_error_free0 (e); return result; } __finally56: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1141,48 +1477,51 @@ static char* dvb_device_group_real_GetChannelList (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; char* result = NULL; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - char* _tmp2_ = NULL; + guint _tmp0_; + gchar* _tmp1_ = NULL; + gchar* _tmp2_; char* _tmp3_; + char* _tmp4_; self = (DVBDeviceGroup*) base; - _tmp0_ = g_strdup_printf (DVB_CONSTANTS_DBUS_CHANNEL_LIST_PATH, self->priv->_Id); - _tmp1_ = _tmp0_; - _tmp2_ = g_strdup (_tmp1_); - result = (_tmp3_ = _tmp2_, _g_free0 (_tmp1_), _tmp3_); + _tmp0_ = self->priv->_Id; + _tmp1_ = g_strdup_printf (DVB_CONSTANTS_DBUS_CHANNEL_LIST_PATH, _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = g_strdup (_tmp2_); + _tmp4_ = _tmp3_; + _g_free0 (_tmp2_); + result = _tmp4_; return result; } gboolean dvb_device_group_register_channel_list (DVBDeviceGroup* self) { gboolean result = FALSE; - DVBChannelList* _tmp0_ = NULL; - DVBChannelList* _tmp1_; + DVBLoggingLogger* _tmp0_; + guint _tmp1_; + DVBChannelList* _tmp2_; + DVBChannelList* _tmp3_; + DVBChannelList* _tmp4_; DVBChannelList* channels; - DBusGConnection* _tmp2_ = NULL; - DBusGConnection* conn; - gchar* _tmp3_ = NULL; + guint _tmp5_; + gchar* _tmp6_ = NULL; gchar* path; + GDBusConnection* _tmp7_; g_return_val_if_fail (self != NULL, FALSE); - g_debug ("DeviceGroup.vala:373: Creating new ChannelList D-Bus service for group" \ -" %u", self->priv->_Id); - _tmp0_ = dvb_device_group_get_Channels (self); - _tmp1_ = _g_object_ref0 (_tmp0_); - channels = _tmp1_; - _tmp2_ = dvb_utils_get_dbus_connection (); - conn = _tmp2_; - if (conn == NULL) { - result = FALSE; - _dbus_g_connection_unref0 (conn); - _g_object_unref0 (channels); - return result; - } - _tmp3_ = g_strdup_printf (DVB_CONSTANTS_DBUS_CHANNEL_LIST_PATH, self->priv->_Id); - path = _tmp3_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) channels); + _tmp0_ = dvb_device_group_log; + _tmp1_ = self->priv->_Id; + dvb_logging_logger_debug (_tmp0_, "DeviceGroup.vala:372: Creating new ChannelList D-Bus service for group" \ +" %u", _tmp1_); + _tmp2_ = dvb_device_group_get_Channels (self); + _tmp3_ = _tmp2_; + _tmp4_ = _g_object_ref0 (_tmp3_); + channels = _tmp4_; + _tmp5_ = self->priv->_Id; + _tmp6_ = g_strdup_printf (DVB_CONSTANTS_DBUS_CHANNEL_LIST_PATH, _tmp5_); + path = _tmp6_; + _tmp7_ = main_conn; + dvb_utils_dbus_register_object (DVB_TYPE_ID_BUS_CHANNEL_LIST, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp7_, path, (DVBIDBusChannelList*) channels); result = TRUE; _g_free0 (path); - _dbus_g_connection_unref0 (conn); _g_object_unref0 (channels); return result; } @@ -1196,58 +1535,89 @@ DVBDeviceGroup * self; gchar** result = NULL; gint _tmp0_; - gchar** _tmp1_ = NULL; + gint _tmp1_; + gchar** _tmp2_ = NULL; + gchar** groupdevs; gint groupdevs_length1; gint _groupdevs_size_; - gchar** _tmp2_; - gchar** groupdevs; gint i; - gchar** _tmp10_; + gchar** _tmp22_; + gint _tmp22__length1; GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; _tmp0_ = dvb_device_group_get_size (self); - _tmp1_ = g_new0 (gchar*, _tmp0_ + 1); - _tmp2_ = _tmp1_; - groupdevs_length1 = _tmp0_; - _groupdevs_size_ = groupdevs_length1; + _tmp1_ = _tmp0_; + _tmp2_ = g_new0 (gchar*, _tmp1_ + 1); groupdevs = _tmp2_; + groupdevs_length1 = _tmp1_; + _groupdevs_size_ = groupdevs_length1; i = 0; { + GeeSet* _tmp3_; + _tmp3_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeIterator* _tmp3_ = NULL; - GeeIterator* _dev_it; - _tmp3_ = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - _dev_it = _tmp3_; - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - DVBDevice* dev; - guint _tmp6_; - guint _tmp7_; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - _tmp4_ = gee_iterator_next (_dev_it); - if (!_tmp4_) { - break; + { + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _dev_it; + _tmp4_ = self->priv->devices; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _dev_it = _tmp5_; + while (TRUE) { + GeeIterator* _tmp6_; + gboolean _tmp7_ = FALSE; + GeeIterator* _tmp8_; + gpointer _tmp9_ = NULL; + DVBDevice* dev; + gchar** _tmp10_; + gint _tmp10__length1; + gint _tmp11_; + DVBDevice* _tmp12_; + guint _tmp13_; + guint _tmp14_; + DVBDevice* _tmp15_; + guint _tmp16_; + guint _tmp17_; + gchar* _tmp18_ = NULL; + gchar* _tmp19_; + gint _tmp20_; + _tmp6_ = _dev_it; + _tmp7_ = gee_iterator_next (_tmp6_); + if (!_tmp7_) { + break; + } + _tmp8_ = _dev_it; + _tmp9_ = gee_iterator_get (_tmp8_); + dev = (DVBDevice*) _tmp9_; + _tmp10_ = groupdevs; + _tmp10__length1 = groupdevs_length1; + _tmp11_ = i; + _tmp12_ = dev; + _tmp13_ = dvb_device_get_Adapter (_tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = dev; + _tmp16_ = dvb_device_get_Frontend (_tmp15_); + _tmp17_ = _tmp16_; + _tmp18_ = g_strdup_printf (DVB_CONSTANTS_DVB_DEVICE_PATH, _tmp14_, _tmp17_); + _g_free0 (_tmp10_[_tmp11_]); + _tmp10_[_tmp11_] = _tmp18_; + _tmp19_ = _tmp10_[_tmp11_]; + _tmp20_ = i; + i = _tmp20_ + 1; + _g_object_unref0 (dev); } - _tmp5_ = gee_iterator_get (_dev_it); - dev = (DVBDevice*) _tmp5_; - _tmp6_ = dvb_device_get_Adapter (dev); - _tmp7_ = dvb_device_get_Frontend (dev); - _tmp8_ = g_strdup_printf (DVB_CONSTANTS_DVB_DEVICE_PATH, _tmp6_, _tmp7_); - _tmp9_ = _tmp8_; - _g_free0 (groupdevs[i]); - groupdevs[i] = _tmp9_; - i++; - _g_object_unref0 (dev); + _g_object_unref0 (_dev_it); } - _g_object_unref0 (_dev_it); } __finally57: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeSet* _tmp21_; + _tmp21_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); groupdevs = (_vala_array_free (groupdevs, groupdevs_length1, (GDestroyNotify) g_free), NULL); return NULL; @@ -1259,9 +1629,12 @@ } } } - _tmp10_ = groupdevs; - *result_length1 = groupdevs_length1; - result = _tmp10_; + _tmp22_ = groupdevs; + _tmp22__length1 = groupdevs_length1; + if (result_length1) { + *result_length1 = _tmp22__length1; + } + result = _tmp22_; return result; } @@ -1273,76 +1646,92 @@ */ static gboolean dvb_device_group_real_GetSchedule (DVBIDBusDeviceGroup* base, guint channel_sid, char** opath, GError** error) { DVBDeviceGroup * self; - char* _opath = NULL; + char* _vala_opath = NULL; gboolean result = FALSE; - DVBChannelList* _tmp0_ = NULL; - gboolean _tmp1_; - char* _tmp15_ = NULL; - char* _tmp16_; + DVBChannelList* _tmp0_; + DVBChannelList* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + char* _tmp26_; self = (DVBDeviceGroup*) base; _tmp0_ = dvb_device_group_get_Channels (self); - _tmp1_ = dvb_channel_list_contains (_tmp0_, channel_sid); - if (_tmp1_) { - gchar* _tmp2_ = NULL; + _tmp1_ = _tmp0_; + _tmp2_ = channel_sid; + _tmp3_ = dvb_channel_list_contains (_tmp1_, _tmp2_); + if (_tmp3_) { + guint _tmp4_; + guint _tmp5_; + gchar* _tmp6_ = NULL; gchar* path; - gboolean _tmp3_; - char* _tmp13_ = NULL; - char* _tmp14_; - _tmp2_ = g_strdup_printf (DVB_CONSTANTS_DBUS_SCHEDULE_PATH, self->priv->_Id, channel_sid); - path = _tmp2_; - _tmp3_ = gee_abstract_collection_contains ((GeeAbstractCollection*) self->priv->schedules, path); - if (!_tmp3_) { - DBusGConnection* _tmp4_ = NULL; - DBusGConnection* conn; - DVBChannelList* _tmp7_ = NULL; - DVBChannel* _tmp8_ = NULL; - DVBChannel* _tmp9_; - DVBSchedule* _tmp10_ = NULL; - DVBSchedule* _tmp11_; - DVBSchedule* _tmp12_; + GeeHashSet* _tmp7_; + const gchar* _tmp8_; + gboolean _tmp9_ = FALSE; + const gchar* _tmp24_; + char* _tmp25_; + _tmp4_ = self->priv->_Id; + _tmp5_ = channel_sid; + _tmp6_ = g_strdup_printf (DVB_CONSTANTS_DBUS_SCHEDULE_PATH, _tmp4_, _tmp5_); + path = _tmp6_; + _tmp7_ = self->priv->schedules; + _tmp8_ = path; + _tmp9_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp7_, _tmp8_); + if (!_tmp9_) { + DVBChannelList* _tmp10_; + DVBChannelList* _tmp11_; + guint _tmp12_; + DVBChannel* _tmp13_ = NULL; + DVBChannel* _tmp14_; + DVBSchedule* _tmp15_; + DVBSchedule* _tmp16_; + DVBSchedule* _tmp17_; + DVBSchedule* _tmp18_; DVBSchedule* schedule; - _tmp4_ = dvb_utils_get_dbus_connection (); - conn = _tmp4_; - if (conn == NULL) { - char* _tmp5_ = NULL; - char* _tmp6_; - _tmp5_ = g_strdup (""); - _tmp6_ = _tmp5_; - _g_free0 (_tmp6_); - } - _tmp7_ = dvb_device_group_get_Channels (self); - _tmp8_ = dvb_channel_list_get_channel (_tmp7_, channel_sid); - _tmp9_ = _tmp8_; - _tmp10_ = dvb_channel_get_Schedule (_tmp9_); - _tmp11_ = _g_object_ref0 (_tmp10_); - schedule = (_tmp12_ = _tmp11_, _g_object_unref0 (_tmp9_), _tmp12_); - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) schedule); - gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->schedules, path); + GDBusConnection* _tmp19_; + const gchar* _tmp20_; + DVBSchedule* _tmp21_; + GeeHashSet* _tmp22_; + const gchar* _tmp23_; + _tmp10_ = dvb_device_group_get_Channels (self); + _tmp11_ = _tmp10_; + _tmp12_ = channel_sid; + _tmp13_ = dvb_channel_list_get_channel (_tmp11_, _tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = dvb_channel_get_Schedule (_tmp14_); + _tmp16_ = _tmp15_; + _tmp17_ = _g_object_ref0 (_tmp16_); + _tmp18_ = _tmp17_; + _g_object_unref0 (_tmp14_); + schedule = _tmp18_; + _tmp19_ = main_conn; + _tmp20_ = path; + _tmp21_ = schedule; + dvb_utils_dbus_register_object (DVB_TYPE_ID_BUS_SCHEDULE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp19_, _tmp20_, (DVBIDBusSchedule*) _tmp21_); + _tmp22_ = self->priv->schedules; + _tmp23_ = path; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp23_); _g_object_unref0 (schedule); - _dbus_g_connection_unref0 (conn); } - _tmp13_ = g_strdup (path); - _tmp14_ = _tmp13_; - _g_free0 (_opath); - _opath = _tmp14_; + _tmp24_ = path; + _tmp25_ = g_strdup (_tmp24_); + _g_free0 (_vala_opath); + _vala_opath = _tmp25_; result = TRUE; _g_free0 (path); if (opath) { - *opath = _opath; + *opath = _vala_opath; } else { - _g_free0 (_opath); + _g_free0 (_vala_opath); } return result; } - _tmp15_ = g_strdup (""); - _tmp16_ = _tmp15_; - _g_free0 (_opath); - _opath = _tmp16_; + _tmp26_ = g_strdup (""); + _g_free0 (_vala_opath); + _vala_opath = _tmp26_; result = FALSE; if (opath) { - *opath = _opath; + *opath = _vala_opath; } else { - _g_free0 (_opath); + _g_free0 (_vala_opath); } return result; } @@ -1354,12 +1743,14 @@ static gchar* dvb_device_group_real_GetRecordingsDirectory (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; gchar* result = NULL; - GFile* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; + GFile* _tmp0_; + GFile* _tmp1_; + gchar* _tmp2_ = NULL; self = (DVBDeviceGroup*) base; _tmp0_ = dvb_device_group_get_RecordingsDirectory (self); - _tmp1_ = g_file_get_path (_tmp0_); - result = _tmp1_; + _tmp1_ = _tmp0_; + _tmp2_ = g_file_get_path (_tmp1_); + result = _tmp2_; return result; } @@ -1371,45 +1762,64 @@ static gboolean dvb_device_group_real_SetRecordingsDirectory (DVBIDBusDeviceGroup* base, const gchar* location, GError** error) { DVBDeviceGroup * self; gboolean result = FALSE; - GFile* _tmp0_ = NULL; - GFile* _tmp1_; - DVBdatabaseConfigStore* _tmp2_ = NULL; - DVBdatabaseConfigStore* config; + const gchar* _tmp0_; + GFile* _tmp1_ = NULL; + GFile* _tmp2_; GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; g_return_val_if_fail (location != NULL, FALSE); - _tmp0_ = g_file_new_for_path (location); - _tmp1_ = _tmp0_; - dvb_device_group_set_RecordingsDirectory (self, _tmp1_); - _g_object_unref0 (_tmp1_); - _tmp2_ = dvb_factory_get_config_store (); - config = _tmp2_; - dvb_database_config_store_update_from_group (config, self, &_inner_error_); - if (_inner_error_ != NULL) { - _g_object_unref0 (config); - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch58_dvb_database_sql_error; + _tmp0_ = location; + _tmp1_ = g_file_new_for_path (_tmp0_); + _tmp2_ = _tmp1_; + dvb_device_group_set_RecordingsDirectory (self, _tmp2_); + _g_object_unref0 (_tmp2_); + { + DVBFactory* _tmp3_; + DVBFactory* _tmp4_; + DVBdatabaseConfigStore* _tmp5_ = NULL; + DVBdatabaseConfigStore* _tmp6_; + DVBdatabaseConfigStore* config; + DVBdatabaseConfigStore* _tmp7_; + _tmp3_ = dvb_factory_new (); + _tmp4_ = _tmp3_; + _tmp5_ = dvb_factory_get_config_store (_tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + config = _tmp6_; + _tmp7_ = config; + dvb_database_config_store_update_from_group (_tmp7_, self, &_inner_error_); + if (_inner_error_ != NULL) { + _g_object_unref0 (config); + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch58_dvb_database_sql_error; + } + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } - _g_object_unref0 (config); goto __finally58; __catch58_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp8_; + GError* _tmp9_; + const gchar* _tmp10_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("DeviceGroup.vala:455: %s", e->message); + _tmp8_ = dvb_device_group_log; + _tmp9_ = e; + _tmp10_ = _tmp9_->message; + dvb_logging_logger_error (_tmp8_, "DeviceGroup.vala:446: %s", _tmp10_); result = FALSE; _g_error_free0 (e); return result; } __finally58: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1426,10 +1836,12 @@ static GeeIterator* dvb_device_group_real_iterator (GeeIterable* base) { DVBDeviceGroup * self; GeeIterator* result = NULL; - GeeIterator* _tmp0_ = NULL; + GeeSet* _tmp0_; + GeeIterator* _tmp1_ = NULL; self = (DVBDeviceGroup*) base; - _tmp0_ = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - result = _tmp0_; + _tmp0_ = self->priv->devices; + _tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_); + result = _tmp1_; return result; } @@ -1442,33 +1854,57 @@ GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); { + GeeSet* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeIterator* _tmp0_ = NULL; - GeeIterator* _device_it; - _tmp0_ = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - _device_it = _tmp0_; - while (TRUE) { - gboolean _tmp1_; - gpointer _tmp2_ = NULL; - DVBDevice* device; - _tmp1_ = gee_iterator_next (_device_it); - if (!_tmp1_) { - break; - } - _tmp2_ = gee_iterator_get (_device_it); - device = (DVBDevice*) _tmp2_; - if (device != self->priv->_reference_device) { - GFile* _tmp3_ = NULL; - _tmp3_ = dvb_device_get_RecordingsDirectory (self->priv->_reference_device); - dvb_device_set_RecordingsDirectory (device, _tmp3_); + { + GeeSet* _tmp1_; + GeeIterator* _tmp2_ = NULL; + GeeIterator* _device_it; + _tmp1_ = self->priv->devices; + _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); + _device_it = _tmp2_; + while (TRUE) { + GeeIterator* _tmp3_; + gboolean _tmp4_ = FALSE; + GeeIterator* _tmp5_; + gpointer _tmp6_ = NULL; + DVBDevice* device; + DVBDevice* _tmp7_; + DVBDevice* _tmp8_; + _tmp3_ = _device_it; + _tmp4_ = gee_iterator_next (_tmp3_); + if (!_tmp4_) { + break; + } + _tmp5_ = _device_it; + _tmp6_ = gee_iterator_get (_tmp5_); + device = (DVBDevice*) _tmp6_; + _tmp7_ = device; + _tmp8_ = self->priv->_reference_device; + if (_tmp7_ != _tmp8_) { + DVBDevice* _tmp9_; + DVBDevice* _tmp10_; + GFile* _tmp11_; + GFile* _tmp12_; + _tmp9_ = device; + _tmp10_ = self->priv->_reference_device; + _tmp11_ = dvb_device_get_RecordingsDirectory (_tmp10_); + _tmp12_ = _tmp11_; + dvb_device_set_RecordingsDirectory (_tmp9_, _tmp12_); + } + _g_object_unref0 (device); } - _g_object_unref0 (device); + _g_object_unref0 (_device_it); } - _g_object_unref0 (_device_it); } __finally59: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeSet* _tmp13_; + _tmp13_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1480,52 +1916,72 @@ gint dvb_device_group_get_size (DVBDeviceGroup* self) { gint result; - gint _tmp0_; + GeeSet* _tmp0_; + gint _tmp1_; + gint _tmp2_; g_return_val_if_fail (self != NULL, 0); - _tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->devices); - result = _tmp0_; + _tmp0_ = self->priv->devices; + _tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_); + _tmp2_ = _tmp1_; + result = _tmp2_; return result; } guint dvb_device_group_get_Id (DVBDeviceGroup* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Id; + _tmp0_ = self->priv->_Id; + result = _tmp0_; return result; } static void dvb_device_group_set_Id (DVBDeviceGroup* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Id = value; + _tmp0_ = value; + self->priv->_Id = _tmp0_; g_object_notify ((GObject *) self, "Id"); } DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self) { DVBChannelList* result; - DVBChannelList* _tmp0_ = NULL; + DVBDevice* _tmp0_; + DVBChannelList* _tmp1_; + DVBChannelList* _tmp2_; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = dvb_device_get_Channels (self->priv->_reference_device); - result = _tmp0_; + _tmp0_ = self->priv->_reference_device; + _tmp1_ = dvb_device_get_Channels (_tmp0_); + _tmp2_ = _tmp1_; + result = _tmp2_; return result; } GFile* dvb_device_group_get_RecordingsDirectory (DVBDeviceGroup* self) { GFile* result; - GFile* _tmp0_ = NULL; + DVBDevice* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = dvb_device_get_RecordingsDirectory (self->priv->_reference_device); - result = _tmp0_; + _tmp0_ = self->priv->_reference_device; + _tmp1_ = dvb_device_get_RecordingsDirectory (_tmp0_); + _tmp2_ = _tmp1_; + result = _tmp2_; return result; } void dvb_device_group_set_RecordingsDirectory (DVBDeviceGroup* self, GFile* value) { + DVBDevice* _tmp0_; + GFile* _tmp1_; g_return_if_fail (self != NULL); - dvb_device_set_RecordingsDirectory (self->priv->_reference_device, value); + _tmp0_ = self->priv->_reference_device; + _tmp1_ = value; + dvb_device_set_RecordingsDirectory (_tmp0_, _tmp1_); dvb_device_group_update_all_devices (self); g_object_notify ((GObject *) self, "RecordingsDirectory"); } @@ -1533,52 +1989,64 @@ DVBAdapterType dvb_device_group_get_Type (DVBDeviceGroup* self) { DVBAdapterType result; - DVBAdapterType _tmp0_; + DVBDevice* _tmp0_; + DVBAdapterType _tmp1_; + DVBAdapterType _tmp2_; g_return_val_if_fail (self != NULL, 0); - _tmp0_ = dvb_device_get_Type (self->priv->_reference_device); - result = _tmp0_; + _tmp0_ = self->priv->_reference_device; + _tmp1_ = dvb_device_get_Type (_tmp0_); + _tmp2_ = _tmp1_; + result = _tmp2_; return result; } DVBRecorder* dvb_device_group_get_recorder (DVBDeviceGroup* self) { DVBRecorder* result; + DVBRecorder* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_recorder; + _tmp0_ = self->priv->_recorder; + result = _tmp0_; return result; } DVBEPGScanner* dvb_device_group_get_epgscanner (DVBDeviceGroup* self) { DVBEPGScanner* result; + DVBEPGScanner* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_epgscanner; + _tmp0_ = self->priv->_epgscanner; + result = _tmp0_; return result; } DVBChannelFactory* dvb_device_group_get_channel_factory (DVBDeviceGroup* self) { DVBChannelFactory* result; + DVBChannelFactory* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_channelfactory; + _tmp0_ = self->priv->_channelfactory; + result = _tmp0_; return result; } const gchar* dvb_device_group_get_Name (DVBDeviceGroup* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Name; + _tmp0_ = self->priv->_Name; + result = _tmp0_; return result; } void dvb_device_group_set_Name (DVBDeviceGroup* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_Name); self->priv->_Name = _tmp1_; g_object_notify ((GObject *) self, "Name"); @@ -1587,8 +2055,10 @@ DVBDevice* dvb_device_group_get_reference_device (DVBDeviceGroup* self) { DVBDevice* result; + DVBDevice* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_reference_device; + _tmp0_ = self->priv->_reference_device; + result = _tmp0_; return result; } @@ -1597,8 +2067,8 @@ DVBDevice* _tmp0_; DVBDevice* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_reference_device); self->priv->_reference_device = _tmp1_; g_object_notify ((GObject *) self, "reference-device"); @@ -1632,32 +2102,32 @@ GObject * obj; GObjectClass * parent_class; DVBDeviceGroup * self; - GeeHashSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeHashSet* _tmp2_ = NULL; + GeeHashSet* _tmp0_; + GHashFunc _tmp1_; + GEqualFunc _tmp2_; GeeHashSet* _tmp3_; - DVBChannelFactory* _tmp4_ = NULL; - DVBChannelFactory* _tmp5_; - DVBRecorder* _tmp6_ = NULL; + GeeSet* _tmp4_; + DVBDevice* _tmp5_; + DVBChannelFactory* _tmp6_; DVBRecorder* _tmp7_; parent_class = G_OBJECT_CLASS (dvb_device_group_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_DEVICE_GROUP (obj); _tmp0_ = gee_hash_set_new (DVB_TYPE_DEVICE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _dvb_device_hash_ghash_func, _dvb_device_equal_gequal_func); - _tmp1_ = (GeeSet*) _tmp0_; _g_object_unref0 (self->priv->devices); - self->priv->devices = _tmp1_; - _tmp2_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal); - _tmp3_ = _tmp2_; + self->priv->devices = (GeeSet*) _tmp0_; + _tmp1_ = g_str_hash; + _tmp2_ = g_str_equal; + _tmp3_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp1_, _tmp2_); _g_object_unref0 (self->priv->schedules); self->priv->schedules = _tmp3_; - gee_collection_add ((GeeCollection*) self->priv->devices, self->priv->_reference_device); - _tmp4_ = dvb_channel_factory_new (self); - _tmp5_ = _tmp4_; + _tmp4_ = self->priv->devices; + _tmp5_ = self->priv->_reference_device; + gee_collection_add ((GeeCollection*) _tmp4_, _tmp5_); + _tmp6_ = dvb_channel_factory_new (self); _g_object_unref0 (self->priv->_channelfactory); - self->priv->_channelfactory = _tmp5_; - _tmp6_ = dvb_recorder_new (self); - _tmp7_ = _tmp6_; + self->priv->_channelfactory = _tmp6_; + _tmp7_ = dvb_recorder_new (self); _g_object_unref0 (self->priv->_recorder); self->priv->_recorder = _tmp7_; return obj; @@ -1665,6 +2135,8 @@ static void dvb_device_group_class_init (DVBDeviceGroupClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_device_group_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBDeviceGroupPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_device_group_get_property; @@ -1682,23 +2154,25 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUP_NAME, g_param_spec_string ("Name", "Name", "Name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUP_REFERENCE_DEVICE, g_param_spec_object ("reference-device", "reference-device", "reference-device", DVB_TYPE_DEVICE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUP_ELEMENT_TYPE, "element-type"); - g_type_set_qdata (DVB_TYPE_DEVICE_GROUP, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_device_group_dbus_vtable)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_device_group_log = _tmp1_; } static void dvb_device_group_dvb_id_bus_device_group_interface_init (DVBIDBusDeviceGroupIface * iface) { dvb_device_group_dvb_id_bus_device_group_parent_iface = g_type_interface_peek_parent (iface); - iface->GetType = (gchar* (*)(DVBIDBusDeviceGroup* ,GError**)) dvb_device_group_real_GetType; - iface->AddDevice = (gboolean (*)(DVBIDBusDeviceGroup* ,guint ,guint ,GError**)) dvb_device_group_real_AddDevice; - iface->GetRecorder = (char* (*)(DVBIDBusDeviceGroup* ,GError**)) dvb_device_group_real_GetRecorder; - iface->RemoveDevice = (gboolean (*)(DVBIDBusDeviceGroup* ,guint ,guint ,GError**)) dvb_device_group_real_RemoveDevice; - iface->GetName = (gchar* (*)(DVBIDBusDeviceGroup* ,GError**)) dvb_device_group_real_GetName; - iface->SetName = (gboolean (*)(DVBIDBusDeviceGroup* ,const gchar* ,GError**)) dvb_device_group_real_SetName; - iface->GetChannelList = (char* (*)(DVBIDBusDeviceGroup* ,GError**)) dvb_device_group_real_GetChannelList; - iface->GetMembers = (gchar** (*)(DVBIDBusDeviceGroup* ,int* ,GError**)) dvb_device_group_real_GetMembers; - iface->GetSchedule = (gboolean (*)(DVBIDBusDeviceGroup* ,guint ,char** ,GError**)) dvb_device_group_real_GetSchedule; - iface->GetRecordingsDirectory = (gchar* (*)(DVBIDBusDeviceGroup* ,GError**)) dvb_device_group_real_GetRecordingsDirectory; - iface->SetRecordingsDirectory = (gboolean (*)(DVBIDBusDeviceGroup* ,const gchar* ,GError**)) dvb_device_group_real_SetRecordingsDirectory; + iface->GetType = (gchar* (*)(DVBIDBusDeviceGroup*, GError**)) dvb_device_group_real_GetType; + iface->AddDevice = (gboolean (*)(DVBIDBusDeviceGroup*, guint, guint, GError**)) dvb_device_group_real_AddDevice; + iface->GetRecorder = (char* (*)(DVBIDBusDeviceGroup*, GError**)) dvb_device_group_real_GetRecorder; + iface->RemoveDevice = (gboolean (*)(DVBIDBusDeviceGroup*, guint, guint, GError**)) dvb_device_group_real_RemoveDevice; + iface->GetName = (gchar* (*)(DVBIDBusDeviceGroup*, GError**)) dvb_device_group_real_GetName; + iface->SetName = (gboolean (*)(DVBIDBusDeviceGroup*, const gchar*, GError**)) dvb_device_group_real_SetName; + iface->GetChannelList = (char* (*)(DVBIDBusDeviceGroup*, GError**)) dvb_device_group_real_GetChannelList; + iface->GetMembers = (gchar** (*)(DVBIDBusDeviceGroup*, int*, GError**)) dvb_device_group_real_GetMembers; + iface->GetSchedule = (gboolean (*)(DVBIDBusDeviceGroup*, guint, char**, GError**)) dvb_device_group_real_GetSchedule; + iface->GetRecordingsDirectory = (gchar* (*)(DVBIDBusDeviceGroup*, GError**)) dvb_device_group_real_GetRecordingsDirectory; + iface->SetRecordingsDirectory = (gboolean (*)(DVBIDBusDeviceGroup*, const gchar*, GError**)) dvb_device_group_real_SetRecordingsDirectory; } diff -Nru gnome-dvb-daemon-0.1.23/src/DeviceGroup.vala gnome-dvb-daemon-0.2.7/src/DeviceGroup.vala --- gnome-dvb-daemon-0.1.23/src/DeviceGroup.vala 2010-05-10 20:35:42.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/DeviceGroup.vala 2011-09-29 20:27:47.000000000 +0000 @@ -20,6 +20,7 @@ using GLib; using Gee; using DVB.database; +using DVB.Logging; namespace DVB { @@ -28,7 +29,9 @@ * (list of channels, recordings dir) */ public class DeviceGroup : GLib.Object, IDBusDeviceGroup, Iterable { - + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public int size { get { return this.devices.size; } } @@ -56,21 +59,21 @@ get { return this._channelfactory; } } public string Name {get; set;} - + // All settings are copied from this one public Device reference_device { get; construct set; } - + private Set devices; private Recorder _recorder; private EPGScanner? _epgscanner; private ChannelFactory _channelfactory; - - // Containss object paths to Schedule + + // Containss object paths to Schedule private HashSet schedules; - + construct { this.devices = new HashSet (Device.hash, Device.equal); this.schedules = new HashSet (GLib.str_hash, @@ -79,7 +82,7 @@ this._channelfactory = new ChannelFactory (this); this._recorder = new Recorder (this); } - + /** * @id: ID of group * @reference_device: All devices of this group will inherit @@ -101,7 +104,7 @@ } public void destroy () { - debug ("Destroying group %u", this.Id); + log.debug ("Destroying group %u", this.Id); this.stop_epg_scanner (); this._recorder.stop (); this._channelfactory.destroy (); @@ -120,7 +123,7 @@ if (this._epgscanner != null) this._epgscanner.stop (); } - + /** * @adapter: Number of the device's adapter * @frontend: Number of the device's frontend @@ -133,7 +136,7 @@ Device new_dev = Device.new_with_type (adapter, frontend); this.add (new_dev); } - + /** * Add device to group. The device's settings will be overridden * with those of the reference device. @@ -143,13 +146,13 @@ warning ("Cannot add device, because it is not of same type"); return false; } - + bool result; lock (this.devices) { // Set settings from reference device device.Channels = this.reference_device.Channels; device.RecordingsDirectory = this.reference_device.RecordingsDirectory; - + result = this.devices.add (device); } return result; @@ -162,7 +165,7 @@ } return false; } - + public bool contains (Device device) { bool result; lock (this.devices) { @@ -170,14 +173,14 @@ } return result; } - + public bool remove (Device device) { bool result; lock (this.devices) { result = this.devices.remove (device); if (Device.equal (device, this.reference_device)) { foreach (Device dev in this.devices) { - debug ("Assigning new reference device"); + log.debug ("Assigning new reference device"); this.reference_device = dev; break; } @@ -193,7 +196,7 @@ } return false; } - + /** * Get first device that isn't busy. * If all devices are busy NULL is returned. @@ -208,15 +211,15 @@ } } } - + return result; } - + /** * @returns: Name of adapter type the group holds * or an empty string when group with given id doesn't exist. */ - public string GetType () { + public string GetType () throws DBusError { string type_str; switch (this.Type) { case AdapterType.DVB_T: type_str = "DVB-T"; break; @@ -226,7 +229,7 @@ } return type_str; } - + /** * @adapter: Number of the device's adapter * @frontend: Number of the device's frontend @@ -236,69 +239,65 @@ * The new device will inherit all settings from the group's * reference device. */ - public bool AddDevice (uint adapter, uint frontend) throws DBus.Error { + public bool AddDevice (uint adapter, uint frontend) throws DBusError { // When the device is already registered we // might see some errors if the device is // currently in use Device device = Device.new_with_type (adapter, frontend); - + if (device == null) return false; - + Manager manager = Manager.get_instance (); if (manager.device_is_in_any_group (device)) { - debug ("Device with adapter %u, frontend %u is" + + log.debug ("Device with adapter %u, frontend %u is" + "already part of a group", adapter, frontend); return false; } - + uint group_id = this.Id; - debug ("Adding device with adapter %u, frontend %u to group %u", + log.debug ("Adding device with adapter %u, frontend %u to group %u", adapter, frontend, group_id); if (this.add (device)) { try { - Factory.get_config_store ().add_device_to_group (device, + new Factory().get_config_store ().add_device_to_group (device, this); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); return false; } - + this.device_added (adapter, frontend); - + return true; } - + return false; } - + /** * @returns: Object path of the device's recorder - * + * * Returns the object path to the device's recorder. */ - public DBus.ObjectPath GetRecorder () throws DBus.Error { - return new DBus.ObjectPath ( + public ObjectPath GetRecorder () throws DBusError { + return new ObjectPath ( Constants.DBUS_RECORDER_PATH.printf (this.Id)); - } - + } + protected bool register_recorder () { - debug ("Creating new Recorder D-Bus service for group %u", + log.debug ("Creating new Recorder D-Bus service for group %u", this.Id); - + Recorder recorder = this.recorder; - - var conn = Utils.get_dbus_connection (); - if (conn == null) return false; - + string path = Constants.DBUS_RECORDER_PATH.printf (this.Id); - conn.register_object ( - path, - recorder); - + Utils.dbus_register_object (Main.conn, + path, recorder); + return true; } - + /** * @adapter: Number of the device's adapter * @frontend: Number of the device's frontend @@ -307,9 +306,9 @@ * Removes the device from the group. If the group contains * no devices after the removal it's removed as well. */ - public bool RemoveDevice (uint adapter, uint frontend) throws DBus.Error { + public bool RemoveDevice (uint adapter, uint frontend) throws DBusError { Device dev = new Device (adapter, frontend); - + if (this.contains (dev)) { if (this.remove (dev)) { // Stop epgscanner, because it might use the @@ -317,10 +316,10 @@ this.stop_epg_scanner (); try { - Factory.get_config_store ().remove_device_from_group ( + new Factory().get_config_store ().remove_device_from_group ( dev, this); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); return false; } // Group has no devices anymore, delete it @@ -330,69 +329,65 @@ } this.device_removed (adapter, frontend); - + return true; } } - + return false; } - + /** * @returns: Name of the device group */ - public string GetName () throws DBus.Error { + public string GetName () throws DBusError { return this.Name; } - + /** * @name: Name of the group * @returns: TRUE on success */ - public bool SetName (string name) throws DBus.Error { + public bool SetName (string name) throws DBusError { this.Name = name; try { - ConfigStore config = Factory.get_config_store(); + ConfigStore config = new Factory().get_config_store(); config.update_from_group (this); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); return false; } return true; } - + /** * @returns: Object path to the ChannelList service for this device */ - public DBus.ObjectPath GetChannelList () throws DBus.Error { - return new DBus.ObjectPath ( + public ObjectPath GetChannelList () throws DBusError { + return new ObjectPath ( Constants.DBUS_CHANNEL_LIST_PATH.printf (this.Id)); } - + protected bool register_channel_list () { - debug ("Creating new ChannelList D-Bus service for group %u", + log.debug ("Creating new ChannelList D-Bus service for group %u", this.Id); - + ChannelList channels = this.Channels; - - var conn = Utils.get_dbus_connection (); - if (conn == null) return false; - + string path = Constants.DBUS_CHANNEL_LIST_PATH.printf (this.Id); - conn.register_object ( - path, - channels); - + Utils.dbus_register_object (Main.conn, + path, channels); + return true; } - + /** * @returns: List of paths to the devices that are part of * the group (e.g. /dev/dvb/adapter0/frontend0) */ - public string[] GetMembers () throws DBus.Error { + public string[] GetMembers () throws DBusError { string[] groupdevs = new string[this.size]; - + int i=0; lock (this.devices) { foreach (Device dev in this.devices) { @@ -401,7 +396,7 @@ i++; } } - + return groupdevs; } /** @@ -409,61 +404,57 @@ * @opath: Device group's DBus path * @returns: TRUE on success */ - public bool GetSchedule (uint channel_sid, out DBus.ObjectPath opath) throws DBus.Error { + public bool GetSchedule (uint channel_sid, out ObjectPath opath) throws DBusError { if (this.Channels.contains (channel_sid)) { string path = Constants.DBUS_SCHEDULE_PATH.printf (this.Id, channel_sid); - + if (!this.schedules.contains (path)) { - var conn = Utils.get_dbus_connection (); - if (conn == null) new DBus.ObjectPath (""); - Schedule schedule = this.Channels.get_channel ( channel_sid).Schedule; - - conn.register_object ( - path, - schedule); - + + Utils.dbus_register_object (Main.conn, + path, schedule); + this.schedules.add (path); } - - opath = new DBus.ObjectPath (path); + + opath = new ObjectPath (path); return true; } - - opath = new DBus.ObjectPath (""); + + opath = new ObjectPath (""); return false; } /** * @returns: Location of the recordings directory */ - public string GetRecordingsDirectory () throws DBus.Error { + public string GetRecordingsDirectory () throws DBusError { return this.RecordingsDirectory.get_path (); } - + /** * @location: Location of the recordings directory * @returns: TRUE on success */ - public bool SetRecordingsDirectory (string location) throws DBus.Error { + public bool SetRecordingsDirectory (string location) throws DBusError { this.RecordingsDirectory = File.new_for_path (location); try { - ConfigStore config = Factory.get_config_store(); + ConfigStore config = new Factory().get_config_store(); config.update_from_group (this); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); return false; } return true; } - + public Type element_type { get { return typeof (Device); } } - + public Iterator iterator () { return this.devices.iterator(); } - + /** * Set RecordingsDirectory property of all * devices to the values of the reference device @@ -477,7 +468,7 @@ } } } - + } - + } diff -Nru gnome-dvb-daemon-0.1.23/src/Device.vala gnome-dvb-daemon-0.2.7/src/Device.vala --- gnome-dvb-daemon-0.1.23/src/Device.vala 2010-10-05 13:18:08.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Device.vala 2011-09-22 20:08:40.000000000 +0000 @@ -19,6 +19,8 @@ using GLib; using Gst; +using DVB.Logging; + namespace DVB { public errordomain DeviceError { @@ -33,6 +35,8 @@ } public class Device : GLib.Object { + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); private static const int PRIME = 31; @@ -53,7 +57,18 @@ public Device (uint adapter, uint frontend) { base (Adapter: adapter, Frontend: frontend); } - + + public static Device new_set_type (uint adapter, uint frontend, + File channels_conf, File recordings_dir, string name, AdapterType type) { + Device dev = new Device (adapter, frontend); + dev.adapter_name = name; + dev.adapter_type = type; + dev.RecordingsDirectory = recordings_dir; + dev.Channels = new ChannelList (channels_conf); + + return dev; + } + public static Device new_with_type (uint adapter, uint frontend) { var device = new Device (adapter, frontend); @@ -63,7 +78,7 @@ } public static Device? new_full (uint adapter, uint frontend, - File channels_conf, File recordings_dir, uint group_id) + File channels_conf, File recordings_dir) throws DeviceError { Device device = Device.new_with_type (adapter, frontend); @@ -103,7 +118,7 @@ public bool is_busy () { Element dvbsrc = ElementFactory.make ("dvbsrc", "text_dvbsrc"); if (dvbsrc == null) { - critical ("Could not create dvbsrc element"); + log.error ("Could not create dvbsrc element"); return true; } dvbsrc.set ("adapter", this.Adapter); @@ -125,7 +140,7 @@ string debug_text; msg.parse_error (out gerror, out debug_text); - debug ("Error tuning: %s; %s", gerror.message, debug_text); + log.debug ("Error tuning: %s; %s", gerror.message, debug_text); busy_val = true; } @@ -139,7 +154,7 @@ private bool setAdapterTypeAndName (uint adapter, uint frontend) { Element dvbsrc = ElementFactory.make ("dvbsrc", "test_dvbsrc"); if (dvbsrc == null) { - critical ("Could not create dvbsrc element"); + log.error ("Could not create dvbsrc element"); return false; } dvbsrc.set ("adapter", adapter); @@ -176,13 +191,22 @@ pipeline.set_state(State.NULL); - if (adapter_type == "DVB-T") this.adapter_type = AdapterType.DVB_T; - else if (adapter_type == "DVB-S") this.adapter_type = AdapterType.DVB_S; - else if (adapter_type == "DVB-C") this.adapter_type = AdapterType.DVB_C; - else this.adapter_type = AdapterType.UNKNOWN; - + this.adapter_type = get_type_from_string (adapter_type); + return success; } + + public static AdapterType get_type_from_string (string? adapter_type) { + if (adapter_type == null) + return AdapterType.UNKNOWN; + + AdapterType type; + if (adapter_type == "DVB-T") type = AdapterType.DVB_T; + else if (adapter_type == "DVB-S") type = AdapterType.DVB_S; + else if (adapter_type == "DVB-C") type = AdapterType.DVB_C; + else type = AdapterType.UNKNOWN; + return type; + } } - + } diff -Nru gnome-dvb-daemon-0.1.23/src/EPGScanner.c gnome-dvb-daemon-0.2.7/src/EPGScanner.c --- gnome-dvb-daemon-0.1.23/src/EPGScanner.c 2011-01-14 16:56:06.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/EPGScanner.c 2011-11-23 18:39:39.000000000 +0000 @@ -1,4 +1,4 @@ -/* EPGScanner.c generated by valac 0.11.3, the Vala compiler +/* EPGScanner.c generated by valac 0.14.0, the Vala compiler * generated from EPGScanner.vala, do not modify */ /* @@ -69,6 +69,26 @@ typedef struct _DVBEvent DVBEvent; typedef struct _DVBEventClass DVBEventClass; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) #define _g_queue_free0(var) ((var == NULL) ? NULL : (var = (g_queue_free (var), NULL))) #define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL))) @@ -76,6 +96,16 @@ #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL))) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + #define DVB_TYPE_SETTINGS (dvb_settings_get_type ()) #define DVB_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SETTINGS, DVBSettings)) #define DVB_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SETTINGS, DVBSettingsClass)) @@ -205,6 +235,8 @@ static gpointer dvb_epg_scanner_parent_class = NULL; +static DVBLoggingLogger* dvb_epg_scanner_log; +static DVBLoggingLogger* dvb_epg_scanner_log = NULL; static gint dvb_epg_scanner_CHECK_EIT_INTERVAL; static gint dvb_epg_scanner_CHECK_EIT_INTERVAL = 0; @@ -222,21 +254,30 @@ enum { DVB_EPG_SCANNER_DUMMY_PROPERTY }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_EPG_SCANNER_WAIT_FOR_EIT_DURATION 10 #define DVB_EPG_SCANNER_PIPELINE_TEMPLATE "dvbsrc name=dvbsrc adapter=%u frontend=%u pids=0:16:17:18 stats-report" \ "ing-interval=0 ! mpegtsparse ! fakesink silent=true" DVBEPGScanner* dvb_epg_scanner_new (DVBDeviceGroup* device); DVBEPGScanner* dvb_epg_scanner_construct (GType object_type, DVBDeviceGroup* device); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; GType dvb_settings_get_type (void) G_GNUC_CONST; -DVBSettings* dvb_factory_get_settings (void); +DVBSettings* dvb_factory_get_settings (DVBFactory* self); gint dvb_settings_get_epg_scan_interval (DVBSettings* self); void dvb_epg_scanner_stop (DVBEPGScanner* self); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); guint dvb_device_group_get_Id (DVBDeviceGroup* self); static void dvb_epg_scanner_remove_timeouts (DVBEPGScanner* self); static void dvb_epg_scanner_reset (DVBEPGScanner* self); -static gboolean dvb_epg_scanner_worker (DVBEPGScanner* self); +static void* dvb_epg_scanner_worker (DVBEPGScanner* self); gboolean dvb_epg_scanner_start (DVBEPGScanner* self); static gpointer _dvb_epg_scanner_worker_gthread_func (gpointer self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); GType dvb_device_get_type (void) G_GNUC_CONST; @@ -256,6 +297,11 @@ void dvb_schedule_remove_expired_events (DVBSchedule* self); void dvb_channel_setup_dvb_source (DVBChannel* self, GstElement* source); void dvb_epg_scanner_on_eit_structure (DVBEPGScanner* self, const GstStructure* structure); +static guint dvb_epg_scanner_get_uint_val (const GstStructure* structure, const gchar* name); +guint dvb_event_hash (DVBEvent* event); +static guint _dvb_event_hash_ghash_func (gconstpointer key); +gboolean dvb_event_equal (DVBEvent* event1, DVBEvent* event2); +static gboolean _dvb_event_equal_gequal_func (gconstpointer a, gconstpointer b); DVBEvent* dvb_event_new (void); DVBEvent* dvb_event_construct (GType object_type); gpointer dvb_event_audio_component_ref (gpointer instance); @@ -279,12 +325,7 @@ void dvb_event_value_take_teletext_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_teletext_component (const GValue* value); GType dvb_event_teletext_component_get_type (void) G_GNUC_CONST; -static guint dvb_epg_scanner_get_uint_val (const GstStructure* structure, const gchar* name); gboolean dvb_event_has_expired (DVBEvent* self); -guint dvb_event_hash (DVBEvent* event); -static guint _dvb_event_hash_ghash_func (gconstpointer key); -gboolean dvb_event_equal (DVBEvent* event1, DVBEvent* event2); -static gboolean _dvb_event_equal_gequal_func (gconstpointer a, gconstpointer b); static GObject * dvb_epg_scanner_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); static void dvb_epg_scanner_finalize (GObject* obj); @@ -294,17 +335,30 @@ */ DVBEPGScanner* dvb_epg_scanner_construct (GType object_type, DVBDeviceGroup* device) { DVBEPGScanner * self = NULL; + DVBDeviceGroup* _tmp0_; + gint _tmp1_; g_return_val_if_fail (device != NULL, NULL); self = (DVBEPGScanner*) g_object_new (object_type, NULL); - self->priv->DeviceGroup = device; - if (dvb_epg_scanner_CHECK_EIT_INTERVAL == (-1)) { - DVBSettings* _tmp0_ = NULL; + _tmp0_ = device; + self->priv->DeviceGroup = _tmp0_; + _tmp1_ = dvb_epg_scanner_CHECK_EIT_INTERVAL; + if (_tmp1_ == (-1)) { + DVBFactory* _tmp2_; + DVBFactory* _tmp3_; + DVBSettings* _tmp4_ = NULL; + DVBSettings* _tmp5_; DVBSettings* settings; - gint _tmp1_; - _tmp0_ = dvb_factory_get_settings (); - settings = _tmp0_; - _tmp1_ = dvb_settings_get_epg_scan_interval (settings); - dvb_epg_scanner_CHECK_EIT_INTERVAL = _tmp1_; + DVBSettings* _tmp6_; + gint _tmp7_ = 0; + _tmp2_ = dvb_factory_new (); + _tmp3_ = _tmp2_; + _tmp4_ = dvb_factory_get_settings (_tmp3_); + _tmp5_ = _tmp4_; + _g_object_unref0 (_tmp3_); + settings = _tmp5_; + _tmp6_ = settings; + _tmp7_ = dvb_settings_get_epg_scan_interval (_tmp6_); + dvb_epg_scanner_CHECK_EIT_INTERVAL = _tmp7_; _g_object_unref0 (settings); } return self; @@ -320,51 +374,73 @@ * Stop collecting EPG data */ void dvb_epg_scanner_stop (DVBEPGScanner* self) { - guint _tmp0_; + DVBLoggingLogger* _tmp0_; + DVBDeviceGroup* _tmp1_; + guint _tmp2_; + guint _tmp3_; + gint _tmp4_; + gint _tmp5_; + gint _tmp6_; g_return_if_fail (self != NULL); - _tmp0_ = dvb_device_group_get_Id (self->priv->DeviceGroup); - g_debug ("EPGScanner.vala:72: Stopping EPG scan for group %u (%d)", _tmp0_, self->priv->stop_counter); - if (self->priv->stop_counter == 0) { + _tmp0_ = dvb_epg_scanner_log; + _tmp1_ = self->priv->DeviceGroup; + _tmp2_ = dvb_device_group_get_Id (_tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = self->priv->stop_counter; + dvb_logging_logger_debug (_tmp0_, "EPGScanner.vala:75: Stopping EPG scan for group %u (%d)", _tmp3_, _tmp4_); + _tmp5_ = self->priv->stop_counter; + if (_tmp5_ == 0) { dvb_epg_scanner_remove_timeouts (self); dvb_epg_scanner_reset (self); } - self->priv->stop_counter = self->priv->stop_counter + 1; + _tmp6_ = self->priv->stop_counter; + self->priv->stop_counter = _tmp6_ + 1; } static void dvb_epg_scanner_remove_timeouts (DVBEPGScanner* self) { + GSource* _tmp0_; + GSource* _tmp2_; + GMainLoop* _tmp4_; g_return_if_fail (self != NULL); - if (self->priv->scan_source != NULL) { - GSource* _tmp0_; - g_source_destroy (self->priv->scan_source); - _tmp0_ = NULL; + _tmp0_ = self->priv->scan_source; + if (_tmp0_ != NULL) { + GSource* _tmp1_; + _tmp1_ = self->priv->scan_source; + g_source_destroy (_tmp1_); _g_source_unref0 (self->priv->scan_source); - self->priv->scan_source = _tmp0_; + self->priv->scan_source = NULL; } - if (self->priv->queue_source != NULL) { - GSource* _tmp1_; - g_source_destroy (self->priv->queue_source); - _tmp1_ = NULL; + _tmp2_ = self->priv->queue_source; + if (_tmp2_ != NULL) { + GSource* _tmp3_; + _tmp3_ = self->priv->queue_source; + g_source_destroy (_tmp3_); _g_source_unref0 (self->priv->queue_source); - self->priv->queue_source = _tmp1_; + self->priv->queue_source = NULL; } - if (self->priv->loop != NULL) { - GMainLoop* _tmp2_; - g_main_loop_quit (self->priv->loop); - _tmp2_ = NULL; + _tmp4_ = self->priv->loop; + if (_tmp4_ != NULL) { + GMainLoop* _tmp5_; + GThread* _tmp6_; + _tmp5_ = self->priv->loop; + g_main_loop_quit (_tmp5_); _g_main_loop_unref0 (self->priv->loop); - self->priv->loop = _tmp2_; - g_thread_join (self->priv->worker_thread); + self->priv->loop = NULL; + _tmp6_ = self->priv->worker_thread; + g_thread_join (_tmp6_); self->priv->worker_thread = NULL; } } -static gboolean dvb_epg_scanner_worker (DVBEPGScanner* self) { - gboolean result = FALSE; - g_return_val_if_fail (self != NULL, FALSE); - g_main_loop_run (self->priv->loop); - result = TRUE; +static void* dvb_epg_scanner_worker (DVBEPGScanner* self) { + void* result = NULL; + GMainLoop* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->loop; + g_main_loop_run (_tmp0_); + result = NULL; return result; } @@ -375,52 +451,77 @@ static void dvb_epg_scanner_reset (DVBEPGScanner* self) { - DVBChannel* c; + DVBChannel* c = NULL; + GQueue* _tmp14_; + GeeHashMap* _tmp15_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); { + GstElement* _tmp0_; + _tmp0_ = self->priv->pipeline; g_static_rec_mutex_lock (&self->priv->__lock_pipeline); - if (self->priv->pipeline != NULL) { - GSource* _tmp0_ = NULL; - GSource* _tmp1_; - GSource* bus_watch_source; - GstElement* _tmp2_; - _tmp0_ = g_main_context_find_source_by_id (self->priv->context, self->priv->bus_watch_id); - _tmp1_ = _g_source_ref0 (_tmp0_); - bus_watch_source = _tmp1_; - if (bus_watch_source != NULL) { - g_source_destroy (bus_watch_source); - self->priv->bus_watch_id = (guint) 0; + { + GstElement* _tmp1_; + _tmp1_ = self->priv->pipeline; + if (_tmp1_ != NULL) { + GMainContext* _tmp2_; + guint _tmp3_; + GSource* _tmp4_ = NULL; + GSource* _tmp5_; + GSource* bus_watch_source; + GSource* _tmp6_; + GstElement* _tmp8_; + GstElement* _tmp9_; + _tmp2_ = self->priv->context; + _tmp3_ = self->priv->bus_watch_id; + _tmp4_ = g_main_context_find_source_by_id (_tmp2_, _tmp3_); + _tmp5_ = _g_source_ref0 (_tmp4_); + bus_watch_source = _tmp5_; + _tmp6_ = bus_watch_source; + if (_tmp6_ != NULL) { + GSource* _tmp7_; + _tmp7_ = bus_watch_source; + g_source_destroy (_tmp7_); + self->priv->bus_watch_id = (guint) 0; + } + _tmp8_ = self->priv->pipeline; + gst_element_set_state (_tmp8_, GST_STATE_NULL); + _tmp9_ = self->priv->pipeline; + gst_element_get_state (_tmp9_, NULL, NULL, (GstClockTime) (-1)); + _gst_object_unref0 (self->priv->pipeline); + self->priv->pipeline = NULL; + _g_source_unref0 (bus_watch_source); } - gst_element_set_state (self->priv->pipeline, GST_STATE_NULL); - gst_element_get_state (self->priv->pipeline, NULL, NULL, (GstClockTime) (-1)); - _tmp2_ = NULL; - _gst_object_unref0 (self->priv->pipeline); - self->priv->pipeline = _tmp2_; - _g_source_unref0 (bus_watch_source); } __finally60: - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + { + GstElement* _tmp10_; + _tmp10_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return; } } - c = NULL; while (TRUE) { - gpointer _tmp3_ = NULL; - DVBChannel* _tmp4_; - _tmp3_ = g_queue_pop_head (self->priv->channels); - _tmp4_ = (DVBChannel*) _tmp3_; + GQueue* _tmp11_; + gpointer _tmp12_ = NULL; + DVBChannel* _tmp13_; + _tmp11_ = self->priv->channels; + _tmp12_ = g_queue_pop_head (_tmp11_); _g_object_unref0 (c); - c = _tmp4_; - if (!(c != NULL)) { + c = (DVBChannel*) _tmp12_; + _tmp13_ = c; + if (!(_tmp13_ != NULL)) { break; } } - g_queue_clear (self->priv->channels); - gee_abstract_map_clear ((GeeAbstractMap*) self->priv->channel_events); + _tmp14_ = self->priv->channels; + g_queue_clear (_tmp14_); + _tmp15_ = self->priv->channel_events; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_); _g_object_unref0 (c); } @@ -456,41 +557,63 @@ gboolean dvb_epg_scanner_start (DVBEPGScanner* self) { gboolean result = FALSE; - guint _tmp0_; - GMainLoop* _tmp1_ = NULL; - GMainLoop* _tmp2_; - GThread* _tmp3_ = NULL; - GThread* _tmp4_; - DVBDevice* _tmp10_ = NULL; + DVBLoggingLogger* _tmp0_; + DVBDeviceGroup* _tmp1_; + guint _tmp2_; + guint _tmp3_; + gint _tmp4_; + GMainContext* _tmp5_; + GMainLoop* _tmp6_; + gint _tmp12_; + gint _tmp13_; + DVBDeviceGroup* _tmp25_; + DVBDevice* _tmp26_ = NULL; DVBDevice* device; - GSource* _tmp21_ = NULL; - GSource* _tmp22_; + DVBDevice* _tmp27_; + GSource* _tmp51_; + GSource* _tmp52_; + GSource* _tmp53_; + GMainContext* _tmp54_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _tmp0_ = dvb_device_group_get_Id (self->priv->DeviceGroup); - g_debug ("EPGScanner.vala:134: Starting EPG scan for group %u (%d)", _tmp0_, self->priv->stop_counter); - _tmp1_ = g_main_loop_new (self->priv->context, FALSE); - _tmp2_ = _tmp1_; + _tmp0_ = dvb_epg_scanner_log; + _tmp1_ = self->priv->DeviceGroup; + _tmp2_ = dvb_device_group_get_Id (_tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = self->priv->stop_counter; + dvb_logging_logger_debug (_tmp0_, "EPGScanner.vala:137: Starting EPG scan for group %u (%d)", _tmp3_, _tmp4_); + _tmp5_ = self->priv->context; + _tmp6_ = g_main_loop_new (_tmp5_, FALSE); _g_main_loop_unref0 (self->priv->loop); - self->priv->loop = _tmp2_; - _tmp3_ = g_thread_create (_dvb_epg_scanner_worker_gthread_func, self, TRUE, &_inner_error_); - _tmp4_ = _tmp3_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_THREAD_ERROR) { - goto __catch61_g_thread_error; + self->priv->loop = _tmp6_; + { + GThread* _tmp7_ = NULL; + GThread* _tmp8_; + _tmp7_ = g_thread_create (_dvb_epg_scanner_worker_gthread_func, self, TRUE, &_inner_error_); + _tmp8_ = _tmp7_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_THREAD_ERROR) { + goto __catch61_g_thread_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + self->priv->worker_thread = _tmp8_; } - self->priv->worker_thread = _tmp4_; goto __finally61; __catch61_g_thread_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp9_; + GError* _tmp10_; + const gchar* _tmp11_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("EPGScanner.vala:140: Could not create thread: %s", e->message); + _tmp9_ = dvb_epg_scanner_log; + _tmp10_ = e; + _tmp11_ = _tmp10_->message; + dvb_logging_logger_error (_tmp9_, "EPGScanner.vala:143: Could not create thread: %s", _tmp11_); result = FALSE; _g_error_free0 (e); return result; @@ -501,96 +624,150 @@ g_clear_error (&_inner_error_); return FALSE; } - self->priv->stop_counter = self->priv->stop_counter - 1; - if (self->priv->stop_counter > 0) { + _tmp12_ = self->priv->stop_counter; + self->priv->stop_counter = _tmp12_ - 1; + _tmp13_ = self->priv->stop_counter; + if (_tmp13_ > 0) { result = FALSE; return result; } self->priv->stop_counter = 0; { - DVBChannelList* _tmp5_ = NULL; - GeeIterator* _tmp6_ = NULL; + DVBDeviceGroup* _tmp14_; + DVBChannelList* _tmp15_; + DVBChannelList* _tmp16_; + GeeIterator* _tmp17_ = NULL; GeeIterator* _c_it; - _tmp5_ = dvb_device_group_get_Channels (self->priv->DeviceGroup); - _tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_); - _c_it = _tmp6_; + _tmp14_ = self->priv->DeviceGroup; + _tmp15_ = dvb_device_group_get_Channels (_tmp14_); + _tmp16_ = _tmp15_; + _tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_); + _c_it = _tmp17_; while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; + GeeIterator* _tmp18_; + gboolean _tmp19_ = FALSE; + GeeIterator* _tmp20_; + gpointer _tmp21_ = NULL; DVBChannel* c; - DVBChannel* _tmp9_; - _tmp7_ = gee_iterator_next (_c_it); - if (!_tmp7_) { + GQueue* _tmp22_; + DVBChannel* _tmp23_; + DVBChannel* _tmp24_; + _tmp18_ = _c_it; + _tmp19_ = gee_iterator_next (_tmp18_); + if (!_tmp19_) { break; } - _tmp8_ = gee_iterator_get (_c_it); - c = (DVBChannel*) _tmp8_; - _tmp9_ = _g_object_ref0 (c); - g_queue_push_tail (self->priv->channels, _tmp9_); + _tmp20_ = _c_it; + _tmp21_ = gee_iterator_get (_tmp20_); + c = (DVBChannel*) _tmp21_; + _tmp22_ = self->priv->channels; + _tmp23_ = c; + _tmp24_ = _g_object_ref0 (_tmp23_); + g_queue_push_tail (_tmp22_, _tmp24_); _g_object_unref0 (c); } _g_object_unref0 (_c_it); } - _tmp10_ = dvb_device_group_get_next_free_device (self->priv->DeviceGroup); - device = _tmp10_; - if (device == NULL) { + _tmp25_ = self->priv->DeviceGroup; + _tmp26_ = dvb_device_group_get_next_free_device (_tmp25_); + device = _tmp26_; + _tmp27_ = device; + if (_tmp27_ == NULL) { result = FALSE; _g_object_unref0 (device); return result; } { - guint _tmp11_; - guint _tmp12_; - gchar* _tmp13_ = NULL; - gchar* _tmp14_; - GstElement* _tmp15_ = NULL; - GstElement* _tmp16_; - GstElement* _tmp17_; - GstElement* _tmp18_; - GstBus* _tmp19_ = NULL; - GstBus* bus; - guint _tmp20_; + GstElement* _tmp28_; + _tmp28_ = self->priv->pipeline; g_static_rec_mutex_lock (&self->priv->__lock_pipeline); - _tmp11_ = dvb_device_get_Adapter (device); - _tmp12_ = dvb_device_get_Frontend (device); - _tmp13_ = g_strdup_printf (DVB_EPG_SCANNER_PIPELINE_TEMPLATE, _tmp11_, _tmp12_); - _tmp14_ = _tmp13_; - _tmp15_ = gst_parse_launch (_tmp14_, &_inner_error_); - _tmp17_ = (_tmp16_ = _tmp15_, _g_free0 (_tmp14_), _tmp16_); - if (_inner_error_ != NULL) { - goto __catch63_g_error; - } - _tmp18_ = _tmp17_; - _gst_object_unref0 (self->priv->pipeline); - self->priv->pipeline = _tmp18_; - goto __finally63; - __catch63_g_error: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("EPGScanner.vala:160: Could not create pipeline: %s", e->message); - result = FALSE; - _g_error_free0 (e); - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _g_object_unref0 (device); - return result; + GstElement* _tmp45_; + GstBus* _tmp46_ = NULL; + GstBus* bus; + GstBus* _tmp47_; + GMainContext* _tmp48_; + guint _tmp49_ = 0U; + { + DVBDevice* _tmp29_; + guint _tmp30_; + guint _tmp31_; + DVBDevice* _tmp32_; + guint _tmp33_; + guint _tmp34_; + gchar* _tmp35_ = NULL; + gchar* _tmp36_; + GstElement* _tmp37_ = NULL; + GstElement* _tmp38_; + GstElement* _tmp39_; + _tmp29_ = device; + _tmp30_ = dvb_device_get_Adapter (_tmp29_); + _tmp31_ = _tmp30_; + _tmp32_ = device; + _tmp33_ = dvb_device_get_Frontend (_tmp32_); + _tmp34_ = _tmp33_; + _tmp35_ = g_strdup_printf (DVB_EPG_SCANNER_PIPELINE_TEMPLATE, _tmp31_, _tmp34_); + _tmp36_ = _tmp35_; + _tmp37_ = gst_parse_launch (_tmp36_, &_inner_error_); + _tmp38_ = _tmp37_; + _g_free0 (_tmp36_); + _tmp39_ = _tmp38_; + if (_inner_error_ != NULL) { + goto __catch63_g_error; + } + _gst_object_unref0 (self->priv->pipeline); + self->priv->pipeline = _tmp39_; + } + goto __finally63; + __catch63_g_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp40_; + GError* _tmp41_; + const gchar* _tmp42_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp40_ = dvb_epg_scanner_log; + _tmp41_ = e; + _tmp42_ = _tmp41_->message; + dvb_logging_logger_error (_tmp40_, "EPGScanner.vala:163: Could not create pipeline: %s", _tmp42_); + result = FALSE; + _g_error_free0 (e); + { + GstElement* _tmp43_; + _tmp43_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _g_object_unref0 (device); + return result; + } + __finally63: + if (_inner_error_ != NULL) { + { + GstElement* _tmp44_; + _tmp44_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _g_object_unref0 (device); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } + _tmp45_ = self->priv->pipeline; + _tmp46_ = gst_element_get_bus (_tmp45_); + bus = _tmp46_; + _tmp47_ = bus; + _tmp48_ = self->priv->context; + _tmp49_ = gst_bus_add_watch_context (_tmp47_, _dvb_epg_scanner_bus_watch_func_gst_bus_func, self, _tmp48_); + self->priv->bus_watch_id = _tmp49_; + _gst_object_unref0 (bus); } - __finally63: - if (_inner_error_ != NULL) { + __finally62: + { + GstElement* _tmp50_; + _tmp50_ = self->priv->pipeline; g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - _g_object_unref0 (device); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } - _tmp19_ = gst_element_get_bus (self->priv->pipeline); - bus = _tmp19_; - _tmp20_ = gst_bus_add_watch_context (bus, _dvb_epg_scanner_bus_watch_func_gst_bus_func, self, self->priv->context); - self->priv->bus_watch_id = _tmp20_; - _gst_object_unref0 (bus); - __finally62: - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); if (_inner_error_ != NULL) { _g_object_unref0 (device); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -598,12 +775,14 @@ return FALSE; } } - _tmp21_ = g_timeout_source_new_seconds ((guint) DVB_EPG_SCANNER_WAIT_FOR_EIT_DURATION); - _tmp22_ = _tmp21_; + _tmp51_ = g_timeout_source_new_seconds ((guint) DVB_EPG_SCANNER_WAIT_FOR_EIT_DURATION); _g_source_unref0 (self->priv->scan_source); - self->priv->scan_source = _tmp22_; - g_source_set_callback (self->priv->scan_source, _dvb_epg_scanner_scan_new_frequency_gsource_func, g_object_ref (self), g_object_unref); - g_source_attach (self->priv->scan_source, self->priv->context); + self->priv->scan_source = _tmp51_; + _tmp52_ = self->priv->scan_source; + g_source_set_callback (_tmp52_, _dvb_epg_scanner_scan_new_frequency_gsource_func, g_object_ref (self), g_object_unref); + _tmp53_ = self->priv->scan_source; + _tmp54_ = self->priv->context; + g_source_attach (_tmp53_, _tmp54_); result = FALSE; _g_object_unref0 (device); return result; @@ -622,104 +801,194 @@ static gboolean dvb_epg_scanner_scan_new_frequency (DVBEPGScanner* self) { gboolean result = FALSE; - gboolean _tmp12_; - gpointer _tmp16_ = NULL; + GQueue* _tmp35_; + gboolean _tmp36_ = FALSE; + GQueue* _tmp46_; + gpointer _tmp47_ = NULL; DVBChannel* channel; - DVBSchedule* _tmp17_ = NULL; + DVBChannel* _tmp48_; + DVBSchedule* _tmp49_; + DVBSchedule* _tmp50_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->channel_events; g_static_rec_mutex_lock (&self->priv->__lock_channel_events); { - GeeSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _sid_it; - _tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->channel_events); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _sid_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - guint sid; - DVBChannelList* _tmp6_ = NULL; - DVBChannel* _tmp7_ = NULL; - DVBChannel* channel; - gpointer _tmp8_ = NULL; - GeeHashSet* list; - gint _tmp9_; - const gchar* _tmp10_ = NULL; - DVBSchedule* _tmp11_ = NULL; - _tmp4_ = gee_iterator_next (_sid_it); - if (!_tmp4_) { - break; - } - _tmp5_ = gee_iterator_get (_sid_it); - sid = GPOINTER_TO_UINT (_tmp5_); - _tmp6_ = dvb_device_group_get_Channels (self->priv->DeviceGroup); - _tmp7_ = dvb_channel_list_get_channel (_tmp6_, sid); - channel = _tmp7_; - if (channel == NULL) { - g_warning ("EPGScanner.vala:184: Could not find channel %u for this device", sid); + GeeHashMap* _tmp33_; + { + GeeHashMap* _tmp1_; + GeeSet* _tmp2_; + GeeSet* _tmp3_; + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _sid_it; + _tmp1_ = self->priv->channel_events; + _tmp2_ = gee_map_get_keys ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _sid_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + guint sid; + DVBDeviceGroup* _tmp11_; + DVBChannelList* _tmp12_; + DVBChannelList* _tmp13_; + guint _tmp14_; + DVBChannel* _tmp15_ = NULL; + DVBChannel* channel; + DVBChannel* _tmp16_; + GeeHashMap* _tmp18_; + guint _tmp19_; + gpointer _tmp20_ = NULL; + GeeHashSet* list; + DVBLoggingLogger* _tmp21_; + GeeHashSet* _tmp22_; + gint _tmp23_; + gint _tmp24_; + DVBChannel* _tmp25_; + const gchar* _tmp26_; + const gchar* _tmp27_; + guint _tmp28_; + DVBChannel* _tmp29_; + DVBSchedule* _tmp30_; + DVBSchedule* _tmp31_; + GeeHashSet* _tmp32_; + _tmp7_ = _sid_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _sid_it; + _tmp10_ = gee_iterator_get (_tmp9_); + sid = GPOINTER_TO_UINT (_tmp10_); + _tmp11_ = self->priv->DeviceGroup; + _tmp12_ = dvb_device_group_get_Channels (_tmp11_); + _tmp13_ = _tmp12_; + _tmp14_ = sid; + _tmp15_ = dvb_channel_list_get_channel (_tmp13_, _tmp14_); + channel = _tmp15_; + _tmp16_ = channel; + if (_tmp16_ == NULL) { + guint _tmp17_; + _tmp17_ = sid; + g_warning ("EPGScanner.vala:187: Could not find channel %u for this device", _tmp17_); + _g_object_unref0 (channel); + continue; + } + _tmp18_ = self->priv->channel_events; + _tmp19_ = sid; + _tmp20_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp18_, GUINT_TO_POINTER (_tmp19_)); + list = (GeeHashSet*) _tmp20_; + _tmp21_ = dvb_epg_scanner_log; + _tmp22_ = list; + _tmp23_ = gee_collection_get_size ((GeeCollection*) _tmp22_); + _tmp24_ = _tmp23_; + _tmp25_ = channel; + _tmp26_ = dvb_channel_get_Name (_tmp25_); + _tmp27_ = _tmp26_; + _tmp28_ = sid; + dvb_logging_logger_debug (_tmp21_, "EPGScanner.vala:192: Adding %d events of channel %s (%u)", _tmp24_, _tmp27_, _tmp28_); + _tmp29_ = channel; + _tmp30_ = dvb_channel_get_Schedule (_tmp29_); + _tmp31_ = _tmp30_; + _tmp32_ = list; + dvb_schedule_add_all (_tmp31_, (GeeCollection*) _tmp32_); + _g_object_unref0 (list); _g_object_unref0 (channel); - continue; } - _tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid)); - list = (GeeHashSet*) _tmp8_; - _tmp9_ = gee_collection_get_size ((GeeCollection*) list); - _tmp10_ = dvb_channel_get_Name (channel); - g_debug ("EPGScanner.vala:189: Adding %d events of channel %s (%u)", _tmp9_, _tmp10_, sid); - _tmp11_ = dvb_channel_get_Schedule (channel); - dvb_schedule_add_all (_tmp11_, (GeeCollection*) list); - _g_object_unref0 (list); - _g_object_unref0 (channel); + _g_object_unref0 (_sid_it); } - _g_object_unref0 (_sid_it); + _tmp33_ = self->priv->channel_events; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp33_); } - gee_abstract_map_clear ((GeeAbstractMap*) self->priv->channel_events); __finally64: - g_static_rec_mutex_unlock (&self->priv->__lock_channel_events); + { + GeeHashMap* _tmp34_; + _tmp34_ = self->priv->channel_events; + g_static_rec_mutex_unlock (&self->priv->__lock_channel_events); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return FALSE; } } - _tmp12_ = g_queue_is_empty (self->priv->channels); - if (_tmp12_) { - guint _tmp13_; - GSource* _tmp14_ = NULL; - GSource* _tmp15_; - _tmp13_ = dvb_device_group_get_Id (self->priv->DeviceGroup); - g_debug ("EPGScanner.vala:197: Finished EPG scan for group %u", _tmp13_); + _tmp35_ = self->priv->channels; + _tmp36_ = g_queue_is_empty (_tmp35_); + if (_tmp36_) { + DVBLoggingLogger* _tmp37_; + DVBDeviceGroup* _tmp38_; + guint _tmp39_; + guint _tmp40_; + gint _tmp41_; + GSource* _tmp42_; + GSource* _tmp43_; + GSource* _tmp44_; + GMainContext* _tmp45_; + _tmp37_ = dvb_epg_scanner_log; + _tmp38_ = self->priv->DeviceGroup; + _tmp39_ = dvb_device_group_get_Id (_tmp38_); + _tmp40_ = _tmp39_; + dvb_logging_logger_debug (_tmp37_, "EPGScanner.vala:200: Finished EPG scan for group %u", _tmp40_); dvb_epg_scanner_reset (self); - _tmp14_ = g_timeout_source_new_seconds ((guint) dvb_epg_scanner_CHECK_EIT_INTERVAL); - _tmp15_ = _tmp14_; + _tmp41_ = dvb_epg_scanner_CHECK_EIT_INTERVAL; + _tmp42_ = g_timeout_source_new_seconds ((guint) _tmp41_); _g_source_unref0 (self->priv->queue_source); - self->priv->queue_source = _tmp15_; - g_source_set_callback (self->priv->queue_source, _dvb_epg_scanner_start_gsource_func, g_object_ref (self), g_object_unref); - g_source_attach (self->priv->queue_source, self->priv->context); + self->priv->queue_source = _tmp42_; + _tmp43_ = self->priv->queue_source; + g_source_set_callback (_tmp43_, _dvb_epg_scanner_start_gsource_func, g_object_ref (self), g_object_unref); + _tmp44_ = self->priv->queue_source; + _tmp45_ = self->priv->context; + g_source_attach (_tmp44_, _tmp45_); result = FALSE; return result; } - _tmp16_ = g_queue_pop_head (self->priv->channels); - channel = (DVBChannel*) _tmp16_; - _tmp17_ = dvb_channel_get_Schedule (channel); - dvb_schedule_remove_expired_events (_tmp17_); + _tmp46_ = self->priv->channels; + _tmp47_ = g_queue_pop_head (_tmp46_); + channel = (DVBChannel*) _tmp47_; + _tmp48_ = channel; + _tmp49_ = dvb_channel_get_Schedule (_tmp48_); + _tmp50_ = _tmp49_; + dvb_schedule_remove_expired_events (_tmp50_); { - GstElement* _tmp18_ = NULL; - GstElement* dvbsrc; + GstElement* _tmp51_; + _tmp51_ = self->priv->pipeline; g_static_rec_mutex_lock (&self->priv->__lock_pipeline); - gst_element_set_state (self->priv->pipeline, GST_STATE_READY); - _tmp18_ = gst_bin_get_by_name (GST_BIN (self->priv->pipeline), "dvbsrc"); - dvbsrc = _tmp18_; - dvb_channel_setup_dvb_source (channel, dvbsrc); - gst_element_set_state (self->priv->pipeline, GST_STATE_PLAYING); - _gst_object_unref0 (dvbsrc); + { + GstElement* _tmp52_; + GstElement* _tmp53_; + GstElement* _tmp54_ = NULL; + GstElement* dvbsrc; + DVBChannel* _tmp55_; + GstElement* _tmp56_; + GstElement* _tmp57_; + _tmp52_ = self->priv->pipeline; + gst_element_set_state (_tmp52_, GST_STATE_READY); + _tmp53_ = self->priv->pipeline; + _tmp54_ = gst_bin_get_by_name (GST_BIN (_tmp53_), "dvbsrc"); + dvbsrc = _tmp54_; + _tmp55_ = channel; + _tmp56_ = dvbsrc; + dvb_channel_setup_dvb_source (_tmp55_, _tmp56_); + _tmp57_ = self->priv->pipeline; + gst_element_set_state (_tmp57_, GST_STATE_PLAYING); + _gst_object_unref0 (dvbsrc); + } __finally65: - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + { + GstElement* _tmp58_; + _tmp58_ = self->priv->pipeline; + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } if (_inner_error_ != NULL) { _g_object_unref0 (channel); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -740,28 +1009,42 @@ static gboolean dvb_epg_scanner_bus_watch_func (DVBEPGScanner* self, GstBus* bus, GstMessage* message) { gboolean result = FALSE; + GstMessage* _tmp0_; + GstMessageType _tmp1_; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (bus != NULL, FALSE); g_return_val_if_fail (message != NULL, FALSE); - switch (message->type) { + _tmp0_ = message; + _tmp1_ = _tmp0_->type; + switch (_tmp1_) { case GST_MESSAGE_ELEMENT: { - const GstStructure* _tmp0_ = NULL; - GstStructure* _tmp1_; + GstMessage* _tmp2_; + const GstStructure* _tmp3_ = NULL; + GstStructure* _tmp4_; GstStructure* structure; - const gchar* _tmp2_ = NULL; - _tmp0_ = gst_message_get_structure (message); - _tmp1_ = _gst_structure_copy0 (_tmp0_); - structure = _tmp1_; - _tmp2_ = gst_structure_get_name (structure); - if (g_strcmp0 (_tmp2_, "dvb-read-failure") == 0) { - g_critical ("EPGScanner.vala:229: Could not read from DVB device"); + const GstStructure* _tmp5_; + const gchar* _tmp6_ = NULL; + _tmp2_ = message; + _tmp3_ = gst_message_get_structure (_tmp2_); + _tmp4_ = _gst_structure_copy0 (_tmp3_); + structure = _tmp4_; + _tmp5_ = structure; + _tmp6_ = gst_structure_get_name (_tmp5_); + if (g_strcmp0 (_tmp6_, "dvb-read-failure") == 0) { + DVBLoggingLogger* _tmp7_; + _tmp7_ = dvb_epg_scanner_log; + dvb_logging_logger_error (_tmp7_, "EPGScanner.vala:232: Could not read from DVB device"); dvb_epg_scanner_stop (self); } else { - const gchar* _tmp3_ = NULL; - _tmp3_ = gst_structure_get_name (structure); - if (g_strcmp0 (_tmp3_, "eit") == 0) { - dvb_epg_scanner_on_eit_structure (self, structure); + const GstStructure* _tmp8_; + const gchar* _tmp9_ = NULL; + _tmp8_ = structure; + _tmp9_ = gst_structure_get_name (_tmp8_); + if (g_strcmp0 (_tmp9_, "eit") == 0) { + const GstStructure* _tmp10_; + _tmp10_ = structure; + dvb_epg_scanner_on_eit_structure (self, _tmp10_); } } _gst_structure_free0 (structure); @@ -769,18 +1052,26 @@ } case GST_MESSAGE_ERROR: { - GError* gerror; - gchar* debug; - GError* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; - gerror = NULL; - debug = NULL; - gst_message_parse_error (message, &_tmp4_, &_tmp5_); + GError* gerror = NULL; + gchar* debug = NULL; + GstMessage* _tmp11_; + GError* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + DVBLoggingLogger* _tmp14_; + GError* _tmp15_; + const gchar* _tmp16_; + const gchar* _tmp17_; + _tmp11_ = message; + gst_message_parse_error (_tmp11_, &_tmp12_, &_tmp13_); _g_error_free0 (gerror); - gerror = _tmp4_; + gerror = _tmp12_; _g_free0 (debug); - debug = _tmp5_; - g_critical ("EPGScanner.vala:240: %s %s", gerror->message, debug); + debug = _tmp13_; + _tmp14_ = dvb_epg_scanner_log; + _tmp15_ = gerror; + _tmp16_ = _tmp15_->message; + _tmp17_ = debug; + dvb_logging_logger_error (_tmp14_, "EPGScanner.vala:243: %s %s", _tmp16_, _tmp17_); dvb_epg_scanner_stop (self); result = FALSE; _g_free0 (debug); @@ -812,186 +1103,297 @@ void dvb_epg_scanner_on_eit_structure (DVBEPGScanner* self, const GstStructure* structure) { - GValue* _tmp0_ = NULL; + const GstStructure* _tmp0_; + GValue* _tmp1_ = NULL; GValue events; - GType _tmp1_; - gboolean _tmp2_; - guint _tmp3_; + GType _tmp2_ = 0UL; + gboolean _tmp3_ = FALSE; + guint _tmp4_ = 0U; guint size; GValue val = {0}; - const GstStructure* event; + const GstStructure* event = NULL; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - _tmp0_ = gst_structure_get_value (structure, "events"); - events = *_tmp0_; - _tmp1_ = gst_value_list_get_type (); - _tmp2_ = G_VALUE_HOLDS (&events, _tmp1_); - if (!_tmp2_) { + _tmp0_ = structure; + _tmp1_ = gst_structure_get_value (_tmp0_, "events"); + events = *_tmp1_; + _tmp2_ = gst_value_list_get_type (); + _tmp3_ = G_VALUE_HOLDS (&events, _tmp2_); + if (!_tmp3_) { return; } - _tmp3_ = gst_value_list_get_size (&events); - size = _tmp3_; - event = NULL; + _tmp4_ = gst_value_list_get_size (&events); + size = _tmp4_; { + GeeHashMap* _tmp5_; + _tmp5_ = self->priv->channel_events; g_static_rec_mutex_lock (&self->priv->__lock_channel_events); { - guint i; - i = (guint) 0; + const GstStructure* _tmp6_; + guint _tmp7_ = 0U; + guint sid; + GeeHashMap* _tmp8_; + guint _tmp9_; + gboolean _tmp10_ = FALSE; + GeeHashMap* _tmp15_; + guint _tmp16_; + gpointer _tmp17_ = NULL; + GeeHashSet* list; + _tmp6_ = structure; + _tmp7_ = dvb_epg_scanner_get_uint_val (_tmp6_, "service-id"); + sid = _tmp7_; + _tmp8_ = self->priv->channel_events; + _tmp9_ = sid; + _tmp10_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp8_, GUINT_TO_POINTER (_tmp9_)); + if (!_tmp10_) { + GeeHashMap* _tmp11_; + guint _tmp12_; + GeeHashSet* _tmp13_; + GeeHashSet* _tmp14_; + _tmp11_ = self->priv->channel_events; + _tmp12_ = sid; + _tmp13_ = gee_hash_set_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, _dvb_event_hash_ghash_func, _dvb_event_equal_gequal_func); + _tmp14_ = _tmp13_; + gee_abstract_map_set ((GeeAbstractMap*) _tmp11_, GUINT_TO_POINTER (_tmp12_), _tmp14_); + _g_object_unref0 (_tmp14_); + } + _tmp15_ = self->priv->channel_events; + _tmp16_ = sid; + _tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp15_, GUINT_TO_POINTER (_tmp16_)); + list = (GeeHashSet*) _tmp17_; { - gboolean _tmp4_; - _tmp4_ = TRUE; - while (TRUE) { - GValue* _tmp5_ = NULL; - const GstStructure* _tmp6_ = NULL; - DVBEvent* _tmp7_ = NULL; - DVBEvent* event_class; - guint _tmp8_; - guint _tmp9_; - guint _tmp10_; - guint _tmp11_; - guint _tmp12_; - guint _tmp13_; - guint _tmp14_; - guint _tmp15_; - gboolean _tmp16_; - guint _tmp17_; - const gchar* _tmp18_ = NULL; - gchar* _tmp19_; - gchar* name; - gboolean _tmp20_ = FALSE; - const gchar* _tmp24_ = NULL; - gchar* _tmp25_; - gchar* desc; - gboolean _tmp26_ = FALSE; - const gchar* _tmp30_ = NULL; - gchar* _tmp31_; - gchar* ext_desc; - gboolean _tmp32_ = FALSE; - gboolean free_ca = FALSE; - gboolean _tmp36_; - guint _tmp37_; - guint sid; - gboolean _tmp38_; - gpointer _tmp41_ = NULL; - GeeHashSet* list; - if (!_tmp4_) { - i++; - } - _tmp4_ = FALSE; - if (!(i < size)) { - break; - } - _tmp5_ = gst_value_list_get_value (&events, i); - val = *_tmp5_; - _tmp6_ = gst_value_get_structure (&val); - event = _tmp6_; - _tmp7_ = dvb_event_new (); - event_class = _tmp7_; - _tmp8_ = dvb_epg_scanner_get_uint_val (event, "event-id"); - event_class->id = _tmp8_; - _tmp9_ = dvb_epg_scanner_get_uint_val (event, "year"); - event_class->year = _tmp9_; - _tmp10_ = dvb_epg_scanner_get_uint_val (event, "month"); - event_class->month = _tmp10_; - _tmp11_ = dvb_epg_scanner_get_uint_val (event, "day"); - event_class->day = _tmp11_; - _tmp12_ = dvb_epg_scanner_get_uint_val (event, "hour"); - event_class->hour = _tmp12_; - _tmp13_ = dvb_epg_scanner_get_uint_val (event, "minute"); - event_class->minute = _tmp13_; - _tmp14_ = dvb_epg_scanner_get_uint_val (event, "second"); - event_class->second = _tmp14_; - _tmp15_ = dvb_epg_scanner_get_uint_val (event, "duration"); - event_class->duration = _tmp15_; - _tmp16_ = dvb_event_has_expired (event_class); - if (_tmp16_) { + guint i; + i = (guint) 0; + { + gboolean _tmp18_; + _tmp18_ = TRUE; + while (TRUE) { + gboolean _tmp19_; + guint _tmp21_; + guint _tmp22_; + guint _tmp23_; + GValue* _tmp24_ = NULL; + const GstStructure* _tmp25_ = NULL; + DVBEvent* _tmp26_; + DVBEvent* event_class; + DVBEvent* _tmp27_; + const GstStructure* _tmp28_; + guint _tmp29_ = 0U; + DVBEvent* _tmp30_; + const GstStructure* _tmp31_; + guint _tmp32_ = 0U; + DVBEvent* _tmp33_; + const GstStructure* _tmp34_; + guint _tmp35_ = 0U; + DVBEvent* _tmp36_; + const GstStructure* _tmp37_; + guint _tmp38_ = 0U; + DVBEvent* _tmp39_; + const GstStructure* _tmp40_; + guint _tmp41_ = 0U; + DVBEvent* _tmp42_; + const GstStructure* _tmp43_; + guint _tmp44_ = 0U; + DVBEvent* _tmp45_; + const GstStructure* _tmp46_; + guint _tmp47_ = 0U; + DVBEvent* _tmp48_; + const GstStructure* _tmp49_; + guint _tmp50_ = 0U; + DVBEvent* _tmp51_; + gboolean _tmp52_ = FALSE; + DVBEvent* _tmp53_; + const GstStructure* _tmp54_; + guint _tmp55_ = 0U; + const GstStructure* _tmp56_; + const gchar* _tmp57_ = NULL; + gchar* _tmp58_; + gchar* name; + gboolean _tmp59_ = FALSE; + const gchar* _tmp60_; + gboolean _tmp63_; + const GstStructure* _tmp67_; + const gchar* _tmp68_ = NULL; + gchar* _tmp69_; + gchar* desc; + gboolean _tmp70_ = FALSE; + const gchar* _tmp71_; + gboolean _tmp74_; + const GstStructure* _tmp78_; + const gchar* _tmp79_ = NULL; + gchar* _tmp80_; + gchar* ext_desc; + gboolean _tmp81_ = FALSE; + const gchar* _tmp82_; + gboolean _tmp85_; + gboolean free_ca = FALSE; + const GstStructure* _tmp89_; + gboolean _tmp90_ = FALSE; + DVBEvent* _tmp91_; + gboolean _tmp92_; + GeeHashSet* _tmp93_; + DVBEvent* _tmp94_; + _tmp19_ = _tmp18_; + if (!_tmp19_) { + guint _tmp20_; + _tmp20_ = i; + i = _tmp20_ + 1; + } + _tmp18_ = FALSE; + _tmp21_ = i; + _tmp22_ = size; + if (!(_tmp21_ < _tmp22_)) { + break; + } + _tmp23_ = i; + _tmp24_ = gst_value_list_get_value (&events, _tmp23_); + val = *_tmp24_; + _tmp25_ = gst_value_get_structure (&val); + event = _tmp25_; + _tmp26_ = dvb_event_new (); + event_class = _tmp26_; + _tmp27_ = event_class; + _tmp28_ = event; + _tmp29_ = dvb_epg_scanner_get_uint_val (_tmp28_, "event-id"); + _tmp27_->id = _tmp29_; + _tmp30_ = event_class; + _tmp31_ = event; + _tmp32_ = dvb_epg_scanner_get_uint_val (_tmp31_, "year"); + _tmp30_->year = _tmp32_; + _tmp33_ = event_class; + _tmp34_ = event; + _tmp35_ = dvb_epg_scanner_get_uint_val (_tmp34_, "month"); + _tmp33_->month = _tmp35_; + _tmp36_ = event_class; + _tmp37_ = event; + _tmp38_ = dvb_epg_scanner_get_uint_val (_tmp37_, "day"); + _tmp36_->day = _tmp38_; + _tmp39_ = event_class; + _tmp40_ = event; + _tmp41_ = dvb_epg_scanner_get_uint_val (_tmp40_, "hour"); + _tmp39_->hour = _tmp41_; + _tmp42_ = event_class; + _tmp43_ = event; + _tmp44_ = dvb_epg_scanner_get_uint_val (_tmp43_, "minute"); + _tmp42_->minute = _tmp44_; + _tmp45_ = event_class; + _tmp46_ = event; + _tmp47_ = dvb_epg_scanner_get_uint_val (_tmp46_, "second"); + _tmp45_->second = _tmp47_; + _tmp48_ = event_class; + _tmp49_ = event; + _tmp50_ = dvb_epg_scanner_get_uint_val (_tmp49_, "duration"); + _tmp48_->duration = _tmp50_; + _tmp51_ = event_class; + _tmp52_ = dvb_event_has_expired (_tmp51_); + if (_tmp52_) { + _dvb_event_unref0 (event_class); + continue; + } + _tmp53_ = event_class; + _tmp54_ = event; + _tmp55_ = dvb_epg_scanner_get_uint_val (_tmp54_, "running-status"); + _tmp53_->running_status = _tmp55_; + _tmp56_ = event; + _tmp57_ = gst_structure_get_string (_tmp56_, "name"); + _tmp58_ = g_strdup (_tmp57_); + name = _tmp58_; + _tmp60_ = name; + if (_tmp60_ != NULL) { + const gchar* _tmp61_; + gboolean _tmp62_ = FALSE; + _tmp61_ = name; + _tmp62_ = g_utf8_validate (_tmp61_, (gssize) (-1), NULL); + _tmp59_ = _tmp62_; + } else { + _tmp59_ = FALSE; + } + _tmp63_ = _tmp59_; + if (_tmp63_) { + DVBEvent* _tmp64_; + const gchar* _tmp65_; + gchar* _tmp66_; + _tmp64_ = event_class; + _tmp65_ = name; + _tmp66_ = g_strdup (_tmp65_); + _g_free0 (_tmp64_->name); + _tmp64_->name = _tmp66_; + } + _tmp67_ = event; + _tmp68_ = gst_structure_get_string (_tmp67_, "description"); + _tmp69_ = g_strdup (_tmp68_); + desc = _tmp69_; + _tmp71_ = desc; + if (_tmp71_ != NULL) { + const gchar* _tmp72_; + gboolean _tmp73_ = FALSE; + _tmp72_ = desc; + _tmp73_ = g_utf8_validate (_tmp72_, (gssize) (-1), NULL); + _tmp70_ = _tmp73_; + } else { + _tmp70_ = FALSE; + } + _tmp74_ = _tmp70_; + if (_tmp74_) { + DVBEvent* _tmp75_; + const gchar* _tmp76_; + gchar* _tmp77_; + _tmp75_ = event_class; + _tmp76_ = desc; + _tmp77_ = g_strdup (_tmp76_); + _g_free0 (_tmp75_->description); + _tmp75_->description = _tmp77_; + } + _tmp78_ = event; + _tmp79_ = gst_structure_get_string (_tmp78_, "extended-text"); + _tmp80_ = g_strdup (_tmp79_); + ext_desc = _tmp80_; + _tmp82_ = ext_desc; + if (_tmp82_ != NULL) { + const gchar* _tmp83_; + gboolean _tmp84_ = FALSE; + _tmp83_ = ext_desc; + _tmp84_ = g_utf8_validate (_tmp83_, (gssize) (-1), NULL); + _tmp81_ = _tmp84_; + } else { + _tmp81_ = FALSE; + } + _tmp85_ = _tmp81_; + if (_tmp85_) { + DVBEvent* _tmp86_; + const gchar* _tmp87_; + gchar* _tmp88_; + _tmp86_ = event_class; + _tmp87_ = ext_desc; + _tmp88_ = g_strdup (_tmp87_); + _g_free0 (_tmp86_->extended_description); + _tmp86_->extended_description = _tmp88_; + } + _tmp89_ = event; + gst_structure_get_boolean (_tmp89_, "free-ca-mode", &_tmp90_); + free_ca = _tmp90_; + _tmp91_ = event_class; + _tmp92_ = free_ca; + _tmp91_->free_ca_mode = _tmp92_; + _tmp93_ = list; + _tmp94_ = event_class; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp93_, _tmp94_); + _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); _dvb_event_unref0 (event_class); - continue; - } - _tmp17_ = dvb_epg_scanner_get_uint_val (event, "running-status"); - event_class->running_status = _tmp17_; - _tmp18_ = gst_structure_get_string (event, "name"); - _tmp19_ = g_strdup (_tmp18_); - name = _tmp19_; - if (name != NULL) { - gboolean _tmp21_; - _tmp21_ = g_utf8_validate (name, (gssize) (-1), NULL); - _tmp20_ = _tmp21_; - } else { - _tmp20_ = FALSE; - } - if (_tmp20_) { - gchar* _tmp22_; - gchar* _tmp23_; - _tmp22_ = g_strdup (name); - _tmp23_ = _tmp22_; - _g_free0 (event_class->name); - event_class->name = _tmp23_; - } - _tmp24_ = gst_structure_get_string (event, "description"); - _tmp25_ = g_strdup (_tmp24_); - desc = _tmp25_; - if (desc != NULL) { - gboolean _tmp27_; - _tmp27_ = g_utf8_validate (desc, (gssize) (-1), NULL); - _tmp26_ = _tmp27_; - } else { - _tmp26_ = FALSE; - } - if (_tmp26_) { - gchar* _tmp28_; - gchar* _tmp29_; - _tmp28_ = g_strdup (desc); - _tmp29_ = _tmp28_; - _g_free0 (event_class->description); - event_class->description = _tmp29_; - } - _tmp30_ = gst_structure_get_string (event, "extended-text"); - _tmp31_ = g_strdup (_tmp30_); - ext_desc = _tmp31_; - if (ext_desc != NULL) { - gboolean _tmp33_; - _tmp33_ = g_utf8_validate (ext_desc, (gssize) (-1), NULL); - _tmp32_ = _tmp33_; - } else { - _tmp32_ = FALSE; } - if (_tmp32_) { - gchar* _tmp34_; - gchar* _tmp35_; - _tmp34_ = g_strdup (ext_desc); - _tmp35_ = _tmp34_; - _g_free0 (event_class->extended_description); - event_class->extended_description = _tmp35_; - } - gst_structure_get_boolean (event, "free-ca-mode", &_tmp36_); - free_ca = _tmp36_; - event_class->free_ca_mode = free_ca; - _tmp37_ = dvb_epg_scanner_get_uint_val (structure, "service-id"); - sid = _tmp37_; - _tmp38_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid)); - if (!_tmp38_) { - GeeHashSet* _tmp39_ = NULL; - GeeHashSet* _tmp40_; - _tmp39_ = gee_hash_set_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, _dvb_event_hash_ghash_func, _dvb_event_equal_gequal_func); - _tmp40_ = _tmp39_; - gee_abstract_map_set ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid), _tmp40_); - _g_object_unref0 (_tmp40_); - } - _tmp41_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid)); - list = (GeeHashSet*) _tmp41_; - gee_abstract_collection_add ((GeeAbstractCollection*) list, event_class); - _g_object_unref0 (list); - _g_free0 (ext_desc); - _g_free0 (desc); - _g_free0 (name); - _dvb_event_unref0 (event_class); } } + _g_object_unref0 (list); } __finally66: - g_static_rec_mutex_unlock (&self->priv->__lock_channel_events); + { + GeeHashMap* _tmp95_; + _tmp95_ = self->priv->channel_events; + g_static_rec_mutex_unlock (&self->priv->__lock_channel_events); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1004,11 +1406,15 @@ static guint dvb_epg_scanner_get_uint_val (const GstStructure* structure, const gchar* name) { guint result = 0U; guint val = 0U; - guint _tmp0_; + const GstStructure* _tmp0_; + const gchar* _tmp1_; + guint _tmp2_ = 0U; g_return_val_if_fail (structure != NULL, 0U); g_return_val_if_fail (name != NULL, 0U); - gst_structure_get_uint (structure, name, &_tmp0_); - val = _tmp0_; + _tmp0_ = structure; + _tmp1_ = name; + gst_structure_get_uint (_tmp0_, _tmp1_, &_tmp2_); + val = _tmp2_; result = val; return result; } @@ -1018,37 +1424,36 @@ GObject * obj; GObjectClass * parent_class; DVBEPGScanner * self; - GQueue* _tmp0_ = NULL; - GQueue* _tmp1_; - GMainContext* _tmp2_ = NULL; - GMainContext* _tmp3_; - GeeHashMap* _tmp4_ = NULL; - GeeHashMap* _tmp5_; + GQueue* _tmp0_; + GMainContext* _tmp1_; + GeeHashMap* _tmp2_; parent_class = G_OBJECT_CLASS (dvb_epg_scanner_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_EPG_SCANNER (obj); _tmp0_ = g_queue_new (); - _tmp1_ = _tmp0_; _g_queue_free0 (self->priv->channels); - self->priv->channels = _tmp1_; + self->priv->channels = _tmp0_; self->priv->stop_counter = 0; - _tmp2_ = g_main_context_new (); - _tmp3_ = _tmp2_; + _tmp1_ = g_main_context_new (); _g_main_context_unref0 (self->priv->context); - self->priv->context = _tmp3_; - _tmp4_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, GEE_TYPE_HASH_SET, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp5_ = _tmp4_; + self->priv->context = _tmp1_; + _tmp2_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, GEE_TYPE_HASH_SET, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); _g_object_unref0 (self->priv->channel_events); - self->priv->channel_events = _tmp5_; + self->priv->channel_events = _tmp2_; return obj; } static void dvb_epg_scanner_class_init (DVBEPGScannerClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_epg_scanner_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBEPGScannerPrivate)); G_OBJECT_CLASS (klass)->constructor = dvb_epg_scanner_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_epg_scanner_finalize; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_epg_scanner_log = _tmp1_; dvb_epg_scanner_CHECK_EIT_INTERVAL = -1; } diff -Nru gnome-dvb-daemon-0.1.23/src/EPGScanner.vala gnome-dvb-daemon-0.2.7/src/EPGScanner.vala --- gnome-dvb-daemon-0.1.23/src/EPGScanner.vala 2011-01-14 16:50:21.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/EPGScanner.vala 2011-11-23 18:39:07.000000000 +0000 @@ -19,10 +19,13 @@ using GLib; using Gee; +using DVB.Logging; namespace DVB { public class EPGScanner : GLib.Object { + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); // how long to wait after all channels have been scanned // before the next iteration is started @@ -42,7 +45,7 @@ private int stop_counter; private MainContext context; private MainLoop loop; - private unowned Thread worker_thread; + private unowned Thread worker_thread; private uint bus_watch_id; private HashMap> channel_events; @@ -60,7 +63,7 @@ this.DeviceGroup = device; // check if interval is unset if (CHECK_EIT_INTERVAL == -1) { - Settings settings = Factory.get_settings (); + Settings settings = new Factory().get_settings (); CHECK_EIT_INTERVAL = settings.get_epg_scan_interval (); } } @@ -69,7 +72,7 @@ * Stop collecting EPG data */ public void stop () { - debug ("Stopping EPG scan for group %u (%d)", this.DeviceGroup.Id, this.stop_counter); + log.debug ("Stopping EPG scan for group %u (%d)", this.DeviceGroup.Id, this.stop_counter); if (this.stop_counter == 0) { this.remove_timeouts (); @@ -97,10 +100,10 @@ } /* Main Thread */ - private bool worker () { + private void* worker () { this.loop.run (); - return true; + return null; } private void reset () { @@ -131,13 +134,13 @@ * Start collection EPG data for all channels */ public bool start () { - debug ("Starting EPG scan for group %u (%d)", this.DeviceGroup.Id, this.stop_counter); + log.debug ("Starting EPG scan for group %u (%d)", this.DeviceGroup.Id, this.stop_counter); this.loop = new MainLoop (this.context, false); try { - this.worker_thread = Thread.create (this.worker, true); + this.worker_thread = Thread.create (this.worker, true); } catch (ThreadError e) { - critical ("Could not create thread: %s", e.message); + log.error ("Could not create thread: %s", e.message); return false; } @@ -157,7 +160,7 @@ this.pipeline = Gst.parse_launch (PIPELINE_TEMPLATE.printf ( device.Adapter, device.Frontend)); } catch (Error e) { - critical ("Could not create pipeline: %s", e.message); + log.error ("Could not create pipeline: %s", e.message); return false; } @@ -186,7 +189,7 @@ } HashSet list = this.channel_events.get (sid); - debug ("Adding %d events of channel %s (%u)", + log.debug ("Adding %d events of channel %s (%u)", list.size, channel.Name, sid); channel.Schedule.add_all (list); } @@ -194,7 +197,7 @@ } if (this.channels.is_empty ()) { - debug ("Finished EPG scan for group %u", this.DeviceGroup.Id); + log.debug ("Finished EPG scan for group %u", this.DeviceGroup.Id); this.reset (); // Time the next iteration @@ -207,7 +210,7 @@ Channel channel = this.channels.pop_head (); channel.Schedule.remove_expired_events (); /* - debug ("Scanning channel %s (%u left)", + log.debug ("Scanning channel %s (%u left)", channel.Name, this.channels.get_length ()); */ lock (this.pipeline) { @@ -226,7 +229,7 @@ case Gst.MessageType.ELEMENT: Gst.Structure structure = message.get_structure (); if (structure.get_name() == "dvb-read-failure") { - critical ("Could not read from DVB device"); + log.error ("Could not read from DVB device"); this.stop (); } else if (structure.get_name() == "eit") { this.on_eit_structure (structure); @@ -237,7 +240,7 @@ Error gerror; string debug; message.parse_error (out gerror, out debug); - critical ("%s %s", gerror.message, debug); + log.error ("%s %s", gerror.message, debug); this.stop (); return false; @@ -258,6 +261,13 @@ weak Gst.Structure event; // Iterate over events lock (this.channel_events) { + uint sid = get_uint_val (structure, "service-id"); + if (!this.channel_events.has_key (sid)) { + this.channel_events.set (sid, + new HashSet (Event.hash, Event.equal)); + } + HashSet list = this.channel_events.get (sid); + for (uint i=0; i (Event.hash, Event.equal)); - } - HashSet list = this.channel_events.get (sid); - list.add (event_class); } } diff -Nru gnome-dvb-daemon-0.1.23/src/Event.c gnome-dvb-daemon-0.2.7/src/Event.c --- gnome-dvb-daemon-0.1.23/src/Event.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Event.c 2011-09-22 12:34:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* Event.c generated by valac 0.11.3, the Vala compiler +/* Event.c generated by valac 0.14.0, the Vala compiler * generated from Event.vala, do not modify */ /* @@ -283,19 +283,13 @@ DVBEvent* dvb_event_construct (GType object_type) { DVBEvent* self = NULL; - GSList* _tmp0_; - GSList* _tmp1_; - GSList* _tmp2_; self = (DVBEvent*) g_type_create_instance (object_type); - _tmp0_ = NULL; __g_slist_free__dvb_event_audio_component_unref0_0 (self->audio_components); - self->audio_components = _tmp0_; - _tmp1_ = NULL; + self->audio_components = NULL; __g_slist_free__dvb_event_video_component_unref0_0 (self->video_components); - self->video_components = _tmp1_; - _tmp2_ = NULL; + self->video_components = NULL; __g_slist_free__dvb_event_teletext_component_unref0_0 (self->teletext_components); - self->teletext_components = _tmp2_; + self->teletext_components = NULL; self->year = (guint) 0; self->month = (guint) 0; self->hour = (guint) 0; @@ -330,21 +324,20 @@ gboolean result = FALSE; time_t _tmp0_; struct tm _tmp1_ = {0}; - struct tm _tmp2_ = {0}; struct tm current_utc; - time_t _tmp3_; + time_t _tmp2_ = 0; time_t current_time; - time_t _tmp4_; + time_t _tmp3_ = 0; time_t end_timestamp; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = time (NULL); - _tmp2_ = (g_time_gm (_tmp0_, &_tmp1_), _tmp1_); - current_utc = _tmp2_; + g_time_gm (_tmp0_, &_tmp1_); + current_utc = _tmp1_; current_utc.tm_isdst = -1; - _tmp3_ = mktime (¤t_utc); - current_time = _tmp3_; - _tmp4_ = dvb_event_get_end_timestamp (self); - end_timestamp = _tmp4_; + _tmp2_ = mktime (¤t_utc); + current_time = _tmp2_; + _tmp3_ = dvb_event_get_end_timestamp (self); + end_timestamp = _tmp3_; result = end_timestamp < current_time; return result; } @@ -354,29 +347,35 @@ gboolean result = FALSE; time_t _tmp0_; struct tm _tmp1_ = {0}; - struct tm _tmp2_ = {0}; struct tm time_now; - struct tm _tmp3_ = {0}; - struct tm _tmp4_ = {0}; + struct tm _tmp2_ = {0}; struct tm time_start; - time_t _tmp5_; + struct tm _tmp3_; + time_t _tmp4_ = 0; time_t timestamp_now; - time_t _tmp6_; + struct tm _tmp5_; + time_t _tmp6_ = 0; time_t timestamp_start; + time_t _tmp7_; + time_t _tmp8_; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = time (NULL); - _tmp2_ = (g_time_gm (_tmp0_, &_tmp1_), _tmp1_); - time_now = _tmp2_; - _tmp4_ = (dvb_event_get_utc_start_time (self, &_tmp3_), _tmp3_); - time_start = _tmp4_; - _tmp5_ = timegm (&time_now); - timestamp_now = _tmp5_; - _tmp6_ = timegm (&time_start); + g_time_gm (_tmp0_, &_tmp1_); + time_now = _tmp1_; + dvb_event_get_utc_start_time (self, &_tmp2_); + time_start = _tmp2_; + _tmp3_ = time_now; + _tmp4_ = timegm (&_tmp3_); + timestamp_now = _tmp4_; + _tmp5_ = time_start; + _tmp6_ = timegm (&_tmp5_); timestamp_start = _tmp6_; - if ((timestamp_now - timestamp_start) >= 0) { - gboolean _tmp7_; - _tmp7_ = dvb_event_has_expired (self); - result = !_tmp7_; + _tmp7_ = timestamp_now; + _tmp8_ = timestamp_start; + if ((_tmp7_ - _tmp8_) >= ((time_t) 0)) { + gboolean _tmp9_ = FALSE; + _tmp9_ = dvb_event_has_expired (self); + result = !_tmp9_; return result; } else { result = FALSE; @@ -387,45 +386,86 @@ gchar* dvb_event_to_string (DVBEvent* self) { gchar* result = NULL; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - gchar* _tmp2_ = NULL; - gchar* _tmp3_; - gchar* _tmp4_; + guint _tmp0_; + guint _tmp1_; + guint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_; + guint _tmp6_; + gchar* _tmp7_ = NULL; + gchar* _tmp8_; + guint _tmp9_; + const gchar* _tmp10_; + const gchar* _tmp11_; + gchar* _tmp12_ = NULL; + gchar* _tmp13_; + gchar* _tmp14_; + gchar* _tmp15_; gchar* text; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = g_strdup_printf ("ID: %u\nDate: %04u-%02u-%02u %02u:%02u:%02u\n", self->id, self->year, self->month, self->day, self->hour, self->minute, self->second); - _tmp1_ = _tmp0_; - _tmp2_ = g_strdup_printf ("Duration: %u\nName: %s\nDescription: %s\n", self->duration, self->name, self->description); - _tmp3_ = _tmp2_; - text = (_tmp4_ = g_strconcat (_tmp1_, _tmp3_, NULL), _g_free0 (_tmp3_), _g_free0 (_tmp1_), _tmp4_); + _tmp0_ = self->id; + _tmp1_ = self->year; + _tmp2_ = self->month; + _tmp3_ = self->day; + _tmp4_ = self->hour; + _tmp5_ = self->minute; + _tmp6_ = self->second; + _tmp7_ = g_strdup_printf ("ID: %u\nDate: %04u-%02u-%02u %02u:%02u:%02u\n", _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = self->duration; + _tmp10_ = self->name; + _tmp11_ = self->description; + _tmp12_ = g_strdup_printf ("Duration: %u\nName: %s\nDescription: %s\n", _tmp9_, _tmp10_, _tmp11_); + _tmp13_ = _tmp12_; + _tmp14_ = g_strconcat (_tmp8_, _tmp13_, NULL); + _tmp15_ = _tmp14_; + _g_free0 (_tmp13_); + _g_free0 (_tmp8_); + text = _tmp15_; { gint i; i = 0; { - gboolean _tmp5_; - _tmp5_ = TRUE; + gboolean _tmp16_; + _tmp16_ = TRUE; while (TRUE) { - guint _tmp6_; - gconstpointer _tmp7_ = NULL; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - gchar* _tmp10_; - if (!_tmp5_) { - i++; + gboolean _tmp17_; + gint _tmp19_; + GSList* _tmp20_; + guint _tmp21_ = 0U; + const gchar* _tmp22_; + GSList* _tmp23_; + gint _tmp24_; + gconstpointer _tmp25_ = NULL; + const gchar* _tmp26_; + gchar* _tmp27_ = NULL; + gchar* _tmp28_; + gchar* _tmp29_; + _tmp17_ = _tmp16_; + if (!_tmp17_) { + gint _tmp18_; + _tmp18_ = i; + i = _tmp18_ + 1; } - _tmp5_ = FALSE; - _tmp6_ = g_slist_length (self->audio_components); - if (!(i < _tmp6_)) { + _tmp16_ = FALSE; + _tmp19_ = i; + _tmp20_ = self->audio_components; + _tmp21_ = g_slist_length (_tmp20_); + if (!(((guint) _tmp19_) < _tmp21_)) { break; } - _tmp7_ = g_slist_nth_data (self->audio_components, (guint) i); - _tmp8_ = g_strdup_printf ("%s ", ((DVBEventAudioComponent*) _tmp7_)->type); - _tmp9_ = _tmp8_; - _tmp10_ = g_strconcat (text, _tmp9_, NULL); + _tmp22_ = text; + _tmp23_ = self->audio_components; + _tmp24_ = i; + _tmp25_ = g_slist_nth_data (_tmp23_, (guint) _tmp24_); + _tmp26_ = ((DVBEventAudioComponent*) _tmp25_)->type; + _tmp27_ = g_strdup_printf ("%s ", _tmp26_); + _tmp28_ = _tmp27_; + _tmp29_ = g_strconcat (_tmp22_, _tmp28_, NULL); _g_free0 (text); - text = _tmp10_; - _g_free0 (_tmp9_); + text = _tmp29_; + _g_free0 (_tmp28_); } } } @@ -446,47 +486,58 @@ void dvb_event_get_local_start_time (DVBEvent* self, struct tm* result) { struct tm _tmp0_ = {0}; - struct tm _tmp1_ = {0}; struct tm utc_time; - time_t _tmp2_; + struct tm _tmp1_; + time_t _tmp2_ = 0; time_t utc_timestamp; struct tm _tmp3_ = {0}; - struct tm _tmp4_ = {0}; struct tm local_time; g_return_if_fail (self != NULL); - _tmp1_ = (dvb_event_get_utc_start_time (self, &_tmp0_), _tmp0_); - utc_time = _tmp1_; - _tmp2_ = timegm (&utc_time); + dvb_event_get_utc_start_time (self, &_tmp0_); + utc_time = _tmp0_; + _tmp1_ = utc_time; + _tmp2_ = timegm (&_tmp1_); utc_timestamp = _tmp2_; - _tmp4_ = (g_time_local (utc_timestamp, &_tmp3_), _tmp3_); - local_time = _tmp4_; + g_time_local (utc_timestamp, &_tmp3_); + local_time = _tmp3_; *result = local_time; return; } void dvb_event_get_utc_start_time (DVBEvent* self, struct tm* result) { - struct tm _tmp0_ = {0}; - struct tm _tmp1_ = {0}; + guint _tmp0_; + guint _tmp1_; + guint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_; + struct tm _tmp6_ = {0}; struct tm utc_time; g_return_if_fail (self != NULL); - _tmp1_ = (dvb_utils_create_utc_time ((gint) self->year, (gint) self->month, (gint) self->day, (gint) self->hour, (gint) self->minute, (gint) self->second, &_tmp0_), _tmp0_); - utc_time = _tmp1_; + _tmp0_ = self->year; + _tmp1_ = self->month; + _tmp2_ = self->day; + _tmp3_ = self->hour; + _tmp4_ = self->minute; + _tmp5_ = self->second; + dvb_utils_create_utc_time ((gint) _tmp0_, (gint) _tmp1_, (gint) _tmp2_, (gint) _tmp3_, (gint) _tmp4_, (gint) _tmp5_, &_tmp6_); + utc_time = _tmp6_; *result = utc_time; return; } time_t dvb_event_get_start_timestamp (DVBEvent* self) { - time_t result; + time_t result = 0; struct tm _tmp0_ = {0}; - struct tm _tmp1_ = {0}; struct tm utc_time; - time_t _tmp2_; - _tmp1_ = (dvb_event_get_utc_start_time (self, &_tmp0_), _tmp0_); - utc_time = _tmp1_; - _tmp2_ = mktime (&utc_time); - result = _tmp2_; + time_t _tmp1_ = 0; + g_return_val_if_fail (self != NULL, 0); + dvb_event_get_utc_start_time (self, &_tmp0_); + utc_time = _tmp0_; + _tmp1_ = mktime (&utc_time); + result = _tmp1_; return result; } @@ -495,22 +546,40 @@ * @returns: UNIX time stamp */ time_t dvb_event_get_end_timestamp (DVBEvent* self) { - time_t result; - struct tm _tmp0_ = {0}; - struct tm _tmp1_ = {0}; + time_t result = 0; + guint _tmp0_; + guint _tmp1_; + guint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_; + struct tm _tmp6_ = {0}; struct tm end_time; - time_t _tmp2_; + time_t _tmp7_ = 0; time_t before; - time_t _tmp3_; + gint _tmp8_; + guint _tmp9_; + time_t _tmp10_ = 0; time_t after; - _tmp1_ = (dvb_utils_create_utc_time ((gint) self->year, (gint) self->month, (gint) self->day, (gint) self->hour, (gint) self->minute, (gint) self->second, &_tmp0_), _tmp0_); - end_time = _tmp1_; - _tmp2_ = mktime (&end_time); - before = _tmp2_; - end_time.tm_sec = end_time.tm_sec + ((gint) self->duration); - _tmp3_ = mktime (&end_time); - after = _tmp3_; - g_assert ((after - before) == self->duration); + guint _tmp11_; + g_return_val_if_fail (self != NULL, 0); + _tmp0_ = self->year; + _tmp1_ = self->month; + _tmp2_ = self->day; + _tmp3_ = self->hour; + _tmp4_ = self->minute; + _tmp5_ = self->second; + dvb_utils_create_utc_time ((gint) _tmp0_, (gint) _tmp1_, (gint) _tmp2_, (gint) _tmp3_, (gint) _tmp4_, (gint) _tmp5_, &_tmp6_); + end_time = _tmp6_; + _tmp7_ = mktime (&end_time); + before = _tmp7_; + _tmp8_ = end_time.tm_sec; + _tmp9_ = self->duration; + end_time.tm_sec = _tmp8_ + ((gint) _tmp9_); + _tmp10_ = mktime (&end_time); + after = _tmp10_; + _tmp11_ = self->duration; + g_assert ((after - before) == ((time_t) _tmp11_)); result = after; return result; } @@ -518,42 +587,72 @@ gdouble dvb_event_get_overlap_percentage (DVBEvent* self, DVBEvent* other) { gdouble result = 0.0; - time_t _tmp0_; + time_t _tmp0_ = 0; time_t this_start; - time_t _tmp1_; + time_t _tmp1_ = 0; time_t this_end; - time_t _tmp2_; + DVBEvent* _tmp2_; + time_t _tmp3_ = 0; time_t other_start; - time_t _tmp3_; + DVBEvent* _tmp4_; + time_t _tmp5_ = 0; time_t other_end; - gboolean _tmp4_ = FALSE; + gboolean _tmp6_ = FALSE; + time_t _tmp7_; + time_t _tmp8_; + gboolean _tmp11_; g_return_val_if_fail (self != NULL, 0.0); g_return_val_if_fail (other != NULL, 0.0); _tmp0_ = dvb_event_get_start_timestamp (self); this_start = _tmp0_; _tmp1_ = dvb_event_get_end_timestamp (self); this_end = _tmp1_; - _tmp2_ = dvb_event_get_start_timestamp (other); - other_start = _tmp2_; - _tmp3_ = dvb_event_get_end_timestamp (other); - other_end = _tmp3_; - if (this_start <= other_end) { - _tmp4_ = this_end >= other_start; - } else { - _tmp4_ = FALSE; - } - if (_tmp4_) { - time_t _tmp5_; + _tmp2_ = other; + _tmp3_ = dvb_event_get_start_timestamp (_tmp2_); + other_start = _tmp3_; + _tmp4_ = other; + _tmp5_ = dvb_event_get_end_timestamp (_tmp4_); + other_end = _tmp5_; + _tmp7_ = this_start; + _tmp8_ = other_end; + if (_tmp7_ <= _tmp8_) { + time_t _tmp9_; + time_t _tmp10_; + _tmp9_ = this_end; + _tmp10_ = other_start; + _tmp6_ = _tmp9_ >= _tmp10_; + } else { + _tmp6_ = FALSE; + } + _tmp11_ = _tmp6_; + if (_tmp11_) { + time_t _tmp12_; + time_t _tmp13_; + time_t _tmp14_ = 0; time_t start; - time_t _tmp6_; + time_t _tmp15_; + time_t _tmp16_; + time_t _tmp17_ = 0; time_t end; - gdouble _tmp7_; - _tmp5_ = dvb_utils_t_max (this_start, other_start); - start = _tmp5_; - _tmp6_ = dvb_utils_t_min (this_end, other_end); - end = _tmp6_; - _tmp7_ = fabs ((gdouble) (start - end)); - result = _tmp7_ / (this_end - this_start); + time_t _tmp18_; + time_t _tmp19_; + gdouble _tmp20_ = 0.0; + time_t _tmp21_; + time_t _tmp22_; + _tmp12_ = this_start; + _tmp13_ = other_start; + _tmp14_ = dvb_utils_t_max (_tmp12_, _tmp13_); + start = _tmp14_; + _tmp15_ = this_end; + _tmp16_ = other_end; + _tmp17_ = dvb_utils_t_min (_tmp15_, _tmp16_); + end = _tmp17_; + _tmp18_ = start; + _tmp19_ = end; + _tmp20_ = fabs ((gdouble) (_tmp18_ - _tmp19_)); + _tmp21_ = this_end; + _tmp22_ = this_start; + result = _tmp20_ / (_tmp21_ - _tmp22_); return result; } result = (gdouble) 0; @@ -570,50 +669,80 @@ gint dvb_event_compare (DVBEvent* event1, DVBEvent* event2) { gint result = 0; gboolean _tmp0_ = FALSE; - time_t _tmp3_; + DVBEvent* _tmp1_; + gboolean _tmp3_; + DVBEvent* _tmp12_; + time_t _tmp13_ = 0; time_t event1_time; - time_t _tmp4_; + DVBEvent* _tmp14_; + time_t _tmp15_ = 0; time_t event2_time; - if (event1 == NULL) { - _tmp0_ = event2 == NULL; + time_t _tmp16_; + time_t _tmp17_; + _tmp1_ = event1; + if (_tmp1_ == NULL) { + DVBEvent* _tmp2_; + _tmp2_ = event2; + _tmp0_ = _tmp2_ == NULL; } else { _tmp0_ = FALSE; } - if (_tmp0_) { + _tmp3_ = _tmp0_; + if (_tmp3_) { result = 0; return result; } else { - gboolean _tmp1_ = FALSE; - if (event1 == NULL) { - _tmp1_ = event2 != NULL; + gboolean _tmp4_ = FALSE; + DVBEvent* _tmp5_; + gboolean _tmp7_; + _tmp5_ = event1; + if (_tmp5_ == NULL) { + DVBEvent* _tmp6_; + _tmp6_ = event2; + _tmp4_ = _tmp6_ != NULL; } else { - _tmp1_ = FALSE; + _tmp4_ = FALSE; } - if (_tmp1_) { + _tmp7_ = _tmp4_; + if (_tmp7_) { result = +1; return result; } else { - gboolean _tmp2_ = FALSE; - if (event1 != NULL) { - _tmp2_ = event2 == NULL; + gboolean _tmp8_ = FALSE; + DVBEvent* _tmp9_; + gboolean _tmp11_; + _tmp9_ = event1; + if (_tmp9_ != NULL) { + DVBEvent* _tmp10_; + _tmp10_ = event2; + _tmp8_ = _tmp10_ == NULL; } else { - _tmp2_ = FALSE; + _tmp8_ = FALSE; } - if (_tmp2_) { + _tmp11_ = _tmp8_; + if (_tmp11_) { result = -1; return result; } } } - _tmp3_ = dvb_event_get_end_timestamp (event1); - event1_time = _tmp3_; - _tmp4_ = dvb_event_get_end_timestamp (event2); - event2_time = _tmp4_; - if (event1_time < event2_time) { + _tmp12_ = event1; + _tmp13_ = dvb_event_get_end_timestamp (_tmp12_); + event1_time = _tmp13_; + _tmp14_ = event2; + _tmp15_ = dvb_event_get_end_timestamp (_tmp14_); + event2_time = _tmp15_; + _tmp16_ = event1_time; + _tmp17_ = event2_time; + if (_tmp16_ < _tmp17_) { result = -1; return result; } else { - if (event1_time > event2_time) { + time_t _tmp18_; + time_t _tmp19_; + _tmp18_ = event1_time; + _tmp19_ = event2_time; + if (_tmp18_ > _tmp19_) { result = +1; return result; } else { @@ -633,23 +762,41 @@ gboolean dvb_event_equal (DVBEvent* event1, DVBEvent* event2) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; - if (event1 == NULL) { + DVBEvent* _tmp1_; + gboolean _tmp3_; + DVBEvent* _tmp4_; + guint _tmp5_; + DVBEvent* _tmp6_; + guint _tmp7_; + _tmp1_ = event1; + if (_tmp1_ == NULL) { _tmp0_ = TRUE; } else { - _tmp0_ = event2 == NULL; + DVBEvent* _tmp2_; + _tmp2_ = event2; + _tmp0_ = _tmp2_ == NULL; } - if (_tmp0_) { + _tmp3_ = _tmp0_; + if (_tmp3_) { result = FALSE; return result; } - result = event1->id == event2->id; + _tmp4_ = event1; + _tmp5_ = _tmp4_->id; + _tmp6_ = event2; + _tmp7_ = _tmp6_->id; + result = _tmp5_ == _tmp7_; return result; } guint dvb_event_hash (DVBEvent* event) { guint result = 0U; - result = event->id; + DVBEvent* _tmp0_; + guint _tmp1_; + _tmp0_ = event; + _tmp1_ = _tmp0_->id; + result = _tmp1_; return result; } diff -Nru gnome-dvb-daemon-0.1.23/src/EventStorage.c gnome-dvb-daemon-0.2.7/src/EventStorage.c --- gnome-dvb-daemon-0.1.23/src/EventStorage.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/EventStorage.c 2011-09-29 18:32:11.000000000 +0000 @@ -1,4 +1,4 @@ -/* EventStorage.c generated by valac 0.11.3, the Vala compiler +/* EventStorage.c generated by valac 0.14.0, the Vala compiler * generated from EventStorage.vala, do not modify */ /* @@ -38,7 +38,6 @@ typedef struct _DVBEventElement DVBEventElement; typedef struct _DVBEventElementClass DVBEventElementClass; typedef struct _DVBEventElementPrivate DVBEventElementPrivate; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define DVB_TYPE_EVENT (dvb_event_get_type ()) #define DVB_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EVENT, DVBEvent)) @@ -80,6 +79,7 @@ typedef struct _DVBEventTeletextComponent DVBEventTeletextComponent; typedef struct _DVBEventTeletextComponentClass DVBEventTeletextComponentClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define DVB_TYPE_EVENT_STORAGE (dvb_event_storage_get_type ()) #define DVB_EVENT_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EVENT_STORAGE, DVBEventStorage)) @@ -186,7 +186,6 @@ DVB_EVENT_ELEMENT_DUMMY_PROPERTY }; gint dvb_event_element_compare (DVBEventElement* event1, DVBEventElement* event2); -void dvb_event_element_destroy (void* data); gpointer dvb_event_ref (gpointer instance); void dvb_event_unref (gpointer instance); GParamSpec* dvb_param_spec_event (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); @@ -229,7 +228,7 @@ }; DVBEventStorage* dvb_event_storage_new (void); DVBEventStorage* dvb_event_storage_construct (GType object_type); -static void _dvb_event_element_destroy_gdestroy_notify (void* data); +static void _g_object_unref0_ (gpointer var); void dvb_event_storage_insert (DVBEventStorage* self, DVBEvent* event); static gint _dvb_event_element_compare_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self); void dvb_event_storage_remove_range (DVBEventStorage* self, gint start, gint end); @@ -267,44 +266,78 @@ gint dvb_event_element_compare (DVBEventElement* event1, DVBEventElement* event2) { gint result = 0; gboolean _tmp0_ = FALSE; + DVBEventElement* _tmp1_; + gboolean _tmp3_; + DVBEventElement* _tmp12_; + time_t _tmp13_; + DVBEventElement* _tmp14_; + time_t _tmp15_; g_return_val_if_fail (event1 != NULL, 0); g_return_val_if_fail (event2 != NULL, 0); - if (event1 == NULL) { - _tmp0_ = event2 == NULL; + _tmp1_ = event1; + if (_tmp1_ == NULL) { + DVBEventElement* _tmp2_; + _tmp2_ = event2; + _tmp0_ = _tmp2_ == NULL; } else { _tmp0_ = FALSE; } - if (_tmp0_) { + _tmp3_ = _tmp0_; + if (_tmp3_) { result = 0; return result; } else { - gboolean _tmp1_ = FALSE; - if (event1 == NULL) { - _tmp1_ = event2 != NULL; + gboolean _tmp4_ = FALSE; + DVBEventElement* _tmp5_; + gboolean _tmp7_; + _tmp5_ = event1; + if (_tmp5_ == NULL) { + DVBEventElement* _tmp6_; + _tmp6_ = event2; + _tmp4_ = _tmp6_ != NULL; } else { - _tmp1_ = FALSE; + _tmp4_ = FALSE; } - if (_tmp1_) { + _tmp7_ = _tmp4_; + if (_tmp7_) { result = +1; return result; } else { - gboolean _tmp2_ = FALSE; - if (event1 != NULL) { - _tmp2_ = event2 == NULL; + gboolean _tmp8_ = FALSE; + DVBEventElement* _tmp9_; + gboolean _tmp11_; + _tmp9_ = event1; + if (_tmp9_ != NULL) { + DVBEventElement* _tmp10_; + _tmp10_ = event2; + _tmp8_ = _tmp10_ == NULL; } else { - _tmp2_ = FALSE; + _tmp8_ = FALSE; } - if (_tmp2_) { + _tmp11_ = _tmp8_; + if (_tmp11_) { result = -1; return result; } } } - if (event1->starttime < event2->starttime) { + _tmp12_ = event1; + _tmp13_ = _tmp12_->starttime; + _tmp14_ = event2; + _tmp15_ = _tmp14_->starttime; + if (_tmp13_ < _tmp15_) { result = -1; return result; } else { - if (event1->starttime > event2->starttime) { + DVBEventElement* _tmp16_; + time_t _tmp17_; + DVBEventElement* _tmp18_; + time_t _tmp19_; + _tmp16_ = event1; + _tmp17_ = _tmp16_->starttime; + _tmp18_ = event2; + _tmp19_ = _tmp18_->starttime; + if (_tmp17_ > _tmp19_) { result = +1; return result; } else { @@ -315,32 +348,23 @@ } -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - -void dvb_event_element_destroy (void* data) { - DVBEventElement* _tmp0_; - DVBEventElement* e; - _tmp0_ = _g_object_ref0 (DVB_EVENT_ELEMENT (data)); - e = _tmp0_; - g_object_unref (e); - _g_object_unref0 (e); -} - - DVBEventElement* dvb_event_element_new_from_event (DVBEvent* event) { DVBEventElement* result = NULL; - DVBEventElement* _tmp0_ = NULL; + DVBEventElement* _tmp0_; DVBEventElement* element; - time_t _tmp1_; + DVBEvent* _tmp1_; + guint _tmp2_; + DVBEvent* _tmp3_; + time_t _tmp4_ = 0; g_return_val_if_fail (event != NULL, NULL); _tmp0_ = dvb_event_element_new (); element = _tmp0_; - element->id = event->id; - _tmp1_ = dvb_event_get_start_timestamp (event); - element->starttime = _tmp1_; + _tmp1_ = event; + _tmp2_ = _tmp1_->id; + element->id = _tmp2_; + _tmp3_ = event; + _tmp4_ = dvb_event_get_start_timestamp (_tmp3_); + element->starttime = _tmp4_; result = element; return result; } @@ -392,26 +416,22 @@ } -static void _dvb_event_element_destroy_gdestroy_notify (void* data) { - dvb_event_element_destroy (data); +static void _g_object_unref0_ (gpointer var) { + (var == NULL) ? NULL : (var = (g_object_unref (var), NULL)); } DVBEventStorage* dvb_event_storage_construct (GType object_type) { DVBEventStorage * self = NULL; - GSequence* _tmp0_ = NULL; - GSequence* _tmp1_; - GeeHashMap* _tmp2_ = NULL; - GeeMap* _tmp3_; + GSequence* _tmp0_; + GeeHashMap* _tmp1_; self = (DVBEventStorage*) g_object_new (object_type, NULL); - _tmp0_ = g_sequence_new (_dvb_event_element_destroy_gdestroy_notify); - _tmp1_ = _tmp0_; + _tmp0_ = g_sequence_new (_g_object_unref0_); _g_sequence_free0 (self->priv->events); - self->priv->events = _tmp1_; - _tmp2_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, G_TYPE_POINTER, NULL, NULL, NULL, NULL, NULL); - _tmp3_ = (GeeMap*) _tmp2_; + self->priv->events = _tmp0_; + _tmp1_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, G_TYPE_POINTER, NULL, NULL, NULL, NULL, NULL); _g_object_unref0 (self->priv->event_id_map); - self->priv->event_id_map = _tmp3_; + self->priv->event_id_map = (GeeMap*) _tmp1_; return self; } @@ -421,6 +441,11 @@ } +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + static gint _dvb_event_element_compare_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) { gint result; result = dvb_event_element_compare (a, b); @@ -429,126 +454,236 @@ void dvb_event_storage_insert (DVBEventStorage* self, DVBEvent* event) { - DVBEventElement* _tmp0_ = NULL; + DVBEvent* _tmp0_; + DVBEventElement* _tmp1_ = NULL; DVBEventElement* element; - DVBEventElement* _tmp1_; - GSequenceIter* _tmp2_ = NULL; + GSequence* _tmp2_; + DVBEventElement* _tmp3_; + GSequenceIter* _tmp4_ = NULL; GSequenceIter* iter; - gint _tmp3_; - gint _tmp4_; + GeeMap* _tmp5_; + DVBEvent* _tmp6_; + guint _tmp7_; + gint _tmp8_; + GSequence* _tmp9_; + gint _tmp10_ = 0; + GeeMap* _tmp11_; + gint _tmp12_; + gint _tmp13_; g_return_if_fail (self != NULL); g_return_if_fail (event != NULL); - _tmp0_ = dvb_event_element_new_from_event (event); - element = _tmp0_; - _tmp1_ = _g_object_ref0 (element); - _tmp2_ = g_sequence_insert_sorted (self->priv->events, _tmp1_, _dvb_event_element_compare_gcompare_data_func, NULL); - iter = _tmp2_; - gee_map_set (self->priv->event_id_map, GUINT_TO_POINTER (event->id), iter); - self->priv->_stamp++; - _tmp3_ = g_sequence_get_length (self->priv->events); - _tmp4_ = gee_map_get_size (self->priv->event_id_map); - g_assert (_tmp3_ == _tmp4_); + _tmp0_ = event; + _tmp1_ = dvb_event_element_new_from_event (_tmp0_); + element = _tmp1_; + _tmp2_ = self->priv->events; + _tmp3_ = _g_object_ref0 (element); + _tmp4_ = g_sequence_insert_sorted (_tmp2_, _tmp3_, _dvb_event_element_compare_gcompare_data_func, NULL); + iter = _tmp4_; + _tmp5_ = self->priv->event_id_map; + _tmp6_ = event; + _tmp7_ = _tmp6_->id; + gee_map_set (_tmp5_, GUINT_TO_POINTER (_tmp7_), iter); + _tmp8_ = self->priv->_stamp; + self->priv->_stamp = _tmp8_ + 1; + _tmp9_ = self->priv->events; + _tmp10_ = g_sequence_get_length (_tmp9_); + _tmp11_ = self->priv->event_id_map; + _tmp12_ = gee_map_get_size (_tmp11_); + _tmp13_ = _tmp12_; + g_assert (_tmp10_ == _tmp13_); _g_object_unref0 (element); } void dvb_event_storage_remove_range (DVBEventStorage* self, gint start, gint end) { gint _tmp0_; - GSequenceIter* _tmp1_ = NULL; + gint _tmp1_; + GSequence* _tmp2_; + gint _tmp3_ = 0; + GSequence* _tmp4_; + gint _tmp5_; + GSequenceIter* _tmp6_ = NULL; GSequenceIter* begin_iter; - GSequenceIter* _tmp2_ = NULL; + GSequence* _tmp7_; + gint _tmp8_; + GSequenceIter* _tmp9_ = NULL; GSequenceIter* end_iter; + GSequenceIter* _tmp10_; GSequenceIter* iter; - gint _tmp6_; - gint _tmp7_; + GSequence* _tmp22_; + GSequenceIter* _tmp23_; + GSequenceIter* _tmp24_; + gint _tmp25_; + GSequence* _tmp26_; + gint _tmp27_ = 0; + GeeMap* _tmp28_; + gint _tmp29_; + gint _tmp30_; g_return_if_fail (self != NULL); - g_assert (start >= 0); - _tmp0_ = g_sequence_get_length (self->priv->events); - g_assert (end < _tmp0_); - _tmp1_ = g_sequence_get_iter_at_pos (self->priv->events, start); - begin_iter = _tmp1_; - _tmp2_ = g_sequence_get_iter_at_pos (self->priv->events, end); - end_iter = _tmp2_; - iter = begin_iter; + _tmp0_ = start; + g_assert (_tmp0_ >= 0); + _tmp1_ = end; + _tmp2_ = self->priv->events; + _tmp3_ = g_sequence_get_length (_tmp2_); + g_assert (_tmp1_ < _tmp3_); + _tmp4_ = self->priv->events; + _tmp5_ = start; + _tmp6_ = g_sequence_get_iter_at_pos (_tmp4_, _tmp5_); + begin_iter = _tmp6_; + _tmp7_ = self->priv->events; + _tmp8_ = end; + _tmp9_ = g_sequence_get_iter_at_pos (_tmp7_, _tmp8_); + end_iter = _tmp9_; + _tmp10_ = begin_iter; + iter = _tmp10_; while (TRUE) { - gconstpointer _tmp3_ = NULL; - DVBEventElement* _tmp4_; + GSequenceIter* _tmp11_; + GSequenceIter* _tmp12_; + GSequence* _tmp13_; + GSequenceIter* _tmp14_; + gconstpointer _tmp15_ = NULL; + DVBEventElement* _tmp16_; DVBEventElement* element; - GSequenceIter* _tmp5_ = NULL; - if (!(iter != end_iter)) { + GeeMap* _tmp17_; + DVBEventElement* _tmp18_; + guint _tmp19_; + GSequenceIter* _tmp20_; + GSequenceIter* _tmp21_ = NULL; + _tmp11_ = iter; + _tmp12_ = end_iter; + if (!(_tmp11_ != _tmp12_)) { break; } - _tmp3_ = g_sequence_get (iter); - _tmp4_ = _g_object_ref0 ((DVBEventElement*) _tmp3_); - element = _tmp4_; - gee_map_unset (self->priv->event_id_map, GUINT_TO_POINTER (element->id), NULL); - _tmp5_ = g_sequence_iter_next (iter); - iter = _tmp5_; + _tmp13_ = self->priv->events; + _tmp14_ = iter; + _tmp15_ = g_sequence_get (_tmp14_); + _tmp16_ = _g_object_ref0 ((DVBEventElement*) _tmp15_); + element = _tmp16_; + _tmp17_ = self->priv->event_id_map; + _tmp18_ = element; + _tmp19_ = _tmp18_->id; + gee_map_unset (_tmp17_, GUINT_TO_POINTER (_tmp19_), NULL); + _tmp20_ = iter; + _tmp21_ = g_sequence_iter_next (_tmp20_); + iter = _tmp21_; _g_object_unref0 (element); } - g_sequence_remove_range (begin_iter, end_iter); - self->priv->_stamp++; - _tmp6_ = g_sequence_get_length (self->priv->events); - _tmp7_ = gee_map_get_size (self->priv->event_id_map); - g_assert (_tmp6_ == _tmp7_); + _tmp22_ = self->priv->events; + _tmp23_ = begin_iter; + _tmp24_ = end_iter; + g_sequence_remove_range (_tmp23_, _tmp24_); + _tmp25_ = self->priv->_stamp; + self->priv->_stamp = _tmp25_ + 1; + _tmp26_ = self->priv->events; + _tmp27_ = g_sequence_get_length (_tmp26_); + _tmp28_ = self->priv->event_id_map; + _tmp29_ = gee_map_get_size (_tmp28_); + _tmp30_ = _tmp29_; + g_assert (_tmp27_ == _tmp30_); } void dvb_event_storage_remove_all (DVBEventStorage* self, GeeList* events) { + gint _tmp21_; g_return_if_fail (self != NULL); g_return_if_fail (events != NULL); { GeeList* _tmp0_; + GeeList* _tmp1_; GeeList* _event_list; - gint _tmp1_; + GeeList* _tmp2_; + gint _tmp3_; + gint _tmp4_; gint _event_size; gint _event_index; - _tmp0_ = _g_object_ref0 (events); - _event_list = _tmp0_; - _tmp1_ = gee_collection_get_size ((GeeCollection*) _event_list); - _event_size = _tmp1_; + _tmp0_ = events; + _tmp1_ = _g_object_ref0 (_tmp0_); + _event_list = _tmp1_; + _tmp2_ = _event_list; + _tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_); + _tmp4_ = _tmp3_; + _event_size = _tmp4_; _event_index = -1; while (TRUE) { - gpointer _tmp2_ = NULL; + gint _tmp5_; + gint _tmp6_; + gint _tmp7_; + GeeList* _tmp8_; + gint _tmp9_; + gpointer _tmp10_ = NULL; DVBEvent* event; - gpointer _tmp3_ = NULL; + GeeMap* _tmp11_; + DVBEvent* _tmp12_; + guint _tmp13_; + gpointer _tmp14_ = NULL; GSequenceIter* iter; - _event_index = _event_index + 1; - if (!(_event_index < _event_size)) { + GSequenceIter* _tmp15_; + _tmp5_ = _event_index; + _event_index = _tmp5_ + 1; + _tmp6_ = _event_index; + _tmp7_ = _event_size; + if (!(_tmp6_ < _tmp7_)) { break; } - _tmp2_ = gee_list_get (_event_list, _event_index); - event = (DVBEvent*) _tmp2_; - _tmp3_ = gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER (event->id)); - iter = (GSequenceIter*) _tmp3_; - if (iter != NULL) { - g_sequence_remove (iter); - gee_map_unset (self->priv->event_id_map, GUINT_TO_POINTER (event->id), NULL); + _tmp8_ = _event_list; + _tmp9_ = _event_index; + _tmp10_ = gee_list_get (_tmp8_, _tmp9_); + event = (DVBEvent*) _tmp10_; + _tmp11_ = self->priv->event_id_map; + _tmp12_ = event; + _tmp13_ = _tmp12_->id; + _tmp14_ = gee_map_get (_tmp11_, GUINT_TO_POINTER (_tmp13_)); + iter = (GSequenceIter*) _tmp14_; + _tmp15_ = iter; + if (_tmp15_ != NULL) { + GSequence* _tmp16_; + GSequenceIter* _tmp17_; + GeeMap* _tmp18_; + DVBEvent* _tmp19_; + guint _tmp20_; + _tmp16_ = self->priv->events; + _tmp17_ = iter; + g_sequence_remove (_tmp17_); + _tmp18_ = self->priv->event_id_map; + _tmp19_ = event; + _tmp20_ = _tmp19_->id; + gee_map_unset (_tmp18_, GUINT_TO_POINTER (_tmp20_), NULL); } _dvb_event_unref0 (event); } _g_object_unref0 (_event_list); } - self->priv->_stamp++; + _tmp21_ = self->priv->_stamp; + self->priv->_stamp = _tmp21_ + 1; } DVBEventElement* dvb_event_storage_get (DVBEventStorage* self, gint index) { DVBEventElement* result = NULL; gint _tmp0_; - GSequenceIter* _tmp1_ = NULL; + GSequence* _tmp1_; + gint _tmp2_ = 0; + GSequence* _tmp3_; + gint _tmp4_; + GSequenceIter* _tmp5_ = NULL; GSequenceIter* iter; - gconstpointer _tmp2_ = NULL; - DVBEventElement* _tmp3_; + GSequence* _tmp6_; + gconstpointer _tmp7_ = NULL; + DVBEventElement* _tmp8_; DVBEventElement* element; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = g_sequence_get_length (self->priv->events); - g_assert (index < _tmp0_); - _tmp1_ = g_sequence_get_iter_at_pos (self->priv->events, index); - iter = _tmp1_; - _tmp2_ = g_sequence_get (iter); - _tmp3_ = _g_object_ref0 ((DVBEventElement*) _tmp2_); - element = _tmp3_; + _tmp0_ = index; + _tmp1_ = self->priv->events; + _tmp2_ = g_sequence_get_length (_tmp1_); + g_assert (_tmp0_ < _tmp2_); + _tmp3_ = self->priv->events; + _tmp4_ = index; + _tmp5_ = g_sequence_get_iter_at_pos (_tmp3_, _tmp4_); + iter = _tmp5_; + _tmp6_ = self->priv->events; + _tmp7_ = g_sequence_get (iter); + _tmp8_ = _g_object_ref0 ((DVBEventElement*) _tmp7_); + element = _tmp8_; result = element; return result; } @@ -556,17 +691,23 @@ DVBEventElement* dvb_event_storage_get_by_id (DVBEventStorage* self, guint event_id) { DVBEventElement* result = NULL; - gpointer _tmp0_ = NULL; + GeeMap* _tmp0_; + guint _tmp1_; + gpointer _tmp2_ = NULL; GSequenceIter* iter; - gconstpointer _tmp1_ = NULL; - DVBEventElement* _tmp2_; + GSequence* _tmp3_; + gconstpointer _tmp4_ = NULL; + DVBEventElement* _tmp5_; DVBEventElement* element; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER (event_id)); - iter = (GSequenceIter*) _tmp0_; - _tmp1_ = g_sequence_get (iter); - _tmp2_ = _g_object_ref0 ((DVBEventElement*) _tmp1_); - element = _tmp2_; + _tmp0_ = self->priv->event_id_map; + _tmp1_ = event_id; + _tmp2_ = gee_map_get (_tmp0_, GUINT_TO_POINTER (_tmp1_)); + iter = (GSequenceIter*) _tmp2_; + _tmp3_ = self->priv->events; + _tmp4_ = g_sequence_get (iter); + _tmp5_ = _g_object_ref0 ((DVBEventElement*) _tmp4_); + element = _tmp5_; result = element; return result; } @@ -574,120 +715,180 @@ gboolean dvb_event_storage_contains_event_with_id (DVBEventStorage* self, guint event_id) { gboolean result = FALSE; - gboolean _tmp0_; + GeeMap* _tmp0_; + guint _tmp1_; + gboolean _tmp2_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); - _tmp0_ = gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER (event_id)); - result = _tmp0_; + _tmp0_ = self->priv->event_id_map; + _tmp1_ = event_id; + _tmp2_ = gee_map_has_key (_tmp0_, GUINT_TO_POINTER (_tmp1_)); + result = _tmp2_; return result; } DVBEventElement* dvb_event_storage_next (DVBEventStorage* self, DVBEventElement* element) { DVBEventElement* result = NULL; - gpointer _tmp0_ = NULL; + GeeMap* _tmp0_; + DVBEventElement* _tmp1_; + guint _tmp2_; + gpointer _tmp3_ = NULL; GSequenceIter* iter; - GSequenceIter* _tmp1_ = NULL; + GSequenceIter* _tmp4_; + GSequenceIter* _tmp5_; + GSequenceIter* _tmp6_ = NULL; GSequenceIter* next; - DVBEventElement* _tmp2_; - gboolean _tmp3_; - DVBEventElement* _tmp5_; + DVBEventElement* _tmp7_ = NULL; + GSequenceIter* _tmp8_; + gboolean _tmp9_ = FALSE; + DVBEventElement* _tmp12_; + DVBEventElement* _tmp13_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (element != NULL, NULL); - _tmp0_ = gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER (element->id)); - iter = (GSequenceIter*) _tmp0_; - g_assert (iter != NULL); - _tmp1_ = g_sequence_iter_next (iter); - next = _tmp1_; - _tmp2_ = NULL; - _tmp3_ = g_sequence_iter_is_end (next); - if (_tmp3_) { - _tmp2_ = NULL; + _tmp0_ = self->priv->event_id_map; + _tmp1_ = element; + _tmp2_ = _tmp1_->id; + _tmp3_ = gee_map_get (_tmp0_, GUINT_TO_POINTER (_tmp2_)); + iter = (GSequenceIter*) _tmp3_; + _tmp4_ = iter; + g_assert (_tmp4_ != NULL); + _tmp5_ = iter; + _tmp6_ = g_sequence_iter_next (_tmp5_); + next = _tmp6_; + _tmp8_ = next; + _tmp9_ = g_sequence_iter_is_end (_tmp8_); + if (_tmp9_) { + _tmp7_ = NULL; } else { - gconstpointer _tmp4_ = NULL; - _tmp4_ = g_sequence_get (next); - _tmp2_ = (DVBEventElement*) _tmp4_; + GSequenceIter* _tmp10_; + gconstpointer _tmp11_ = NULL; + _tmp10_ = next; + _tmp11_ = g_sequence_get (_tmp10_); + _tmp7_ = (DVBEventElement*) _tmp11_; } - _tmp5_ = _g_object_ref0 (_tmp2_); - result = _tmp5_; + _tmp12_ = _tmp7_; + _tmp13_ = _g_object_ref0 (_tmp12_); + result = _tmp13_; return result; } DVBEventElement* dvb_event_storage_prev (DVBEventStorage* self, DVBEventElement* element) { DVBEventElement* result = NULL; - gpointer _tmp0_ = NULL; + GeeMap* _tmp0_; + DVBEventElement* _tmp1_; + guint _tmp2_; + gpointer _tmp3_ = NULL; GSequenceIter* iter; - GSequenceIter* _tmp1_ = NULL; + GSequenceIter* _tmp4_; + GSequenceIter* _tmp5_; + GSequenceIter* _tmp6_ = NULL; GSequenceIter* prev; - DVBEventElement* _tmp2_; - gboolean _tmp3_; - DVBEventElement* _tmp5_; + DVBEventElement* _tmp7_ = NULL; + GSequenceIter* _tmp8_; + gboolean _tmp9_ = FALSE; + DVBEventElement* _tmp12_; + DVBEventElement* _tmp13_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (element != NULL, NULL); - _tmp0_ = gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER (element->id)); - iter = (GSequenceIter*) _tmp0_; - g_assert (iter != NULL); - _tmp1_ = g_sequence_iter_prev (iter); - prev = _tmp1_; - _tmp2_ = NULL; - _tmp3_ = g_sequence_iter_is_begin (prev); - if (_tmp3_) { - _tmp2_ = NULL; + _tmp0_ = self->priv->event_id_map; + _tmp1_ = element; + _tmp2_ = _tmp1_->id; + _tmp3_ = gee_map_get (_tmp0_, GUINT_TO_POINTER (_tmp2_)); + iter = (GSequenceIter*) _tmp3_; + _tmp4_ = iter; + g_assert (_tmp4_ != NULL); + _tmp5_ = iter; + _tmp6_ = g_sequence_iter_prev (_tmp5_); + prev = _tmp6_; + _tmp8_ = prev; + _tmp9_ = g_sequence_iter_is_begin (_tmp8_); + if (_tmp9_) { + _tmp7_ = NULL; } else { - gconstpointer _tmp4_ = NULL; - _tmp4_ = g_sequence_get (prev); - _tmp2_ = (DVBEventElement*) _tmp4_; + GSequenceIter* _tmp10_; + gconstpointer _tmp11_ = NULL; + _tmp10_ = prev; + _tmp11_ = g_sequence_get (_tmp10_); + _tmp7_ = (DVBEventElement*) _tmp11_; } - _tmp5_ = _g_object_ref0 (_tmp2_); - result = _tmp5_; + _tmp12_ = _tmp7_; + _tmp13_ = _g_object_ref0 (_tmp12_); + result = _tmp13_; return result; } GeeList* dvb_event_storage_get_overlapping_events (DVBEventStorage* self, DVBEvent* event) { GeeList* result = NULL; - DVBEventElement* _tmp0_ = NULL; + DVBEvent* _tmp0_; + DVBEventElement* _tmp1_ = NULL; DVBEventElement* element; - time_t _tmp1_; + DVBEvent* _tmp2_; + time_t _tmp3_ = 0; time_t event_end; - GSequenceIter* _tmp2_ = NULL; - GSequenceIter* _tmp3_ = NULL; + GSequence* _tmp4_; + DVBEventElement* _tmp5_; + GSequenceIter* _tmp6_ = NULL; + GSequenceIter* _tmp7_ = NULL; GSequenceIter* start_iter; - GeeArrayList* _tmp4_ = NULL; + GeeArrayList* _tmp8_; GeeList* overlap; + GSequenceIter* _tmp9_; GSequenceIter* end_iter; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (event != NULL, NULL); - _tmp0_ = dvb_event_element_new_from_event (event); - element = _tmp0_; - _tmp1_ = dvb_event_get_end_timestamp (event); - event_end = _tmp1_; - _tmp2_ = g_sequence_search (self->priv->events, element, _dvb_event_element_compare_gcompare_data_func, NULL); - _tmp3_ = g_sequence_iter_prev (_tmp2_); - start_iter = _tmp3_; - _tmp4_ = gee_array_list_new (DVB_TYPE_EVENT_ELEMENT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); - overlap = (GeeList*) _tmp4_; - end_iter = start_iter; + _tmp0_ = event; + _tmp1_ = dvb_event_element_new_from_event (_tmp0_); + element = _tmp1_; + _tmp2_ = event; + _tmp3_ = dvb_event_get_end_timestamp (_tmp2_); + event_end = _tmp3_; + _tmp4_ = self->priv->events; + _tmp5_ = element; + _tmp6_ = g_sequence_search (_tmp4_, _tmp5_, _dvb_event_element_compare_gcompare_data_func, NULL); + _tmp7_ = g_sequence_iter_prev (_tmp6_); + start_iter = _tmp7_; + _tmp8_ = gee_array_list_new (DVB_TYPE_EVENT_ELEMENT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); + overlap = (GeeList*) _tmp8_; + _tmp9_ = start_iter; + end_iter = _tmp9_; while (TRUE) { - gboolean _tmp5_; - gconstpointer _tmp6_ = NULL; - DVBEventElement* _tmp7_; + GSequenceIter* _tmp10_; + gboolean _tmp11_ = FALSE; + GSequenceIter* _tmp12_; + gconstpointer _tmp13_ = NULL; + DVBEventElement* _tmp14_; DVBEventElement* data; - GSequenceIter* _tmp8_ = NULL; - _tmp5_ = g_sequence_iter_is_end (end_iter); - if (!(!_tmp5_)) { + DVBEventElement* _tmp15_; + time_t _tmp16_; + time_t _tmp17_; + GeeList* _tmp18_; + DVBEventElement* _tmp19_; + GSequenceIter* _tmp20_; + GSequenceIter* _tmp21_ = NULL; + _tmp10_ = end_iter; + _tmp11_ = g_sequence_iter_is_end (_tmp10_); + if (!(!_tmp11_)) { break; } - _tmp6_ = g_sequence_get (end_iter); - _tmp7_ = _g_object_ref0 ((DVBEventElement*) _tmp6_); - data = _tmp7_; - if (data->starttime > event_end) { + _tmp12_ = end_iter; + _tmp13_ = g_sequence_get (_tmp12_); + _tmp14_ = _g_object_ref0 ((DVBEventElement*) _tmp13_); + data = _tmp14_; + _tmp15_ = data; + _tmp16_ = _tmp15_->starttime; + _tmp17_ = event_end; + if (_tmp16_ > _tmp17_) { _g_object_unref0 (data); break; } - gee_collection_add ((GeeCollection*) overlap, data); - _tmp8_ = g_sequence_iter_next (end_iter); - end_iter = _tmp8_; + _tmp18_ = overlap; + _tmp19_ = data; + gee_collection_add ((GeeCollection*) _tmp18_, _tmp19_); + _tmp20_ = end_iter; + _tmp21_ = g_sequence_iter_next (_tmp20_); + end_iter = _tmp21_; _g_object_unref0 (data); } result = overlap; @@ -699,7 +900,7 @@ static GeeIterator* dvb_event_storage_real_iterator (GeeIterable* base) { DVBEventStorage * self; GeeIterator* result = NULL; - DVBEventStorageEventIterator* _tmp0_ = NULL; + DVBEventStorageEventIterator* _tmp0_; self = (DVBEventStorage*) base; _tmp0_ = dvb_event_storage_event_iterator_new (self); result = (GeeIterator*) _tmp0_; @@ -709,7 +910,7 @@ GeeBidirIterator* dvb_event_storage_bidir_iterator (DVBEventStorage* self) { GeeBidirIterator* result = NULL; - DVBEventStorageEventIterator* _tmp0_ = NULL; + DVBEventStorageEventIterator* _tmp0_; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = dvb_event_storage_event_iterator_new (self); result = (GeeBidirIterator*) _tmp0_; @@ -719,10 +920,12 @@ gint dvb_event_storage_get_size (DVBEventStorage* self) { gint result; - gint _tmp0_; + GSequence* _tmp0_; + gint _tmp1_ = 0; g_return_val_if_fail (self != NULL, 0); - _tmp0_ = g_sequence_get_length (self->priv->events); - result = _tmp0_; + _tmp0_ = self->priv->events; + _tmp1_ = g_sequence_get_length (_tmp0_); + result = _tmp1_; return result; } @@ -740,13 +943,17 @@ DVBEventStorageEventIterator * self = NULL; DVBEventStorage* _tmp0_; DVBEventStorage* _tmp1_; + DVBEventStorage* _tmp2_; + gint _tmp3_; g_return_val_if_fail (storage != NULL, NULL); self = (DVBEventStorageEventIterator*) g_object_new (object_type, NULL); - _tmp0_ = _g_object_ref0 (storage); - _tmp1_ = _tmp0_; + _tmp0_ = storage; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_storage); self->priv->_storage = _tmp1_; - self->priv->_stamp = storage->priv->_stamp; + _tmp2_ = storage; + _tmp3_ = _tmp2_->priv->_stamp; + self->priv->_stamp = _tmp3_; return self; } @@ -759,14 +966,24 @@ static gboolean dvb_event_storage_event_iterator_real_next (GeeIterator* base) { DVBEventStorageEventIterator * self; gboolean result = FALSE; - gboolean _tmp0_; + gint _tmp0_; + DVBEventStorage* _tmp1_; + gint _tmp2_; + GSequenceIter* _tmp3_; + gboolean _tmp4_ = FALSE; self = (DVBEventStorageEventIterator*) base; - g_assert (self->priv->_stamp == self->priv->_storage->priv->_stamp); - _tmp0_ = g_sequence_iter_is_end (self->priv->_iter); - if (!_tmp0_) { - GSequenceIter* _tmp1_ = NULL; - _tmp1_ = g_sequence_iter_next (self->priv->_iter); - self->priv->_iter = _tmp1_; + _tmp0_ = self->priv->_stamp; + _tmp1_ = self->priv->_storage; + _tmp2_ = _tmp1_->priv->_stamp; + g_assert (_tmp0_ == _tmp2_); + _tmp3_ = self->priv->_iter; + _tmp4_ = g_sequence_iter_is_end (_tmp3_); + if (!_tmp4_) { + GSequenceIter* _tmp5_; + GSequenceIter* _tmp6_ = NULL; + _tmp5_ = self->priv->_iter; + _tmp6_ = g_sequence_iter_next (_tmp5_); + self->priv->_iter = _tmp6_; result = TRUE; return result; } @@ -778,11 +995,19 @@ static gboolean dvb_event_storage_event_iterator_real_has_next (GeeIterator* base) { DVBEventStorageEventIterator * self; gboolean result = FALSE; - gboolean _tmp0_; + gint _tmp0_; + DVBEventStorage* _tmp1_; + gint _tmp2_; + GSequenceIter* _tmp3_; + gboolean _tmp4_ = FALSE; self = (DVBEventStorageEventIterator*) base; - g_assert (self->priv->_stamp == self->priv->_storage->priv->_stamp); - _tmp0_ = g_sequence_iter_is_end (self->priv->_iter); - result = !_tmp0_; + _tmp0_ = self->priv->_stamp; + _tmp1_ = self->priv->_storage; + _tmp2_ = _tmp1_->priv->_stamp; + g_assert (_tmp0_ == _tmp2_); + _tmp3_ = self->priv->_iter; + _tmp4_ = g_sequence_iter_is_end (_tmp3_); + result = !_tmp4_; return result; } @@ -791,13 +1016,27 @@ DVBEventStorageEventIterator * self; gboolean result = FALSE; gint _tmp0_; + DVBEventStorage* _tmp1_; + gint _tmp2_; + DVBEventStorage* _tmp3_; + gint _tmp4_; + gint _tmp5_; self = (DVBEventStorageEventIterator*) base; - g_assert (self->priv->_stamp == self->priv->_storage->priv->_stamp); - _tmp0_ = dvb_event_storage_get_size (self->priv->_storage); - if (_tmp0_ > 0) { - GSequenceIter* _tmp1_ = NULL; - _tmp1_ = g_sequence_get_begin_iter (self->priv->_storage->priv->events); - self->priv->_iter = _tmp1_; + _tmp0_ = self->priv->_stamp; + _tmp1_ = self->priv->_storage; + _tmp2_ = _tmp1_->priv->_stamp; + g_assert (_tmp0_ == _tmp2_); + _tmp3_ = self->priv->_storage; + _tmp4_ = dvb_event_storage_get_size (_tmp3_); + _tmp5_ = _tmp4_; + if (_tmp5_ > 0) { + DVBEventStorage* _tmp6_; + GSequence* _tmp7_; + GSequenceIter* _tmp8_ = NULL; + _tmp6_ = self->priv->_storage; + _tmp7_ = _tmp6_->priv->events; + _tmp8_ = g_sequence_get_begin_iter (_tmp7_); + self->priv->_iter = _tmp8_; result = TRUE; return result; } @@ -809,14 +1048,28 @@ static DVBEventElement* dvb_event_storage_event_iterator_real_get (GeeIterator* base) { DVBEventStorageEventIterator * self; DVBEventElement* result = NULL; - gconstpointer _tmp0_ = NULL; - DVBEventElement* _tmp1_; + gint _tmp0_; + DVBEventStorage* _tmp1_; + gint _tmp2_; + GSequenceIter* _tmp3_; + DVBEventStorage* _tmp4_; + GSequence* _tmp5_; + GSequenceIter* _tmp6_; + gconstpointer _tmp7_ = NULL; + DVBEventElement* _tmp8_; self = (DVBEventStorageEventIterator*) base; - g_assert (self->priv->_stamp == self->priv->_storage->priv->_stamp); - g_assert (self->priv->_iter != NULL); - _tmp0_ = g_sequence_get (self->priv->_iter); - _tmp1_ = _g_object_ref0 ((DVBEventElement*) _tmp0_); - result = _tmp1_; + _tmp0_ = self->priv->_stamp; + _tmp1_ = self->priv->_storage; + _tmp2_ = _tmp1_->priv->_stamp; + g_assert (_tmp0_ == _tmp2_); + _tmp3_ = self->priv->_iter; + g_assert (_tmp3_ != NULL); + _tmp4_ = self->priv->_storage; + _tmp5_ = _tmp4_->priv->events; + _tmp6_ = self->priv->_iter; + _tmp7_ = g_sequence_get (_tmp6_); + _tmp8_ = _g_object_ref0 ((DVBEventElement*) _tmp7_); + result = _tmp8_; return result; } @@ -830,14 +1083,24 @@ static gboolean dvb_event_storage_event_iterator_real_previous (GeeBidirIterator* base) { DVBEventStorageEventIterator * self; gboolean result = FALSE; - gboolean _tmp0_; + gint _tmp0_; + DVBEventStorage* _tmp1_; + gint _tmp2_; + GSequenceIter* _tmp3_; + gboolean _tmp4_ = FALSE; self = (DVBEventStorageEventIterator*) base; - g_assert (self->priv->_stamp == self->priv->_storage->priv->_stamp); - _tmp0_ = g_sequence_iter_is_begin (self->priv->_iter); - if (!_tmp0_) { - GSequenceIter* _tmp1_ = NULL; - _tmp1_ = g_sequence_iter_prev (self->priv->_iter); - self->priv->_iter = _tmp1_; + _tmp0_ = self->priv->_stamp; + _tmp1_ = self->priv->_storage; + _tmp2_ = _tmp1_->priv->_stamp; + g_assert (_tmp0_ == _tmp2_); + _tmp3_ = self->priv->_iter; + _tmp4_ = g_sequence_iter_is_begin (_tmp3_); + if (!_tmp4_) { + GSequenceIter* _tmp5_; + GSequenceIter* _tmp6_ = NULL; + _tmp5_ = self->priv->_iter; + _tmp6_ = g_sequence_iter_prev (_tmp5_); + self->priv->_iter = _tmp6_; result = TRUE; return result; } @@ -849,11 +1112,19 @@ static gboolean dvb_event_storage_event_iterator_real_has_previous (GeeBidirIterator* base) { DVBEventStorageEventIterator * self; gboolean result = FALSE; - gboolean _tmp0_; + gint _tmp0_; + DVBEventStorage* _tmp1_; + gint _tmp2_; + GSequenceIter* _tmp3_; + gboolean _tmp4_ = FALSE; self = (DVBEventStorageEventIterator*) base; - g_assert (self->priv->_stamp == self->priv->_storage->priv->_stamp); - _tmp0_ = g_sequence_iter_is_begin (self->priv->_iter); - result = !_tmp0_; + _tmp0_ = self->priv->_stamp; + _tmp1_ = self->priv->_storage; + _tmp2_ = _tmp1_->priv->_stamp; + g_assert (_tmp0_ == _tmp2_); + _tmp3_ = self->priv->_iter; + _tmp4_ = g_sequence_iter_is_begin (_tmp3_); + result = !_tmp4_; return result; } @@ -862,13 +1133,27 @@ DVBEventStorageEventIterator * self; gboolean result = FALSE; gint _tmp0_; + DVBEventStorage* _tmp1_; + gint _tmp2_; + DVBEventStorage* _tmp3_; + gint _tmp4_; + gint _tmp5_; self = (DVBEventStorageEventIterator*) base; - g_assert (self->priv->_stamp == self->priv->_storage->priv->_stamp); - _tmp0_ = dvb_event_storage_get_size (self->priv->_storage); - if (_tmp0_ > 0) { - GSequenceIter* _tmp1_ = NULL; - _tmp1_ = g_sequence_get_end_iter (self->priv->_storage->priv->events); - self->priv->_iter = _tmp1_; + _tmp0_ = self->priv->_stamp; + _tmp1_ = self->priv->_storage; + _tmp2_ = _tmp1_->priv->_stamp; + g_assert (_tmp0_ == _tmp2_); + _tmp3_ = self->priv->_storage; + _tmp4_ = dvb_event_storage_get_size (_tmp3_); + _tmp5_ = _tmp4_; + if (_tmp5_ > 0) { + DVBEventStorage* _tmp6_; + GSequence* _tmp7_; + GSequenceIter* _tmp8_ = NULL; + _tmp6_ = self->priv->_storage; + _tmp7_ = _tmp6_->priv->events; + _tmp8_ = g_sequence_get_end_iter (_tmp7_); + self->priv->_iter = _tmp8_; result = TRUE; return result; } diff -Nru gnome-dvb-daemon-0.1.23/src/EventStorage.vala gnome-dvb-daemon-0.2.7/src/EventStorage.vala --- gnome-dvb-daemon-0.1.23/src/EventStorage.vala 2011-01-06 11:49:08.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/EventStorage.vala 2011-09-29 20:27:47.000000000 +0000 @@ -42,11 +42,6 @@ else if (event1.starttime > event2.starttime) return +1; else return 0; } - - public static void destroy (void* data) { - EventElement e = (EventElement) data; - g_object_unref (e); - } public static EventElement new_from_event (Event event) { EventElement element = new EventElement (); @@ -77,7 +72,7 @@ } public EventStorage () { - this.events = new Sequence (EventElement.destroy); + this.events = new Sequence (); this.event_id_map = new HashMap> (); } diff -Nru gnome-dvb-daemon-0.1.23/src/Factory.c gnome-dvb-daemon-0.2.7/src/Factory.c --- gnome-dvb-daemon-0.1.23/src/Factory.c 2011-01-14 16:56:06.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Factory.c 2011-09-29 19:59:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Factory.c generated by valac 0.11.3, the Vala compiler +/* Factory.c generated by valac 0.14.0, the Vala compiler * generated from Factory.vala, do not modify */ /* @@ -26,7 +26,37 @@ #include #include + +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; +typedef struct _DVBFactoryPrivate DVBFactoryPrivate; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE (dvb_database_sqlite_sqlite_database_get_type ()) #define DVB_DATABASE_SQLITE_SQLITE_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE, DVBdatabasesqliteSqliteDatabase)) @@ -155,6 +185,12 @@ typedef struct _DVBEventClass DVBEventClass; struct _DVBFactory { + GObject parent_instance; + DVBFactoryPrivate * priv; +}; + +struct _DVBFactoryClass { + GObjectClass parent_class; }; typedef enum { @@ -223,21 +259,27 @@ }; +static gpointer dvb_factory_parent_class = NULL; +static DVBLoggingLogger* dvb_factory_log; +static DVBLoggingLogger* dvb_factory_log = NULL; static DVBdatabasesqliteSqliteConfigTimersStore* dvb_factory_store; +static GStaticRecMutex __lock_dvb_factory_store = {0}; static DVBdatabasesqliteSqliteConfigTimersStore* dvb_factory_store = NULL; -static GStaticRecMutex dvb_factory_store_mutex; -static GStaticRecMutex dvb_factory_store_mutex = {0}; static DVBdatabasesqliteSqliteEPGStore* dvb_factory_epgstore; +static GStaticRecMutex __lock_dvb_factory_epgstore = {0}; static DVBdatabasesqliteSqliteEPGStore* dvb_factory_epgstore = NULL; -static GStaticRecMutex dvb_factory_epgstore_mutex; -static GStaticRecMutex dvb_factory_epgstore_mutex = {0}; static DVBSettings* dvb_factory_settings; +static GStaticRecMutex __lock_dvb_factory_settings = {0}; static DVBSettings* dvb_factory_settings = NULL; -static GStaticRecMutex dvb_factory_settings_mutex; -static GStaticRecMutex dvb_factory_settings_mutex = {0}; -void dvb_factory_free (DVBFactory* self); -static void dvb_factory_instance_init (DVBFactory * self); +GType dvb_factory_get_type (void) G_GNUC_CONST; +enum { + DVB_FACTORY_DUMMY_PROPERTY +}; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); GType dvb_database_sqlite_sqlite_database_get_type (void) G_GNUC_CONST; GType dvb_database_sqlite_sqlite_config_timers_store_get_type (void) G_GNUC_CONST; GType dvb_database_sqlite_sqlite_epg_store_get_type (void) G_GNUC_CONST; @@ -246,15 +288,16 @@ GType dvb_timer_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); GType dvb_database_timers_store_get_type (void) G_GNUC_CONST; -DVBdatabaseTimersStore* dvb_factory_get_timers_store (void); +DVBdatabaseTimersStore* dvb_factory_get_timers_store (DVBFactory* self); DVBdatabasesqliteSqliteConfigTimersStore* dvb_database_sqlite_sqlite_config_timers_store_new (void); DVBdatabasesqliteSqliteConfigTimersStore* dvb_database_sqlite_sqlite_config_timers_store_construct (GType object_type); void dvb_database_sqlite_sqlite_database_open (DVBdatabasesqliteSqliteDatabase* self, GError** error); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); GType dvb_device_get_type (void) G_GNUC_CONST; GType dvb_channel_group_get_type (void) G_GNUC_CONST; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_database_config_store_get_type (void) G_GNUC_CONST; -DVBdatabaseConfigStore* dvb_factory_get_config_store (void); +DVBdatabaseConfigStore* dvb_factory_get_config_store (DVBFactory* self); gpointer dvb_event_ref (gpointer instance); void dvb_event_unref (gpointer instance); GParamSpec* dvb_param_spec_event (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); @@ -263,17 +306,18 @@ gpointer dvb_value_get_event (const GValue* value); GType dvb_event_get_type (void) G_GNUC_CONST; GType dvb_database_epg_store_get_type (void) G_GNUC_CONST; -DVBdatabaseEPGStore* dvb_factory_get_epg_store (void); +DVBdatabaseEPGStore* dvb_factory_get_epg_store (DVBFactory* self); DVBdatabasesqliteSqliteEPGStore* dvb_database_sqlite_sqlite_epg_store_new (void); DVBdatabasesqliteSqliteEPGStore* dvb_database_sqlite_sqlite_epg_store_construct (GType object_type); -DVBSettings* dvb_factory_get_settings (void); +DVBSettings* dvb_factory_get_settings (DVBFactory* self); DVBSettings* dvb_settings_new (void); DVBSettings* dvb_settings_construct (GType object_type); gboolean dvb_settings_load (DVBSettings* self); -void dvb_factory_shutdown (void); +void dvb_factory_shutdown (DVBFactory* self); gboolean dvb_settings_save (DVBSettings* self); DVBFactory* dvb_factory_new (void); -DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +static void dvb_factory_finalize (GObject* obj); static gpointer _g_object_ref0 (gpointer self) { @@ -281,209 +325,380 @@ } -DVBdatabaseTimersStore* dvb_factory_get_timers_store (void) { +DVBdatabaseTimersStore* dvb_factory_get_timers_store (DVBFactory* self) { DVBdatabaseTimersStore* result = NULL; - DVBdatabaseTimersStore* _tmp3_; + DVBdatabasesqliteSqliteConfigTimersStore* _tmp10_; + DVBdatabaseTimersStore* _tmp11_; GError * _inner_error_ = NULL; - g_static_rec_mutex_lock (&dvb_factory_store_mutex); - if (dvb_factory_store == NULL) { - DVBdatabasesqliteSqliteConfigTimersStore* _tmp0_ = NULL; - DVBdatabasesqliteSqliteConfigTimersStore* _tmp1_; - _tmp0_ = dvb_database_sqlite_sqlite_config_timers_store_new (); - _tmp1_ = _tmp0_; - _g_object_unref0 (dvb_factory_store); - dvb_factory_store = _tmp1_; - dvb_database_sqlite_sqlite_database_open ((DVBdatabasesqliteSqliteDatabase*) dvb_factory_store, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch67_dvb_database_sql_error; + g_return_val_if_fail (self != NULL, NULL); + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp0_; + _tmp0_ = dvb_factory_store; + g_static_rec_mutex_lock (&__lock_dvb_factory_store); + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp1_; + _tmp1_ = dvb_factory_store; + if (_tmp1_ == NULL) { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp2_; + _tmp2_ = dvb_database_sqlite_sqlite_config_timers_store_new (); + _g_object_unref0 (dvb_factory_store); + dvb_factory_store = _tmp2_; + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp3_; + _tmp3_ = dvb_factory_store; + dvb_database_sqlite_sqlite_database_open ((DVBdatabasesqliteSqliteDatabase*) _tmp3_, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch68_dvb_database_sql_error; + } + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp4_; + _tmp4_ = dvb_factory_store; + g_static_rec_mutex_unlock (&__lock_dvb_factory_store); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + goto __finally68; + __catch68_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp5_; + GError* _tmp6_; + const gchar* _tmp7_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp5_ = dvb_factory_log; + _tmp6_ = e; + _tmp7_ = _tmp6_->message; + dvb_logging_logger_error (_tmp5_, "Factory.vala:42: %s", _tmp7_); + _g_object_unref0 (dvb_factory_store); + dvb_factory_store = NULL; + _g_error_free0 (e); + } + __finally68: + if (_inner_error_ != NULL) { + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp8_; + _tmp8_ = dvb_factory_store; + g_static_rec_mutex_unlock (&__lock_dvb_factory_store); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; } - goto __finally67; - __catch67_dvb_database_sql_error: + __finally67: { - GError * e; - DVBdatabasesqliteSqliteConfigTimersStore* _tmp2_; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Factory.vala:43: %s", e->message); - _tmp2_ = NULL; - _g_object_unref0 (dvb_factory_store); - dvb_factory_store = _tmp2_; - _g_error_free0 (e); + DVBdatabasesqliteSqliteConfigTimersStore* _tmp9_; + _tmp9_ = dvb_factory_store; + g_static_rec_mutex_unlock (&__lock_dvb_factory_store); } - __finally67: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return NULL; } } - g_static_rec_mutex_unlock (&dvb_factory_store_mutex); - _tmp3_ = _g_object_ref0 ((DVBdatabaseTimersStore*) dvb_factory_store); - result = _tmp3_; + _tmp10_ = dvb_factory_store; + _tmp11_ = _g_object_ref0 ((DVBdatabaseTimersStore*) _tmp10_); + result = _tmp11_; return result; } -DVBdatabaseConfigStore* dvb_factory_get_config_store (void) { +DVBdatabaseConfigStore* dvb_factory_get_config_store (DVBFactory* self) { DVBdatabaseConfigStore* result = NULL; - DVBdatabaseConfigStore* _tmp3_; + DVBdatabasesqliteSqliteConfigTimersStore* _tmp10_; + DVBdatabaseConfigStore* _tmp11_; GError * _inner_error_ = NULL; - g_static_rec_mutex_lock (&dvb_factory_store_mutex); - if (dvb_factory_store == NULL) { - DVBdatabasesqliteSqliteConfigTimersStore* _tmp0_ = NULL; - DVBdatabasesqliteSqliteConfigTimersStore* _tmp1_; - _tmp0_ = dvb_database_sqlite_sqlite_config_timers_store_new (); - _tmp1_ = _tmp0_; - _g_object_unref0 (dvb_factory_store); - dvb_factory_store = _tmp1_; - dvb_database_sqlite_sqlite_database_open ((DVBdatabasesqliteSqliteDatabase*) dvb_factory_store, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch68_dvb_database_sql_error; + g_return_val_if_fail (self != NULL, NULL); + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp0_; + _tmp0_ = dvb_factory_store; + g_static_rec_mutex_lock (&__lock_dvb_factory_store); + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp1_; + _tmp1_ = dvb_factory_store; + if (_tmp1_ == NULL) { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp2_; + _tmp2_ = dvb_database_sqlite_sqlite_config_timers_store_new (); + _g_object_unref0 (dvb_factory_store); + dvb_factory_store = _tmp2_; + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp3_; + _tmp3_ = dvb_factory_store; + dvb_database_sqlite_sqlite_database_open ((DVBdatabasesqliteSqliteDatabase*) _tmp3_, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch70_dvb_database_sql_error; + } + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp4_; + _tmp4_ = dvb_factory_store; + g_static_rec_mutex_unlock (&__lock_dvb_factory_store); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + goto __finally70; + __catch70_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp5_; + GError* _tmp6_; + const gchar* _tmp7_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp5_ = dvb_factory_log; + _tmp6_ = e; + _tmp7_ = _tmp6_->message; + dvb_logging_logger_error (_tmp5_, "Factory.vala:57: %s", _tmp7_); + _g_object_unref0 (dvb_factory_store); + dvb_factory_store = NULL; + _g_error_free0 (e); + } + __finally70: + if (_inner_error_ != NULL) { + { + DVBdatabasesqliteSqliteConfigTimersStore* _tmp8_; + _tmp8_ = dvb_factory_store; + g_static_rec_mutex_unlock (&__lock_dvb_factory_store); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; } - goto __finally68; - __catch68_dvb_database_sql_error: + __finally69: { - GError * e; - DVBdatabasesqliteSqliteConfigTimersStore* _tmp2_; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Factory.vala:58: %s", e->message); - _tmp2_ = NULL; - _g_object_unref0 (dvb_factory_store); - dvb_factory_store = _tmp2_; - _g_error_free0 (e); + DVBdatabasesqliteSqliteConfigTimersStore* _tmp9_; + _tmp9_ = dvb_factory_store; + g_static_rec_mutex_unlock (&__lock_dvb_factory_store); } - __finally68: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return NULL; } } - g_static_rec_mutex_unlock (&dvb_factory_store_mutex); - _tmp3_ = _g_object_ref0 ((DVBdatabaseConfigStore*) dvb_factory_store); - result = _tmp3_; + _tmp10_ = dvb_factory_store; + _tmp11_ = _g_object_ref0 ((DVBdatabaseConfigStore*) _tmp10_); + result = _tmp11_; return result; } -DVBdatabaseEPGStore* dvb_factory_get_epg_store (void) { +DVBdatabaseEPGStore* dvb_factory_get_epg_store (DVBFactory* self) { DVBdatabaseEPGStore* result = NULL; - DVBdatabaseEPGStore* _tmp3_; + DVBdatabasesqliteSqliteEPGStore* _tmp10_; + DVBdatabaseEPGStore* _tmp11_; GError * _inner_error_ = NULL; - g_static_rec_mutex_lock (&dvb_factory_epgstore_mutex); - if (dvb_factory_epgstore == NULL) { - DVBdatabasesqliteSqliteEPGStore* _tmp0_ = NULL; - DVBdatabasesqliteSqliteEPGStore* _tmp1_; - _tmp0_ = dvb_database_sqlite_sqlite_epg_store_new (); - _tmp1_ = _tmp0_; - _g_object_unref0 (dvb_factory_epgstore); - dvb_factory_epgstore = _tmp1_; - dvb_database_sqlite_sqlite_database_open ((DVBdatabasesqliteSqliteDatabase*) dvb_factory_epgstore, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch69_dvb_database_sql_error; + g_return_val_if_fail (self != NULL, NULL); + { + DVBdatabasesqliteSqliteEPGStore* _tmp0_; + _tmp0_ = dvb_factory_epgstore; + g_static_rec_mutex_lock (&__lock_dvb_factory_epgstore); + { + DVBdatabasesqliteSqliteEPGStore* _tmp1_; + _tmp1_ = dvb_factory_epgstore; + if (_tmp1_ == NULL) { + DVBdatabasesqliteSqliteEPGStore* _tmp2_; + _tmp2_ = dvb_database_sqlite_sqlite_epg_store_new (); + _g_object_unref0 (dvb_factory_epgstore); + dvb_factory_epgstore = _tmp2_; + { + DVBdatabasesqliteSqliteEPGStore* _tmp3_; + _tmp3_ = dvb_factory_epgstore; + dvb_database_sqlite_sqlite_database_open ((DVBdatabasesqliteSqliteDatabase*) _tmp3_, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch72_dvb_database_sql_error; + } + { + DVBdatabasesqliteSqliteEPGStore* _tmp4_; + _tmp4_ = dvb_factory_epgstore; + g_static_rec_mutex_unlock (&__lock_dvb_factory_epgstore); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + goto __finally72; + __catch72_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp5_; + GError* _tmp6_; + const gchar* _tmp7_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp5_ = dvb_factory_log; + _tmp6_ = e; + _tmp7_ = _tmp6_->message; + dvb_logging_logger_error (_tmp5_, "Factory.vala:72: %s", _tmp7_); + _g_object_unref0 (dvb_factory_epgstore); + dvb_factory_epgstore = NULL; + _g_error_free0 (e); + } + __finally72: + if (_inner_error_ != NULL) { + { + DVBdatabasesqliteSqliteEPGStore* _tmp8_; + _tmp8_ = dvb_factory_epgstore; + g_static_rec_mutex_unlock (&__lock_dvb_factory_epgstore); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; } - goto __finally69; - __catch69_dvb_database_sql_error: + __finally71: { - GError * e; - DVBdatabasesqliteSqliteEPGStore* _tmp2_; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Factory.vala:73: %s", e->message); - _tmp2_ = NULL; - _g_object_unref0 (dvb_factory_epgstore); - dvb_factory_epgstore = _tmp2_; - _g_error_free0 (e); + DVBdatabasesqliteSqliteEPGStore* _tmp9_; + _tmp9_ = dvb_factory_epgstore; + g_static_rec_mutex_unlock (&__lock_dvb_factory_epgstore); } - __finally69: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return NULL; } } - g_static_rec_mutex_unlock (&dvb_factory_epgstore_mutex); - _tmp3_ = _g_object_ref0 ((DVBdatabaseEPGStore*) dvb_factory_epgstore); - result = _tmp3_; + _tmp10_ = dvb_factory_epgstore; + _tmp11_ = _g_object_ref0 ((DVBdatabaseEPGStore*) _tmp10_); + result = _tmp11_; return result; } -DVBSettings* dvb_factory_get_settings (void) { +DVBSettings* dvb_factory_get_settings (DVBFactory* self) { DVBSettings* result = NULL; - DVBSettings* _tmp2_; - g_static_rec_mutex_lock (&dvb_factory_settings_mutex); - if (dvb_factory_settings == NULL) { - DVBSettings* _tmp0_ = NULL; - DVBSettings* _tmp1_; - _tmp0_ = dvb_settings_new (); - _tmp1_ = _tmp0_; - _g_object_unref0 (dvb_factory_settings); - dvb_factory_settings = _tmp1_; - dvb_settings_load (dvb_factory_settings); + DVBSettings* _tmp5_; + DVBSettings* _tmp6_; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, NULL); + { + DVBSettings* _tmp0_; + _tmp0_ = dvb_factory_settings; + g_static_rec_mutex_lock (&__lock_dvb_factory_settings); + { + DVBSettings* _tmp1_; + _tmp1_ = dvb_factory_settings; + if (_tmp1_ == NULL) { + DVBSettings* _tmp2_; + DVBSettings* _tmp3_; + _tmp2_ = dvb_settings_new (); + _g_object_unref0 (dvb_factory_settings); + dvb_factory_settings = _tmp2_; + _tmp3_ = dvb_factory_settings; + dvb_settings_load (_tmp3_); + } + } + __finally73: + { + DVBSettings* _tmp4_; + _tmp4_ = dvb_factory_settings; + g_static_rec_mutex_unlock (&__lock_dvb_factory_settings); + } + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } } - g_static_rec_mutex_unlock (&dvb_factory_settings_mutex); - _tmp2_ = _g_object_ref0 (dvb_factory_settings); - result = _tmp2_; + _tmp5_ = dvb_factory_settings; + _tmp6_ = _g_object_ref0 (_tmp5_); + result = _tmp6_; return result; } -void dvb_factory_shutdown (void) { - DVBdatabasesqliteSqliteConfigTimersStore* _tmp0_; - DVBdatabasesqliteSqliteEPGStore* _tmp1_; - DVBSettings* _tmp2_; - g_static_rec_mutex_lock (&dvb_factory_store_mutex); - _tmp0_ = NULL; - _g_object_unref0 (dvb_factory_store); - dvb_factory_store = _tmp0_; - g_static_rec_mutex_unlock (&dvb_factory_store_mutex); - g_static_rec_mutex_lock (&dvb_factory_epgstore_mutex); - _tmp1_ = NULL; - _g_object_unref0 (dvb_factory_epgstore); - dvb_factory_epgstore = _tmp1_; - g_static_rec_mutex_unlock (&dvb_factory_epgstore_mutex); - g_static_rec_mutex_lock (&dvb_factory_settings_mutex); - if (dvb_factory_settings != NULL) { - dvb_settings_save (dvb_factory_settings); +void dvb_factory_shutdown (DVBFactory* self) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + { + DVBSettings* _tmp0_; + _tmp0_ = dvb_factory_settings; + g_static_rec_mutex_lock (&__lock_dvb_factory_settings); + { + DVBSettings* _tmp1_; + _tmp1_ = dvb_factory_settings; + if (_tmp1_ != NULL) { + DVBSettings* _tmp2_; + _tmp2_ = dvb_factory_settings; + dvb_settings_save (_tmp2_); + } + } + __finally74: + { + DVBSettings* _tmp3_; + _tmp3_ = dvb_factory_settings; + g_static_rec_mutex_unlock (&__lock_dvb_factory_settings); + } + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } } - _tmp2_ = NULL; - _g_object_unref0 (dvb_factory_settings); - dvb_factory_settings = _tmp2_; - g_static_rec_mutex_unlock (&dvb_factory_settings_mutex); } -DVBFactory* dvb_factory_new (void) { - DVBFactory* self; - self = g_slice_new0 (DVBFactory); - dvb_factory_instance_init (self); +DVBFactory* dvb_factory_construct (GType object_type) { + DVBFactory * self = NULL; + self = (DVBFactory*) g_object_new (object_type, NULL); return self; } +DVBFactory* dvb_factory_new (void) { + return dvb_factory_construct (DVB_TYPE_FACTORY); +} + + +static void dvb_factory_class_init (DVBFactoryClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; + dvb_factory_parent_class = g_type_class_peek_parent (klass); + G_OBJECT_CLASS (klass)->finalize = dvb_factory_finalize; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_factory_log = _tmp1_; + g_static_rec_mutex_init (&__lock_dvb_factory_store); + g_static_rec_mutex_init (&__lock_dvb_factory_epgstore); + g_static_rec_mutex_init (&__lock_dvb_factory_settings); +} + + static void dvb_factory_instance_init (DVBFactory * self) { } -void dvb_factory_free (DVBFactory* self) { - g_slice_free (DVBFactory, self); +static void dvb_factory_finalize (GObject* obj) { + DVBFactory * self; + self = DVB_FACTORY (obj); + G_OBJECT_CLASS (dvb_factory_parent_class)->finalize (obj); +} + + +GType dvb_factory_get_type (void) { + static volatile gsize dvb_factory_type_id__volatile = 0; + if (g_once_init_enter (&dvb_factory_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBFactory), 0, (GInstanceInitFunc) dvb_factory_instance_init, NULL }; + GType dvb_factory_type_id; + dvb_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBFactory", &g_define_type_info, 0); + g_once_init_leave (&dvb_factory_type_id__volatile, dvb_factory_type_id); + } + return dvb_factory_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.23/src/Factory.vala gnome-dvb-daemon-0.2.7/src/Factory.vala --- gnome-dvb-daemon-0.1.23/src/Factory.vala 2010-12-05 11:23:49.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Factory.vala 2011-09-29 20:27:47.000000000 +0000 @@ -20,89 +20,79 @@ using GLib; using DVB.database; using DVB.database.sqlite; +using DVB.Logging; namespace DVB { - [Compact] - public class Factory { + public class Factory : GLib.Object { + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); private static SqliteConfigTimersStore store; - private static StaticRecMutex store_mutex = StaticRecMutex (); private static SqliteEPGStore epgstore; - private static StaticRecMutex epgstore_mutex = StaticRecMutex (); private static DVB.Settings settings; - private static StaticRecMutex settings_mutex = StaticRecMutex (); - - public static TimersStore get_timers_store () { - store_mutex.lock (); + + public TimersStore get_timers_store () { + lock(store) { if (store == null) { store = new SqliteConfigTimersStore (); try { store.open (); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); store = null; } } - store_mutex.unlock (); + } return store; } - - public static ConfigStore get_config_store () { - store_mutex.lock (); + + public ConfigStore get_config_store () { + lock(store) { if (store == null) { store = new SqliteConfigTimersStore (); try { store.open (); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); store = null; } } - store_mutex.unlock (); + } return store; } - - public static EPGStore get_epg_store () { - epgstore_mutex.lock (); + + public EPGStore get_epg_store () { + lock (epgstore) { if (epgstore == null) { epgstore = new SqliteEPGStore (); try { epgstore.open (); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); epgstore = null; } } - epgstore_mutex.unlock (); + } return epgstore; } - - public static DVB.Settings get_settings () { - settings_mutex.lock (); + + public DVB.Settings get_settings () { + lock(settings) { if (settings == null) { settings = new DVB.Settings (); settings.load (); } - settings_mutex.unlock (); + } return settings; } - - public static void shutdown () { - store_mutex.lock (); - store = null; - store_mutex.unlock (); - - epgstore_mutex.lock (); - epgstore = null; - epgstore_mutex.unlock (); - - settings_mutex.lock (); + + public void shutdown () { + lock(settings) { if (settings != null) settings.save (); - settings = null; - settings_mutex.unlock (); + } } - + } - + } diff -Nru gnome-dvb-daemon-0.1.23/src/io/ChannelListReader.c gnome-dvb-daemon-0.2.7/src/io/ChannelListReader.c --- gnome-dvb-daemon-0.1.23/src/io/ChannelListReader.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/io/ChannelListReader.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelListReader.c generated by valac 0.11.3, the Vala compiler +/* ChannelListReader.c generated by valac 0.14.0, the Vala compiler * generated from ChannelListReader.vala, do not modify */ /* @@ -50,6 +50,26 @@ typedef struct _DVBChannelListClass DVBChannelListClass; #define DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -188,6 +208,8 @@ static gpointer dvb_io_channel_list_reader_parent_class = NULL; +static DVBLoggingLogger* dvb_io_channel_list_reader_log; +static DVBLoggingLogger* dvb_io_channel_list_reader_log = NULL; GType dvb_io_channel_list_reader_get_type (void) G_GNUC_CONST; GType dvb_channel_list_get_type (void) G_GNUC_CONST; @@ -198,6 +220,10 @@ DVB_IO_CHANNEL_LIST_READER_CHANNELS, DVB_IO_CHANNEL_LIST_READER_TYPE }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBioChannelListReader* dvb_io_channel_list_reader_new (DVBChannelList* channels, DVBAdapterType type); DVBioChannelListReader* dvb_io_channel_list_reader_construct (GType object_type, DVBChannelList* channels, DVBAdapterType type); void dvb_io_channel_list_reader_read_into (DVBioChannelListReader* self, GError** error); @@ -213,12 +239,12 @@ static DVBSatelliteChannel* dvb_io_channel_list_reader_parse_satellite_channel (DVBioChannelListReader* self, const gchar* line); GType dvb_cable_channel_get_type (void) G_GNUC_CONST; static DVBCableChannel* dvb_io_channel_list_reader_parse_cable_channel (DVBioChannelListReader* self, const gchar* line); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); gboolean dvb_channel_is_valid (DVBChannel* self); -guint dvb_channel_list_get_GroupId (DVBChannelList* self); -void dvb_channel_set_GroupId (DVBChannel* self, guint value); gchar* dvb_channel_to_string (DVBChannel* self); -DVBTerrestrialChannel* dvb_terrestrial_channel_new (void); -DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type); +guint dvb_channel_list_get_GroupId (DVBChannelList* self); +DVBTerrestrialChannel* dvb_terrestrial_channel_new (guint group_id); +DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type, guint group_id); void dvb_channel_set_Name (DVBChannel* self, const gchar* value); void dvb_channel_set_Frequency (DVBChannel* self, guint value); static gboolean dvb_io_channel_list_reader_get_value_with_prefix (GType enumtype, const gchar* name, const gchar* prefix, gint* val); @@ -240,13 +266,13 @@ void dvb_channel_set_VideoPID (DVBChannel* self, guint value); GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self); void dvb_channel_set_Sid (DVBChannel* self, guint value); -DVBSatelliteChannel* dvb_satellite_channel_new (void); -DVBSatelliteChannel* dvb_satellite_channel_construct (GType object_type); +DVBSatelliteChannel* dvb_satellite_channel_new (guint group_id); +DVBSatelliteChannel* dvb_satellite_channel_construct (GType object_type, guint group_id); void dvb_satellite_channel_set_Polarization (DVBSatelliteChannel* self, const gchar* value); void dvb_satellite_channel_set_DiseqcSource (DVBSatelliteChannel* self, gint value); void dvb_satellite_channel_set_SymbolRate (DVBSatelliteChannel* self, guint value); -DVBCableChannel* dvb_cable_channel_new (void); -DVBCableChannel* dvb_cable_channel_construct (GType object_type); +DVBCableChannel* dvb_cable_channel_new (guint group_id); +DVBCableChannel* dvb_cable_channel_construct (GType object_type, guint group_id); void dvb_cable_channel_set_Inversion (DVBCableChannel* self, DVBDvbSrcInversion value); void dvb_cable_channel_set_SymbolRate (DVBCableChannel* self, guint value); void dvb_cable_channel_set_CodeRate (DVBCableChannel* self, DVBDvbSrcCodeRate value); @@ -264,8 +290,12 @@ DVBioChannelListReader* dvb_io_channel_list_reader_construct (GType object_type, DVBChannelList* channels, DVBAdapterType type) { DVBioChannelListReader * self = NULL; + DVBChannelList* _tmp0_; + DVBAdapterType _tmp1_; g_return_val_if_fail (channels != NULL, NULL); - self = (DVBioChannelListReader*) g_object_new (object_type, "channels", channels, "Type", type, NULL); + _tmp0_ = channels; + _tmp1_ = type; + self = (DVBioChannelListReader*) g_object_new (object_type, "channels", _tmp0_, "Type", _tmp1_, NULL); return self; } @@ -276,65 +306,89 @@ void dvb_io_channel_list_reader_read_into (DVBioChannelListReader* self, GError** error) { - GFile* _tmp0_ = NULL; - GFile* _tmp1_ = NULL; - GFileInputStream* _tmp2_ = NULL; - GFileInputStream* _tmp3_; - GFileInputStream* _tmp4_; - GDataInputStream* _tmp5_ = NULL; - GDataInputStream* _tmp6_; + DVBChannelList* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; + DVBChannelList* _tmp3_; + GFile* _tmp4_; + GFile* _tmp5_; + GFileInputStream* _tmp6_ = NULL; + GFileInputStream* _tmp7_; + GFileInputStream* _tmp8_; + GDataInputStream* _tmp9_; + GDataInputStream* _tmp10_; GDataInputStream* reader; gchar* line; gsize len = 0UL; + GDataInputStream* _tmp22_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _tmp0_ = dvb_channel_list_get_channels_file (self->priv->_channels); - g_return_if_fail (_tmp0_ != NULL); - _tmp1_ = dvb_channel_list_get_channels_file (self->priv->_channels); - _tmp2_ = g_file_read (_tmp1_, NULL, &_inner_error_); - _tmp3_ = _tmp2_; + _tmp0_ = self->priv->_channels; + _tmp1_ = dvb_channel_list_get_channels_file (_tmp0_); + _tmp2_ = _tmp1_; + g_return_if_fail (_tmp2_ != NULL); + _tmp3_ = self->priv->_channels; + _tmp4_ = dvb_channel_list_get_channels_file (_tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = g_file_read (_tmp5_, NULL, &_inner_error_); + _tmp7_ = _tmp6_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); return; } - _tmp4_ = _tmp3_; - _tmp5_ = g_data_input_stream_new ((GInputStream*) _tmp4_); - reader = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = g_data_input_stream_new ((GInputStream*) _tmp8_); + _tmp10_ = _tmp9_; + _g_object_unref0 (_tmp8_); + reader = _tmp10_; line = NULL; while (TRUE) { - gsize _tmp7_; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - gchar* _tmp10_; - _tmp8_ = g_data_input_stream_read_line (reader, &_tmp7_, NULL, &_inner_error_); - len = _tmp7_; - _tmp9_ = _tmp8_; + GDataInputStream* _tmp11_; + gsize _tmp12_ = 0UL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_; + const gchar* _tmp15_; + gsize _tmp16_; + _tmp11_ = reader; + _tmp13_ = g_data_input_stream_read_line (_tmp11_, &_tmp12_, NULL, &_inner_error_); + len = _tmp12_; + _tmp14_ = _tmp13_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (line); _g_object_unref0 (reader); return; } - _tmp10_ = _tmp9_; _g_free0 (line); - line = _tmp10_; - if (!(line != NULL)) { + line = _tmp14_; + _tmp15_ = line; + if (!(_tmp15_ != NULL)) { break; } - if (len > 0) { - DVBChannel* _tmp11_ = NULL; + _tmp16_ = len; + if (_tmp16_ > ((gsize) 0)) { + const gchar* _tmp17_; + DVBChannel* _tmp18_ = NULL; DVBChannel* c; - _tmp11_ = dvb_io_channel_list_reader_parse_line (self, line); - c = _tmp11_; - if (c != NULL) { - dvb_channel_list_add (self->priv->_channels, c); + DVBChannel* _tmp19_; + _tmp17_ = line; + _tmp18_ = dvb_io_channel_list_reader_parse_line (self, _tmp17_); + c = _tmp18_; + _tmp19_ = c; + if (_tmp19_ != NULL) { + DVBChannelList* _tmp20_; + DVBChannel* _tmp21_; + _tmp20_ = self->priv->_channels; + _tmp21_ = c; + dvb_channel_list_add (_tmp20_, _tmp21_); } else { - g_warning ("ChannelListReader.vala:47: Could not parse channel"); + g_warning ("ChannelListReader.vala:50: Could not parse channel"); } _g_object_unref0 (c); } } - g_input_stream_close ((GInputStream*) reader, NULL, &_inner_error_); + _tmp22_ = reader; + g_input_stream_close ((GInputStream*) _tmp22_, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (line); @@ -349,86 +403,96 @@ static DVBChannel* dvb_io_channel_list_reader_parse_line (DVBioChannelListReader* self, const gchar* line) { DVBChannel* result = NULL; DVBChannel* c; - gboolean _tmp6_ = FALSE; + DVBAdapterType _tmp0_; + gboolean _tmp8_ = FALSE; + DVBChannel* _tmp9_; + gboolean _tmp12_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (line != NULL, NULL); c = NULL; - switch (self->priv->_Type) { + _tmp0_ = self->priv->_Type; + switch (_tmp0_) { case DVB_ADAPTER_TYPE_DVB_T: { - DVBTerrestrialChannel* _tmp0_ = NULL; - DVBChannel* _tmp1_; - _tmp0_ = dvb_io_channel_list_reader_parse_terrestrial_channel (self, line); - _tmp1_ = (DVBChannel*) _tmp0_; + const gchar* _tmp1_; + DVBTerrestrialChannel* _tmp2_ = NULL; + _tmp1_ = line; + _tmp2_ = dvb_io_channel_list_reader_parse_terrestrial_channel (self, _tmp1_); _g_object_unref0 (c); - c = _tmp1_; + c = (DVBChannel*) _tmp2_; break; } case DVB_ADAPTER_TYPE_DVB_S: { - DVBSatelliteChannel* _tmp2_ = NULL; - DVBChannel* _tmp3_; - _tmp2_ = dvb_io_channel_list_reader_parse_satellite_channel (self, line); - _tmp3_ = (DVBChannel*) _tmp2_; + const gchar* _tmp3_; + DVBSatelliteChannel* _tmp4_ = NULL; + _tmp3_ = line; + _tmp4_ = dvb_io_channel_list_reader_parse_satellite_channel (self, _tmp3_); _g_object_unref0 (c); - c = _tmp3_; + c = (DVBChannel*) _tmp4_; break; } case DVB_ADAPTER_TYPE_DVB_C: { - DVBCableChannel* _tmp4_ = NULL; - DVBChannel* _tmp5_; - _tmp4_ = dvb_io_channel_list_reader_parse_cable_channel (self, line); - _tmp5_ = (DVBChannel*) _tmp4_; + const gchar* _tmp5_; + DVBCableChannel* _tmp6_ = NULL; + _tmp5_ = line; + _tmp6_ = dvb_io_channel_list_reader_parse_cable_channel (self, _tmp5_); _g_object_unref0 (c); - c = _tmp5_; + c = (DVBChannel*) _tmp6_; break; } default: { - g_critical ("ChannelListReader.vala:69: Unknown adapter type"); + DVBLoggingLogger* _tmp7_; + _tmp7_ = dvb_io_channel_list_reader_log; + dvb_logging_logger_error (_tmp7_, "ChannelListReader.vala:72: Unknown adapter type"); break; } } - if (c != NULL) { - gboolean _tmp7_; - _tmp7_ = dvb_channel_is_valid (c); - _tmp6_ = _tmp7_; + _tmp9_ = c; + if (_tmp9_ != NULL) { + DVBChannel* _tmp10_; + gboolean _tmp11_ = FALSE; + _tmp10_ = c; + _tmp11_ = dvb_channel_is_valid (_tmp10_); + _tmp8_ = _tmp11_; } else { - _tmp6_ = FALSE; + _tmp8_ = FALSE; } - if (_tmp6_) { - guint _tmp8_; - _tmp8_ = dvb_channel_list_get_GroupId (self->priv->_channels); - dvb_channel_set_GroupId (c, _tmp8_); + _tmp12_ = _tmp8_; + if (_tmp12_) { result = c; return result; } else { - gchar* _tmp9_; - gchar* _tmp14_; + gchar* _tmp13_ = NULL; + DVBChannel* _tmp14_; + const gchar* _tmp18_; + gchar* _tmp19_; gchar* val; - _tmp9_ = NULL; - if (c == NULL) { - gchar* _tmp10_; - gchar* _tmp11_; - _tmp10_ = g_strdup ("(null)"); - _tmp11_ = _tmp10_; - _g_free0 (_tmp9_); - _tmp9_ = _tmp11_; + const gchar* _tmp20_; + _tmp14_ = c; + if (_tmp14_ == NULL) { + gchar* _tmp15_; + _tmp15_ = g_strdup ("(null)"); + _g_free0 (_tmp13_); + _tmp13_ = _tmp15_; } else { - gchar* _tmp12_ = NULL; - gchar* _tmp13_; - _tmp12_ = dvb_channel_to_string (c); - _tmp13_ = _tmp12_; - _g_free0 (_tmp9_); - _tmp9_ = _tmp13_; + DVBChannel* _tmp16_; + gchar* _tmp17_ = NULL; + _tmp16_ = c; + _tmp17_ = dvb_channel_to_string (_tmp16_); + _g_free0 (_tmp13_); + _tmp13_ = _tmp17_; } - _tmp14_ = g_strdup (_tmp9_); - val = _tmp14_; - g_warning ("ChannelListReader.vala:78: Channel is not valid: %s", val); + _tmp18_ = _tmp13_; + _tmp19_ = g_strdup (_tmp18_); + val = _tmp19_; + _tmp20_ = val; + g_warning ("ChannelListReader.vala:80: Channel is not valid: %s", _tmp20_); result = NULL; _g_free0 (val); - _g_free0 (_tmp9_); + _g_free0 (_tmp13_); _g_object_unref0 (c); return result; } @@ -445,174 +509,289 @@ */ static DVBTerrestrialChannel* dvb_io_channel_list_reader_parse_terrestrial_channel (DVBioChannelListReader* self, const gchar* line) { DVBTerrestrialChannel* result = NULL; - DVBTerrestrialChannel* _tmp0_ = NULL; + DVBChannelList* _tmp0_; + guint _tmp1_; + guint _tmp2_; + DVBTerrestrialChannel* _tmp3_; DVBTerrestrialChannel* channel; - gchar** _tmp1_; - gchar** _tmp2_ = NULL; + const gchar* _tmp4_; + gchar** _tmp5_; + gchar** _tmp6_ = NULL; + gchar** fields; gint fields_length1; gint _fields_size_; - gchar** _tmp3_; - gchar** fields; gint i; - gchar* val; + gchar* val = NULL; gboolean failed; + gboolean _tmp85_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (line != NULL, NULL); - _tmp0_ = dvb_terrestrial_channel_new (); - channel = _tmp0_; - _tmp2_ = _tmp1_ = g_strsplit (line, ":", 0); - _tmp3_ = _tmp2_; - fields_length1 = _vala_array_length (_tmp1_); + _tmp0_ = self->priv->_channels; + _tmp1_ = dvb_channel_list_get_GroupId (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_terrestrial_channel_new (_tmp2_); + channel = _tmp3_; + _tmp4_ = line; + _tmp6_ = _tmp5_ = g_strsplit (_tmp4_, ":", 0); + fields = _tmp6_; + fields_length1 = _vala_array_length (_tmp5_); _fields_size_ = fields_length1; - fields = _tmp3_; i = 0; - val = NULL; failed = FALSE; while (TRUE) { - gchar* _tmp4_; - gchar* _tmp5_; - _tmp4_ = g_strdup (fields[i]); - _tmp5_ = _tmp4_; + gchar** _tmp7_; + gint _tmp7__length1; + gint _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_; + const gchar* _tmp11_; + gint _tmp12_; + gint _tmp84_; + _tmp7_ = fields; + _tmp7__length1 = fields_length1; + _tmp8_ = i; + _tmp9_ = _tmp7_[_tmp8_]; + _tmp10_ = g_strdup (_tmp9_); _g_free0 (val); - val = _tmp5_; - if (!(val != NULL)) { + val = _tmp10_; + _tmp11_ = val; + if (!(_tmp11_ != NULL)) { break; } - if (i == 0) { - gboolean _tmp6_; - _tmp6_ = g_utf8_validate (val, (gssize) (-1), NULL); - if (_tmp6_) { - dvb_channel_set_Name ((DVBChannel*) channel, val); + _tmp12_ = i; + if (_tmp12_ == 0) { + const gchar* _tmp13_; + gboolean _tmp14_ = FALSE; + _tmp13_ = val; + _tmp14_ = g_utf8_validate (_tmp13_, (gssize) (-1), NULL); + if (_tmp14_) { + DVBTerrestrialChannel* _tmp15_; + const gchar* _tmp16_; + _tmp15_ = channel; + _tmp16_ = val; + dvb_channel_set_Name ((DVBChannel*) _tmp15_, _tmp16_); } else { - g_warning ("ChannelListReader.vala:103: Bad UTF-8 encoded channel name"); - dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); + DVBTerrestrialChannel* _tmp17_; + g_warning ("ChannelListReader.vala:105: Bad UTF-8 encoded channel name"); + _tmp17_ = channel; + dvb_channel_set_Name ((DVBChannel*) _tmp17_, "Bad encoding"); } } else { - if (i == 1) { - gint _tmp7_; - _tmp7_ = atoi (val); - dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) _tmp7_); + gint _tmp18_; + _tmp18_ = i; + if (_tmp18_ == 1) { + DVBTerrestrialChannel* _tmp19_; + const gchar* _tmp20_; + gint _tmp21_ = 0; + _tmp19_ = channel; + _tmp20_ = val; + _tmp21_ = atoi (_tmp20_); + dvb_channel_set_Frequency ((DVBChannel*) _tmp19_, (guint) _tmp21_); } else { - if (i == 2) { + gint _tmp22_; + _tmp22_ = i; + if (_tmp22_ == 2) { gint eval = 0; - gint _tmp8_; - gboolean _tmp9_; - _tmp9_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, val, "DVB_DVB_SRC_INVERSION_", &_tmp8_); - eval = _tmp8_; - if (_tmp9_) { - dvb_terrestrial_channel_set_Inversion (channel, (DVBDvbSrcInversion) eval); + const gchar* _tmp23_; + gint _tmp24_ = 0; + gboolean _tmp25_ = FALSE; + _tmp23_ = val; + _tmp25_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, _tmp23_, "DVB_DVB_SRC_INVERSION_", &_tmp24_); + eval = _tmp24_; + if (_tmp25_) { + DVBTerrestrialChannel* _tmp26_; + gint _tmp27_; + _tmp26_ = channel; + _tmp27_ = eval; + dvb_terrestrial_channel_set_Inversion (_tmp26_, (DVBDvbSrcInversion) _tmp27_); } else { failed = TRUE; break; } } else { - if (i == 3) { + gint _tmp28_; + _tmp28_ = i; + if (_tmp28_ == 3) { gint eval = 0; - gint _tmp10_; - gboolean _tmp11_; - _tmp11_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, val, "DVB_DVB_SRC_BANDWIDTH_", &_tmp10_); - eval = _tmp10_; - if (_tmp11_) { - dvb_terrestrial_channel_set_Bandwidth (channel, (DVBDvbSrcBandwidth) eval); + const gchar* _tmp29_; + gint _tmp30_ = 0; + gboolean _tmp31_ = FALSE; + _tmp29_ = val; + _tmp31_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, _tmp29_, "DVB_DVB_SRC_BANDWIDTH_", &_tmp30_); + eval = _tmp30_; + if (_tmp31_) { + DVBTerrestrialChannel* _tmp32_; + gint _tmp33_; + _tmp32_ = channel; + _tmp33_ = eval; + dvb_terrestrial_channel_set_Bandwidth (_tmp32_, (DVBDvbSrcBandwidth) _tmp33_); } else { failed = TRUE; break; } } else { - if (i == 4) { + gint _tmp34_; + _tmp34_ = i; + if (_tmp34_ == 4) { gint eval = 0; - gint _tmp12_; - gboolean _tmp13_; - _tmp13_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &_tmp12_); - eval = _tmp12_; - if (_tmp13_) { - dvb_terrestrial_channel_set_CodeRateHP (channel, (DVBDvbSrcCodeRate) eval); + const gchar* _tmp35_; + gint _tmp36_ = 0; + gboolean _tmp37_ = FALSE; + _tmp35_ = val; + _tmp37_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, _tmp35_, "DVB_DVB_SRC_CODE_RATE_", &_tmp36_); + eval = _tmp36_; + if (_tmp37_) { + DVBTerrestrialChannel* _tmp38_; + gint _tmp39_; + _tmp38_ = channel; + _tmp39_ = eval; + dvb_terrestrial_channel_set_CodeRateHP (_tmp38_, (DVBDvbSrcCodeRate) _tmp39_); } else { failed = TRUE; break; } } else { - if (i == 5) { + gint _tmp40_; + _tmp40_ = i; + if (_tmp40_ == 5) { gint eval = 0; - gint _tmp14_; - gboolean _tmp15_; - _tmp15_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &_tmp14_); - eval = _tmp14_; - if (_tmp15_) { - dvb_terrestrial_channel_set_CodeRateLP (channel, (DVBDvbSrcCodeRate) eval); + const gchar* _tmp41_; + gint _tmp42_ = 0; + gboolean _tmp43_ = FALSE; + _tmp41_ = val; + _tmp43_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, _tmp41_, "DVB_DVB_SRC_CODE_RATE_", &_tmp42_); + eval = _tmp42_; + if (_tmp43_) { + DVBTerrestrialChannel* _tmp44_; + gint _tmp45_; + _tmp44_ = channel; + _tmp45_ = eval; + dvb_terrestrial_channel_set_CodeRateLP (_tmp44_, (DVBDvbSrcCodeRate) _tmp45_); } else { failed = TRUE; break; } } else { - if (i == 6) { + gint _tmp46_; + _tmp46_ = i; + if (_tmp46_ == 6) { gint eval = 0; - gint _tmp16_; - gboolean _tmp17_; - _tmp17_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, val, "DVB_DVB_SRC_MODULATION_", &_tmp16_); - eval = _tmp16_; - if (_tmp17_) { - dvb_terrestrial_channel_set_Constellation (channel, (DVBDvbSrcModulation) eval); + const gchar* _tmp47_; + gint _tmp48_ = 0; + gboolean _tmp49_ = FALSE; + _tmp47_ = val; + _tmp49_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, _tmp47_, "DVB_DVB_SRC_MODULATION_", &_tmp48_); + eval = _tmp48_; + if (_tmp49_) { + DVBTerrestrialChannel* _tmp50_; + gint _tmp51_; + _tmp50_ = channel; + _tmp51_ = eval; + dvb_terrestrial_channel_set_Constellation (_tmp50_, (DVBDvbSrcModulation) _tmp51_); } else { failed = TRUE; break; } } else { - if (i == 7) { + gint _tmp52_; + _tmp52_ = i; + if (_tmp52_ == 7) { gint eval = 0; - gint _tmp18_; - gboolean _tmp19_; - _tmp19_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, val, "DVB_DVB_SRC_TRANSMISSION_MODE_", &_tmp18_); - eval = _tmp18_; - if (_tmp19_) { - dvb_terrestrial_channel_set_TransmissionMode (channel, (DVBDvbSrcTransmissionMode) eval); + const gchar* _tmp53_; + gint _tmp54_ = 0; + gboolean _tmp55_ = FALSE; + _tmp53_ = val; + _tmp55_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, _tmp53_, "DVB_DVB_SRC_TRANSMISSION_MODE_", &_tmp54_); + eval = _tmp54_; + if (_tmp55_) { + DVBTerrestrialChannel* _tmp56_; + gint _tmp57_; + _tmp56_ = channel; + _tmp57_ = eval; + dvb_terrestrial_channel_set_TransmissionMode (_tmp56_, (DVBDvbSrcTransmissionMode) _tmp57_); } else { failed = TRUE; break; } } else { - if (i == 8) { + gint _tmp58_; + _tmp58_ = i; + if (_tmp58_ == 8) { gint eval = 0; - gint _tmp20_; - gboolean _tmp21_; - _tmp21_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_GUARD, val, "DVB_DVB_SRC_GUARD_", &_tmp20_); - eval = _tmp20_; - if (_tmp21_) { - dvb_terrestrial_channel_set_GuardInterval (channel, (DVBDvbSrcGuard) eval); + const gchar* _tmp59_; + gint _tmp60_ = 0; + gboolean _tmp61_ = FALSE; + _tmp59_ = val; + _tmp61_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_GUARD, _tmp59_, "DVB_DVB_SRC_GUARD_", &_tmp60_); + eval = _tmp60_; + if (_tmp61_) { + DVBTerrestrialChannel* _tmp62_; + gint _tmp63_; + _tmp62_ = channel; + _tmp63_ = eval; + dvb_terrestrial_channel_set_GuardInterval (_tmp62_, (DVBDvbSrcGuard) _tmp63_); } else { failed = TRUE; break; } } else { - if (i == 9) { + gint _tmp64_; + _tmp64_ = i; + if (_tmp64_ == 9) { gint eval = 0; - gint _tmp22_; - gboolean _tmp23_; - _tmp23_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, val, "DVB_DVB_SRC_HIERARCHY_", &_tmp22_); - eval = _tmp22_; - if (_tmp23_) { - dvb_terrestrial_channel_set_Hierarchy (channel, (DVBDvbSrcHierarchy) eval); + const gchar* _tmp65_; + gint _tmp66_ = 0; + gboolean _tmp67_ = FALSE; + _tmp65_ = val; + _tmp67_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, _tmp65_, "DVB_DVB_SRC_HIERARCHY_", &_tmp66_); + eval = _tmp66_; + if (_tmp67_) { + DVBTerrestrialChannel* _tmp68_; + gint _tmp69_; + _tmp68_ = channel; + _tmp69_ = eval; + dvb_terrestrial_channel_set_Hierarchy (_tmp68_, (DVBDvbSrcHierarchy) _tmp69_); } else { failed = TRUE; break; } } else { - if (i == 10) { - gint _tmp24_; - _tmp24_ = atoi (val); - dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) _tmp24_); + gint _tmp70_; + _tmp70_ = i; + if (_tmp70_ == 10) { + DVBTerrestrialChannel* _tmp71_; + const gchar* _tmp72_; + gint _tmp73_ = 0; + _tmp71_ = channel; + _tmp72_ = val; + _tmp73_ = atoi (_tmp72_); + dvb_channel_set_VideoPID ((DVBChannel*) _tmp71_, (guint) _tmp73_); } else { - if (i == 11) { - GeeList* _tmp25_ = NULL; - gint _tmp26_; - _tmp25_ = dvb_channel_get_AudioPIDs ((DVBChannel*) channel); - _tmp26_ = atoi (val); - gee_collection_add ((GeeCollection*) _tmp25_, GUINT_TO_POINTER ((guint) _tmp26_)); + gint _tmp74_; + _tmp74_ = i; + if (_tmp74_ == 11) { + DVBTerrestrialChannel* _tmp75_; + GeeList* _tmp76_; + GeeList* _tmp77_; + const gchar* _tmp78_; + gint _tmp79_ = 0; + _tmp75_ = channel; + _tmp76_ = dvb_channel_get_AudioPIDs ((DVBChannel*) _tmp75_); + _tmp77_ = _tmp76_; + _tmp78_ = val; + _tmp79_ = atoi (_tmp78_); + gee_collection_add ((GeeCollection*) _tmp77_, GUINT_TO_POINTER ((guint) _tmp79_)); } else { - if (i == 12) { - gint _tmp27_; - _tmp27_ = atoi (val); - dvb_channel_set_Sid ((DVBChannel*) channel, (guint) _tmp27_); + gint _tmp80_; + _tmp80_ = i; + if (_tmp80_ == 12) { + DVBTerrestrialChannel* _tmp81_; + const gchar* _tmp82_; + gint _tmp83_ = 0; + _tmp81_ = channel; + _tmp82_ = val; + _tmp83_ = atoi (_tmp82_); + dvb_channel_set_Sid ((DVBChannel*) _tmp81_, (guint) _tmp83_); } } } @@ -626,9 +805,11 @@ } } } - i++; + _tmp84_ = i; + i = _tmp84_ + 1; } - if (failed) { + _tmp85_ = failed; + if (_tmp85_) { result = NULL; _g_free0 (val); fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); @@ -653,81 +834,149 @@ */ static DVBSatelliteChannel* dvb_io_channel_list_reader_parse_satellite_channel (DVBioChannelListReader* self, const gchar* line) { DVBSatelliteChannel* result = NULL; - DVBSatelliteChannel* _tmp0_ = NULL; + DVBChannelList* _tmp0_; + guint _tmp1_; + guint _tmp2_; + DVBSatelliteChannel* _tmp3_; DVBSatelliteChannel* channel; - gchar** _tmp1_; - gchar** _tmp2_ = NULL; + const gchar* _tmp4_; + gchar** _tmp5_; + gchar** _tmp6_ = NULL; + gchar** fields; gint fields_length1; gint _fields_size_; - gchar** _tmp3_; - gchar** fields; gint i; - gchar* val; + gchar* val = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (line != NULL, NULL); - _tmp0_ = dvb_satellite_channel_new (); - channel = _tmp0_; - _tmp2_ = _tmp1_ = g_strsplit (line, ":", 0); - _tmp3_ = _tmp2_; - fields_length1 = _vala_array_length (_tmp1_); + _tmp0_ = self->priv->_channels; + _tmp1_ = dvb_channel_list_get_GroupId (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_satellite_channel_new (_tmp2_); + channel = _tmp3_; + _tmp4_ = line; + _tmp6_ = _tmp5_ = g_strsplit (_tmp4_, ":", 0); + fields = _tmp6_; + fields_length1 = _vala_array_length (_tmp5_); _fields_size_ = fields_length1; - fields = _tmp3_; i = 0; - val = NULL; while (TRUE) { - gchar* _tmp4_; - gchar* _tmp5_; - _tmp4_ = g_strdup (fields[i]); - _tmp5_ = _tmp4_; + gchar** _tmp7_; + gint _tmp7__length1; + gint _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_; + const gchar* _tmp11_; + gint _tmp12_; + gint _tmp47_; + _tmp7_ = fields; + _tmp7__length1 = fields_length1; + _tmp8_ = i; + _tmp9_ = _tmp7_[_tmp8_]; + _tmp10_ = g_strdup (_tmp9_); _g_free0 (val); - val = _tmp5_; - if (!(val != NULL)) { + val = _tmp10_; + _tmp11_ = val; + if (!(_tmp11_ != NULL)) { break; } - if (i == 0) { - gboolean _tmp6_; - _tmp6_ = g_utf8_validate (val, (gssize) (-1), NULL); - if (_tmp6_) { - dvb_channel_set_Name ((DVBChannel*) channel, val); + _tmp12_ = i; + if (_tmp12_ == 0) { + const gchar* _tmp13_; + gboolean _tmp14_ = FALSE; + _tmp13_ = val; + _tmp14_ = g_utf8_validate (_tmp13_, (gssize) (-1), NULL); + if (_tmp14_) { + DVBSatelliteChannel* _tmp15_; + const gchar* _tmp16_; + _tmp15_ = channel; + _tmp16_ = val; + dvb_channel_set_Name ((DVBChannel*) _tmp15_, _tmp16_); } else { - g_warning ("ChannelListReader.vala:212: Bad UTF-8 encoded channel name"); - dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); + DVBSatelliteChannel* _tmp17_; + g_warning ("ChannelListReader.vala:214: Bad UTF-8 encoded channel name"); + _tmp17_ = channel; + dvb_channel_set_Name ((DVBChannel*) _tmp17_, "Bad encoding"); } } else { - if (i == 1) { - gint _tmp7_; - _tmp7_ = atoi (val); - dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) (_tmp7_ * 1000)); + gint _tmp18_; + _tmp18_ = i; + if (_tmp18_ == 1) { + DVBSatelliteChannel* _tmp19_; + const gchar* _tmp20_; + gint _tmp21_ = 0; + _tmp19_ = channel; + _tmp20_ = val; + _tmp21_ = atoi (_tmp20_); + dvb_channel_set_Frequency ((DVBChannel*) _tmp19_, (guint) (_tmp21_ * 1000)); } else { - if (i == 2) { - dvb_satellite_channel_set_Polarization (channel, val); + gint _tmp22_; + _tmp22_ = i; + if (_tmp22_ == 2) { + DVBSatelliteChannel* _tmp23_; + const gchar* _tmp24_; + _tmp23_ = channel; + _tmp24_ = val; + dvb_satellite_channel_set_Polarization (_tmp23_, _tmp24_); } else { - if (i == 3) { - gint _tmp8_; - _tmp8_ = atoi (val); - dvb_satellite_channel_set_DiseqcSource (channel, _tmp8_); + gint _tmp25_; + _tmp25_ = i; + if (_tmp25_ == 3) { + DVBSatelliteChannel* _tmp26_; + const gchar* _tmp27_; + gint _tmp28_ = 0; + _tmp26_ = channel; + _tmp27_ = val; + _tmp28_ = atoi (_tmp27_); + dvb_satellite_channel_set_DiseqcSource (_tmp26_, _tmp28_); } else { - if (i == 4) { - gint _tmp9_; - _tmp9_ = atoi (val); - dvb_satellite_channel_set_SymbolRate (channel, (guint) _tmp9_); + gint _tmp29_; + _tmp29_ = i; + if (_tmp29_ == 4) { + DVBSatelliteChannel* _tmp30_; + const gchar* _tmp31_; + gint _tmp32_ = 0; + _tmp30_ = channel; + _tmp31_ = val; + _tmp32_ = atoi (_tmp31_); + dvb_satellite_channel_set_SymbolRate (_tmp30_, (guint) _tmp32_); } else { - if (i == 5) { - gint _tmp10_; - _tmp10_ = atoi (val); - dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) _tmp10_); + gint _tmp33_; + _tmp33_ = i; + if (_tmp33_ == 5) { + DVBSatelliteChannel* _tmp34_; + const gchar* _tmp35_; + gint _tmp36_ = 0; + _tmp34_ = channel; + _tmp35_ = val; + _tmp36_ = atoi (_tmp35_); + dvb_channel_set_VideoPID ((DVBChannel*) _tmp34_, (guint) _tmp36_); } else { - if (i == 6) { - GeeList* _tmp11_ = NULL; - gint _tmp12_; - _tmp11_ = dvb_channel_get_AudioPIDs ((DVBChannel*) channel); - _tmp12_ = atoi (val); - gee_collection_add ((GeeCollection*) _tmp11_, GUINT_TO_POINTER ((guint) _tmp12_)); + gint _tmp37_; + _tmp37_ = i; + if (_tmp37_ == 6) { + DVBSatelliteChannel* _tmp38_; + GeeList* _tmp39_; + GeeList* _tmp40_; + const gchar* _tmp41_; + gint _tmp42_ = 0; + _tmp38_ = channel; + _tmp39_ = dvb_channel_get_AudioPIDs ((DVBChannel*) _tmp38_); + _tmp40_ = _tmp39_; + _tmp41_ = val; + _tmp42_ = atoi (_tmp41_); + gee_collection_add ((GeeCollection*) _tmp40_, GUINT_TO_POINTER ((guint) _tmp42_)); } else { - if (i == 7) { - gint _tmp13_; - _tmp13_ = atoi (val); - dvb_channel_set_Sid ((DVBChannel*) channel, (guint) _tmp13_); + gint _tmp43_; + _tmp43_ = i; + if (_tmp43_ == 7) { + DVBSatelliteChannel* _tmp44_; + const gchar* _tmp45_; + gint _tmp46_ = 0; + _tmp44_ = channel; + _tmp45_ = val; + _tmp46_ = atoi (_tmp45_); + dvb_channel_set_Sid ((DVBChannel*) _tmp44_, (guint) _tmp46_); } } } @@ -736,7 +985,8 @@ } } } - i++; + _tmp47_ = i; + i = _tmp47_ + 1; } result = channel; _g_free0 (val); @@ -752,114 +1002,195 @@ */ static DVBCableChannel* dvb_io_channel_list_reader_parse_cable_channel (DVBioChannelListReader* self, const gchar* line) { DVBCableChannel* result = NULL; - DVBCableChannel* _tmp0_ = NULL; + DVBChannelList* _tmp0_; + guint _tmp1_; + guint _tmp2_; + DVBCableChannel* _tmp3_; DVBCableChannel* channel; - gchar** _tmp1_; - gchar** _tmp2_ = NULL; + const gchar* _tmp4_; + gchar** _tmp5_; + gchar** _tmp6_ = NULL; + gchar** fields; gint fields_length1; gint _fields_size_; - gchar** _tmp3_; - gchar** fields; gint i; - gchar* val; + gchar* val = NULL; gboolean failed; + gboolean _tmp59_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (line != NULL, NULL); - _tmp0_ = dvb_cable_channel_new (); - channel = _tmp0_; - _tmp2_ = _tmp1_ = g_strsplit (line, ":", 0); - _tmp3_ = _tmp2_; - fields_length1 = _vala_array_length (_tmp1_); + _tmp0_ = self->priv->_channels; + _tmp1_ = dvb_channel_list_get_GroupId (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_cable_channel_new (_tmp2_); + channel = _tmp3_; + _tmp4_ = line; + _tmp6_ = _tmp5_ = g_strsplit (_tmp4_, ":", 0); + fields = _tmp6_; + fields_length1 = _vala_array_length (_tmp5_); _fields_size_ = fields_length1; - fields = _tmp3_; i = 0; - val = NULL; failed = FALSE; while (TRUE) { - gchar* _tmp4_; - gchar* _tmp5_; - _tmp4_ = g_strdup (fields[i]); - _tmp5_ = _tmp4_; + gchar** _tmp7_; + gint _tmp7__length1; + gint _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_; + const gchar* _tmp11_; + gint _tmp12_; + gint _tmp58_; + _tmp7_ = fields; + _tmp7__length1 = fields_length1; + _tmp8_ = i; + _tmp9_ = _tmp7_[_tmp8_]; + _tmp10_ = g_strdup (_tmp9_); _g_free0 (val); - val = _tmp5_; - if (!(val != NULL)) { + val = _tmp10_; + _tmp11_ = val; + if (!(_tmp11_ != NULL)) { break; } - if (i == 0) { - gboolean _tmp6_; - _tmp6_ = g_utf8_validate (val, (gssize) (-1), NULL); - if (_tmp6_) { - dvb_channel_set_Name ((DVBChannel*) channel, val); + _tmp12_ = i; + if (_tmp12_ == 0) { + const gchar* _tmp13_; + gboolean _tmp14_ = FALSE; + _tmp13_ = val; + _tmp14_ = g_utf8_validate (_tmp13_, (gssize) (-1), NULL); + if (_tmp14_) { + DVBCableChannel* _tmp15_; + const gchar* _tmp16_; + _tmp15_ = channel; + _tmp16_ = val; + dvb_channel_set_Name ((DVBChannel*) _tmp15_, _tmp16_); } else { - g_warning ("ChannelListReader.vala:258: Bad UTF-8 encoded channel name"); - dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); + DVBCableChannel* _tmp17_; + g_warning ("ChannelListReader.vala:260: Bad UTF-8 encoded channel name"); + _tmp17_ = channel; + dvb_channel_set_Name ((DVBChannel*) _tmp17_, "Bad encoding"); } } else { - if (i == 1) { - gint _tmp7_; - _tmp7_ = atoi (val); - dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) _tmp7_); + gint _tmp18_; + _tmp18_ = i; + if (_tmp18_ == 1) { + DVBCableChannel* _tmp19_; + const gchar* _tmp20_; + gint _tmp21_ = 0; + _tmp19_ = channel; + _tmp20_ = val; + _tmp21_ = atoi (_tmp20_); + dvb_channel_set_Frequency ((DVBChannel*) _tmp19_, (guint) _tmp21_); } else { - if (i == 2) { + gint _tmp22_; + _tmp22_ = i; + if (_tmp22_ == 2) { gint eval = 0; - gint _tmp8_; - gboolean _tmp9_; - _tmp9_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, val, "DVB_DVB_SRC_INVERSION_", &_tmp8_); - eval = _tmp8_; - if (_tmp9_) { - dvb_cable_channel_set_Inversion (channel, (DVBDvbSrcInversion) eval); + const gchar* _tmp23_; + gint _tmp24_ = 0; + gboolean _tmp25_ = FALSE; + _tmp23_ = val; + _tmp25_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, _tmp23_, "DVB_DVB_SRC_INVERSION_", &_tmp24_); + eval = _tmp24_; + if (_tmp25_) { + DVBCableChannel* _tmp26_; + gint _tmp27_; + _tmp26_ = channel; + _tmp27_ = eval; + dvb_cable_channel_set_Inversion (_tmp26_, (DVBDvbSrcInversion) _tmp27_); } else { failed = TRUE; break; } } else { - if (i == 3) { - gint _tmp10_; - _tmp10_ = atoi (val); - dvb_cable_channel_set_SymbolRate (channel, (guint) (_tmp10_ / 1000)); + gint _tmp28_; + _tmp28_ = i; + if (_tmp28_ == 3) { + DVBCableChannel* _tmp29_; + const gchar* _tmp30_; + gint _tmp31_ = 0; + _tmp29_ = channel; + _tmp30_ = val; + _tmp31_ = atoi (_tmp30_); + dvb_cable_channel_set_SymbolRate (_tmp29_, (guint) (_tmp31_ / 1000)); } else { - if (i == 4) { + gint _tmp32_; + _tmp32_ = i; + if (_tmp32_ == 4) { gint eval = 0; - gint _tmp11_; - gboolean _tmp12_; - _tmp12_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &_tmp11_); - eval = _tmp11_; - if (_tmp12_) { - dvb_cable_channel_set_CodeRate (channel, (DVBDvbSrcCodeRate) eval); + const gchar* _tmp33_; + gint _tmp34_ = 0; + gboolean _tmp35_ = FALSE; + _tmp33_ = val; + _tmp35_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, _tmp33_, "DVB_DVB_SRC_CODE_RATE_", &_tmp34_); + eval = _tmp34_; + if (_tmp35_) { + DVBCableChannel* _tmp36_; + gint _tmp37_; + _tmp36_ = channel; + _tmp37_ = eval; + dvb_cable_channel_set_CodeRate (_tmp36_, (DVBDvbSrcCodeRate) _tmp37_); } else { failed = TRUE; break; } } else { - if (i == 5) { + gint _tmp38_; + _tmp38_ = i; + if (_tmp38_ == 5) { gint eval = 0; - gint _tmp13_; - gboolean _tmp14_; - _tmp14_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, val, "DVB_DVB_SRC_MODULATION_", &_tmp13_); - eval = _tmp13_; - if (_tmp14_) { - dvb_cable_channel_set_Modulation (channel, (DVBDvbSrcModulation) eval); + const gchar* _tmp39_; + gint _tmp40_ = 0; + gboolean _tmp41_ = FALSE; + _tmp39_ = val; + _tmp41_ = dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, _tmp39_, "DVB_DVB_SRC_MODULATION_", &_tmp40_); + eval = _tmp40_; + if (_tmp41_) { + DVBCableChannel* _tmp42_; + gint _tmp43_; + _tmp42_ = channel; + _tmp43_ = eval; + dvb_cable_channel_set_Modulation (_tmp42_, (DVBDvbSrcModulation) _tmp43_); } else { failed = TRUE; break; } } else { - if (i == 6) { - gint _tmp15_; - _tmp15_ = atoi (val); - dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) _tmp15_); + gint _tmp44_; + _tmp44_ = i; + if (_tmp44_ == 6) { + DVBCableChannel* _tmp45_; + const gchar* _tmp46_; + gint _tmp47_ = 0; + _tmp45_ = channel; + _tmp46_ = val; + _tmp47_ = atoi (_tmp46_); + dvb_channel_set_VideoPID ((DVBChannel*) _tmp45_, (guint) _tmp47_); } else { - if (i == 7) { - GeeList* _tmp16_ = NULL; - gint _tmp17_; - _tmp16_ = dvb_channel_get_AudioPIDs ((DVBChannel*) channel); - _tmp17_ = atoi (val); - gee_collection_add ((GeeCollection*) _tmp16_, GUINT_TO_POINTER ((guint) _tmp17_)); + gint _tmp48_; + _tmp48_ = i; + if (_tmp48_ == 7) { + DVBCableChannel* _tmp49_; + GeeList* _tmp50_; + GeeList* _tmp51_; + const gchar* _tmp52_; + gint _tmp53_ = 0; + _tmp49_ = channel; + _tmp50_ = dvb_channel_get_AudioPIDs ((DVBChannel*) _tmp49_); + _tmp51_ = _tmp50_; + _tmp52_ = val; + _tmp53_ = atoi (_tmp52_); + gee_collection_add ((GeeCollection*) _tmp51_, GUINT_TO_POINTER ((guint) _tmp53_)); } else { - if (i == 8) { - gint _tmp18_; - _tmp18_ = atoi (val); - dvb_channel_set_Sid ((DVBChannel*) channel, (guint) _tmp18_); + gint _tmp54_; + _tmp54_ = i; + if (_tmp54_ == 8) { + DVBCableChannel* _tmp55_; + const gchar* _tmp56_; + gint _tmp57_ = 0; + _tmp55_ = channel; + _tmp56_ = val; + _tmp57_ = atoi (_tmp56_); + dvb_channel_set_Sid ((DVBChannel*) _tmp55_, (guint) _tmp57_); } } } @@ -869,9 +1200,11 @@ } } } - i++; + _tmp58_ = i; + i = _tmp58_ + 1; } - if (failed) { + _tmp59_ = failed; + if (_tmp59_) { result = NULL; _g_free0 (val); fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); @@ -890,20 +1223,30 @@ static gboolean dvb_io_channel_list_reader_get_value_with_prefix (GType enumtype, const gchar* name, const gchar* prefix, gint* val) { - gint _val = 0; + gint _vala_val = 0; gboolean result = FALSE; - gchar* _tmp0_; - gint _tmp1_; - gboolean _tmp2_; - gboolean _tmp3_; + GType _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gint _tmp5_ = 0; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_; g_return_val_if_fail (name != NULL, FALSE); g_return_val_if_fail (prefix != NULL, FALSE); - _tmp0_ = g_strconcat (prefix, name, NULL); - _tmp2_ = dvb_utils_get_value_by_name_from_enum (enumtype, _tmp0_, &_tmp1_); - _val = _tmp1_; - result = (_tmp3_ = _tmp2_, _g_free0 (_tmp0_), _tmp3_); + _tmp0_ = enumtype; + _tmp1_ = prefix; + _tmp2_ = name; + _tmp3_ = g_strconcat (_tmp1_, _tmp2_, NULL); + _tmp4_ = _tmp3_; + _tmp6_ = dvb_utils_get_value_by_name_from_enum (_tmp0_, _tmp4_, &_tmp5_); + _vala_val = _tmp5_; + _tmp7_ = _tmp6_; + _g_free0 (_tmp4_); + result = _tmp7_; if (val) { - *val = _val; + *val = _vala_val; } return result; } @@ -911,8 +1254,10 @@ DVBChannelList* dvb_io_channel_list_reader_get_channels (DVBioChannelListReader* self) { DVBChannelList* result; + DVBChannelList* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_channels; + _tmp0_ = self->priv->_channels; + result = _tmp0_; return result; } @@ -926,8 +1271,8 @@ DVBChannelList* _tmp0_; DVBChannelList* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_channels); self->priv->_channels = _tmp1_; g_object_notify ((GObject *) self, "channels"); @@ -936,20 +1281,26 @@ DVBAdapterType dvb_io_channel_list_reader_get_Type (DVBioChannelListReader* self) { DVBAdapterType result; + DVBAdapterType _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Type; + _tmp0_ = self->priv->_Type; + result = _tmp0_; return result; } static void dvb_io_channel_list_reader_set_Type (DVBioChannelListReader* self, DVBAdapterType value) { + DVBAdapterType _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Type = value; + _tmp0_ = value; + self->priv->_Type = _tmp0_; g_object_notify ((GObject *) self, "Type"); } static void dvb_io_channel_list_reader_class_init (DVBioChannelListReaderClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_io_channel_list_reader_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBioChannelListReaderPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_io_channel_list_reader_get_property; @@ -957,6 +1308,9 @@ G_OBJECT_CLASS (klass)->finalize = dvb_io_channel_list_reader_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_IO_CHANNEL_LIST_READER_CHANNELS, g_param_spec_object ("channels", "channels", "channels", DVB_TYPE_CHANNEL_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_IO_CHANNEL_LIST_READER_TYPE, g_param_spec_enum ("Type", "Type", "Type", DVB_TYPE_ADAPTER_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_io_channel_list_reader_log = _tmp1_; } diff -Nru gnome-dvb-daemon-0.1.23/src/io/ChannelListReader.vala gnome-dvb-daemon-0.2.7/src/io/ChannelListReader.vala --- gnome-dvb-daemon-0.1.23/src/io/ChannelListReader.vala 2010-04-19 18:12:04.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/io/ChannelListReader.vala 2011-05-29 11:03:46.000000000 +0000 @@ -18,11 +18,14 @@ */ using GLib; +using DVB.Logging; namespace DVB.io { public class ChannelListReader : GLib.Object { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public ChannelList channels {get; construct;} public AdapterType Type {get; construct;} @@ -66,12 +69,11 @@ break; default: - critical ("Unknown adapter type"); + log.error ("Unknown adapter type"); break; } if (c != null && c.is_valid ()) { - c.GroupId = this.channels.GroupId; return c; } else { string val = (c == null) ? "(null)" : c.to_string (); @@ -88,7 +90,7 @@ * Das Erste:212500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:513:514:32 */ private TerrestrialChannel? parse_terrestrial_channel (string line) { - var channel = new TerrestrialChannel (); + var channel = new TerrestrialChannel (this.channels.GroupId); string[] fields = line.split(":"); @@ -104,7 +106,7 @@ channel.Name = "Bad encoding"; } } else if (i == 1) { - channel.Frequency = (uint)val.to_int (); + channel.Frequency = (uint)int.parse (val); } else if (i == 2) { int eval; if (get_value_with_prefix (typeof(DvbSrcInversion), val, @@ -178,11 +180,11 @@ break; } } else if (i == 10) { - channel.VideoPID = (uint)val.to_int (); + channel.VideoPID = (uint)int.parse (val); } else if (i == 11) { - channel.AudioPIDs.add ((uint)val.to_int ()); + channel.AudioPIDs.add ((uint)int.parse (val)); } else if (i == 12) { - channel.Sid = (uint)val.to_int (); + channel.Sid = (uint)int.parse (val); } i++; @@ -198,7 +200,7 @@ * Das Erste:11836:h:0:27500:101:102:28106 */ private SatelliteChannel? parse_satellite_channel (string line) { - var channel = new SatelliteChannel (); + var channel = new SatelliteChannel (this.channels.GroupId); string[] fields = line.split(":"); @@ -214,21 +216,21 @@ } } else if (i == 1) { // frequency is stored in MHz - channel.Frequency = (uint)(val.to_int () * 1000); + channel.Frequency = (uint)(int.parse (val) * 1000); } else if (i == 2) { channel.Polarization = val; } else if (i == 3) { // Sat number - channel.DiseqcSource = val.to_int (); + channel.DiseqcSource = int.parse (val); } else if (i == 4) { // symbol rate is stored in kBaud - channel.SymbolRate = (uint)val.to_int(); + channel.SymbolRate = (uint)int.parse (val); } else if (i == 5) { - channel.VideoPID = (uint)val.to_int (); + channel.VideoPID = (uint)int.parse (val); } else if (i == 6) { - channel.AudioPIDs.add ((uint)val.to_int ()); + channel.AudioPIDs.add ((uint)int.parse (val)); } else if (i == 7) { - channel.Sid = (uint)val.to_int (); + channel.Sid = (uint)int.parse (val); } i++; @@ -243,7 +245,7 @@ * ProSieben:330000000:INVERSION_AUTO:6900000:FEC_NONE:QAM_64:255:256:898 */ private CableChannel? parse_cable_channel (string line) { - var channel = new CableChannel (); + var channel = new CableChannel (this.channels.GroupId); string[] fields = line.split(":"); @@ -259,7 +261,7 @@ channel.Name = "Bad encoding"; } } else if (i == 1) { - channel.Frequency = (uint)val.to_int (); + channel.Frequency = (uint)int.parse (val); } else if (i == 2) { int eval; if (get_value_with_prefix (typeof(DvbSrcInversion), val, @@ -270,7 +272,7 @@ break; } } else if (i == 3) { - channel.SymbolRate = (uint)(val.to_int () / 1000); + channel.SymbolRate = (uint)(int.parse (val) / 1000); } else if (i == 4) { int eval; if (get_value_with_prefix (typeof(DvbSrcCodeRate), val, @@ -290,11 +292,11 @@ break; } } else if (i == 6) { - channel.VideoPID = (uint)val.to_int (); + channel.VideoPID = (uint)int.parse (val); } else if (i == 7) { - channel.AudioPIDs.add ((uint)val.to_int ()); + channel.AudioPIDs.add ((uint)int.parse (val)); } else if (i == 8) { - channel.Sid = (uint)val.to_int (); + channel.Sid = (uint)int.parse (val); } i++; diff -Nru gnome-dvb-daemon-0.1.23/src/io/ChannelListWriter.c gnome-dvb-daemon-0.2.7/src/io/ChannelListWriter.c --- gnome-dvb-daemon-0.1.23/src/io/ChannelListWriter.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/io/ChannelListWriter.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelListWriter.c generated by valac 0.11.3, the Vala compiler +/* ChannelListWriter.c generated by valac 0.14.0, the Vala compiler * generated from ChannelListWriter.vala, do not modify */ /* @@ -228,54 +228,58 @@ static void dvb_io_channel_list_writer_open_stream (DVBioChannelListWriter* self, GError** error) { GFileOutputStream* fostream; - gboolean _tmp0_; - GBufferedOutputStream* _tmp7_ = NULL; - GOutputStream* _tmp8_; + GFile* _tmp0_; + gboolean _tmp1_ = FALSE; + GFileOutputStream* _tmp8_; + GBufferedOutputStream* _tmp9_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); fostream = NULL; - _tmp0_ = g_file_query_exists (self->priv->_file, NULL); - if (_tmp0_) { - GFileOutputStream* _tmp1_ = NULL; - GFileOutputStream* _tmp2_; - GFileOutputStream* _tmp3_; - _tmp1_ = g_file_replace (self->priv->_file, NULL, TRUE, 0, NULL, &_inner_error_); - _tmp2_ = _tmp1_; + _tmp0_ = self->priv->_file; + _tmp1_ = g_file_query_exists (_tmp0_, NULL); + if (_tmp1_) { + GFile* _tmp2_; + GFileOutputStream* _tmp3_ = NULL; + GFileOutputStream* _tmp4_; + _tmp2_ = self->priv->_file; + _tmp3_ = g_file_replace (_tmp2_, NULL, TRUE, 0, NULL, &_inner_error_); + _tmp4_ = _tmp3_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (fostream); return; } - _tmp3_ = _tmp2_; _g_object_unref0 (fostream); - fostream = _tmp3_; + fostream = _tmp4_; } else { - GFileOutputStream* _tmp4_ = NULL; - GFileOutputStream* _tmp5_; - GFileOutputStream* _tmp6_; - _tmp4_ = g_file_create (self->priv->_file, 0, NULL, &_inner_error_); - _tmp5_ = _tmp4_; + GFile* _tmp5_; + GFileOutputStream* _tmp6_ = NULL; + GFileOutputStream* _tmp7_; + _tmp5_ = self->priv->_file; + _tmp6_ = g_file_create (_tmp5_, 0, NULL, &_inner_error_); + _tmp7_ = _tmp6_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (fostream); return; } - _tmp6_ = _tmp5_; _g_object_unref0 (fostream); - fostream = _tmp6_; + fostream = _tmp7_; } - _tmp7_ = (GBufferedOutputStream*) g_buffered_output_stream_new ((GOutputStream*) fostream); - _tmp8_ = (GOutputStream*) _tmp7_; + _tmp8_ = fostream; + _tmp9_ = (GBufferedOutputStream*) g_buffered_output_stream_new ((GOutputStream*) _tmp8_); _g_object_unref0 (self->priv->stream); - self->priv->stream = _tmp8_; + self->priv->stream = (GOutputStream*) _tmp9_; _g_object_unref0 (fostream); } DVBioChannelListWriter* dvb_io_channel_list_writer_construct (GType object_type, GFile* file) { DVBioChannelListWriter * self = NULL; + GFile* _tmp0_; g_return_val_if_fail (file != NULL, NULL); - self = (DVBioChannelListWriter*) g_object_new (object_type, "file", file, NULL); + _tmp0_ = file; + self = (DVBioChannelListWriter*) g_object_new (object_type, "file", _tmp0_, NULL); return self; } @@ -287,86 +291,132 @@ static guint8* string_get_data (const gchar* self, int* result_length1) { guint8* result; + guint8* res; gint res_length1; gint _res_size_; - guint8* _tmp0_; - guint8* res; + gint _tmp0_; gint _tmp1_; - guint8* _tmp2_; + gint _tmp2_; + guint8* _tmp3_; + gint _tmp3__length1; + guint8* _tmp4_; + gint _tmp4__length1; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = (guint8*) self; + res = (guint8*) self; res_length1 = -1; _res_size_ = res_length1; - res = _tmp0_; - _tmp1_ = strlen (self); + _tmp0_ = strlen (self); + _tmp1_ = _tmp0_; res_length1 = (gint) _tmp1_; - _tmp2_ = res; - *result_length1 = res_length1; - result = _tmp2_; + _tmp2_ = res_length1; + _tmp3_ = res; + _tmp3__length1 = res_length1; + _tmp4_ = _tmp3_; + _tmp4__length1 = _tmp3__length1; + if (result_length1) { + *result_length1 = _tmp4__length1; + } + result = _tmp4_; return result; } void dvb_io_channel_list_writer_write (DVBioChannelListWriter* self, DVBChannel* channel, GError** error) { - gchar* buffer; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - gchar* _tmp2_; - guint8* _tmp3_ = NULL; - gint _tmp4_; + GOutputStream* _tmp0_; + GOutputStream* _tmp1_; + gchar* buffer = NULL; + DVBChannel* _tmp2_; + const gchar* _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_ = NULL; + GOutputStream* _tmp6_; + const gchar* _tmp7_; + guint8* _tmp8_; + gint _tmp8__length1; + guint8* _tmp9_; + gint _tmp9__length1; + DVBChannel* _tmp10_; guint apid = 0U; - GeeList* _tmp5_ = NULL; - gint _tmp6_; - guint _tmp9_; - guint _tmp10_; - gchar* _tmp11_ = NULL; - gchar* _tmp12_; - guint8* _tmp13_ = NULL; - gint _tmp14_; + DVBChannel* _tmp16_; + GeeList* _tmp17_; + GeeList* _tmp18_; + gint _tmp19_; + gint _tmp20_; + DVBChannel* _tmp25_; + guint _tmp26_; + guint _tmp27_; + guint _tmp28_; + DVBChannel* _tmp29_; + guint _tmp30_; + guint _tmp31_; + gchar* _tmp32_ = NULL; + GOutputStream* _tmp33_; + const gchar* _tmp34_; + guint8* _tmp35_; + gint _tmp35__length1; + guint8* _tmp36_; + gint _tmp36__length1; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); - if (self->priv->stream == NULL) { + _tmp0_ = self->priv->stream; + if (_tmp0_ == NULL) { dvb_io_channel_list_writer_open_stream (self, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); return; } } - if (self->priv->stream == NULL) { + _tmp1_ = self->priv->stream; + if (_tmp1_ == NULL) { return; } - buffer = NULL; - _tmp0_ = dvb_channel_get_Name (channel); - _tmp1_ = g_strdup_printf ("%s:", _tmp0_); - _tmp2_ = _tmp1_; + _tmp2_ = channel; + _tmp3_ = dvb_channel_get_Name (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = g_strdup_printf ("%s:", _tmp4_); _g_free0 (buffer); - buffer = _tmp2_; - _tmp3_ = string_get_data (buffer, &_tmp4_); - g_output_stream_write_all (self->priv->stream, _tmp3_, (gsize) _tmp4_, NULL, NULL, &_inner_error_); + buffer = _tmp5_; + _tmp6_ = self->priv->stream; + _tmp7_ = buffer; + _tmp8_ = string_get_data (_tmp7_, &_tmp8__length1); + _tmp9_ = _tmp8_; + _tmp9__length1 = _tmp8__length1; + g_output_stream_write_all (_tmp6_, _tmp9_, (gsize) _tmp9__length1, NULL, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); return; } - if (DVB_IS_TERRESTRIAL_CHANNEL (channel)) { - dvb_io_channel_list_writer_write_terrestrial_channel (self, DVB_TERRESTRIAL_CHANNEL (channel), &_inner_error_); + _tmp10_ = channel; + if (DVB_IS_TERRESTRIAL_CHANNEL (_tmp10_)) { + DVBChannel* _tmp11_; + _tmp11_ = channel; + dvb_io_channel_list_writer_write_terrestrial_channel (self, DVB_TERRESTRIAL_CHANNEL (_tmp11_), &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); return; } } else { - if (DVB_IS_SATELLITE_CHANNEL (channel)) { - dvb_io_channel_list_writer_write_satellite_channel (self, DVB_SATELLITE_CHANNEL (channel), &_inner_error_); + DVBChannel* _tmp12_; + _tmp12_ = channel; + if (DVB_IS_SATELLITE_CHANNEL (_tmp12_)) { + DVBChannel* _tmp13_; + _tmp13_ = channel; + dvb_io_channel_list_writer_write_satellite_channel (self, DVB_SATELLITE_CHANNEL (_tmp13_), &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); return; } } else { - if (DVB_IS_CABLE_CHANNEL (channel)) { - dvb_io_channel_list_writer_write_cable_channel (self, DVB_CABLE_CHANNEL (channel), &_inner_error_); + DVBChannel* _tmp14_; + _tmp14_ = channel; + if (DVB_IS_CABLE_CHANNEL (_tmp14_)) { + DVBChannel* _tmp15_; + _tmp15_ = channel; + dvb_io_channel_list_writer_write_cable_channel (self, DVB_CABLE_CHANNEL (_tmp15_), &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); @@ -377,25 +427,40 @@ } } } - _tmp5_ = dvb_channel_get_AudioPIDs (channel); - _tmp6_ = gee_collection_get_size ((GeeCollection*) _tmp5_); - if (_tmp6_ == 0) { + _tmp16_ = channel; + _tmp17_ = dvb_channel_get_AudioPIDs (_tmp16_); + _tmp18_ = _tmp17_; + _tmp19_ = gee_collection_get_size ((GeeCollection*) _tmp18_); + _tmp20_ = _tmp19_; + if (_tmp20_ == 0) { apid = (guint) 0; } else { - GeeList* _tmp7_ = NULL; - gpointer _tmp8_ = NULL; - _tmp7_ = dvb_channel_get_AudioPIDs (channel); - _tmp8_ = gee_list_get (_tmp7_, 0); - apid = GPOINTER_TO_UINT (_tmp8_); - } - _tmp9_ = dvb_channel_get_VideoPID (channel); - _tmp10_ = dvb_channel_get_Sid (channel); - _tmp11_ = g_strdup_printf (":%u:%u:%u\n", _tmp9_, apid, _tmp10_); - _tmp12_ = _tmp11_; + DVBChannel* _tmp21_; + GeeList* _tmp22_; + GeeList* _tmp23_; + gpointer _tmp24_ = NULL; + _tmp21_ = channel; + _tmp22_ = dvb_channel_get_AudioPIDs (_tmp21_); + _tmp23_ = _tmp22_; + _tmp24_ = gee_list_get (_tmp23_, 0); + apid = GPOINTER_TO_UINT (_tmp24_); + } + _tmp25_ = channel; + _tmp26_ = dvb_channel_get_VideoPID (_tmp25_); + _tmp27_ = _tmp26_; + _tmp28_ = apid; + _tmp29_ = channel; + _tmp30_ = dvb_channel_get_Sid (_tmp29_); + _tmp31_ = _tmp30_; + _tmp32_ = g_strdup_printf (":%u:%u:%u\n", _tmp27_, _tmp28_, _tmp31_); _g_free0 (buffer); - buffer = _tmp12_; - _tmp13_ = string_get_data (buffer, &_tmp14_); - g_output_stream_write_all (self->priv->stream, _tmp13_, (gsize) _tmp14_, NULL, NULL, &_inner_error_); + buffer = _tmp32_; + _tmp33_ = self->priv->stream; + _tmp34_ = buffer; + _tmp35_ = string_get_data (_tmp34_, &_tmp35__length1); + _tmp36_ = _tmp35_; + _tmp36__length1 = _tmp35__length1; + g_output_stream_write_all (_tmp33_, _tmp36_, (gsize) _tmp36__length1, NULL, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); @@ -407,119 +472,163 @@ gboolean dvb_io_channel_list_writer_close (DVBioChannelListWriter* self, GError** error) { gboolean result = FALSE; - gboolean _tmp0_; - gboolean _tmp1_; + GOutputStream* _tmp0_; + GOutputStream* _tmp1_; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - if (self->priv->stream == NULL) { + _tmp0_ = self->priv->stream; + if (_tmp0_ == NULL) { result = TRUE; return result; } - _tmp0_ = g_output_stream_close (self->priv->stream, NULL, &_inner_error_); - _tmp1_ = _tmp0_; + _tmp1_ = self->priv->stream; + _tmp2_ = g_output_stream_close (_tmp1_, NULL, &_inner_error_); + _tmp3_ = _tmp2_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); return FALSE; } - result = _tmp1_; + result = _tmp3_; return result; } static void dvb_io_channel_list_writer_write_terrestrial_channel (DVBioChannelListWriter* self, DVBTerrestrialChannel* channel, GError** error) { gchar** _tmp0_ = NULL; + gchar** elements; gint elements_length1; gint _elements_size_; - gchar** _tmp1_; - gchar** elements; + DVBTerrestrialChannel* _tmp1_; guint _tmp2_; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - DVBDvbSrcInversion _tmp5_; - gchar* _tmp6_ = NULL; - gchar* _tmp7_; - DVBDvbSrcBandwidth _tmp8_; + guint _tmp3_; + gchar* _tmp4_ = NULL; + gchar* _tmp5_; + DVBTerrestrialChannel* _tmp6_; + DVBDvbSrcInversion _tmp7_; + DVBDvbSrcInversion _tmp8_; gchar* _tmp9_ = NULL; gchar* _tmp10_; - DVBDvbSrcCodeRate _tmp11_; - gchar* _tmp12_ = NULL; - gchar* _tmp13_; - DVBDvbSrcCodeRate _tmp14_; - gchar* _tmp15_ = NULL; - gchar* _tmp16_; - DVBDvbSrcModulation _tmp17_; - gchar* _tmp18_ = NULL; - gchar* _tmp19_; - DVBDvbSrcTransmissionMode _tmp20_; - gchar* _tmp21_ = NULL; - gchar* _tmp22_; - DVBDvbSrcGuard _tmp23_; + DVBTerrestrialChannel* _tmp11_; + DVBDvbSrcBandwidth _tmp12_; + DVBDvbSrcBandwidth _tmp13_; + gchar* _tmp14_ = NULL; + gchar* _tmp15_; + DVBTerrestrialChannel* _tmp16_; + DVBDvbSrcCodeRate _tmp17_; + DVBDvbSrcCodeRate _tmp18_; + gchar* _tmp19_ = NULL; + gchar* _tmp20_; + DVBTerrestrialChannel* _tmp21_; + DVBDvbSrcCodeRate _tmp22_; + DVBDvbSrcCodeRate _tmp23_; gchar* _tmp24_ = NULL; gchar* _tmp25_; - DVBDvbSrcHierarchy _tmp26_; - gchar* _tmp27_ = NULL; - gchar* _tmp28_; + DVBTerrestrialChannel* _tmp26_; + DVBDvbSrcModulation _tmp27_; + DVBDvbSrcModulation _tmp28_; gchar* _tmp29_ = NULL; + gchar* _tmp30_; + DVBTerrestrialChannel* _tmp31_; + DVBDvbSrcTransmissionMode _tmp32_; + DVBDvbSrcTransmissionMode _tmp33_; + gchar* _tmp34_ = NULL; + gchar* _tmp35_; + DVBTerrestrialChannel* _tmp36_; + DVBDvbSrcGuard _tmp37_; + DVBDvbSrcGuard _tmp38_; + gchar* _tmp39_ = NULL; + gchar* _tmp40_; + DVBTerrestrialChannel* _tmp41_; + DVBDvbSrcHierarchy _tmp42_; + DVBDvbSrcHierarchy _tmp43_; + gchar* _tmp44_ = NULL; + gchar* _tmp45_; + gchar* _tmp46_ = NULL; gchar* buffer; - guint8* _tmp30_ = NULL; - gint _tmp31_; + GOutputStream* _tmp47_; + guint8* _tmp48_; + gint _tmp48__length1; + guint8* _tmp49_; + gint _tmp49__length1; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); _tmp0_ = g_new0 (gchar*, 9 + 1); - _tmp1_ = _tmp0_; + elements = _tmp0_; elements_length1 = 9; _elements_size_ = elements_length1; - elements = _tmp1_; - _tmp2_ = dvb_channel_get_Frequency ((DVBChannel*) channel); - _tmp3_ = g_strdup_printf ("%u", _tmp2_); - _tmp4_ = _tmp3_; + _tmp1_ = channel; + _tmp2_ = dvb_channel_get_Frequency ((DVBChannel*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = g_strdup_printf ("%u", _tmp3_); _g_free0 (elements[0]); elements[0] = _tmp4_; - _tmp5_ = dvb_terrestrial_channel_get_Inversion (channel); - _tmp6_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) _tmp5_, "DVB_DVB_SRC_INVERSION_"); - _tmp7_ = _tmp6_; + _tmp5_ = elements[0]; + _tmp6_ = channel; + _tmp7_ = dvb_terrestrial_channel_get_Inversion (_tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) _tmp8_, "DVB_DVB_SRC_INVERSION_"); _g_free0 (elements[1]); - elements[1] = _tmp7_; - _tmp8_ = dvb_terrestrial_channel_get_Bandwidth (channel); - _tmp9_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, (gint) _tmp8_, "DVB_DVB_SRC_BANDWIDTH_"); - _tmp10_ = _tmp9_; - _g_free0 (elements[2]); - elements[2] = _tmp10_; - _tmp11_ = dvb_terrestrial_channel_get_CodeRateHP (channel); - _tmp12_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp11_, "DVB_DVB_SRC_CODE_RATE_"); + elements[1] = _tmp9_; + _tmp10_ = elements[1]; + _tmp11_ = channel; + _tmp12_ = dvb_terrestrial_channel_get_Bandwidth (_tmp11_); _tmp13_ = _tmp12_; + _tmp14_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, (gint) _tmp13_, "DVB_DVB_SRC_BANDWIDTH_"); + _g_free0 (elements[2]); + elements[2] = _tmp14_; + _tmp15_ = elements[2]; + _tmp16_ = channel; + _tmp17_ = dvb_terrestrial_channel_get_CodeRateHP (_tmp16_); + _tmp18_ = _tmp17_; + _tmp19_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp18_, "DVB_DVB_SRC_CODE_RATE_"); _g_free0 (elements[3]); - elements[3] = _tmp13_; - _tmp14_ = dvb_terrestrial_channel_get_CodeRateLP (channel); - _tmp15_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp14_, "DVB_DVB_SRC_CODE_RATE_"); - _tmp16_ = _tmp15_; + elements[3] = _tmp19_; + _tmp20_ = elements[3]; + _tmp21_ = channel; + _tmp22_ = dvb_terrestrial_channel_get_CodeRateLP (_tmp21_); + _tmp23_ = _tmp22_; + _tmp24_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp23_, "DVB_DVB_SRC_CODE_RATE_"); _g_free0 (elements[4]); - elements[4] = _tmp16_; - _tmp17_ = dvb_terrestrial_channel_get_Constellation (channel); - _tmp18_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) _tmp17_, "DVB_DVB_SRC_MODULATION_"); - _tmp19_ = _tmp18_; + elements[4] = _tmp24_; + _tmp25_ = elements[4]; + _tmp26_ = channel; + _tmp27_ = dvb_terrestrial_channel_get_Constellation (_tmp26_); + _tmp28_ = _tmp27_; + _tmp29_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) _tmp28_, "DVB_DVB_SRC_MODULATION_"); _g_free0 (elements[5]); - elements[5] = _tmp19_; - _tmp20_ = dvb_terrestrial_channel_get_TransmissionMode (channel); - _tmp21_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, (gint) _tmp20_, "DVB_DVB_SRC_TRANSMISSION_MODE_"); - _tmp22_ = _tmp21_; + elements[5] = _tmp29_; + _tmp30_ = elements[5]; + _tmp31_ = channel; + _tmp32_ = dvb_terrestrial_channel_get_TransmissionMode (_tmp31_); + _tmp33_ = _tmp32_; + _tmp34_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, (gint) _tmp33_, "DVB_DVB_SRC_TRANSMISSION_MODE_"); _g_free0 (elements[6]); - elements[6] = _tmp22_; - _tmp23_ = dvb_terrestrial_channel_get_GuardInterval (channel); - _tmp24_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_GUARD, (gint) _tmp23_, "DVB_DVB_SRC_GUARD_"); - _tmp25_ = _tmp24_; + elements[6] = _tmp34_; + _tmp35_ = elements[6]; + _tmp36_ = channel; + _tmp37_ = dvb_terrestrial_channel_get_GuardInterval (_tmp36_); + _tmp38_ = _tmp37_; + _tmp39_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_GUARD, (gint) _tmp38_, "DVB_DVB_SRC_GUARD_"); _g_free0 (elements[7]); - elements[7] = _tmp25_; - _tmp26_ = dvb_terrestrial_channel_get_Hierarchy (channel); - _tmp27_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, (gint) _tmp26_, "DVB_DVB_SRC_HIERARCHY_"); - _tmp28_ = _tmp27_; + elements[7] = _tmp39_; + _tmp40_ = elements[7]; + _tmp41_ = channel; + _tmp42_ = dvb_terrestrial_channel_get_Hierarchy (_tmp41_); + _tmp43_ = _tmp42_; + _tmp44_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, (gint) _tmp43_, "DVB_DVB_SRC_HIERARCHY_"); _g_free0 (elements[8]); - elements[8] = _tmp28_; - _tmp29_ = g_strjoinv (":", elements); - buffer = _tmp29_; - _tmp30_ = string_get_data (buffer, &_tmp31_); - g_output_stream_write_all (self->priv->stream, _tmp30_, (gsize) _tmp31_, NULL, NULL, &_inner_error_); + elements[8] = _tmp44_; + _tmp45_ = elements[8]; + _tmp46_ = g_strjoinv (":", elements); + buffer = _tmp46_; + _tmp47_ = self->priv->stream; + _tmp48_ = string_get_data (buffer, &_tmp48__length1); + _tmp49_ = _tmp48_; + _tmp49__length1 = _tmp48__length1; + g_output_stream_write_all (_tmp47_, _tmp49_, (gsize) _tmp49__length1, NULL, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); @@ -532,25 +641,47 @@ static void dvb_io_channel_list_writer_write_satellite_channel (DVBioChannelListWriter* self, DVBSatelliteChannel* channel, GError** error) { - guint _tmp0_; - const gchar* _tmp1_ = NULL; - gint _tmp2_; - guint _tmp3_; - gchar* _tmp4_ = NULL; + DVBSatelliteChannel* _tmp0_; + guint _tmp1_; + guint _tmp2_; + DVBSatelliteChannel* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + DVBSatelliteChannel* _tmp6_; + gint _tmp7_; + gint _tmp8_; + DVBSatelliteChannel* _tmp9_; + guint _tmp10_; + guint _tmp11_; + gchar* _tmp12_ = NULL; gchar* buffer; - guint8* _tmp5_ = NULL; - gint _tmp6_; + GOutputStream* _tmp13_; + guint8* _tmp14_; + gint _tmp14__length1; + guint8* _tmp15_; + gint _tmp15__length1; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); - _tmp0_ = dvb_channel_get_Frequency ((DVBChannel*) channel); - _tmp1_ = dvb_satellite_channel_get_Polarization (channel); - _tmp2_ = dvb_satellite_channel_get_DiseqcSource (channel); - _tmp3_ = dvb_satellite_channel_get_SymbolRate (channel); - _tmp4_ = g_strdup_printf ("%u:%s:%d:%u", _tmp0_ / 1000, _tmp1_, _tmp2_, _tmp3_); - buffer = _tmp4_; - _tmp5_ = string_get_data (buffer, &_tmp6_); - g_output_stream_write_all (self->priv->stream, _tmp5_, (gsize) _tmp6_, NULL, NULL, &_inner_error_); + _tmp0_ = channel; + _tmp1_ = dvb_channel_get_Frequency ((DVBChannel*) _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = channel; + _tmp4_ = dvb_satellite_channel_get_Polarization (_tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = channel; + _tmp7_ = dvb_satellite_channel_get_DiseqcSource (_tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = channel; + _tmp10_ = dvb_satellite_channel_get_SymbolRate (_tmp9_); + _tmp11_ = _tmp10_; + _tmp12_ = g_strdup_printf ("%u:%s:%d:%u", _tmp2_ / 1000, _tmp5_, _tmp8_, _tmp11_); + buffer = _tmp12_; + _tmp13_ = self->priv->stream; + _tmp14_ = string_get_data (buffer, &_tmp14__length1); + _tmp15_ = _tmp14_; + _tmp15__length1 = _tmp14__length1; + g_output_stream_write_all (_tmp13_, _tmp15_, (gsize) _tmp15__length1, NULL, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); @@ -562,66 +693,90 @@ static void dvb_io_channel_list_writer_write_cable_channel (DVBioChannelListWriter* self, DVBCableChannel* channel, GError** error) { gchar** _tmp0_ = NULL; + gchar** elements; gint elements_length1; gint _elements_size_; - gchar** _tmp1_; - gchar** elements; + DVBCableChannel* _tmp1_; guint _tmp2_; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - DVBDvbSrcInversion _tmp5_; - gchar* _tmp6_ = NULL; - gchar* _tmp7_; - guint _tmp8_; + guint _tmp3_; + gchar* _tmp4_ = NULL; + gchar* _tmp5_; + DVBCableChannel* _tmp6_; + DVBDvbSrcInversion _tmp7_; + DVBDvbSrcInversion _tmp8_; gchar* _tmp9_ = NULL; gchar* _tmp10_; - DVBDvbSrcCodeRate _tmp11_; - gchar* _tmp12_ = NULL; - gchar* _tmp13_; - DVBDvbSrcModulation _tmp14_; - gchar* _tmp15_ = NULL; - gchar* _tmp16_; - gchar* _tmp17_ = NULL; + DVBCableChannel* _tmp11_; + guint _tmp12_; + guint _tmp13_; + gchar* _tmp14_ = NULL; + gchar* _tmp15_; + DVBCableChannel* _tmp16_; + DVBDvbSrcCodeRate _tmp17_; + DVBDvbSrcCodeRate _tmp18_; + gchar* _tmp19_ = NULL; + gchar* _tmp20_; + DVBCableChannel* _tmp21_; + DVBDvbSrcModulation _tmp22_; + DVBDvbSrcModulation _tmp23_; + gchar* _tmp24_ = NULL; + gchar* _tmp25_; + gchar* _tmp26_ = NULL; gchar* buffer; - guint8* _tmp18_ = NULL; - gint _tmp19_; + GOutputStream* _tmp27_; + guint8* _tmp28_; + gint _tmp28__length1; + guint8* _tmp29_; + gint _tmp29__length1; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); _tmp0_ = g_new0 (gchar*, 5 + 1); - _tmp1_ = _tmp0_; + elements = _tmp0_; elements_length1 = 5; _elements_size_ = elements_length1; - elements = _tmp1_; - _tmp2_ = dvb_channel_get_Frequency ((DVBChannel*) channel); - _tmp3_ = g_strdup_printf ("%u", _tmp2_); - _tmp4_ = _tmp3_; + _tmp1_ = channel; + _tmp2_ = dvb_channel_get_Frequency ((DVBChannel*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = g_strdup_printf ("%u", _tmp3_); _g_free0 (elements[0]); elements[0] = _tmp4_; - _tmp5_ = dvb_cable_channel_get_Inversion (channel); - _tmp6_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) _tmp5_, "DVB_DVB_SRC_INVERSION_"); - _tmp7_ = _tmp6_; + _tmp5_ = elements[0]; + _tmp6_ = channel; + _tmp7_ = dvb_cable_channel_get_Inversion (_tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) _tmp8_, "DVB_DVB_SRC_INVERSION_"); _g_free0 (elements[1]); - elements[1] = _tmp7_; - _tmp8_ = dvb_cable_channel_get_SymbolRate (channel); - _tmp9_ = g_strdup_printf ("%u", _tmp8_ * 1000); - _tmp10_ = _tmp9_; - _g_free0 (elements[2]); - elements[2] = _tmp10_; - _tmp11_ = dvb_cable_channel_get_CodeRate (channel); - _tmp12_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp11_, "DVB_DVB_SRC_CODE_RATE_"); + elements[1] = _tmp9_; + _tmp10_ = elements[1]; + _tmp11_ = channel; + _tmp12_ = dvb_cable_channel_get_SymbolRate (_tmp11_); _tmp13_ = _tmp12_; + _tmp14_ = g_strdup_printf ("%u", _tmp13_ * 1000); + _g_free0 (elements[2]); + elements[2] = _tmp14_; + _tmp15_ = elements[2]; + _tmp16_ = channel; + _tmp17_ = dvb_cable_channel_get_CodeRate (_tmp16_); + _tmp18_ = _tmp17_; + _tmp19_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp18_, "DVB_DVB_SRC_CODE_RATE_"); _g_free0 (elements[3]); - elements[3] = _tmp13_; - _tmp14_ = dvb_cable_channel_get_Modulation (channel); - _tmp15_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) _tmp14_, "DVB_DVB_SRC_MODULATION_"); - _tmp16_ = _tmp15_; + elements[3] = _tmp19_; + _tmp20_ = elements[3]; + _tmp21_ = channel; + _tmp22_ = dvb_cable_channel_get_Modulation (_tmp21_); + _tmp23_ = _tmp22_; + _tmp24_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) _tmp23_, "DVB_DVB_SRC_MODULATION_"); _g_free0 (elements[4]); - elements[4] = _tmp16_; - _tmp17_ = g_strjoinv (":", elements); - buffer = _tmp17_; - _tmp18_ = string_get_data (buffer, &_tmp19_); - g_output_stream_write_all (self->priv->stream, _tmp18_, (gsize) _tmp19_, NULL, NULL, &_inner_error_); + elements[4] = _tmp24_; + _tmp25_ = elements[4]; + _tmp26_ = g_strjoinv (":", elements); + buffer = _tmp26_; + _tmp27_ = self->priv->stream; + _tmp28_ = string_get_data (buffer, &_tmp28__length1); + _tmp29_ = _tmp28_; + _tmp29__length1 = _tmp28__length1; + g_output_stream_write_all (_tmp27_, _tmp29_, (gsize) _tmp29__length1, NULL, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (buffer); @@ -633,67 +788,153 @@ } -static const gchar* string_offset (const gchar* self, glong offset) { - const gchar* result = NULL; - g_return_val_if_fail (self != NULL, NULL); - result = (const gchar*) (((gchar*) self) + offset); - return result; +static glong string_strnlen (gchar* str, glong maxlen) { + glong result = 0L; + gchar* _tmp0_; + glong _tmp1_; + gchar* _tmp2_ = NULL; + gchar* end; + gchar* _tmp3_; + _tmp0_ = str; + _tmp1_ = maxlen; + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); + end = _tmp2_; + _tmp3_ = end; + if (_tmp3_ == NULL) { + glong _tmp4_; + _tmp4_ = maxlen; + result = _tmp4_; + return result; + } else { + gchar* _tmp5_; + gchar* _tmp6_; + _tmp5_ = end; + _tmp6_ = str; + result = (glong) (_tmp5_ - _tmp6_); + return result; + } } static gchar* string_substring (const gchar* self, glong offset, glong len) { gchar* result = NULL; - gint _tmp0_; - glong string_length; - const gchar* _tmp1_ = NULL; - const gchar* start; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; + glong string_length = 0L; + gboolean _tmp0_ = FALSE; + glong _tmp1_; + gboolean _tmp3_; + glong _tmp9_; + glong _tmp15_; + glong _tmp18_; + glong _tmp19_; + glong _tmp20_; + glong _tmp21_; + glong _tmp22_; + gchar* _tmp23_ = NULL; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = strlen (self); - string_length = (glong) _tmp0_; - if (offset < 0) { - offset = string_length + offset; - g_return_val_if_fail (offset >= 0, NULL); + _tmp1_ = offset; + if (_tmp1_ >= ((glong) 0)) { + glong _tmp2_; + _tmp2_ = len; + _tmp0_ = _tmp2_ >= ((glong) 0); } else { - g_return_val_if_fail (offset <= string_length, NULL); + _tmp0_ = FALSE; } - if (len < 0) { - len = string_length - offset; + _tmp3_ = _tmp0_; + if (_tmp3_) { + glong _tmp4_; + glong _tmp5_; + glong _tmp6_ = 0L; + _tmp4_ = offset; + _tmp5_ = len; + _tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_); + string_length = _tmp6_; + } else { + gint _tmp7_; + gint _tmp8_; + _tmp7_ = strlen (self); + _tmp8_ = _tmp7_; + string_length = (glong) _tmp8_; } - g_return_val_if_fail ((offset + len) <= string_length, NULL); - _tmp1_ = string_offset (self, offset); - start = _tmp1_; - _tmp2_ = string_offset (start, len); - _tmp3_ = g_strndup (start, ((gchar*) _tmp2_) - ((gchar*) start)); - result = _tmp3_; + _tmp9_ = offset; + if (_tmp9_ < ((glong) 0)) { + glong _tmp10_; + glong _tmp11_; + glong _tmp12_; + _tmp10_ = string_length; + _tmp11_ = offset; + offset = _tmp10_ + _tmp11_; + _tmp12_ = offset; + g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL); + } else { + glong _tmp13_; + glong _tmp14_; + _tmp13_ = offset; + _tmp14_ = string_length; + g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL); + } + _tmp15_ = len; + if (_tmp15_ < ((glong) 0)) { + glong _tmp16_; + glong _tmp17_; + _tmp16_ = string_length; + _tmp17_ = offset; + len = _tmp16_ - _tmp17_; + } + _tmp18_ = offset; + _tmp19_ = len; + _tmp20_ = string_length; + g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL); + _tmp21_ = offset; + _tmp22_ = len; + _tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_); + result = _tmp23_; return result; } static gchar* dvb_io_channel_list_writer_get_name_without_prefix (GType enumtype, gint val, const gchar* prefix) { gchar* result = NULL; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_; + GType _tmp0_; + gint _tmp1_; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_; gchar* name; + const gchar* _tmp4_; g_return_val_if_fail (prefix != NULL, NULL); - _tmp0_ = dvb_utils_get_name_by_value_from_enum (enumtype, val); - _tmp1_ = g_strdup (_tmp0_); - name = _tmp1_; - if (name == NULL) { + _tmp0_ = enumtype; + _tmp1_ = val; + _tmp2_ = dvb_utils_get_name_by_value_from_enum (_tmp0_, _tmp1_); + _tmp3_ = g_strdup (_tmp2_); + name = _tmp3_; + _tmp4_ = name; + if (_tmp4_ == NULL) { result = NULL; _g_free0 (name); return result; } else { - gint _tmp2_; - gint _tmp3_; - gint _tmp4_; - gchar* _tmp5_ = NULL; - _tmp2_ = strlen (prefix); - _tmp3_ = strlen (name); - _tmp4_ = strlen (prefix); - _tmp5_ = string_substring (name, (glong) _tmp2_, (glong) (_tmp3_ - _tmp4_)); - result = _tmp5_; + const gchar* _tmp5_; + const gchar* _tmp6_; + gint _tmp7_; + gint _tmp8_; + const gchar* _tmp9_; + gint _tmp10_; + gint _tmp11_; + const gchar* _tmp12_; + gint _tmp13_; + gint _tmp14_; + gchar* _tmp15_ = NULL; + _tmp5_ = name; + _tmp6_ = prefix; + _tmp7_ = strlen (_tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = name; + _tmp10_ = strlen (_tmp9_); + _tmp11_ = _tmp10_; + _tmp12_ = prefix; + _tmp13_ = strlen (_tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = string_substring (_tmp5_, (glong) _tmp8_, (glong) (_tmp11_ - _tmp14_)); + result = _tmp15_; _g_free0 (name); return result; } @@ -703,8 +944,10 @@ GFile* dvb_io_channel_list_writer_get_file (DVBioChannelListWriter* self) { GFile* result; + GFile* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_file; + _tmp0_ = self->priv->_file; + result = _tmp0_; return result; } @@ -718,8 +961,8 @@ GFile* _tmp0_; GFile* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_file); self->priv->_file = _tmp1_; g_object_notify ((GObject *) self, "file"); diff -Nru gnome-dvb-daemon-0.1.23/src/io/RecordingReader.c gnome-dvb-daemon-0.2.7/src/io/RecordingReader.c --- gnome-dvb-daemon-0.1.23/src/io/RecordingReader.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/io/RecordingReader.c 2011-10-06 15:40:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* RecordingReader.c generated by valac 0.11.3, the Vala compiler +/* RecordingReader.c generated by valac 0.14.0, the Vala compiler * generated from RecordingReader.vala, do not modify */ /* @@ -49,6 +49,26 @@ typedef struct _DVBRecordingsStore DVBRecordingsStore; typedef struct _DVBRecordingsStoreClass DVBRecordingsStoreClass; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) @@ -76,10 +96,13 @@ struct _DVBioRecordingReaderPrivate { GFile* _directory; DVBRecordingsStore* _store; + gint _max_recursion; }; static gpointer dvb_io_recording_reader_parent_class = NULL; +static DVBLoggingLogger* dvb_io_recording_reader_log; +static DVBLoggingLogger* dvb_io_recording_reader_log = NULL; GType dvb_io_recording_reader_get_type (void) G_GNUC_CONST; GType dvb_recordings_store_get_type (void) G_GNUC_CONST; @@ -87,15 +110,23 @@ enum { DVB_IO_RECORDING_READER_DUMMY_PROPERTY, DVB_IO_RECORDING_READER_DIRECTORY, - DVB_IO_RECORDING_READER_STORE + DVB_IO_RECORDING_READER_STORE, + DVB_IO_RECORDING_READER_MAX_RECURSION }; -#define DVB_IO_RECORDING_READER_ATTRS G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_ACCESS_CAN_READ "," G_FILE_ATTRIBUTE_STANDARD_NAME +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); +#define DVB_IO_RECORDING_READER_ATTRS G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_ACCESS_CAN_READ "," G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN DVBioRecordingReader* dvb_io_recording_reader_new (GFile* recordingsbasedir, DVBRecordingsStore* recstore); DVBioRecordingReader* dvb_io_recording_reader_construct (GType object_type, GFile* recordingsbasedir, DVBRecordingsStore* recstore); gboolean dvb_io_recording_reader_load_into (DVBioRecordingReader* self); GFile* dvb_io_recording_reader_get_directory (DVBioRecordingReader* self); -static gboolean dvb_io_recording_reader_restore_from_dir (DVBioRecordingReader* self, GFile* recordingsbasedir); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); +static gboolean dvb_io_recording_reader_restore_from_dir (DVBioRecordingReader* self, GFile* recordingsbasedir, gint depth); static gboolean dvb_io_recording_reader_is_readable_dir (GFile* directory); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); +gint dvb_io_recording_reader_get_max_recursion (DVBioRecordingReader* self); GType dvb_recording_get_type (void) G_GNUC_CONST; DVBRecording* dvb_io_recording_reader_deserialize (DVBioRecordingReader* self, GFile* file, GError** error); DVBRecordingsStore* dvb_io_recording_reader_get_store (DVBioRecordingReader* self); @@ -112,6 +143,7 @@ void dvb_recording_set_Description (DVBRecording* self, const gchar* value); static void dvb_io_recording_reader_set_directory (DVBioRecordingReader* self, GFile* value); static void dvb_io_recording_reader_set_store (DVBioRecordingReader* self, DVBRecordingsStore* value); +void dvb_io_recording_reader_set_max_recursion (DVBioRecordingReader* self, gint value); static void dvb_io_recording_reader_finalize (GObject* obj); static void _vala_dvb_io_recording_reader_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void _vala_dvb_io_recording_reader_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); @@ -122,9 +154,13 @@ */ DVBioRecordingReader* dvb_io_recording_reader_construct (GType object_type, GFile* recordingsbasedir, DVBRecordingsStore* recstore) { DVBioRecordingReader * self = NULL; + GFile* _tmp0_; + DVBRecordingsStore* _tmp1_; g_return_val_if_fail (recordingsbasedir != NULL, NULL); g_return_val_if_fail (recstore != NULL, NULL); - self = (DVBioRecordingReader*) g_object_new (object_type, "directory", recordingsbasedir, "store", recstore, NULL); + _tmp0_ = recordingsbasedir; + _tmp1_ = recstore; + self = (DVBioRecordingReader*) g_object_new (object_type, "directory", _tmp0_, "store", _tmp1_, NULL); return self; } @@ -141,52 +177,69 @@ */ gboolean dvb_io_recording_reader_load_into (DVBioRecordingReader* self) { gboolean result = FALSE; - gboolean _tmp0_; - gboolean _tmp3_; + GFile* _tmp0_; + gboolean _tmp1_ = FALSE; + GFile* _tmp6_; + gboolean _tmp7_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); - _tmp0_ = g_file_query_exists (self->priv->_directory, NULL); - if (!_tmp0_) { - gchar* _tmp1_ = NULL; - gchar* _tmp2_; - _tmp1_ = g_file_get_path (self->priv->_directory); - _tmp2_ = _tmp1_; - g_debug ("RecordingReader.vala:45: Directory %s does not exist", _tmp2_); - _g_free0 (_tmp2_); + _tmp0_ = self->priv->_directory; + _tmp1_ = g_file_query_exists (_tmp0_, NULL); + if (!_tmp1_) { + DVBLoggingLogger* _tmp2_; + GFile* _tmp3_; + gchar* _tmp4_ = NULL; + gchar* _tmp5_; + _tmp2_ = dvb_io_recording_reader_log; + _tmp3_ = self->priv->_directory; + _tmp4_ = g_file_get_path (_tmp3_); + _tmp5_ = _tmp4_; + dvb_logging_logger_debug (_tmp2_, "RecordingReader.vala:52: Directory %s does not exist", _tmp5_); + _g_free0 (_tmp5_); result = FALSE; return result; } - _tmp3_ = dvb_io_recording_reader_restore_from_dir (self, self->priv->_directory); - result = _tmp3_; + _tmp6_ = self->priv->_directory; + _tmp7_ = dvb_io_recording_reader_restore_from_dir (self, _tmp6_, 0); + result = _tmp7_; return result; } static gboolean dvb_io_recording_reader_is_readable_dir (GFile* directory) { gboolean result = FALSE; - GFileInfo* info; - GFileInfo* _tmp0_ = NULL; - GFileInfo* _tmp1_; - GFileInfo* _tmp2_; - GFileType _tmp3_; - gboolean _tmp6_; + GFileInfo* info = NULL; + GFileInfo* _tmp6_; + GFileType _tmp7_ = 0; + GFileInfo* _tmp12_; + gboolean _tmp13_ = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (directory != NULL, FALSE); - info = NULL; - _tmp0_ = g_file_query_info (directory, DVB_IO_RECORDING_READER_ATTRS, 0, NULL, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch9_g_error; + { + GFile* _tmp0_; + GFileInfo* _tmp1_ = NULL; + GFileInfo* _tmp2_; + _tmp0_ = directory; + _tmp1_ = g_file_query_info (_tmp0_, DVB_IO_RECORDING_READER_ATTRS, 0, NULL, &_inner_error_); + _tmp2_ = _tmp1_; + if (_inner_error_ != NULL) { + goto __catch9_g_error; + } + _g_object_unref0 (info); + info = _tmp2_; } - _tmp2_ = _tmp1_; - _g_object_unref0 (info); - info = _tmp2_; goto __finally9; __catch9_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp3_; + GError* _tmp4_; + const gchar* _tmp5_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("RecordingReader.vala:57: Could not retrieve attributes: %s", e->message); + _tmp3_ = dvb_io_recording_reader_log; + _tmp4_ = e; + _tmp5_ = _tmp4_->message; + dvb_logging_logger_error (_tmp3_, "RecordingReader.vala:64: Could not retrieve attributes: %s", _tmp5_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (info); @@ -199,26 +252,36 @@ g_clear_error (&_inner_error_); return FALSE; } - _tmp3_ = g_file_info_get_file_type (info); - if (_tmp3_ != G_FILE_TYPE_DIRECTORY) { - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - _tmp4_ = g_file_get_path (directory); - _tmp5_ = _tmp4_; - g_critical ("RecordingReader.vala:62: %s is not a directory", _tmp5_); - _g_free0 (_tmp5_); + _tmp6_ = info; + _tmp7_ = g_file_info_get_file_type (_tmp6_); + if (_tmp7_ != G_FILE_TYPE_DIRECTORY) { + DVBLoggingLogger* _tmp8_; + GFile* _tmp9_; + gchar* _tmp10_ = NULL; + gchar* _tmp11_; + _tmp8_ = dvb_io_recording_reader_log; + _tmp9_ = directory; + _tmp10_ = g_file_get_path (_tmp9_); + _tmp11_ = _tmp10_; + dvb_logging_logger_error (_tmp8_, "RecordingReader.vala:69: %s is not a directory", _tmp11_); + _g_free0 (_tmp11_); result = FALSE; _g_object_unref0 (info); return result; } - _tmp6_ = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ); - if (!_tmp6_) { - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - _tmp7_ = g_file_get_path (directory); - _tmp8_ = _tmp7_; - g_critical ("RecordingReader.vala:67: Cannot read %s", _tmp8_); - _g_free0 (_tmp8_); + _tmp12_ = info; + _tmp13_ = g_file_info_get_attribute_boolean (_tmp12_, G_FILE_ATTRIBUTE_ACCESS_CAN_READ); + if (!_tmp13_) { + DVBLoggingLogger* _tmp14_; + GFile* _tmp15_; + gchar* _tmp16_ = NULL; + gchar* _tmp17_; + _tmp14_ = dvb_io_recording_reader_log; + _tmp15_ = directory; + _tmp16_ = g_file_get_path (_tmp15_); + _tmp17_ = _tmp16_; + dvb_logging_logger_error (_tmp14_, "RecordingReader.vala:74: Cannot read %s", _tmp17_); + _g_free0 (_tmp17_); result = FALSE; _g_object_unref0 (info); return result; @@ -229,39 +292,55 @@ } -static gboolean dvb_io_recording_reader_restore_from_dir (DVBioRecordingReader* self, GFile* recordingsbasedir) { +static gboolean dvb_io_recording_reader_restore_from_dir (DVBioRecordingReader* self, GFile* recordingsbasedir, gint depth) { gboolean result = FALSE; - gboolean _tmp0_; - GFileEnumerator* files; - GFileEnumerator* _tmp1_ = NULL; - GFileEnumerator* _tmp2_; - GFileEnumerator* _tmp3_; + gint _tmp0_; + gint _tmp1_; + GFile* _tmp2_; + gboolean _tmp3_ = FALSE; + GFileEnumerator* files = NULL; gboolean success; - GFileInfo* childinfo; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (recordingsbasedir != NULL, FALSE); - _tmp0_ = dvb_io_recording_reader_is_readable_dir (recordingsbasedir); - if (!_tmp0_) { + _tmp0_ = depth; + _tmp1_ = self->priv->_max_recursion; + if (_tmp0_ >= _tmp1_) { + result = TRUE; + return result; + } + _tmp2_ = recordingsbasedir; + _tmp3_ = dvb_io_recording_reader_is_readable_dir (_tmp2_); + if (!_tmp3_) { result = FALSE; return result; } - files = NULL; - _tmp1_ = g_file_enumerate_children (recordingsbasedir, DVB_IO_RECORDING_READER_ATTRS, 0, NULL, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - goto __catch10_g_error; + { + GFile* _tmp4_; + GFileEnumerator* _tmp5_ = NULL; + GFileEnumerator* _tmp6_; + _tmp4_ = recordingsbasedir; + _tmp5_ = g_file_enumerate_children (_tmp4_, DVB_IO_RECORDING_READER_ATTRS, 0, NULL, &_inner_error_); + _tmp6_ = _tmp5_; + if (_inner_error_ != NULL) { + goto __catch10_g_error; + } + _g_object_unref0 (files); + files = _tmp6_; } - _tmp3_ = _tmp2_; - _g_object_unref0 (files); - files = _tmp3_; goto __finally10; __catch10_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp7_; + GError* _tmp8_; + const gchar* _tmp9_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("RecordingReader.vala:83: Could not read directory: %s", e->message); + _tmp7_ = dvb_io_recording_reader_log; + _tmp8_ = e; + _tmp9_ = _tmp8_->message; + dvb_logging_logger_error (_tmp7_, "RecordingReader.vala:92: Could not read directory: %s", _tmp9_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (files); @@ -275,121 +354,184 @@ return FALSE; } success = TRUE; - childinfo = NULL; - while (TRUE) { - GFileInfo* _tmp4_ = NULL; - GFileInfo* _tmp5_; - GFileInfo* _tmp6_; - guint32 _tmp7_; - guint32 type; - const gchar* _tmp8_ = NULL; - GFile* _tmp9_ = NULL; - GFile* child; - _tmp4_ = g_file_enumerator_next_file (files, NULL, &_inner_error_); - _tmp5_ = _tmp4_; - if (_inner_error_ != NULL) { + { + GFileInfo* childinfo = NULL; + while (TRUE) { + GFileEnumerator* _tmp10_; + GFileInfo* _tmp11_ = NULL; + GFileInfo* _tmp12_; + GFileInfo* _tmp13_; + GFileInfo* _tmp14_; + gboolean _tmp15_ = FALSE; + GFileInfo* _tmp16_; + guint32 _tmp17_ = 0U; + guint32 type; + GFile* _tmp18_; + GFileInfo* _tmp19_; + const gchar* _tmp20_ = NULL; + GFile* _tmp21_ = NULL; + GFile* child; + guint32 _tmp22_; + _tmp10_ = files; + _tmp11_ = g_file_enumerator_next_file (_tmp10_, NULL, &_inner_error_); + _tmp12_ = _tmp11_; + if (_inner_error_ != NULL) { + _g_object_unref0 (childinfo); + goto __catch11_g_error; + } _g_object_unref0 (childinfo); - goto __catch11_g_error; - } - _tmp6_ = _tmp5_; - _g_object_unref0 (childinfo); - childinfo = _tmp6_; - if (!(childinfo != NULL)) { - break; - } - _tmp7_ = g_file_info_get_attribute_uint32 (childinfo, G_FILE_ATTRIBUTE_STANDARD_TYPE); - type = _tmp7_; - _tmp8_ = g_file_info_get_name (childinfo); - _tmp9_ = g_file_get_child (recordingsbasedir, _tmp8_); - child = _tmp9_; - switch (type) { - case G_FILE_TYPE_DIRECTORY: - { - dvb_io_recording_reader_restore_from_dir (self, child); + childinfo = _tmp12_; + _tmp13_ = childinfo; + if (!(_tmp13_ != NULL)) { break; } - case G_FILE_TYPE_REGULAR: - { - const gchar* _tmp10_ = NULL; - _tmp10_ = g_file_info_get_name (childinfo); - if (g_strcmp0 (_tmp10_, "info.rec") == 0) { - DVBRecording* rec; - DVBRecording* _tmp11_ = NULL; - DVBRecording* _tmp12_; - DVBRecording* _tmp13_; - rec = NULL; - _tmp11_ = dvb_io_recording_reader_deserialize (self, child, &_inner_error_); - _tmp12_ = _tmp11_; - if (_inner_error_ != NULL) { - goto __catch12_g_error; - } - _tmp13_ = _tmp12_; - _g_object_unref0 (rec); - rec = _tmp13_; - goto __finally12; - __catch12_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("RecordingReader.vala:108: Could not deserialize recording: %s", e->message); - _g_error_free0 (e); - } - __finally12: - if (_inner_error_ != NULL) { + _tmp14_ = childinfo; + _tmp15_ = g_file_info_get_is_hidden (_tmp14_); + if (_tmp15_) { + continue; + } + _tmp16_ = childinfo; + _tmp17_ = g_file_info_get_attribute_uint32 (_tmp16_, G_FILE_ATTRIBUTE_STANDARD_TYPE); + type = _tmp17_; + _tmp18_ = recordingsbasedir; + _tmp19_ = childinfo; + _tmp20_ = g_file_info_get_name (_tmp19_); + _tmp21_ = g_file_get_child (_tmp18_, _tmp20_); + child = _tmp21_; + _tmp22_ = type; + switch (_tmp22_) { + case G_FILE_TYPE_DIRECTORY: + { + GFile* _tmp23_; + gint _tmp24_; + _tmp23_ = child; + _tmp24_ = depth; + dvb_io_recording_reader_restore_from_dir (self, _tmp23_, _tmp24_ + 1); + break; + } + case G_FILE_TYPE_REGULAR: + { + GFileInfo* _tmp25_; + const gchar* _tmp26_ = NULL; + _tmp25_ = childinfo; + _tmp26_ = g_file_info_get_name (_tmp25_); + if (g_strcmp0 (_tmp26_, "info.rec") == 0) { + DVBRecording* rec; + DVBRecording* _tmp33_; + rec = NULL; + { + GFile* _tmp27_; + DVBRecording* _tmp28_ = NULL; + DVBRecording* _tmp29_; + _tmp27_ = child; + _tmp28_ = dvb_io_recording_reader_deserialize (self, _tmp27_, &_inner_error_); + _tmp29_ = _tmp28_; + if (_inner_error_ != NULL) { + goto __catch12_g_error; + } + _g_object_unref0 (rec); + rec = _tmp29_; + } + goto __finally12; + __catch12_g_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp30_; + GError* _tmp31_; + const gchar* _tmp32_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp30_ = dvb_io_recording_reader_log; + _tmp31_ = e; + _tmp32_ = _tmp31_->message; + dvb_logging_logger_error (_tmp30_, "RecordingReader.vala:120: Could not deserialize recording: %s", _tmp32_); + _g_error_free0 (e); + } + __finally12: + if (_inner_error_ != NULL) { + _g_object_unref0 (rec); + _g_object_unref0 (child); + _g_object_unref0 (childinfo); + goto __catch11_g_error; + } + _tmp33_ = rec; + if (_tmp33_ != NULL) { + DVBLoggingLogger* _tmp34_; + GFile* _tmp35_; + gchar* _tmp36_ = NULL; + gchar* _tmp37_; + DVBRecordingsStore* _tmp38_; + DVBRecording* _tmp39_; + _tmp34_ = dvb_io_recording_reader_log; + _tmp35_ = child; + _tmp36_ = g_file_get_path (_tmp35_); + _tmp37_ = _tmp36_; + dvb_logging_logger_debug (_tmp34_, "RecordingReader.vala:125: Restored recording from %s", _tmp37_); + _g_free0 (_tmp37_); + _tmp38_ = self->priv->_store; + _tmp39_ = rec; + dvb_recordings_store_add_and_monitor (_tmp38_, _tmp39_); + } _g_object_unref0 (rec); - _g_object_unref0 (child); - _g_object_unref0 (childinfo); - goto __catch11_g_error; - } - if (rec != NULL) { - gchar* _tmp14_ = NULL; - gchar* _tmp15_; - _tmp14_ = g_file_get_path (child); - _tmp15_ = _tmp14_; - g_debug ("RecordingReader.vala:113: Restored recording from %s", _tmp15_); - _g_free0 (_tmp15_); - dvb_recordings_store_add_and_monitor (self->priv->_store, rec); } - _g_object_unref0 (rec); + break; } + default: break; } + _g_object_unref0 (child); } - _g_object_unref0 (child); + _g_object_unref0 (childinfo); } - _g_object_unref0 (childinfo); goto __finally11; __catch11_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp40_; + GError* _tmp41_; + const gchar* _tmp42_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("RecordingReader.vala:124: %s", e->message); + _tmp40_ = dvb_io_recording_reader_log; + _tmp41_ = e; + _tmp42_ = _tmp41_->message; + dvb_logging_logger_error (_tmp40_, "RecordingReader.vala:136: %s", _tmp42_); success = FALSE; _g_error_free0 (e); } __finally11: - g_file_enumerator_close (files, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch13_g_error; - } - goto __finally13; - __catch13_g_error: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("RecordingReader.vala:130: Could not close file: %s", e->message); - success = FALSE; - _g_error_free0 (e); - } - __finally13: - if (_inner_error_ != NULL) { - _g_object_unref0 (files); - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + { + GFileEnumerator* _tmp43_; + _tmp43_ = files; + g_file_enumerator_close (_tmp43_, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch13_g_error; + } + } + goto __finally13; + __catch13_g_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp44_; + GError* _tmp45_; + const gchar* _tmp46_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp44_ = dvb_io_recording_reader_log; + _tmp45_ = e; + _tmp46_ = _tmp45_->message; + dvb_logging_logger_error (_tmp44_, "RecordingReader.vala:142: Could not close file: %s", _tmp46_); + success = FALSE; + _g_error_free0 (e); + } + __finally13: + if (_inner_error_ != NULL) { + _g_object_unref0 (files); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } } if (_inner_error_ != NULL) { _g_object_unref0 (files); @@ -405,45 +547,57 @@ DVBRecording* dvb_io_recording_reader_deserialize (DVBioRecordingReader* self, GFile* file, GError** error) { DVBRecording* result = NULL; - GFileInputStream* _tmp0_ = NULL; - GFileInputStream* _tmp1_; + GFile* _tmp0_; + GFileInputStream* _tmp1_ = NULL; GFileInputStream* _tmp2_; - GDataInputStream* _tmp3_ = NULL; + GFileInputStream* _tmp3_; GDataInputStream* _tmp4_; + GDataInputStream* _tmp5_; GDataInputStream* reader; gchar* line; gsize len = 0UL; gint line_number; - DVBRecording* _tmp5_ = NULL; + DVBRecording* _tmp6_; DVBRecording* rec; - GString* _tmp6_ = NULL; + GString* _tmp7_; GString* description; + GDataInputStream* _tmp57_; + DVBRecording* _tmp58_; + GString* _tmp59_; + const gchar* _tmp60_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (file != NULL, NULL); - _tmp0_ = g_file_read (file, NULL, &_inner_error_); - _tmp1_ = _tmp0_; + _tmp0_ = file; + _tmp1_ = g_file_read (_tmp0_, NULL, &_inner_error_); + _tmp2_ = _tmp1_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); return NULL; } - _tmp2_ = _tmp1_; - _tmp3_ = g_data_input_stream_new ((GInputStream*) _tmp2_); - reader = (_tmp4_ = _tmp3_, _g_object_unref0 (_tmp2_), _tmp4_); + _tmp3_ = _tmp2_; + _tmp4_ = g_data_input_stream_new ((GInputStream*) _tmp3_); + _tmp5_ = _tmp4_; + _g_object_unref0 (_tmp3_); + reader = _tmp5_; line = NULL; line_number = 0; - _tmp5_ = dvb_recording_new (); - rec = _tmp5_; - _tmp6_ = g_string_new (""); - description = _tmp6_; + _tmp6_ = dvb_recording_new (); + rec = _tmp6_; + _tmp7_ = g_string_new (""); + description = _tmp7_; while (TRUE) { - gsize _tmp7_; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - gchar* _tmp10_; - _tmp8_ = g_data_input_stream_read_line (reader, &_tmp7_, NULL, &_inner_error_); - len = _tmp7_; - _tmp9_ = _tmp8_; + GDataInputStream* _tmp8_; + gsize _tmp9_ = 0UL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_; + const gchar* _tmp12_; + gint _tmp13_; + gint _tmp56_; + _tmp8_ = reader; + _tmp10_ = g_data_input_stream_read_line (_tmp8_, &_tmp9_, NULL, &_inner_error_); + len = _tmp9_; + _tmp11_ = _tmp10_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_string_free0 (description); @@ -452,44 +606,56 @@ _g_object_unref0 (reader); return NULL; } - _tmp10_ = _tmp9_; _g_free0 (line); - line = _tmp10_; - if (!(line != NULL)) { + line = _tmp11_; + _tmp12_ = line; + if (!(_tmp12_ != NULL)) { break; } - switch (line_number) { + _tmp13_ = line_number; + switch (_tmp13_) { case 0: { - gint _tmp11_; - _tmp11_ = atoi (line); - dvb_recording_set_Id (rec, (guint32) _tmp11_); + DVBRecording* _tmp14_; + const gchar* _tmp15_; + gint _tmp16_ = 0; + _tmp14_ = rec; + _tmp15_ = line; + _tmp16_ = atoi (_tmp15_); + dvb_recording_set_Id (_tmp14_, (guint32) _tmp16_); break; } case 1: { - dvb_recording_set_ChannelName (rec, line); + DVBRecording* _tmp17_; + const gchar* _tmp18_; + _tmp17_ = rec; + _tmp18_ = line; + dvb_recording_set_ChannelName (_tmp17_, _tmp18_); break; } case 2: { - GFile* _tmp12_; - _tmp12_ = NULL; - if (len == 0) { - GFile* _tmp13_; - _tmp13_ = NULL; - _g_object_unref0 (_tmp12_); - _tmp12_ = _tmp13_; + GFile* _tmp19_ = NULL; + gsize _tmp20_; + DVBRecording* _tmp23_; + GFile* _tmp24_; + _tmp20_ = len; + if (_tmp20_ == ((gsize) 0)) { + _g_object_unref0 (_tmp19_); + _tmp19_ = NULL; } else { - GFile* _tmp14_ = NULL; - GFile* _tmp15_; - _tmp14_ = g_file_new_for_path (line); - _tmp15_ = _tmp14_; - _g_object_unref0 (_tmp12_); - _tmp12_ = _tmp15_; + const gchar* _tmp21_; + GFile* _tmp22_ = NULL; + _tmp21_ = line; + _tmp22_ = g_file_new_for_path (_tmp21_); + _g_object_unref0 (_tmp19_); + _tmp19_ = _tmp22_; } - dvb_recording_set_Location (rec, _tmp12_); - _g_object_unref0 (_tmp12_); + _tmp23_ = rec; + _tmp24_ = _tmp19_; + dvb_recording_set_Location (_tmp23_, _tmp24_); + _g_object_unref0 (_tmp19_); break; } case 3: @@ -500,73 +666,121 @@ gint day; gint hour; gint minute; - gboolean _tmp16_ = FALSE; - gboolean _tmp17_ = FALSE; - gboolean _tmp18_ = FALSE; - gboolean _tmp19_ = FALSE; + const gchar* _tmp25_; + gboolean _tmp26_ = FALSE; + gboolean _tmp27_ = FALSE; + gboolean _tmp28_ = FALSE; + gboolean _tmp29_ = FALSE; + gint _tmp30_; + gboolean _tmp32_; + gboolean _tmp34_; + gboolean _tmp36_; + gboolean _tmp38_; year = 0; month = 0; day = 0; hour = 0; minute = 0; - sscanf (line, "%d-%d-%d %d:%d", &year, &month, &day, &hour, &minute); - if (year >= 1900) { - _tmp19_ = month >= 1; + _tmp25_ = line; + sscanf (_tmp25_, "%d-%d-%d %d:%d", &year, &month, &day, &hour, &minute); + _tmp30_ = year; + if (_tmp30_ >= 1900) { + gint _tmp31_; + _tmp31_ = month; + _tmp29_ = _tmp31_ >= 1; } else { - _tmp19_ = FALSE; + _tmp29_ = FALSE; } - if (_tmp19_) { - _tmp18_ = day >= 1; + _tmp32_ = _tmp29_; + if (_tmp32_) { + gint _tmp33_; + _tmp33_ = day; + _tmp28_ = _tmp33_ >= 1; } else { - _tmp18_ = FALSE; + _tmp28_ = FALSE; } - if (_tmp18_) { - _tmp17_ = hour >= 0; + _tmp34_ = _tmp28_; + if (_tmp34_) { + gint _tmp35_; + _tmp35_ = hour; + _tmp27_ = _tmp35_ >= 0; } else { - _tmp17_ = FALSE; + _tmp27_ = FALSE; } - if (_tmp17_) { - _tmp16_ = minute >= 0; + _tmp36_ = _tmp27_; + if (_tmp36_) { + gint _tmp37_; + _tmp37_ = minute; + _tmp26_ = _tmp37_ >= 0; } else { - _tmp16_ = FALSE; + _tmp26_ = FALSE; } - if (_tmp16_) { - struct tm _tmp20_ = {0}; - struct tm _tmp21_ = {0}; - _tmp21_ = (dvb_utils_create_time (year, month, day, hour, minute, 0, &_tmp20_), _tmp20_); - dvb_recording_set_StartTime (rec, &_tmp21_); + _tmp38_ = _tmp26_; + if (_tmp38_) { + DVBRecording* _tmp39_; + gint _tmp40_; + gint _tmp41_; + gint _tmp42_; + gint _tmp43_; + gint _tmp44_; + struct tm _tmp45_ = {0}; + _tmp39_ = rec; + _tmp40_ = year; + _tmp41_ = month; + _tmp42_ = day; + _tmp43_ = hour; + _tmp44_ = minute; + dvb_utils_create_time (_tmp40_, _tmp41_, _tmp42_, _tmp43_, _tmp44_, 0, &_tmp45_); + dvb_recording_set_StartTime (_tmp39_, &_tmp45_); } break; } } case 4: { - gint _tmp22_; - _tmp22_ = atoi (line); - dvb_recording_set_Length (rec, (gint64) _tmp22_); + DVBRecording* _tmp46_; + const gchar* _tmp47_; + gint _tmp48_ = 0; + _tmp46_ = rec; + _tmp47_ = line; + _tmp48_ = atoi (_tmp47_); + dvb_recording_set_Length (_tmp46_, (gint64) _tmp48_); break; } case 5: { - const gchar* _tmp23_; - _tmp23_ = NULL; - if (len == 0) { - _tmp23_ = NULL; + const gchar* _tmp49_ = NULL; + gsize _tmp50_; + DVBRecording* _tmp52_; + const gchar* _tmp53_; + _tmp50_ = len; + if (_tmp50_ == ((gsize) 0)) { + _tmp49_ = NULL; } else { - _tmp23_ = line; + const gchar* _tmp51_; + _tmp51_ = line; + _tmp49_ = _tmp51_; } - dvb_recording_set_Name (rec, _tmp23_); + _tmp52_ = rec; + _tmp53_ = _tmp49_; + dvb_recording_set_Name (_tmp52_, _tmp53_); break; } default: { - g_string_append (description, line); + GString* _tmp54_; + const gchar* _tmp55_; + _tmp54_ = description; + _tmp55_ = line; + g_string_append (_tmp54_, _tmp55_); break; } } - line_number++; + _tmp56_ = line_number; + line_number = _tmp56_ + 1; } - g_input_stream_close ((GInputStream*) reader, NULL, &_inner_error_); + _tmp57_ = reader; + g_input_stream_close ((GInputStream*) _tmp57_, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_string_free0 (description); @@ -575,7 +789,10 @@ _g_object_unref0 (reader); return NULL; } - dvb_recording_set_Description (rec, description->str); + _tmp58_ = rec; + _tmp59_ = description; + _tmp60_ = _tmp59_->str; + dvb_recording_set_Description (_tmp58_, _tmp60_); result = rec; _g_string_free0 (description); _g_free0 (line); @@ -586,8 +803,10 @@ GFile* dvb_io_recording_reader_get_directory (DVBioRecordingReader* self) { GFile* result; + GFile* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_directory; + _tmp0_ = self->priv->_directory; + result = _tmp0_; return result; } @@ -601,8 +820,8 @@ GFile* _tmp0_; GFile* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_directory); self->priv->_directory = _tmp1_; g_object_notify ((GObject *) self, "directory"); @@ -611,8 +830,10 @@ DVBRecordingsStore* dvb_io_recording_reader_get_store (DVBioRecordingReader* self) { DVBRecordingsStore* result; + DVBRecordingsStore* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_store; + _tmp0_ = self->priv->_store; + result = _tmp0_; return result; } @@ -621,15 +842,36 @@ DVBRecordingsStore* _tmp0_; DVBRecordingsStore* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_store); self->priv->_store = _tmp1_; g_object_notify ((GObject *) self, "store"); } +gint dvb_io_recording_reader_get_max_recursion (DVBioRecordingReader* self) { + gint result; + gint _tmp0_; + g_return_val_if_fail (self != NULL, 0); + _tmp0_ = self->priv->_max_recursion; + result = _tmp0_; + return result; +} + + +void dvb_io_recording_reader_set_max_recursion (DVBioRecordingReader* self, gint value) { + gint _tmp0_; + g_return_if_fail (self != NULL); + _tmp0_ = value; + self->priv->_max_recursion = _tmp0_; + g_object_notify ((GObject *) self, "max-recursion"); +} + + static void dvb_io_recording_reader_class_init (DVBioRecordingReaderClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_io_recording_reader_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBioRecordingReaderPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_io_recording_reader_get_property; @@ -637,11 +879,16 @@ G_OBJECT_CLASS (klass)->finalize = dvb_io_recording_reader_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_IO_RECORDING_READER_DIRECTORY, g_param_spec_object ("directory", "directory", "directory", G_TYPE_FILE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_IO_RECORDING_READER_STORE, g_param_spec_object ("store", "store", "store", DVB_TYPE_RECORDINGS_STORE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_IO_RECORDING_READER_MAX_RECURSION, g_param_spec_int ("max-recursion", "max-recursion", "max-recursion", G_MININT, G_MAXINT, 3, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_io_recording_reader_log = _tmp1_; } static void dvb_io_recording_reader_instance_init (DVBioRecordingReader * self) { self->priv = DVB_IO_RECORDING_READER_GET_PRIVATE (self); + self->priv->_max_recursion = 3; } @@ -676,6 +923,9 @@ case DVB_IO_RECORDING_READER_STORE: g_value_set_object (value, dvb_io_recording_reader_get_store (self)); break; + case DVB_IO_RECORDING_READER_MAX_RECURSION: + g_value_set_int (value, dvb_io_recording_reader_get_max_recursion (self)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -693,6 +943,9 @@ case DVB_IO_RECORDING_READER_STORE: dvb_io_recording_reader_set_store (self, g_value_get_object (value)); break; + case DVB_IO_RECORDING_READER_MAX_RECURSION: + dvb_io_recording_reader_set_max_recursion (self, g_value_get_int (value)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; diff -Nru gnome-dvb-daemon-0.1.23/src/io/RecordingReader.vala gnome-dvb-daemon-0.2.7/src/io/RecordingReader.vala --- gnome-dvb-daemon-0.1.23/src/io/RecordingReader.vala 2010-04-20 18:58:25.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/io/RecordingReader.vala 2011-10-06 15:38:55.000000000 +0000 @@ -18,15 +18,22 @@ */ using GLib; +using DVB.Logging; namespace DVB.io { public class RecordingReader : GLib.Object { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public File directory {get; construct;} public RecordingsStore store {get; construct;} + public int max_recursion {get; set; default = 3;} - private static const string ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_ACCESS_CAN_READ + "," + FILE_ATTRIBUTE_STANDARD_NAME; + private static const string ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE + + "," + FILE_ATTRIBUTE_ACCESS_CAN_READ + + "," + FILE_ATTRIBUTE_STANDARD_NAME + + "," + FILE_ATTRIBUTE_STANDARD_IS_HIDDEN; /** * @recordingsbasedir: The directory to search @@ -42,7 +49,7 @@ */ public bool load_into () { if (!this.directory.query_exists (null)) { - debug ("Directory %s does not exist", this.directory.get_path ()); + log.debug ("Directory %s does not exist", this.directory.get_path ()); return false; } @@ -54,33 +61,35 @@ try { info = directory.query_info (ATTRS, 0, null); } catch (Error e) { - critical ("Could not retrieve attributes: %s", e.message); + log.error ("Could not retrieve attributes: %s", e.message); return false; } if (info.get_file_type () != FileType.DIRECTORY) { - critical ("%s is not a directory", directory.get_path ()); + log.error ("%s is not a directory", directory.get_path ()); return false; } if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) { - critical ("Cannot read %s", directory.get_path ()); + log.error ("Cannot read %s", directory.get_path ()); return false; } return true; } - - private bool restore_from_dir (File recordingsbasedir) { - if (!is_readable_dir (recordingsbasedir)) return false; + private bool restore_from_dir (File recordingsbasedir, int depth = 0) { + if (depth >= max_recursion) + return true; + if (!is_readable_dir (recordingsbasedir)) + return false; FileEnumerator files; try { files = recordingsbasedir.enumerate_children ( ATTRS, 0, null); } catch (Error e) { - critical ("Could not read directory: %s", e.message); + log.error ("Could not read directory: %s", e.message); return false; } @@ -88,15 +97,18 @@ try { FileInfo childinfo; while ((childinfo = files.next_file (null)) != null) { + if (childinfo.get_is_hidden ()) + continue; + uint32 type = childinfo.get_attribute_uint32 ( FILE_ATTRIBUTE_STANDARD_TYPE); - + File child = recordingsbasedir.get_child ( childinfo.get_name ()); switch (type) { case FileType.DIRECTORY: - this.restore_from_dir (child); + this.restore_from_dir (child, depth + 1); break; case FileType.REGULAR: @@ -105,12 +117,12 @@ try { rec = this.deserialize (child); } catch (Error e) { - critical ( + log.error ( "Could not deserialize recording: %s", e.message); } if (rec != null) { - debug ("Restored recording from %s", + log.debug ("Restored recording from %s", child.get_path ()); this.store.add_and_monitor (rec); @@ -121,13 +133,13 @@ } } } catch (Error e) { - critical ("%s", e.message); + log.error ("%s", e.message); success = false; } finally { try { files.close (null); } catch (Error e) { - critical ("Could not close file: %s", e.message); + log.error ("Could not close file: %s", e.message); success = false; } } @@ -148,7 +160,7 @@ while ((line = reader.read_line (out len, null)) != null) { switch (line_number) { case 0: - rec.Id = (uint32)line.to_int (); + rec.Id = (uint32)int.parse (line); break; case 1: @@ -175,7 +187,7 @@ } case 4: - rec.Length = (int64)line.to_int (); + rec.Length = (int64)int.parse (line); break; case 5: diff -Nru gnome-dvb-daemon-0.1.23/src/io/RecordingWriter.c gnome-dvb-daemon-0.2.7/src/io/RecordingWriter.c --- gnome-dvb-daemon-0.1.23/src/io/RecordingWriter.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/io/RecordingWriter.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* RecordingWriter.c generated by valac 0.11.3, the Vala compiler +/* RecordingWriter.c generated by valac 0.14.0, the Vala compiler * generated from RecordingWriter.vala, do not modify */ /* @@ -47,6 +47,26 @@ typedef struct _DVBRecording DVBRecording; typedef struct _DVBRecordingClass DVBRecordingClass; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -65,6 +85,8 @@ static gpointer dvb_io_recording_writer_parent_class = NULL; +static DVBLoggingLogger* dvb_io_recording_writer_log; +static DVBLoggingLogger* dvb_io_recording_writer_log = NULL; GType dvb_io_recording_writer_get_type (void) G_GNUC_CONST; GType dvb_recording_get_type (void) G_GNUC_CONST; @@ -73,11 +95,16 @@ DVB_IO_RECORDING_WRITER_DUMMY_PROPERTY, DVB_IO_RECORDING_WRITER_REC }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBioRecordingWriter* dvb_io_recording_writer_new (DVBRecording* rec); DVBioRecordingWriter* dvb_io_recording_writer_construct (GType object_type, DVBRecording* rec); void dvb_io_recording_writer_write (DVBioRecordingWriter* self, GError** error); DVBRecording* dvb_io_recording_writer_get_rec (DVBioRecordingWriter* self); GFile* dvb_recording_get_Location (DVBRecording* self); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); gchar* dvb_io_recording_writer_serialize (DVBioRecordingWriter* self, DVBRecording* rec); guint* dvb_recording_get_start (DVBRecording* self, int* result_length1); const gchar* dvb_recording_get_Name (DVBRecording* self); @@ -93,8 +120,10 @@ DVBioRecordingWriter* dvb_io_recording_writer_construct (GType object_type, DVBRecording* rec) { DVBioRecordingWriter * self = NULL; + DVBRecording* _tmp0_; g_return_val_if_fail (rec != NULL, NULL); - self = (DVBioRecordingWriter*) g_object_new (object_type, "rec", rec, NULL); + _tmp0_ = rec; + self = (DVBioRecordingWriter*) g_object_new (object_type, "rec", _tmp0_, NULL); return self; } @@ -110,56 +139,89 @@ */ static guint8* string_get_data (const gchar* self, int* result_length1) { guint8* result; + guint8* res; gint res_length1; gint _res_size_; - guint8* _tmp0_; - guint8* res; + gint _tmp0_; gint _tmp1_; - guint8* _tmp2_; + gint _tmp2_; + guint8* _tmp3_; + gint _tmp3__length1; + guint8* _tmp4_; + gint _tmp4__length1; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = (guint8*) self; + res = (guint8*) self; res_length1 = -1; _res_size_ = res_length1; - res = _tmp0_; - _tmp1_ = strlen (self); + _tmp0_ = strlen (self); + _tmp1_ = _tmp0_; res_length1 = (gint) _tmp1_; - _tmp2_ = res; - *result_length1 = res_length1; - result = _tmp2_; + _tmp2_ = res_length1; + _tmp3_ = res; + _tmp3__length1 = res_length1; + _tmp4_ = _tmp3_; + _tmp4__length1 = _tmp3__length1; + if (result_length1) { + *result_length1 = _tmp4__length1; + } + result = _tmp4_; return result; } void dvb_io_recording_writer_write (DVBioRecordingWriter* self, GError** error) { - GFile* _tmp0_ = NULL; - GFile* _tmp1_ = NULL; + DVBRecording* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; + GFile* _tmp3_ = NULL; GFile* parentdir; - GFile* _tmp2_ = NULL; + GFile* _tmp4_; + GFile* _tmp5_ = NULL; GFile* recfile; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - gboolean _tmp5_; - GFileOutputStream* _tmp6_ = NULL; + DVBLoggingLogger* _tmp6_; + GFile* _tmp7_; + gchar* _tmp8_ = NULL; + gchar* _tmp9_; + GFile* _tmp10_; + gboolean _tmp11_ = FALSE; + GFile* _tmp14_; + GFileOutputStream* _tmp15_ = NULL; GFileOutputStream* stream; - gchar* _tmp7_ = NULL; + DVBRecording* _tmp16_; + gchar* _tmp17_ = NULL; gchar* text; - guint8* _tmp8_ = NULL; - gint _tmp9_; + GFileOutputStream* _tmp18_; + const gchar* _tmp19_; + guint8* _tmp20_; + gint _tmp20__length1; + guint8* _tmp21_; + gint _tmp21__length1; + GFileOutputStream* _tmp22_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _tmp0_ = dvb_recording_get_Location (self->priv->_rec); - _tmp1_ = g_file_get_parent (_tmp0_); - parentdir = _tmp1_; - _tmp2_ = g_file_get_child (parentdir, "info.rec"); - recfile = _tmp2_; - _tmp3_ = g_file_get_path (recfile); - _tmp4_ = _tmp3_; - g_debug ("RecordingWriter.vala:41: Saving recording to %s", _tmp4_); - _g_free0 (_tmp4_); - _tmp5_ = g_file_query_exists (recfile, NULL); - if (_tmp5_) { - g_debug ("RecordingWriter.vala:44: Deleting old info.rec"); - g_file_delete (recfile, NULL, &_inner_error_); + _tmp0_ = self->priv->_rec; + _tmp1_ = dvb_recording_get_Location (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = g_file_get_parent (_tmp2_); + parentdir = _tmp3_; + _tmp4_ = parentdir; + _tmp5_ = g_file_get_child (_tmp4_, "info.rec"); + recfile = _tmp5_; + _tmp6_ = dvb_io_recording_writer_log; + _tmp7_ = recfile; + _tmp8_ = g_file_get_path (_tmp7_); + _tmp9_ = _tmp8_; + dvb_logging_logger_debug (_tmp6_, "RecordingWriter.vala:44: Saving recording to %s", _tmp9_); + _g_free0 (_tmp9_); + _tmp10_ = recfile; + _tmp11_ = g_file_query_exists (_tmp10_, NULL); + if (_tmp11_) { + DVBLoggingLogger* _tmp12_; + GFile* _tmp13_; + _tmp12_ = dvb_io_recording_writer_log; + dvb_logging_logger_debug (_tmp12_, "RecordingWriter.vala:47: Deleting old info.rec"); + _tmp13_ = recfile; + g_file_delete (_tmp13_, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (recfile); @@ -167,18 +229,24 @@ return; } } - _tmp6_ = g_file_create (recfile, 0, NULL, &_inner_error_); - stream = _tmp6_; + _tmp14_ = recfile; + _tmp15_ = g_file_create (_tmp14_, 0, NULL, &_inner_error_); + stream = _tmp15_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (recfile); _g_object_unref0 (parentdir); return; } - _tmp7_ = dvb_io_recording_writer_serialize (self, self->priv->_rec); - text = _tmp7_; - _tmp8_ = string_get_data (text, &_tmp9_); - g_output_stream_write ((GOutputStream*) stream, _tmp8_, (gsize) _tmp9_, NULL, &_inner_error_); + _tmp16_ = self->priv->_rec; + _tmp17_ = dvb_io_recording_writer_serialize (self, _tmp16_); + text = _tmp17_; + _tmp18_ = stream; + _tmp19_ = text; + _tmp20_ = string_get_data (_tmp19_, &_tmp20__length1); + _tmp21_ = _tmp20_; + _tmp21__length1 = _tmp20__length1; + g_output_stream_write ((GOutputStream*) _tmp18_, _tmp21_, (gsize) _tmp21__length1, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (text); @@ -187,7 +255,8 @@ _g_object_unref0 (parentdir); return; } - g_output_stream_close ((GOutputStream*) stream, NULL, &_inner_error_); + _tmp22_ = stream; + g_output_stream_close ((GOutputStream*) _tmp22_, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_free0 (text); @@ -205,57 +274,123 @@ gchar* dvb_io_recording_writer_serialize (DVBioRecordingWriter* self, DVBRecording* rec) { gchar* result = NULL; - gint _tmp0_; - guint* _tmp1_ = NULL; + DVBRecording* _tmp0_; + gint _tmp1_ = 0; + guint* _tmp2_ = NULL; + guint* started; gint started_length1; gint _started_size_; - guint* _tmp2_; - guint* started; - const gchar* _tmp3_; - const gchar* _tmp4_ = NULL; + const gchar* _tmp3_ = NULL; + DVBRecording* _tmp4_; + const gchar* _tmp5_; const gchar* _tmp6_; - const gchar* _tmp7_ = NULL; - guint32 _tmp9_; const gchar* _tmp10_ = NULL; - GFile* _tmp11_ = NULL; - gchar* _tmp12_ = NULL; - gchar* _tmp13_; - gint64 _tmp14_; - gchar* _tmp15_ = NULL; - gchar* _tmp16_; + DVBRecording* _tmp11_; + const gchar* _tmp12_; + const gchar* _tmp13_; + DVBRecording* _tmp17_; + guint32 _tmp18_; + guint32 _tmp19_; + DVBRecording* _tmp20_; + const gchar* _tmp21_; + const gchar* _tmp22_; + DVBRecording* _tmp23_; + GFile* _tmp24_; + GFile* _tmp25_; + gchar* _tmp26_ = NULL; + gchar* _tmp27_; + guint* _tmp28_; + gint _tmp28__length1; + guint _tmp29_; + guint* _tmp30_; + gint _tmp30__length1; + guint _tmp31_; + guint* _tmp32_; + gint _tmp32__length1; + guint _tmp33_; + guint* _tmp34_; + gint _tmp34__length1; + guint _tmp35_; + guint* _tmp36_; + gint _tmp36__length1; + guint _tmp37_; + DVBRecording* _tmp38_; + gint64 _tmp39_; + gint64 _tmp40_; + const gchar* _tmp41_; + const gchar* _tmp42_; + gchar* _tmp43_ = NULL; + gchar* _tmp44_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (rec != NULL, NULL); - _tmp1_ = dvb_recording_get_start (rec, &_tmp0_); - _tmp2_ = _tmp1_; - started_length1 = _tmp0_; - _started_size_ = started_length1; + _tmp0_ = rec; + _tmp2_ = dvb_recording_get_start (_tmp0_, &_tmp1_); started = _tmp2_; - _tmp3_ = NULL; - _tmp4_ = dvb_recording_get_Name (rec); - if (_tmp4_ == NULL) { + started_length1 = _tmp1_; + _started_size_ = started_length1; + _tmp4_ = rec; + _tmp5_ = dvb_recording_get_Name (_tmp4_); + _tmp6_ = _tmp5_; + if (_tmp6_ == NULL) { _tmp3_ = ""; } else { - const gchar* _tmp5_ = NULL; - _tmp5_ = dvb_recording_get_Name (rec); - _tmp3_ = _tmp5_; + DVBRecording* _tmp7_; + const gchar* _tmp8_; + const gchar* _tmp9_; + _tmp7_ = rec; + _tmp8_ = dvb_recording_get_Name (_tmp7_); + _tmp9_ = _tmp8_; + _tmp3_ = _tmp9_; } - _tmp6_ = NULL; - _tmp7_ = dvb_recording_get_Description (rec); - if (_tmp7_ == NULL) { - _tmp6_ = ""; + _tmp11_ = rec; + _tmp12_ = dvb_recording_get_Description (_tmp11_); + _tmp13_ = _tmp12_; + if (_tmp13_ == NULL) { + _tmp10_ = ""; } else { - const gchar* _tmp8_ = NULL; - _tmp8_ = dvb_recording_get_Description (rec); - _tmp6_ = _tmp8_; + DVBRecording* _tmp14_; + const gchar* _tmp15_; + const gchar* _tmp16_; + _tmp14_ = rec; + _tmp15_ = dvb_recording_get_Description (_tmp14_); + _tmp16_ = _tmp15_; + _tmp10_ = _tmp16_; } - _tmp9_ = dvb_recording_get_Id (rec); - _tmp10_ = dvb_recording_get_ChannelName (rec); - _tmp11_ = dvb_recording_get_Location (rec); - _tmp12_ = g_file_get_path (_tmp11_); - _tmp13_ = _tmp12_; - _tmp14_ = dvb_recording_get_Length (rec); - _tmp15_ = g_strdup_printf ("%u\n%s\n%s\n%u-%u-%u %u:%u\n%" G_GINT64_FORMAT "\n%s\n%s", _tmp9_, _tmp10_, _tmp13_, started[0], started[1], started[2], started[3], started[4], _tmp14_, _tmp3_, _tmp6_); - result = (_tmp16_ = _tmp15_, _g_free0 (_tmp13_), _tmp16_); + _tmp17_ = rec; + _tmp18_ = dvb_recording_get_Id (_tmp17_); + _tmp19_ = _tmp18_; + _tmp20_ = rec; + _tmp21_ = dvb_recording_get_ChannelName (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = rec; + _tmp24_ = dvb_recording_get_Location (_tmp23_); + _tmp25_ = _tmp24_; + _tmp26_ = g_file_get_path (_tmp25_); + _tmp27_ = _tmp26_; + _tmp28_ = started; + _tmp28__length1 = started_length1; + _tmp29_ = _tmp28_[0]; + _tmp30_ = started; + _tmp30__length1 = started_length1; + _tmp31_ = _tmp30_[1]; + _tmp32_ = started; + _tmp32__length1 = started_length1; + _tmp33_ = _tmp32_[2]; + _tmp34_ = started; + _tmp34__length1 = started_length1; + _tmp35_ = _tmp34_[3]; + _tmp36_ = started; + _tmp36__length1 = started_length1; + _tmp37_ = _tmp36_[4]; + _tmp38_ = rec; + _tmp39_ = dvb_recording_get_Length (_tmp38_); + _tmp40_ = _tmp39_; + _tmp41_ = _tmp3_; + _tmp42_ = _tmp10_; + _tmp43_ = g_strdup_printf ("%u\n%s\n%s\n%u-%u-%u %u:%u\n%" G_GINT64_FORMAT "\n%s\n%s", _tmp19_, _tmp22_, _tmp27_, _tmp29_, _tmp31_, _tmp33_, _tmp35_, _tmp37_, _tmp40_, _tmp41_, _tmp42_); + _tmp44_ = _tmp43_; + _g_free0 (_tmp27_); + result = _tmp44_; started = (g_free (started), NULL); return result; } @@ -263,8 +398,10 @@ DVBRecording* dvb_io_recording_writer_get_rec (DVBioRecordingWriter* self) { DVBRecording* result; + DVBRecording* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_rec; + _tmp0_ = self->priv->_rec; + result = _tmp0_; return result; } @@ -278,8 +415,8 @@ DVBRecording* _tmp0_; DVBRecording* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_rec); self->priv->_rec = _tmp1_; g_object_notify ((GObject *) self, "rec"); @@ -287,12 +424,17 @@ static void dvb_io_recording_writer_class_init (DVBioRecordingWriterClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_io_recording_writer_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBioRecordingWriterPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_io_recording_writer_get_property; G_OBJECT_CLASS (klass)->set_property = _vala_dvb_io_recording_writer_set_property; G_OBJECT_CLASS (klass)->finalize = dvb_io_recording_writer_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_IO_RECORDING_WRITER_REC, g_param_spec_object ("rec", "rec", "rec", DVB_TYPE_RECORDING, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_io_recording_writer_log = _tmp1_; } diff -Nru gnome-dvb-daemon-0.1.23/src/io/RecordingWriter.vala gnome-dvb-daemon-0.2.7/src/io/RecordingWriter.vala --- gnome-dvb-daemon-0.1.23/src/io/RecordingWriter.vala 2010-11-17 10:40:35.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/io/RecordingWriter.vala 2011-04-19 21:18:36.000000000 +0000 @@ -18,11 +18,14 @@ */ using GLib; +using DVB.Logging; namespace DVB.io { public class RecordingWriter : GLib.Object { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public Recording rec {get; construct;} public RecordingWriter (Recording rec) { @@ -38,10 +41,10 @@ File recfile = parentdir.get_child ("info.rec"); - debug ("Saving recording to %s", recfile.get_path() ); + log.debug ("Saving recording to %s", recfile.get_path() ); if (recfile.query_exists (null)) { - debug ("Deleting old info.rec"); + log.debug ("Deleting old info.rec"); recfile.delete (null); } diff -Nru gnome-dvb-daemon-0.1.23/src/Logging.c gnome-dvb-daemon-0.2.7/src/Logging.c --- gnome-dvb-daemon-0.1.23/src/Logging.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Logging.c 2011-09-29 19:51:17.000000000 +0000 @@ -0,0 +1,2010 @@ +/* Logging.c generated by valac 0.14.0, the Vala compiler + * generated from Logging.vala, do not modify */ + +/* + * Copyright (C) 2011 Sebastian Pölsterl + * + * This file is part of GNOME DVB Daemon. + * + * GNOME DVB Daemon is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GNOME DVB Daemon is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNOME DVB Daemon. If not, see . + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +#define DVB_LOGGING_TYPE_LOG_LEVEL (dvb_logging_log_level_get_type ()) + +#define DVB_LOGGING_TYPE_FORMATTER (dvb_logging_formatter_get_type ()) +#define DVB_LOGGING_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_FORMATTER, DVBLoggingFormatter)) +#define DVB_LOGGING_IS_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_FORMATTER)) +#define DVB_LOGGING_FORMATTER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_LOGGING_TYPE_FORMATTER, DVBLoggingFormatterIface)) + +typedef struct _DVBLoggingFormatter DVBLoggingFormatter; +typedef struct _DVBLoggingFormatterIface DVBLoggingFormatterIface; + +#define DVB_LOGGING_TYPE_HANDLER (dvb_logging_handler_get_type ()) +#define DVB_LOGGING_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_HANDLER, DVBLoggingHandler)) +#define DVB_LOGGING_IS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_HANDLER)) +#define DVB_LOGGING_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_LOGGING_TYPE_HANDLER, DVBLoggingHandlerIface)) + +typedef struct _DVBLoggingHandler DVBLoggingHandler; +typedef struct _DVBLoggingHandlerIface DVBLoggingHandlerIface; + +#define DVB_LOGGING_TYPE_DEFAULT_FORMATTER (dvb_logging_default_formatter_get_type ()) +#define DVB_LOGGING_DEFAULT_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_DEFAULT_FORMATTER, DVBLoggingDefaultFormatter)) +#define DVB_LOGGING_DEFAULT_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_DEFAULT_FORMATTER, DVBLoggingDefaultFormatterClass)) +#define DVB_LOGGING_IS_DEFAULT_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_DEFAULT_FORMATTER)) +#define DVB_LOGGING_IS_DEFAULT_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_DEFAULT_FORMATTER)) +#define DVB_LOGGING_DEFAULT_FORMATTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_DEFAULT_FORMATTER, DVBLoggingDefaultFormatterClass)) + +typedef struct _DVBLoggingDefaultFormatter DVBLoggingDefaultFormatter; +typedef struct _DVBLoggingDefaultFormatterClass DVBLoggingDefaultFormatterClass; +typedef struct _DVBLoggingDefaultFormatterPrivate DVBLoggingDefaultFormatterPrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define DVB_LOGGING_TYPE_COLOR_FORMATTER (dvb_logging_color_formatter_get_type ()) +#define DVB_LOGGING_COLOR_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_COLOR_FORMATTER, DVBLoggingColorFormatter)) +#define DVB_LOGGING_COLOR_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_COLOR_FORMATTER, DVBLoggingColorFormatterClass)) +#define DVB_LOGGING_IS_COLOR_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_COLOR_FORMATTER)) +#define DVB_LOGGING_IS_COLOR_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_COLOR_FORMATTER)) +#define DVB_LOGGING_COLOR_FORMATTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_COLOR_FORMATTER, DVBLoggingColorFormatterClass)) + +typedef struct _DVBLoggingColorFormatter DVBLoggingColorFormatter; +typedef struct _DVBLoggingColorFormatterClass DVBLoggingColorFormatterClass; +typedef struct _DVBLoggingColorFormatterPrivate DVBLoggingColorFormatterPrivate; + +#define DVB_LOGGING_TYPE_CONSOLE_HANDLER (dvb_logging_console_handler_get_type ()) +#define DVB_LOGGING_CONSOLE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_CONSOLE_HANDLER, DVBLoggingConsoleHandler)) +#define DVB_LOGGING_CONSOLE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_CONSOLE_HANDLER, DVBLoggingConsoleHandlerClass)) +#define DVB_LOGGING_IS_CONSOLE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_CONSOLE_HANDLER)) +#define DVB_LOGGING_IS_CONSOLE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_CONSOLE_HANDLER)) +#define DVB_LOGGING_CONSOLE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_CONSOLE_HANDLER, DVBLoggingConsoleHandlerClass)) + +typedef struct _DVBLoggingConsoleHandler DVBLoggingConsoleHandler; +typedef struct _DVBLoggingConsoleHandlerClass DVBLoggingConsoleHandlerClass; +typedef struct _DVBLoggingConsoleHandlerPrivate DVBLoggingConsoleHandlerPrivate; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define DVB_LOGGING_TYPE_FILE_HANDLER (dvb_logging_file_handler_get_type ()) +#define DVB_LOGGING_FILE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_FILE_HANDLER, DVBLoggingFileHandler)) +#define DVB_LOGGING_FILE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_FILE_HANDLER, DVBLoggingFileHandlerClass)) +#define DVB_LOGGING_IS_FILE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_FILE_HANDLER)) +#define DVB_LOGGING_IS_FILE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_FILE_HANDLER)) +#define DVB_LOGGING_FILE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_FILE_HANDLER, DVBLoggingFileHandlerClass)) + +typedef struct _DVBLoggingFileHandler DVBLoggingFileHandler; +typedef struct _DVBLoggingFileHandlerClass DVBLoggingFileHandlerClass; +typedef struct _DVBLoggingFileHandlerPrivate DVBLoggingFileHandlerPrivate; +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; +typedef struct _DVBLoggingLoggerPrivate DVBLoggingLoggerPrivate; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; +typedef struct _DVBLoggingLogManagerPrivate DVBLoggingLogManagerPrivate; + +typedef enum { + DVB_LOGGING_LOG_LEVEL_LOG, + DVB_LOGGING_LOG_LEVEL_DEBUG, + DVB_LOGGING_LOG_LEVEL_INFO, + DVB_LOGGING_LOG_LEVEL_WARNING, + DVB_LOGGING_LOG_LEVEL_ERROR +} DVBLoggingLogLevel; + +struct _DVBLoggingFormatterIface { + GTypeInterface parent_iface; + gchar* (*format) (DVBLoggingFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format); +}; + +struct _DVBLoggingHandlerIface { + GTypeInterface parent_iface; + void (*publish) (DVBLoggingHandler* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args); + void (*close) (DVBLoggingHandler* self); + DVBLoggingFormatter* (*get_formatter) (DVBLoggingHandler* self); + void (*set_formatter) (DVBLoggingHandler* self, DVBLoggingFormatter* value); + DVBLoggingLogLevel (*get_threshold) (DVBLoggingHandler* self); + void (*set_threshold) (DVBLoggingHandler* self, DVBLoggingLogLevel value); +}; + +struct _DVBLoggingDefaultFormatter { + GObject parent_instance; + DVBLoggingDefaultFormatterPrivate * priv; +}; + +struct _DVBLoggingDefaultFormatterClass { + GObjectClass parent_class; + gchar* (*get_level_name) (DVBLoggingDefaultFormatter* self, DVBLoggingLogLevel level); + gchar* (*format) (DVBLoggingDefaultFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format); +}; + +struct _DVBLoggingColorFormatter { + DVBLoggingDefaultFormatter parent_instance; + DVBLoggingColorFormatterPrivate * priv; +}; + +struct _DVBLoggingColorFormatterClass { + DVBLoggingDefaultFormatterClass parent_class; +}; + +struct _DVBLoggingConsoleHandler { + GObject parent_instance; + DVBLoggingConsoleHandlerPrivate * priv; +}; + +struct _DVBLoggingConsoleHandlerClass { + GObjectClass parent_class; +}; + +struct _DVBLoggingConsoleHandlerPrivate { + DVBLoggingFormatter* _formatter; + DVBLoggingLogLevel _threshold; +}; + +struct _DVBLoggingFileHandler { + GObject parent_instance; + DVBLoggingFileHandlerPrivate * priv; +}; + +struct _DVBLoggingFileHandlerClass { + GObjectClass parent_class; +}; + +struct _DVBLoggingFileHandlerPrivate { + DVBLoggingFormatter* _formatter; + DVBLoggingLogLevel _threshold; + gint _limit; + gint _count; + gchar* _pattern; + GOutputStream* os; + gint file_size; + gint file_index; +}; + +struct _DVBLoggingLogger { + GObject parent_instance; + DVBLoggingLoggerPrivate * priv; +}; + +struct _DVBLoggingLoggerClass { + GObjectClass parent_class; +}; + +struct _DVBLoggingLoggerPrivate { + gchar* _name; + GeeHashSet* handlers; + GStaticRecMutex __lock_handlers; +}; + +struct _DVBLoggingLogManager { + GObject parent_instance; + DVBLoggingLogManagerPrivate * priv; +}; + +struct _DVBLoggingLogManagerClass { + GObjectClass parent_class; +}; + +struct _DVBLoggingLogManagerPrivate { + GeeHashMap* loggers; + GStaticRecMutex __lock_loggers; +}; + + +static gpointer dvb_logging_default_formatter_parent_class = NULL; +static DVBLoggingFormatterIface* dvb_logging_default_formatter_dvb_logging_formatter_parent_iface = NULL; +static gpointer dvb_logging_color_formatter_parent_class = NULL; +static gchar** dvb_logging_color_formatter_colormap; +static gint dvb_logging_color_formatter_colormap_length1; +static gchar** dvb_logging_color_formatter_colormap = NULL; +static gint dvb_logging_color_formatter_colormap_length1 = 0; +static gint _dvb_logging_color_formatter_colormap_size_ = 0; +static gpointer dvb_logging_console_handler_parent_class = NULL; +static DVBLoggingHandlerIface* dvb_logging_console_handler_dvb_logging_handler_parent_iface = NULL; +static gpointer dvb_logging_file_handler_parent_class = NULL; +static DVBLoggingHandlerIface* dvb_logging_file_handler_dvb_logging_handler_parent_iface = NULL; +static gpointer dvb_logging_logger_parent_class = NULL; +static gpointer dvb_logging_log_manager_parent_class = NULL; +static DVBLoggingLogManager* dvb_logging_log_manager_instance; +static DVBLoggingLogManager* dvb_logging_log_manager_instance = NULL; +static GStaticRecMutex dvb_logging_log_manager_instance_mutex; +static GStaticRecMutex dvb_logging_log_manager_instance_mutex = {0}; + +GType dvb_logging_log_level_get_type (void) G_GNUC_CONST; +GType dvb_logging_formatter_get_type (void) G_GNUC_CONST; +gchar* dvb_logging_formatter_format (DVBLoggingFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format); +GType dvb_logging_handler_get_type (void) G_GNUC_CONST; +void dvb_logging_handler_publish (DVBLoggingHandler* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args); +void dvb_logging_handler_close (DVBLoggingHandler* self); +DVBLoggingFormatter* dvb_logging_handler_get_formatter (DVBLoggingHandler* self); +void dvb_logging_handler_set_formatter (DVBLoggingHandler* self, DVBLoggingFormatter* value); +DVBLoggingLogLevel dvb_logging_handler_get_threshold (DVBLoggingHandler* self); +void dvb_logging_handler_set_threshold (DVBLoggingHandler* self, DVBLoggingLogLevel value); +GType dvb_logging_default_formatter_get_type (void) G_GNUC_CONST; +enum { + DVB_LOGGING_DEFAULT_FORMATTER_DUMMY_PROPERTY +}; +gchar* dvb_logging_default_formatter_get_level_name (DVBLoggingDefaultFormatter* self, DVBLoggingLogLevel level); +static gchar* dvb_logging_default_formatter_real_get_level_name (DVBLoggingDefaultFormatter* self, DVBLoggingLogLevel level); +gchar* dvb_logging_default_formatter_format (DVBLoggingDefaultFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format); +static gchar* dvb_logging_default_formatter_real_format (DVBLoggingDefaultFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format); +DVBLoggingDefaultFormatter* dvb_logging_default_formatter_new (void); +DVBLoggingDefaultFormatter* dvb_logging_default_formatter_construct (GType object_type); +GType dvb_logging_color_formatter_get_type (void) G_GNUC_CONST; +enum { + DVB_LOGGING_COLOR_FORMATTER_DUMMY_PROPERTY +}; +#define DVB_LOGGING_COLOR_FORMATTER_clear "\033[00m" +static gchar* dvb_logging_color_formatter_real_get_level_name (DVBLoggingDefaultFormatter* base, DVBLoggingLogLevel level); +static gchar* dvb_logging_color_formatter_real_format (DVBLoggingDefaultFormatter* base, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format); +DVBLoggingColorFormatter* dvb_logging_color_formatter_new (void); +DVBLoggingColorFormatter* dvb_logging_color_formatter_construct (GType object_type); +static void dvb_logging_color_formatter_finalize (GObject* obj); +GType dvb_logging_console_handler_get_type (void) G_GNUC_CONST; +#define DVB_LOGGING_CONSOLE_HANDLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_LOGGING_TYPE_CONSOLE_HANDLER, DVBLoggingConsoleHandlerPrivate)) +enum { + DVB_LOGGING_CONSOLE_HANDLER_DUMMY_PROPERTY, + DVB_LOGGING_CONSOLE_HANDLER_FORMATTER, + DVB_LOGGING_CONSOLE_HANDLER_THRESHOLD +}; +static void dvb_logging_console_handler_real_publish (DVBLoggingHandler* base, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args); +static void dvb_logging_console_handler_real_close (DVBLoggingHandler* base); +DVBLoggingConsoleHandler* dvb_logging_console_handler_new (void); +DVBLoggingConsoleHandler* dvb_logging_console_handler_construct (GType object_type); +static void dvb_logging_console_handler_finalize (GObject* obj); +static void _vala_dvb_logging_console_handler_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void _vala_dvb_logging_console_handler_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +GType dvb_logging_file_handler_get_type (void) G_GNUC_CONST; +#define DVB_LOGGING_FILE_HANDLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_LOGGING_TYPE_FILE_HANDLER, DVBLoggingFileHandlerPrivate)) +enum { + DVB_LOGGING_FILE_HANDLER_DUMMY_PROPERTY, + DVB_LOGGING_FILE_HANDLER_FORMATTER, + DVB_LOGGING_FILE_HANDLER_THRESHOLD, + DVB_LOGGING_FILE_HANDLER_LIMIT, + DVB_LOGGING_FILE_HANDLER_COUNT, + DVB_LOGGING_FILE_HANDLER_PATTERN +}; +DVBLoggingFileHandler* dvb_logging_file_handler_new (const gchar* file_pattern, GError** error); +DVBLoggingFileHandler* dvb_logging_file_handler_construct (GType object_type, const gchar* file_pattern, GError** error); +static void dvb_logging_file_handler_rotate (DVBLoggingFileHandler* self, GError** error); +static void dvb_logging_file_handler_real_publish (DVBLoggingHandler* base, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args); +gint dvb_logging_file_handler_get_limit (DVBLoggingFileHandler* self); +static void dvb_logging_file_handler_real_close (DVBLoggingHandler* base); +static GFile* dvb_logging_file_handler_get_next_file (DVBLoggingFileHandler* self); +gint dvb_logging_file_handler_get_count (DVBLoggingFileHandler* self); +const gchar* dvb_logging_file_handler_get_pattern (DVBLoggingFileHandler* self); +void dvb_logging_file_handler_set_limit (DVBLoggingFileHandler* self, gint value); +void dvb_logging_file_handler_set_count (DVBLoggingFileHandler* self, gint value); +static void dvb_logging_file_handler_set_pattern (DVBLoggingFileHandler* self, const gchar* value); +static void dvb_logging_file_handler_finalize (GObject* obj); +static void _vala_dvb_logging_file_handler_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void _vala_dvb_logging_file_handler_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +#define DVB_LOGGING_LOGGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerPrivate)) +enum { + DVB_LOGGING_LOGGER_DUMMY_PROPERTY, + DVB_LOGGING_LOGGER_NAME +}; +void dvb_logging_logger_addHandler (DVBLoggingLogger* self, DVBLoggingHandler* handler); +void dvb_logging_logger_removeHandler (DVBLoggingLogger* self, DVBLoggingHandler* handler); +GeeHashSet* dvb_logging_logger_getHandlers (DVBLoggingLogger* self); +static inline void dvb_logging_logger_log_full (DVBLoggingLogger* self, DVBLoggingLogLevel level, const gchar* format, va_list args); +const gchar* dvb_logging_logger_get_name (DVBLoggingLogger* self); +void dvb_logging_logger_log (DVBLoggingLogger* self, const gchar* format, ...); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); +void dvb_logging_logger_info (DVBLoggingLogger* self, const gchar* format, ...); +void dvb_logging_logger_warning (DVBLoggingLogger* self, const gchar* format, ...); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); +DVBLoggingLogger* dvb_logging_logger_new (void); +DVBLoggingLogger* dvb_logging_logger_construct (GType object_type); +void dvb_logging_logger_set_name (DVBLoggingLogger* self, const gchar* value); +static GObject * dvb_logging_logger_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +static void dvb_logging_logger_finalize (GObject* obj); +static void _vala_dvb_logging_logger_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void _vala_dvb_logging_logger_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +#define DVB_LOGGING_LOG_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerPrivate)) +enum { + DVB_LOGGING_LOG_MANAGER_DUMMY_PROPERTY +}; +#define DVB_LOGGING_LOG_MANAGER_DEFAULT_NAME "default" +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogManager* dvb_logging_log_manager_new (void); +DVBLoggingLogManager* dvb_logging_log_manager_construct (GType object_type); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); +DVBLoggingLogger* dvb_logging_log_manager_getLogger (DVBLoggingLogManager* self, const gchar* name); +static DVBLoggingLogger* dvb_logging_log_manager_createLogger (DVBLoggingLogManager* self, const gchar* name); +void dvb_logging_log_manager_cleanup (DVBLoggingLogManager* self); +static GObject * dvb_logging_log_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +static void dvb_logging_log_manager_finalize (GObject* obj); + + +GType dvb_logging_log_level_get_type (void) { + static volatile gsize dvb_logging_log_level_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_log_level_type_id__volatile)) { + static const GEnumValue values[] = {{DVB_LOGGING_LOG_LEVEL_LOG, "DVB_LOGGING_LOG_LEVEL_LOG", "log"}, {DVB_LOGGING_LOG_LEVEL_DEBUG, "DVB_LOGGING_LOG_LEVEL_DEBUG", "debug"}, {DVB_LOGGING_LOG_LEVEL_INFO, "DVB_LOGGING_LOG_LEVEL_INFO", "info"}, {DVB_LOGGING_LOG_LEVEL_WARNING, "DVB_LOGGING_LOG_LEVEL_WARNING", "warning"}, {DVB_LOGGING_LOG_LEVEL_ERROR, "DVB_LOGGING_LOG_LEVEL_ERROR", "error"}, {0, NULL, NULL}}; + GType dvb_logging_log_level_type_id; + dvb_logging_log_level_type_id = g_enum_register_static ("DVBLoggingLogLevel", values); + g_once_init_leave (&dvb_logging_log_level_type_id__volatile, dvb_logging_log_level_type_id); + } + return dvb_logging_log_level_type_id__volatile; +} + + +gchar* dvb_logging_formatter_format (DVBLoggingFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format) { + g_return_val_if_fail (self != NULL, NULL); + return DVB_LOGGING_FORMATTER_GET_INTERFACE (self)->format (self, logger_name, level, format); +} + + +static void dvb_logging_formatter_base_init (DVBLoggingFormatterIface * iface) { + static gboolean initialized = FALSE; + if (!initialized) { + initialized = TRUE; + } +} + + +GType dvb_logging_formatter_get_type (void) { + static volatile gsize dvb_logging_formatter_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_formatter_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingFormatterIface), (GBaseInitFunc) dvb_logging_formatter_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_logging_formatter_type_id; + dvb_logging_formatter_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBLoggingFormatter", &g_define_type_info, 0); + g_type_interface_add_prerequisite (dvb_logging_formatter_type_id, G_TYPE_OBJECT); + g_once_init_leave (&dvb_logging_formatter_type_id__volatile, dvb_logging_formatter_type_id); + } + return dvb_logging_formatter_type_id__volatile; +} + + +void dvb_logging_handler_publish (DVBLoggingHandler* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args) { + g_return_if_fail (self != NULL); + DVB_LOGGING_HANDLER_GET_INTERFACE (self)->publish (self, logger_name, level, format, args); +} + + +void dvb_logging_handler_close (DVBLoggingHandler* self) { + g_return_if_fail (self != NULL); + DVB_LOGGING_HANDLER_GET_INTERFACE (self)->close (self); +} + + +DVBLoggingFormatter* dvb_logging_handler_get_formatter (DVBLoggingHandler* self) { + g_return_val_if_fail (self != NULL, NULL); + return DVB_LOGGING_HANDLER_GET_INTERFACE (self)->get_formatter (self); +} + + +void dvb_logging_handler_set_formatter (DVBLoggingHandler* self, DVBLoggingFormatter* value) { + g_return_if_fail (self != NULL); + DVB_LOGGING_HANDLER_GET_INTERFACE (self)->set_formatter (self, value); +} + + +DVBLoggingLogLevel dvb_logging_handler_get_threshold (DVBLoggingHandler* self) { + g_return_val_if_fail (self != NULL, 0); + return DVB_LOGGING_HANDLER_GET_INTERFACE (self)->get_threshold (self); +} + + +void dvb_logging_handler_set_threshold (DVBLoggingHandler* self, DVBLoggingLogLevel value) { + g_return_if_fail (self != NULL); + DVB_LOGGING_HANDLER_GET_INTERFACE (self)->set_threshold (self, value); +} + + +static void dvb_logging_handler_base_init (DVBLoggingHandlerIface * iface) { + static gboolean initialized = FALSE; + if (!initialized) { + initialized = TRUE; + g_object_interface_install_property (iface, g_param_spec_object ("formatter", "formatter", "formatter", DVB_LOGGING_TYPE_FORMATTER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_interface_install_property (iface, g_param_spec_enum ("threshold", "threshold", "threshold", DVB_LOGGING_TYPE_LOG_LEVEL, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + } +} + + +GType dvb_logging_handler_get_type (void) { + static volatile gsize dvb_logging_handler_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_handler_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingHandlerIface), (GBaseInitFunc) dvb_logging_handler_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_logging_handler_type_id; + dvb_logging_handler_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBLoggingHandler", &g_define_type_info, 0); + g_type_interface_add_prerequisite (dvb_logging_handler_type_id, G_TYPE_OBJECT); + g_once_init_leave (&dvb_logging_handler_type_id__volatile, dvb_logging_handler_type_id); + } + return dvb_logging_handler_type_id__volatile; +} + + +static gchar* dvb_logging_default_formatter_real_get_level_name (DVBLoggingDefaultFormatter* self, DVBLoggingLogLevel level) { + gchar* result = NULL; + gchar* lvlstr; + DVBLoggingLogLevel _tmp0_; + lvlstr = NULL; + _tmp0_ = level; + switch (_tmp0_) { + case DVB_LOGGING_LOG_LEVEL_LOG: + { + gchar* _tmp1_; + _tmp1_ = g_strdup ("LOG"); + _g_free0 (lvlstr); + lvlstr = _tmp1_; + break; + } + case DVB_LOGGING_LOG_LEVEL_DEBUG: + { + gchar* _tmp2_; + _tmp2_ = g_strdup ("DEBUG"); + _g_free0 (lvlstr); + lvlstr = _tmp2_; + break; + } + case DVB_LOGGING_LOG_LEVEL_INFO: + { + gchar* _tmp3_; + _tmp3_ = g_strdup ("INFO"); + _g_free0 (lvlstr); + lvlstr = _tmp3_; + break; + } + case DVB_LOGGING_LOG_LEVEL_WARNING: + { + gchar* _tmp4_; + _tmp4_ = g_strdup ("WARNING"); + _g_free0 (lvlstr); + lvlstr = _tmp4_; + break; + } + case DVB_LOGGING_LOG_LEVEL_ERROR: + { + gchar* _tmp5_; + _tmp5_ = g_strdup ("ERROR"); + _g_free0 (lvlstr); + lvlstr = _tmp5_; + break; + } + default: + { + g_assert_not_reached (); + } + } + result = lvlstr; + return result; +} + + +gchar* dvb_logging_default_formatter_get_level_name (DVBLoggingDefaultFormatter* self, DVBLoggingLogLevel level) { + g_return_val_if_fail (self != NULL, NULL); + return DVB_LOGGING_DEFAULT_FORMATTER_GET_CLASS (self)->get_level_name (self, level); +} + + +static gchar* dvb_logging_default_formatter_real_format (DVBLoggingDefaultFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format) { + gchar* result = NULL; + DVBLoggingLogLevel _tmp0_; + gchar* _tmp1_ = NULL; + gchar* lvlstr; + const gchar* _tmp2_; + const gchar* _tmp3_; + gchar* _tmp4_ = NULL; + gchar* msg; + g_return_val_if_fail (logger_name != NULL, NULL); + g_return_val_if_fail (format != NULL, NULL); + _tmp0_ = level; + _tmp1_ = dvb_logging_default_formatter_get_level_name (self, _tmp0_); + lvlstr = _tmp1_; + _tmp2_ = logger_name; + _tmp3_ = format; + _tmp4_ = g_strdup_printf ("%-12s %-12s %s\n", _tmp2_, lvlstr, _tmp3_); + msg = _tmp4_; + result = msg; + _g_free0 (lvlstr); + return result; +} + + +gchar* dvb_logging_default_formatter_format (DVBLoggingDefaultFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format) { + g_return_val_if_fail (self != NULL, NULL); + return DVB_LOGGING_DEFAULT_FORMATTER_GET_CLASS (self)->format (self, logger_name, level, format); +} + + +DVBLoggingDefaultFormatter* dvb_logging_default_formatter_construct (GType object_type) { + DVBLoggingDefaultFormatter * self = NULL; + self = (DVBLoggingDefaultFormatter*) g_object_new (object_type, NULL); + return self; +} + + +DVBLoggingDefaultFormatter* dvb_logging_default_formatter_new (void) { + return dvb_logging_default_formatter_construct (DVB_LOGGING_TYPE_DEFAULT_FORMATTER); +} + + +static void dvb_logging_default_formatter_class_init (DVBLoggingDefaultFormatterClass * klass) { + dvb_logging_default_formatter_parent_class = g_type_class_peek_parent (klass); + DVB_LOGGING_DEFAULT_FORMATTER_CLASS (klass)->get_level_name = dvb_logging_default_formatter_real_get_level_name; + DVB_LOGGING_DEFAULT_FORMATTER_CLASS (klass)->format = dvb_logging_default_formatter_real_format; +} + + +static void dvb_logging_default_formatter_dvb_logging_formatter_interface_init (DVBLoggingFormatterIface * iface) { + dvb_logging_default_formatter_dvb_logging_formatter_parent_iface = g_type_interface_peek_parent (iface); + iface->format = (gchar* (*)(DVBLoggingFormatter*, const gchar*, DVBLoggingLogLevel, const gchar*)) dvb_logging_default_formatter_format; +} + + +static void dvb_logging_default_formatter_instance_init (DVBLoggingDefaultFormatter * self) { +} + + +GType dvb_logging_default_formatter_get_type (void) { + static volatile gsize dvb_logging_default_formatter_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_default_formatter_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingDefaultFormatterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_logging_default_formatter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBLoggingDefaultFormatter), 0, (GInstanceInitFunc) dvb_logging_default_formatter_instance_init, NULL }; + static const GInterfaceInfo dvb_logging_formatter_info = { (GInterfaceInitFunc) dvb_logging_default_formatter_dvb_logging_formatter_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_logging_default_formatter_type_id; + dvb_logging_default_formatter_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBLoggingDefaultFormatter", &g_define_type_info, 0); + g_type_add_interface_static (dvb_logging_default_formatter_type_id, DVB_LOGGING_TYPE_FORMATTER, &dvb_logging_formatter_info); + g_once_init_leave (&dvb_logging_default_formatter_type_id__volatile, dvb_logging_default_formatter_type_id); + } + return dvb_logging_default_formatter_type_id__volatile; +} + + +static gchar* dvb_logging_color_formatter_real_get_level_name (DVBLoggingDefaultFormatter* base, DVBLoggingLogLevel level) { + DVBLoggingColorFormatter * self; + gchar* result = NULL; + DVBLoggingLogLevel _tmp0_; + gchar* _tmp1_ = NULL; + gchar* lvlstr; + gchar** _tmp2_; + gint _tmp2__length1; + DVBLoggingLogLevel _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_ = NULL; + self = (DVBLoggingColorFormatter*) base; + _tmp0_ = level; + _tmp1_ = DVB_LOGGING_DEFAULT_FORMATTER_CLASS (dvb_logging_color_formatter_parent_class)->get_level_name (DVB_LOGGING_DEFAULT_FORMATTER (self), _tmp0_); + lvlstr = _tmp1_; + _tmp2_ = dvb_logging_color_formatter_colormap; + _tmp2__length1 = dvb_logging_color_formatter_colormap_length1; + _tmp3_ = level; + _tmp4_ = _tmp2_[_tmp3_]; + _tmp5_ = g_strdup_printf ("%s%s%s", _tmp4_, lvlstr, DVB_LOGGING_COLOR_FORMATTER_clear); + result = _tmp5_; + _g_free0 (lvlstr); + return result; +} + + +static gchar* dvb_logging_color_formatter_real_format (DVBLoggingDefaultFormatter* base, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format) { + DVBLoggingColorFormatter * self; + gchar* result = NULL; + DVBLoggingLogLevel _tmp0_; + gchar* _tmp1_ = NULL; + gchar* lvlstr; + gchar* msg = NULL; + DVBLoggingLogLevel _tmp2_; + self = (DVBLoggingColorFormatter*) base; + g_return_val_if_fail (logger_name != NULL, NULL); + g_return_val_if_fail (format != NULL, NULL); + _tmp0_ = level; + _tmp1_ = dvb_logging_default_formatter_get_level_name ((DVBLoggingDefaultFormatter*) self, _tmp0_); + lvlstr = _tmp1_; + _tmp2_ = level; + if (_tmp2_ < DVB_LOGGING_LOG_LEVEL_INFO) { + const gchar* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + gchar* _tmp6_ = NULL; + _tmp3_ = logger_name; + _tmp4_ = lvlstr; + _tmp5_ = format; + _tmp6_ = g_strdup_printf ("%-12s %-20s %s\n", _tmp3_, _tmp4_, _tmp5_); + _g_free0 (msg); + msg = _tmp6_; + } else { + const gchar* _tmp7_; + const gchar* _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_ = NULL; + _tmp7_ = logger_name; + _tmp8_ = lvlstr; + _tmp9_ = format; + _tmp10_ = g_strdup_printf ("%-12s %-23s %s\n", _tmp7_, _tmp8_, _tmp9_); + _g_free0 (msg); + msg = _tmp10_; + } + result = msg; + _g_free0 (lvlstr); + return result; +} + + +DVBLoggingColorFormatter* dvb_logging_color_formatter_construct (GType object_type) { + DVBLoggingColorFormatter * self = NULL; + self = (DVBLoggingColorFormatter*) dvb_logging_default_formatter_construct (object_type); + return self; +} + + +DVBLoggingColorFormatter* dvb_logging_color_formatter_new (void) { + return dvb_logging_color_formatter_construct (DVB_LOGGING_TYPE_COLOR_FORMATTER); +} + + +static void dvb_logging_color_formatter_class_init (DVBLoggingColorFormatterClass * klass) { + gchar* _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gchar** _tmp5_ = NULL; + dvb_logging_color_formatter_parent_class = g_type_class_peek_parent (klass); + DVB_LOGGING_DEFAULT_FORMATTER_CLASS (klass)->get_level_name = dvb_logging_color_formatter_real_get_level_name; + DVB_LOGGING_DEFAULT_FORMATTER_CLASS (klass)->format = dvb_logging_color_formatter_real_format; + G_OBJECT_CLASS (klass)->finalize = dvb_logging_color_formatter_finalize; + _tmp0_ = g_strdup ("\033[37m"); + _tmp1_ = g_strdup ("\033[36m"); + _tmp2_ = g_strdup ("\033[32;01m"); + _tmp3_ = g_strdup ("\033[33;01m"); + _tmp4_ = g_strdup ("\033[31;01m"); + _tmp5_ = g_new0 (gchar*, 5 + 1); + _tmp5_[0] = _tmp0_; + _tmp5_[1] = _tmp1_; + _tmp5_[2] = _tmp2_; + _tmp5_[3] = _tmp3_; + _tmp5_[4] = _tmp4_; + dvb_logging_color_formatter_colormap = _tmp5_; + dvb_logging_color_formatter_colormap_length1 = 5; +} + + +static void dvb_logging_color_formatter_instance_init (DVBLoggingColorFormatter * self) { +} + + +static void dvb_logging_color_formatter_finalize (GObject* obj) { + DVBLoggingColorFormatter * self; + self = DVB_LOGGING_COLOR_FORMATTER (obj); + G_OBJECT_CLASS (dvb_logging_color_formatter_parent_class)->finalize (obj); +} + + +GType dvb_logging_color_formatter_get_type (void) { + static volatile gsize dvb_logging_color_formatter_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_color_formatter_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingColorFormatterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_logging_color_formatter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBLoggingColorFormatter), 0, (GInstanceInitFunc) dvb_logging_color_formatter_instance_init, NULL }; + GType dvb_logging_color_formatter_type_id; + dvb_logging_color_formatter_type_id = g_type_register_static (DVB_LOGGING_TYPE_DEFAULT_FORMATTER, "DVBLoggingColorFormatter", &g_define_type_info, 0); + g_once_init_leave (&dvb_logging_color_formatter_type_id__volatile, dvb_logging_color_formatter_type_id); + } + return dvb_logging_color_formatter_type_id__volatile; +} + + +static void dvb_logging_console_handler_real_publish (DVBLoggingHandler* base, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args) { + DVBLoggingConsoleHandler * self; + DVBLoggingLogLevel _tmp0_; + DVBLoggingLogLevel _tmp1_; + DVBLoggingLogLevel _tmp2_; + DVBLoggingFormatter* _tmp3_; + DVBLoggingFormatter* _tmp4_; + const gchar* _tmp5_; + DVBLoggingLogLevel _tmp6_; + const gchar* _tmp7_; + gchar* _tmp8_ = NULL; + gchar* msg; + DVBLoggingLogLevel _tmp9_; + self = (DVBLoggingConsoleHandler*) base; + g_return_if_fail (logger_name != NULL); + g_return_if_fail (format != NULL); + _tmp0_ = level; + _tmp1_ = dvb_logging_handler_get_threshold ((DVBLoggingHandler*) self); + _tmp2_ = _tmp1_; + if (_tmp0_ < _tmp2_) { + return; + } + _tmp3_ = dvb_logging_handler_get_formatter ((DVBLoggingHandler*) self); + _tmp4_ = _tmp3_; + _tmp5_ = logger_name; + _tmp6_ = level; + _tmp7_ = format; + _tmp8_ = dvb_logging_formatter_format (_tmp4_, _tmp5_, _tmp6_, _tmp7_); + msg = _tmp8_; + _tmp9_ = level; + if (_tmp9_ > DVB_LOGGING_LOG_LEVEL_INFO) { + FILE* _tmp10_; + const gchar* _tmp11_; + _tmp10_ = stderr; + _tmp11_ = msg; + vfprintf (_tmp10_, _tmp11_, args); + } else { + FILE* _tmp12_; + const gchar* _tmp13_; + _tmp12_ = stdout; + _tmp13_ = msg; + vfprintf (_tmp12_, _tmp13_, args); + } + _g_free0 (msg); +} + + +static void dvb_logging_console_handler_real_close (DVBLoggingHandler* base) { + DVBLoggingConsoleHandler * self; + self = (DVBLoggingConsoleHandler*) base; +} + + +DVBLoggingConsoleHandler* dvb_logging_console_handler_construct (GType object_type) { + DVBLoggingConsoleHandler * self = NULL; + self = (DVBLoggingConsoleHandler*) g_object_new (object_type, NULL); + return self; +} + + +DVBLoggingConsoleHandler* dvb_logging_console_handler_new (void) { + return dvb_logging_console_handler_construct (DVB_LOGGING_TYPE_CONSOLE_HANDLER); +} + + +static DVBLoggingFormatter* dvb_logging_console_handler_real_get_formatter (DVBLoggingHandler* base) { + DVBLoggingFormatter* result; + DVBLoggingConsoleHandler* self; + DVBLoggingFormatter* _tmp0_; + self = (DVBLoggingConsoleHandler*) base; + _tmp0_ = self->priv->_formatter; + result = _tmp0_; + return result; +} + + +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + +static void dvb_logging_console_handler_real_set_formatter (DVBLoggingHandler* base, DVBLoggingFormatter* value) { + DVBLoggingConsoleHandler* self; + DVBLoggingFormatter* _tmp0_; + DVBLoggingFormatter* _tmp1_; + self = (DVBLoggingConsoleHandler*) base; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); + _g_object_unref0 (self->priv->_formatter); + self->priv->_formatter = _tmp1_; + g_object_notify ((GObject *) self, "formatter"); +} + + +static DVBLoggingLogLevel dvb_logging_console_handler_real_get_threshold (DVBLoggingHandler* base) { + DVBLoggingLogLevel result; + DVBLoggingConsoleHandler* self; + DVBLoggingLogLevel _tmp0_; + self = (DVBLoggingConsoleHandler*) base; + _tmp0_ = self->priv->_threshold; + result = _tmp0_; + return result; +} + + +static void dvb_logging_console_handler_real_set_threshold (DVBLoggingHandler* base, DVBLoggingLogLevel value) { + DVBLoggingConsoleHandler* self; + DVBLoggingLogLevel _tmp0_; + self = (DVBLoggingConsoleHandler*) base; + _tmp0_ = value; + self->priv->_threshold = _tmp0_; + g_object_notify ((GObject *) self, "threshold"); +} + + +static void dvb_logging_console_handler_class_init (DVBLoggingConsoleHandlerClass * klass) { + dvb_logging_console_handler_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBLoggingConsoleHandlerPrivate)); + G_OBJECT_CLASS (klass)->get_property = _vala_dvb_logging_console_handler_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_dvb_logging_console_handler_set_property; + G_OBJECT_CLASS (klass)->finalize = dvb_logging_console_handler_finalize; + g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_LOGGING_CONSOLE_HANDLER_FORMATTER, "formatter"); + g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_LOGGING_CONSOLE_HANDLER_THRESHOLD, "threshold"); +} + + +static void dvb_logging_console_handler_dvb_logging_handler_interface_init (DVBLoggingHandlerIface * iface) { + dvb_logging_console_handler_dvb_logging_handler_parent_iface = g_type_interface_peek_parent (iface); + iface->publish = (void (*)(DVBLoggingHandler*, const gchar*, DVBLoggingLogLevel, const gchar*, va_list)) dvb_logging_console_handler_real_publish; + iface->close = (void (*)(DVBLoggingHandler*)) dvb_logging_console_handler_real_close; + iface->get_formatter = dvb_logging_console_handler_real_get_formatter; + iface->set_formatter = dvb_logging_console_handler_real_set_formatter; + iface->get_threshold = dvb_logging_console_handler_real_get_threshold; + iface->set_threshold = dvb_logging_console_handler_real_set_threshold; +} + + +static void dvb_logging_console_handler_instance_init (DVBLoggingConsoleHandler * self) { + DVBLoggingDefaultFormatter* _tmp0_; + self->priv = DVB_LOGGING_CONSOLE_HANDLER_GET_PRIVATE (self); + _tmp0_ = dvb_logging_default_formatter_new (); + self->priv->_formatter = (DVBLoggingFormatter*) _tmp0_; + self->priv->_threshold = DVB_LOGGING_LOG_LEVEL_LOG; +} + + +static void dvb_logging_console_handler_finalize (GObject* obj) { + DVBLoggingConsoleHandler * self; + self = DVB_LOGGING_CONSOLE_HANDLER (obj); + _g_object_unref0 (self->priv->_formatter); + G_OBJECT_CLASS (dvb_logging_console_handler_parent_class)->finalize (obj); +} + + +GType dvb_logging_console_handler_get_type (void) { + static volatile gsize dvb_logging_console_handler_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_console_handler_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingConsoleHandlerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_logging_console_handler_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBLoggingConsoleHandler), 0, (GInstanceInitFunc) dvb_logging_console_handler_instance_init, NULL }; + static const GInterfaceInfo dvb_logging_handler_info = { (GInterfaceInitFunc) dvb_logging_console_handler_dvb_logging_handler_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_logging_console_handler_type_id; + dvb_logging_console_handler_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBLoggingConsoleHandler", &g_define_type_info, 0); + g_type_add_interface_static (dvb_logging_console_handler_type_id, DVB_LOGGING_TYPE_HANDLER, &dvb_logging_handler_info); + g_once_init_leave (&dvb_logging_console_handler_type_id__volatile, dvb_logging_console_handler_type_id); + } + return dvb_logging_console_handler_type_id__volatile; +} + + +static void _vala_dvb_logging_console_handler_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + DVBLoggingConsoleHandler * self; + self = DVB_LOGGING_CONSOLE_HANDLER (object); + switch (property_id) { + case DVB_LOGGING_CONSOLE_HANDLER_FORMATTER: + g_value_set_object (value, dvb_logging_handler_get_formatter ((DVBLoggingHandler*) self)); + break; + case DVB_LOGGING_CONSOLE_HANDLER_THRESHOLD: + g_value_set_enum (value, dvb_logging_handler_get_threshold ((DVBLoggingHandler*) self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void _vala_dvb_logging_console_handler_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + DVBLoggingConsoleHandler * self; + self = DVB_LOGGING_CONSOLE_HANDLER (object); + switch (property_id) { + case DVB_LOGGING_CONSOLE_HANDLER_FORMATTER: + dvb_logging_handler_set_formatter ((DVBLoggingHandler*) self, g_value_get_object (value)); + break; + case DVB_LOGGING_CONSOLE_HANDLER_THRESHOLD: + dvb_logging_handler_set_threshold ((DVBLoggingHandler*) self, g_value_get_enum (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +DVBLoggingFileHandler* dvb_logging_file_handler_construct (GType object_type, const gchar* file_pattern, GError** error) { + DVBLoggingFileHandler * self = NULL; + const gchar* _tmp0_; + GError * _inner_error_ = NULL; + g_return_val_if_fail (file_pattern != NULL, NULL); + _tmp0_ = file_pattern; + self = (DVBLoggingFileHandler*) g_object_new (object_type, "pattern", _tmp0_, NULL); + self->priv->file_index = 0; + dvb_logging_file_handler_rotate (self, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (self); + return NULL; + } + return self; +} + + +DVBLoggingFileHandler* dvb_logging_file_handler_new (const gchar* file_pattern, GError** error) { + return dvb_logging_file_handler_construct (DVB_LOGGING_TYPE_FILE_HANDLER, file_pattern, error); +} + + +static guint8* string_get_data (const gchar* self, int* result_length1) { + guint8* result; + guint8* res; + gint res_length1; + gint _res_size_; + gint _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint8* _tmp3_; + gint _tmp3__length1; + guint8* _tmp4_; + gint _tmp4__length1; + g_return_val_if_fail (self != NULL, NULL); + res = (guint8*) self; + res_length1 = -1; + _res_size_ = res_length1; + _tmp0_ = strlen (self); + _tmp1_ = _tmp0_; + res_length1 = (gint) _tmp1_; + _tmp2_ = res_length1; + _tmp3_ = res; + _tmp3__length1 = res_length1; + _tmp4_ = _tmp3_; + _tmp4__length1 = _tmp3__length1; + if (result_length1) { + *result_length1 = _tmp4__length1; + } + result = _tmp4_; + return result; +} + + +static void dvb_logging_file_handler_real_publish (DVBLoggingHandler* base, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args) { + DVBLoggingFileHandler * self; + DVBLoggingLogLevel _tmp0_; + DVBLoggingLogLevel _tmp1_; + DVBLoggingLogLevel _tmp2_; + DVBLoggingFormatter* _tmp3_; + DVBLoggingFormatter* _tmp4_; + const gchar* _tmp5_; + DVBLoggingLogLevel _tmp6_; + const gchar* _tmp7_; + gchar* _tmp8_ = NULL; + gchar* msg; + const gchar* _tmp9_; + gchar* _tmp10_ = NULL; + gchar* txt; + GError * _inner_error_ = NULL; + self = (DVBLoggingFileHandler*) base; + g_return_if_fail (logger_name != NULL); + g_return_if_fail (format != NULL); + _tmp0_ = level; + _tmp1_ = dvb_logging_handler_get_threshold ((DVBLoggingHandler*) self); + _tmp2_ = _tmp1_; + if (_tmp0_ < _tmp2_) { + return; + } + _tmp3_ = dvb_logging_handler_get_formatter ((DVBLoggingHandler*) self); + _tmp4_ = _tmp3_; + _tmp5_ = logger_name; + _tmp6_ = level; + _tmp7_ = format; + _tmp8_ = dvb_logging_formatter_format (_tmp4_, _tmp5_, _tmp6_, _tmp7_); + msg = _tmp8_; + _tmp9_ = msg; + _tmp10_ = g_strdup_vprintf (_tmp9_, args); + txt = _tmp10_; + { + gint _tmp11_; + GOutputStream* _tmp18_; + const gchar* _tmp19_; + guint8* _tmp20_; + gint _tmp20__length1; + guint8* _tmp21_; + gint _tmp21__length1; + _tmp11_ = self->priv->_limit; + if (_tmp11_ > 0) { + gint _tmp12_; + const gchar* _tmp13_; + gint _tmp14_; + gint _tmp15_; + gint _tmp16_; + gint _tmp17_; + _tmp12_ = self->priv->file_size; + _tmp13_ = txt; + _tmp14_ = strlen (_tmp13_); + _tmp15_ = _tmp14_; + self->priv->file_size = _tmp12_ + _tmp15_; + _tmp16_ = self->priv->file_size; + _tmp17_ = self->priv->_limit; + if (_tmp16_ > _tmp17_) { + dvb_logging_file_handler_rotate (self, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch75_g_error; + } + } + } + _tmp18_ = self->priv->os; + _tmp19_ = txt; + _tmp20_ = string_get_data (_tmp19_, &_tmp20__length1); + _tmp21_ = _tmp20_; + _tmp21__length1 = _tmp20__length1; + g_output_stream_write (_tmp18_, _tmp21_, (gsize) _tmp21__length1, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch75_g_error; + } + } + goto __finally75; + __catch75_g_error: + { + GError* e = NULL; + FILE* _tmp22_; + GError* _tmp23_; + const gchar* _tmp24_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp22_ = stderr; + _tmp23_ = e; + _tmp24_ = _tmp23_->message; + fprintf (_tmp22_, "Error in FileHandler.publish: %s\n", _tmp24_); + _g_error_free0 (e); + } + __finally75: + if (_inner_error_ != NULL) { + _g_free0 (txt); + _g_free0 (msg); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + _g_free0 (txt); + _g_free0 (msg); +} + + +static void dvb_logging_file_handler_real_close (DVBLoggingHandler* base) { + DVBLoggingFileHandler * self; + GError * _inner_error_ = NULL; + self = (DVBLoggingFileHandler*) base; + { + GOutputStream* _tmp0_; + _tmp0_ = self->priv->os; + g_output_stream_close (_tmp0_, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_IO_ERROR) { + goto __catch76_g_io_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } + goto __finally76; + __catch76_g_io_error: + { + GError* e = NULL; + FILE* _tmp1_; + GError* _tmp2_; + const gchar* _tmp3_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp1_ = stderr; + _tmp2_ = e; + _tmp3_ = _tmp2_->message; + fprintf (_tmp1_, "Error in FileHandler.close: %s\n", _tmp3_); + _g_error_free0 (e); + } + __finally76: + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } +} + + +static void dvb_logging_file_handler_rotate (DVBLoggingFileHandler* self, GError** error) { + GOutputStream* _tmp0_; + GFile* _tmp1_ = NULL; + GFile* file; + GFileOutputStream* fos = NULL; + GFile* _tmp2_; + gboolean _tmp3_ = FALSE; + GFileOutputStream* _tmp10_; + GBufferedOutputStream* _tmp11_; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + _tmp0_ = self->priv->os; + if (_tmp0_ != NULL) { + dvb_logging_handler_close ((DVBLoggingHandler*) self); + } + _tmp1_ = dvb_logging_file_handler_get_next_file (self); + file = _tmp1_; + _tmp2_ = file; + _tmp3_ = g_file_query_exists (_tmp2_, NULL); + if (_tmp3_) { + GFile* _tmp4_; + GFileOutputStream* _tmp5_ = NULL; + GFileOutputStream* _tmp6_; + _tmp4_ = file; + _tmp5_ = g_file_replace (_tmp4_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_); + _tmp6_ = _tmp5_; + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (fos); + _g_object_unref0 (file); + return; + } + _g_object_unref0 (fos); + fos = _tmp6_; + } else { + GFile* _tmp7_; + GFileOutputStream* _tmp8_ = NULL; + GFileOutputStream* _tmp9_; + _tmp7_ = file; + _tmp8_ = g_file_create (_tmp7_, G_FILE_CREATE_NONE, NULL, &_inner_error_); + _tmp9_ = _tmp8_; + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (fos); + _g_object_unref0 (file); + return; + } + _g_object_unref0 (fos); + fos = _tmp9_; + } + _tmp10_ = fos; + _tmp11_ = (GBufferedOutputStream*) g_buffered_output_stream_new ((GOutputStream*) _tmp10_); + _g_object_unref0 (self->priv->os); + self->priv->os = (GOutputStream*) _tmp11_; + self->priv->file_size = 0; + _g_object_unref0 (fos); + _g_object_unref0 (file); +} + + +static GFile* dvb_logging_file_handler_get_next_file (DVBLoggingFileHandler* self) { + GFile* result = NULL; + gint _tmp0_; + gint _tmp1_; + const gchar* _tmp2_; + gint _tmp3_; + gchar* _tmp4_ = NULL; + gchar* filename; + GFile* _tmp5_ = NULL; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->file_index; + _tmp1_ = self->priv->_count; + if (_tmp0_ == _tmp1_) { + self->priv->file_index = 0; + } + _tmp2_ = self->priv->_pattern; + _tmp3_ = self->priv->file_index; + self->priv->file_index = _tmp3_ + 1; + _tmp4_ = g_strdup_printf (_tmp2_, _tmp3_); + filename = _tmp4_; + _tmp5_ = g_file_new_for_path (filename); + result = _tmp5_; + _g_free0 (filename); + return result; +} + + +static DVBLoggingFormatter* dvb_logging_file_handler_real_get_formatter (DVBLoggingHandler* base) { + DVBLoggingFormatter* result; + DVBLoggingFileHandler* self; + DVBLoggingFormatter* _tmp0_; + self = (DVBLoggingFileHandler*) base; + _tmp0_ = self->priv->_formatter; + result = _tmp0_; + return result; +} + + +static void dvb_logging_file_handler_real_set_formatter (DVBLoggingHandler* base, DVBLoggingFormatter* value) { + DVBLoggingFileHandler* self; + DVBLoggingFormatter* _tmp0_; + DVBLoggingFormatter* _tmp1_; + self = (DVBLoggingFileHandler*) base; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); + _g_object_unref0 (self->priv->_formatter); + self->priv->_formatter = _tmp1_; + g_object_notify ((GObject *) self, "formatter"); +} + + +static DVBLoggingLogLevel dvb_logging_file_handler_real_get_threshold (DVBLoggingHandler* base) { + DVBLoggingLogLevel result; + DVBLoggingFileHandler* self; + DVBLoggingLogLevel _tmp0_; + self = (DVBLoggingFileHandler*) base; + _tmp0_ = self->priv->_threshold; + result = _tmp0_; + return result; +} + + +static void dvb_logging_file_handler_real_set_threshold (DVBLoggingHandler* base, DVBLoggingLogLevel value) { + DVBLoggingFileHandler* self; + DVBLoggingLogLevel _tmp0_; + self = (DVBLoggingFileHandler*) base; + _tmp0_ = value; + self->priv->_threshold = _tmp0_; + g_object_notify ((GObject *) self, "threshold"); +} + + +gint dvb_logging_file_handler_get_limit (DVBLoggingFileHandler* self) { + gint result; + gint _tmp0_; + g_return_val_if_fail (self != NULL, 0); + _tmp0_ = self->priv->_limit; + result = _tmp0_; + return result; +} + + +void dvb_logging_file_handler_set_limit (DVBLoggingFileHandler* self, gint value) { + gint _tmp0_; + g_return_if_fail (self != NULL); + _tmp0_ = value; + self->priv->_limit = _tmp0_; + g_object_notify ((GObject *) self, "limit"); +} + + +gint dvb_logging_file_handler_get_count (DVBLoggingFileHandler* self) { + gint result; + gint _tmp0_; + g_return_val_if_fail (self != NULL, 0); + _tmp0_ = self->priv->_count; + result = _tmp0_; + return result; +} + + +void dvb_logging_file_handler_set_count (DVBLoggingFileHandler* self, gint value) { + gint _tmp0_; + g_return_if_fail (self != NULL); + _tmp0_ = value; + self->priv->_count = _tmp0_; + g_object_notify ((GObject *) self, "count"); +} + + +const gchar* dvb_logging_file_handler_get_pattern (DVBLoggingFileHandler* self) { + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_pattern; + result = _tmp0_; + return result; +} + + +static void dvb_logging_file_handler_set_pattern (DVBLoggingFileHandler* self, const gchar* value) { + const gchar* _tmp0_; + gchar* _tmp1_; + g_return_if_fail (self != NULL); + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); + _g_free0 (self->priv->_pattern); + self->priv->_pattern = _tmp1_; + g_object_notify ((GObject *) self, "pattern"); +} + + +static void dvb_logging_file_handler_class_init (DVBLoggingFileHandlerClass * klass) { + dvb_logging_file_handler_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBLoggingFileHandlerPrivate)); + G_OBJECT_CLASS (klass)->get_property = _vala_dvb_logging_file_handler_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_dvb_logging_file_handler_set_property; + G_OBJECT_CLASS (klass)->finalize = dvb_logging_file_handler_finalize; + g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_LOGGING_FILE_HANDLER_FORMATTER, "formatter"); + g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_LOGGING_FILE_HANDLER_THRESHOLD, "threshold"); + g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_LOGGING_FILE_HANDLER_LIMIT, g_param_spec_int ("limit", "limit", "limit", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_LOGGING_FILE_HANDLER_COUNT, g_param_spec_int ("count", "count", "count", G_MININT, G_MAXINT, 1, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_LOGGING_FILE_HANDLER_PATTERN, g_param_spec_string ("pattern", "pattern", "pattern", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); +} + + +static void dvb_logging_file_handler_dvb_logging_handler_interface_init (DVBLoggingHandlerIface * iface) { + dvb_logging_file_handler_dvb_logging_handler_parent_iface = g_type_interface_peek_parent (iface); + iface->publish = (void (*)(DVBLoggingHandler*, const gchar*, DVBLoggingLogLevel, const gchar*, va_list)) dvb_logging_file_handler_real_publish; + iface->close = (void (*)(DVBLoggingHandler*)) dvb_logging_file_handler_real_close; + iface->get_formatter = dvb_logging_file_handler_real_get_formatter; + iface->set_formatter = dvb_logging_file_handler_real_set_formatter; + iface->get_threshold = dvb_logging_file_handler_real_get_threshold; + iface->set_threshold = dvb_logging_file_handler_real_set_threshold; +} + + +static void dvb_logging_file_handler_instance_init (DVBLoggingFileHandler * self) { + DVBLoggingDefaultFormatter* _tmp0_; + self->priv = DVB_LOGGING_FILE_HANDLER_GET_PRIVATE (self); + _tmp0_ = dvb_logging_default_formatter_new (); + self->priv->_formatter = (DVBLoggingFormatter*) _tmp0_; + self->priv->_threshold = DVB_LOGGING_LOG_LEVEL_LOG; + self->priv->_limit = 0; + self->priv->_count = 1; +} + + +static void dvb_logging_file_handler_finalize (GObject* obj) { + DVBLoggingFileHandler * self; + self = DVB_LOGGING_FILE_HANDLER (obj); + _g_object_unref0 (self->priv->_formatter); + _g_free0 (self->priv->_pattern); + _g_object_unref0 (self->priv->os); + G_OBJECT_CLASS (dvb_logging_file_handler_parent_class)->finalize (obj); +} + + +GType dvb_logging_file_handler_get_type (void) { + static volatile gsize dvb_logging_file_handler_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_file_handler_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingFileHandlerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_logging_file_handler_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBLoggingFileHandler), 0, (GInstanceInitFunc) dvb_logging_file_handler_instance_init, NULL }; + static const GInterfaceInfo dvb_logging_handler_info = { (GInterfaceInitFunc) dvb_logging_file_handler_dvb_logging_handler_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_logging_file_handler_type_id; + dvb_logging_file_handler_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBLoggingFileHandler", &g_define_type_info, 0); + g_type_add_interface_static (dvb_logging_file_handler_type_id, DVB_LOGGING_TYPE_HANDLER, &dvb_logging_handler_info); + g_once_init_leave (&dvb_logging_file_handler_type_id__volatile, dvb_logging_file_handler_type_id); + } + return dvb_logging_file_handler_type_id__volatile; +} + + +static void _vala_dvb_logging_file_handler_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + DVBLoggingFileHandler * self; + self = DVB_LOGGING_FILE_HANDLER (object); + switch (property_id) { + case DVB_LOGGING_FILE_HANDLER_FORMATTER: + g_value_set_object (value, dvb_logging_handler_get_formatter ((DVBLoggingHandler*) self)); + break; + case DVB_LOGGING_FILE_HANDLER_THRESHOLD: + g_value_set_enum (value, dvb_logging_handler_get_threshold ((DVBLoggingHandler*) self)); + break; + case DVB_LOGGING_FILE_HANDLER_LIMIT: + g_value_set_int (value, dvb_logging_file_handler_get_limit (self)); + break; + case DVB_LOGGING_FILE_HANDLER_COUNT: + g_value_set_int (value, dvb_logging_file_handler_get_count (self)); + break; + case DVB_LOGGING_FILE_HANDLER_PATTERN: + g_value_set_string (value, dvb_logging_file_handler_get_pattern (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void _vala_dvb_logging_file_handler_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + DVBLoggingFileHandler * self; + self = DVB_LOGGING_FILE_HANDLER (object); + switch (property_id) { + case DVB_LOGGING_FILE_HANDLER_FORMATTER: + dvb_logging_handler_set_formatter ((DVBLoggingHandler*) self, g_value_get_object (value)); + break; + case DVB_LOGGING_FILE_HANDLER_THRESHOLD: + dvb_logging_handler_set_threshold ((DVBLoggingHandler*) self, g_value_get_enum (value)); + break; + case DVB_LOGGING_FILE_HANDLER_LIMIT: + dvb_logging_file_handler_set_limit (self, g_value_get_int (value)); + break; + case DVB_LOGGING_FILE_HANDLER_COUNT: + dvb_logging_file_handler_set_count (self, g_value_get_int (value)); + break; + case DVB_LOGGING_FILE_HANDLER_PATTERN: + dvb_logging_file_handler_set_pattern (self, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +void dvb_logging_logger_addHandler (DVBLoggingLogger* self, DVBLoggingHandler* handler) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (handler != NULL); + { + GeeHashSet* _tmp0_; + _tmp0_ = self->priv->handlers; + g_static_rec_mutex_lock (&self->priv->__lock_handlers); + { + GeeHashSet* _tmp1_; + DVBLoggingHandler* _tmp2_; + _tmp1_ = self->priv->handlers; + _tmp2_ = handler; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp2_); + } + __finally77: + { + GeeHashSet* _tmp3_; + _tmp3_ = self->priv->handlers; + g_static_rec_mutex_unlock (&self->priv->__lock_handlers); + } + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } +} + + +void dvb_logging_logger_removeHandler (DVBLoggingLogger* self, DVBLoggingHandler* handler) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (handler != NULL); + { + GeeHashSet* _tmp0_; + _tmp0_ = self->priv->handlers; + g_static_rec_mutex_lock (&self->priv->__lock_handlers); + { + GeeHashSet* _tmp1_; + DVBLoggingHandler* _tmp2_; + _tmp1_ = self->priv->handlers; + _tmp2_ = handler; + gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp1_, _tmp2_); + } + __finally78: + { + GeeHashSet* _tmp3_; + _tmp3_ = self->priv->handlers; + g_static_rec_mutex_unlock (&self->priv->__lock_handlers); + } + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } +} + + +GeeHashSet* dvb_logging_logger_getHandlers (DVBLoggingLogger* self) { + GeeHashSet* result = NULL; + GeeHashSet* _tmp0_; + GeeHashSet* _tmp1_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->handlers; + _tmp1_ = _g_object_ref0 (_tmp0_); + result = _tmp1_; + return result; +} + + +static inline void dvb_logging_logger_log_full (DVBLoggingLogger* self, DVBLoggingLogLevel level, const gchar* format, va_list args) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (format != NULL); + { + GeeHashSet* _tmp0_; + _tmp0_ = self->priv->handlers; + g_static_rec_mutex_lock (&self->priv->__lock_handlers); + { + { + GeeHashSet* _tmp1_; + GeeIterator* _tmp2_ = NULL; + GeeIterator* _handler_it; + _tmp1_ = self->priv->handlers; + _tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_); + _handler_it = _tmp2_; + while (TRUE) { + GeeIterator* _tmp3_; + gboolean _tmp4_ = FALSE; + GeeIterator* _tmp5_; + gpointer _tmp6_ = NULL; + DVBLoggingHandler* handler; + va_list l = {0}; + DVBLoggingHandler* _tmp7_; + const gchar* _tmp8_; + DVBLoggingLogLevel _tmp9_; + const gchar* _tmp10_; + _tmp3_ = _handler_it; + _tmp4_ = gee_iterator_next (_tmp3_); + if (!_tmp4_) { + break; + } + _tmp5_ = _handler_it; + _tmp6_ = gee_iterator_get (_tmp5_); + handler = (DVBLoggingHandler*) _tmp6_; + va_copy (l, args); + _tmp7_ = handler; + _tmp8_ = self->priv->_name; + _tmp9_ = level; + _tmp10_ = format; + dvb_logging_handler_publish (_tmp7_, _tmp8_, _tmp9_, _tmp10_, l); + va_end (l); + _g_object_unref0 (handler); + } + _g_object_unref0 (_handler_it); + } + } + __finally79: + { + GeeHashSet* _tmp11_; + _tmp11_ = self->priv->handlers; + g_static_rec_mutex_unlock (&self->priv->__lock_handlers); + } + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } +} + + +void dvb_logging_logger_log (DVBLoggingLogger* self, const gchar* format, ...) { + va_list l = {0}; + const gchar* _tmp0_; + g_return_if_fail (self != NULL); + g_return_if_fail (format != NULL); + va_start (l, format); + _tmp0_ = format; + dvb_logging_logger_log_full (self, DVB_LOGGING_LOG_LEVEL_LOG, _tmp0_, l); + va_end (l); +} + + +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...) { + va_list l = {0}; + const gchar* _tmp0_; + g_return_if_fail (self != NULL); + g_return_if_fail (format != NULL); + va_start (l, format); + _tmp0_ = format; + dvb_logging_logger_log_full (self, DVB_LOGGING_LOG_LEVEL_DEBUG, _tmp0_, l); + va_end (l); +} + + +void dvb_logging_logger_info (DVBLoggingLogger* self, const gchar* format, ...) { + va_list l = {0}; + const gchar* _tmp0_; + g_return_if_fail (self != NULL); + g_return_if_fail (format != NULL); + va_start (l, format); + _tmp0_ = format; + dvb_logging_logger_log_full (self, DVB_LOGGING_LOG_LEVEL_INFO, _tmp0_, l); + va_end (l); +} + + +void dvb_logging_logger_warning (DVBLoggingLogger* self, const gchar* format, ...) { + va_list l = {0}; + const gchar* _tmp0_; + g_return_if_fail (self != NULL); + g_return_if_fail (format != NULL); + va_start (l, format); + _tmp0_ = format; + dvb_logging_logger_log_full (self, DVB_LOGGING_LOG_LEVEL_WARNING, _tmp0_, l); + va_end (l); +} + + +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...) { + va_list l = {0}; + const gchar* _tmp0_; + g_return_if_fail (self != NULL); + g_return_if_fail (format != NULL); + va_start (l, format); + _tmp0_ = format; + dvb_logging_logger_log_full (self, DVB_LOGGING_LOG_LEVEL_ERROR, _tmp0_, l); + va_end (l); +} + + +DVBLoggingLogger* dvb_logging_logger_construct (GType object_type) { + DVBLoggingLogger * self = NULL; + self = (DVBLoggingLogger*) g_object_new (object_type, NULL); + return self; +} + + +DVBLoggingLogger* dvb_logging_logger_new (void) { + return dvb_logging_logger_construct (DVB_LOGGING_TYPE_LOGGER); +} + + +const gchar* dvb_logging_logger_get_name (DVBLoggingLogger* self) { + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_name; + result = _tmp0_; + return result; +} + + +void dvb_logging_logger_set_name (DVBLoggingLogger* self, const gchar* value) { + const gchar* _tmp0_; + gchar* _tmp1_; + g_return_if_fail (self != NULL); + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); + _g_free0 (self->priv->_name); + self->priv->_name = _tmp1_; + g_object_notify ((GObject *) self, "name"); +} + + +static GObject * dvb_logging_logger_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { + GObject * obj; + GObjectClass * parent_class; + DVBLoggingLogger * self; + GHashFunc _tmp0_; + GEqualFunc _tmp1_; + GeeHashSet* _tmp2_; + parent_class = G_OBJECT_CLASS (dvb_logging_logger_parent_class); + obj = parent_class->constructor (type, n_construct_properties, construct_properties); + self = DVB_LOGGING_LOGGER (obj); + _tmp0_ = g_direct_hash; + _tmp1_ = g_direct_equal; + _tmp2_ = gee_hash_set_new (DVB_LOGGING_TYPE_HANDLER, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp0_, _tmp1_); + _g_object_unref0 (self->priv->handlers); + self->priv->handlers = _tmp2_; + return obj; +} + + +static void dvb_logging_logger_class_init (DVBLoggingLoggerClass * klass) { + dvb_logging_logger_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBLoggingLoggerPrivate)); + G_OBJECT_CLASS (klass)->get_property = _vala_dvb_logging_logger_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_dvb_logging_logger_set_property; + G_OBJECT_CLASS (klass)->constructor = dvb_logging_logger_constructor; + G_OBJECT_CLASS (klass)->finalize = dvb_logging_logger_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_LOGGING_LOGGER_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + + +static void dvb_logging_logger_instance_init (DVBLoggingLogger * self) { + self->priv = DVB_LOGGING_LOGGER_GET_PRIVATE (self); + g_static_rec_mutex_init (&self->priv->__lock_handlers); +} + + +static void dvb_logging_logger_finalize (GObject* obj) { + DVBLoggingLogger * self; + self = DVB_LOGGING_LOGGER (obj); + _g_free0 (self->priv->_name); + g_static_rec_mutex_free (&self->priv->__lock_handlers); + _g_object_unref0 (self->priv->handlers); + G_OBJECT_CLASS (dvb_logging_logger_parent_class)->finalize (obj); +} + + +GType dvb_logging_logger_get_type (void) { + static volatile gsize dvb_logging_logger_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_logger_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingLoggerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_logging_logger_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBLoggingLogger), 0, (GInstanceInitFunc) dvb_logging_logger_instance_init, NULL }; + GType dvb_logging_logger_type_id; + dvb_logging_logger_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBLoggingLogger", &g_define_type_info, 0); + g_once_init_leave (&dvb_logging_logger_type_id__volatile, dvb_logging_logger_type_id); + } + return dvb_logging_logger_type_id__volatile; +} + + +static void _vala_dvb_logging_logger_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + DVBLoggingLogger * self; + self = DVB_LOGGING_LOGGER (object); + switch (property_id) { + case DVB_LOGGING_LOGGER_NAME: + g_value_set_string (value, dvb_logging_logger_get_name (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void _vala_dvb_logging_logger_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + DVBLoggingLogger * self; + self = DVB_LOGGING_LOGGER (object); + switch (property_id) { + case DVB_LOGGING_LOGGER_NAME: + dvb_logging_logger_set_name (self, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void) { + DVBLoggingLogManager* result = NULL; + DVBLoggingLogManager* _tmp0_; + DVBLoggingLogManager* _tmp2_; + g_static_rec_mutex_lock (&dvb_logging_log_manager_instance_mutex); + _tmp0_ = dvb_logging_log_manager_instance; + if (_tmp0_ == NULL) { + DVBLoggingLogManager* _tmp1_; + _tmp1_ = dvb_logging_log_manager_new (); + _g_object_unref0 (dvb_logging_log_manager_instance); + dvb_logging_log_manager_instance = _tmp1_; + } + g_static_rec_mutex_unlock (&dvb_logging_log_manager_instance_mutex); + _tmp2_ = dvb_logging_log_manager_instance; + result = _tmp2_; + return result; +} + + +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self) { + DVBLoggingLogger* result = NULL; + DVBLoggingLogger* _tmp0_ = NULL; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = dvb_logging_log_manager_getLogger (self, DVB_LOGGING_LOG_MANAGER_DEFAULT_NAME); + result = _tmp0_; + return result; +} + + +DVBLoggingLogger* dvb_logging_log_manager_getLogger (DVBLoggingLogManager* self, const gchar* name) { + DVBLoggingLogger* result = NULL; + DVBLoggingLogger* l = NULL; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (name != NULL, NULL); + { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->loggers; + g_static_rec_mutex_lock (&self->priv->__lock_loggers); + { + GeeHashMap* _tmp1_; + const gchar* _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->loggers; + _tmp2_ = name; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp2_); + if (_tmp3_) { + GeeHashMap* _tmp4_; + const gchar* _tmp5_; + gpointer _tmp6_ = NULL; + _tmp4_ = self->priv->loggers; + _tmp5_ = name; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, _tmp5_); + _g_object_unref0 (l); + l = (DVBLoggingLogger*) _tmp6_; + } else { + const gchar* _tmp7_; + DVBLoggingLogger* _tmp8_ = NULL; + _tmp7_ = name; + _tmp8_ = dvb_logging_log_manager_createLogger (self, _tmp7_); + _g_object_unref0 (l); + l = _tmp8_; + } + } + __finally80: + { + GeeHashMap* _tmp9_; + _tmp9_ = self->priv->loggers; + g_static_rec_mutex_unlock (&self->priv->__lock_loggers); + } + if (_inner_error_ != NULL) { + _g_object_unref0 (l); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + result = l; + return result; +} + + +static DVBLoggingLogger* dvb_logging_log_manager_createLogger (DVBLoggingLogManager* self, const gchar* name) { + DVBLoggingLogger* result = NULL; + DVBLoggingLogger* _tmp0_; + DVBLoggingLogger* l; + const gchar* _tmp1_; + GeeHashMap* _tmp2_; + const gchar* _tmp3_; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (name != NULL, NULL); + _tmp0_ = dvb_logging_logger_new (); + l = _tmp0_; + _tmp1_ = name; + dvb_logging_logger_set_name (l, _tmp1_); + _tmp2_ = self->priv->loggers; + _tmp3_ = name; + gee_abstract_map_set ((GeeAbstractMap*) _tmp2_, _tmp3_, l); + result = l; + return result; +} + + +void dvb_logging_log_manager_cleanup (DVBLoggingLogManager* self) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->loggers; + g_static_rec_mutex_lock (&self->priv->__lock_loggers); + { + GeeHashMap* _tmp21_; + { + GeeHashMap* _tmp1_; + GeeCollection* _tmp2_; + GeeCollection* _tmp3_; + GeeCollection* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _logger_it; + _tmp1_ = self->priv->loggers; + _tmp2_ = gee_map_get_values ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _logger_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + DVBLoggingLogger* logger; + _tmp7_ = _logger_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _logger_it; + _tmp10_ = gee_iterator_get (_tmp9_); + logger = (DVBLoggingLogger*) _tmp10_; + { + DVBLoggingLogger* _tmp11_; + GeeHashSet* _tmp12_ = NULL; + GeeHashSet* _tmp13_; + GeeIterator* _tmp14_ = NULL; + GeeIterator* _tmp15_; + GeeIterator* _handler_it; + _tmp11_ = logger; + _tmp12_ = dvb_logging_logger_getHandlers (_tmp11_); + _tmp13_ = _tmp12_; + _tmp14_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp13_); + _tmp15_ = _tmp14_; + _g_object_unref0 (_tmp13_); + _handler_it = _tmp15_; + while (TRUE) { + GeeIterator* _tmp16_; + gboolean _tmp17_ = FALSE; + GeeIterator* _tmp18_; + gpointer _tmp19_ = NULL; + DVBLoggingHandler* handler; + DVBLoggingHandler* _tmp20_; + _tmp16_ = _handler_it; + _tmp17_ = gee_iterator_next (_tmp16_); + if (!_tmp17_) { + break; + } + _tmp18_ = _handler_it; + _tmp19_ = gee_iterator_get (_tmp18_); + handler = (DVBLoggingHandler*) _tmp19_; + _tmp20_ = handler; + dvb_logging_handler_close (_tmp20_); + _g_object_unref0 (handler); + } + _g_object_unref0 (_handler_it); + } + _g_object_unref0 (logger); + } + _g_object_unref0 (_logger_it); + } + _tmp21_ = self->priv->loggers; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp21_); + } + __finally81: + { + GeeHashMap* _tmp22_; + _tmp22_ = self->priv->loggers; + g_static_rec_mutex_unlock (&self->priv->__lock_loggers); + } + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } +} + + +DVBLoggingLogManager* dvb_logging_log_manager_construct (GType object_type) { + DVBLoggingLogManager * self = NULL; + self = (DVBLoggingLogManager*) g_object_new (object_type, NULL); + return self; +} + + +DVBLoggingLogManager* dvb_logging_log_manager_new (void) { + return dvb_logging_log_manager_construct (DVB_LOGGING_TYPE_LOG_MANAGER); +} + + +static GObject * dvb_logging_log_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { + GObject * obj; + GObjectClass * parent_class; + DVBLoggingLogManager * self; + GHashFunc _tmp0_; + GEqualFunc _tmp1_; + GEqualFunc _tmp2_; + GeeHashMap* _tmp3_; + parent_class = G_OBJECT_CLASS (dvb_logging_log_manager_parent_class); + obj = parent_class->constructor (type, n_construct_properties, construct_properties); + self = DVB_LOGGING_LOG_MANAGER (obj); + _tmp0_ = g_str_hash; + _tmp1_ = g_str_equal; + _tmp2_ = g_direct_equal; + _tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, DVB_LOGGING_TYPE_LOGGER, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp0_, _tmp1_, _tmp2_); + _g_object_unref0 (self->priv->loggers); + self->priv->loggers = _tmp3_; + return obj; +} + + +static void dvb_logging_log_manager_class_init (DVBLoggingLogManagerClass * klass) { + GStaticRecMutex _tmp0_ = {0}; + dvb_logging_log_manager_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBLoggingLogManagerPrivate)); + G_OBJECT_CLASS (klass)->constructor = dvb_logging_log_manager_constructor; + G_OBJECT_CLASS (klass)->finalize = dvb_logging_log_manager_finalize; + g_static_rec_mutex_init (&_tmp0_); + dvb_logging_log_manager_instance_mutex = _tmp0_; +} + + +static void dvb_logging_log_manager_instance_init (DVBLoggingLogManager * self) { + self->priv = DVB_LOGGING_LOG_MANAGER_GET_PRIVATE (self); + g_static_rec_mutex_init (&self->priv->__lock_loggers); +} + + +static void dvb_logging_log_manager_finalize (GObject* obj) { + DVBLoggingLogManager * self; + self = DVB_LOGGING_LOG_MANAGER (obj); + g_static_rec_mutex_free (&self->priv->__lock_loggers); + _g_object_unref0 (self->priv->loggers); + G_OBJECT_CLASS (dvb_logging_log_manager_parent_class)->finalize (obj); +} + + +GType dvb_logging_log_manager_get_type (void) { + static volatile gsize dvb_logging_log_manager_type_id__volatile = 0; + if (g_once_init_enter (&dvb_logging_log_manager_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBLoggingLogManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_logging_log_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBLoggingLogManager), 0, (GInstanceInitFunc) dvb_logging_log_manager_instance_init, NULL }; + GType dvb_logging_log_manager_type_id; + dvb_logging_log_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBLoggingLogManager", &g_define_type_info, 0); + g_once_init_leave (&dvb_logging_log_manager_type_id__volatile, dvb_logging_log_manager_type_id); + } + return dvb_logging_log_manager_type_id__volatile; +} + + + diff -Nru gnome-dvb-daemon-0.1.23/src/Logging.vala gnome-dvb-daemon-0.2.7/src/Logging.vala --- gnome-dvb-daemon-0.1.23/src/Logging.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Logging.vala 2011-04-19 21:18:36.000000000 +0000 @@ -0,0 +1,326 @@ +/* + * Copyright (C) 2011 Sebastian Pölsterl + * + * This file is part of GNOME DVB Daemon. + * + * GNOME DVB Daemon is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GNOME DVB Daemon is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNOME DVB Daemon. If not, see . + */ + +using GLib; + +namespace DVB.Logging { + +public enum LogLevel { + LOG, + DEBUG, + INFO, + WARNING, + ERROR +} + +public interface Formatter : GLib.Object { + + public abstract string format (string logger_name, LogLevel level, string format); + +} + +public interface Handler : GLib.Object { + + public abstract Formatter formatter {get; set;} + public abstract LogLevel threshold {get; set;} + + public abstract void publish (string logger_name, LogLevel level, string format, va_list args); + public abstract void close (); + +} + +public class DefaultFormatter : GLib.Object, Formatter { + + protected virtual string get_level_name (LogLevel level) { + string lvlstr = null; + switch (level) { + case LogLevel.LOG: lvlstr = "LOG"; break; + case LogLevel.DEBUG: lvlstr = "DEBUG"; break; + case LogLevel.INFO: lvlstr = "INFO"; break; + case LogLevel.WARNING: lvlstr = "WARNING"; break; + case LogLevel.ERROR: lvlstr = "ERROR"; break; + default: assert_not_reached (); + } + return lvlstr; + } + + public virtual string format (string logger_name, LogLevel level, string format) { + string lvlstr = this.get_level_name (level); + + string msg = "%-12s %-12s %s\n".printf (logger_name, lvlstr, format); + return msg; + } + +} + +public class ColorFormatter : DefaultFormatter { + + static string[] colormap = new string[] { + "\033[37m", /* LOG */ + "\033[36m", /* DEBUG */ + "\033[32;01m", /* INFO */ + "\033[33;01m", /* WARNING */ + "\033[31;01m" /* ERROR */ + }; + static const string clear = "\033[00m"; + + protected override string get_level_name (LogLevel level) { + string lvlstr = base.get_level_name (level); + return "%s%s%s".printf (colormap[level], lvlstr, clear); + } + + public override string format (string logger_name, LogLevel level, string format) { + string lvlstr = this.get_level_name (level); + + string msg; + if (level < LogLevel.INFO) + msg = "%-12s %-20s %s\n".printf (logger_name, lvlstr, format); + else + msg = "%-12s %-23s %s\n".printf (logger_name, lvlstr, format); + return msg; + } + +} + +public class ConsoleHandler : GLib.Object, Handler { + + public Formatter formatter {get; set; default = new DefaultFormatter ();} + public LogLevel threshold {get; set; default = LogLevel.LOG;} + + public void publish (string logger_name, LogLevel level, string format, va_list args) { + if (level < threshold) + return; + + string msg = formatter.format (logger_name, level, format); + if (level > LogLevel.INFO) + stderr.vprintf (msg, args); + else + stdout.vprintf (msg, args); + } + + public void close () { } + +} + +public class FileHandler : GLib.Object, Handler { + + public Formatter formatter {get; set; default = new DefaultFormatter ();} + public LogLevel threshold {get; set; default = LogLevel.LOG;} + public int limit {get; set; default = 0;} + public int count {get; set; default = 1;} + public string pattern {get; construct;} + + private OutputStream os; + private int file_size; + private int file_index; + + public FileHandler (string file_pattern) throws Error { + GLib.Object (pattern: file_pattern); + + this.file_index = 0; + this.rotate (); + } + + public void publish (string logger_name, LogLevel level, string format, va_list args) { + if (level < threshold) + return; + + string msg = formatter.format (logger_name, level, format); + string txt = msg.vprintf (args); + + try { + if (limit > 0) { + file_size += txt.length; + if (file_size > limit) { + this.rotate (); + } + } + + os.write (txt.data); + } catch (Error e) { + stderr.printf ("Error in FileHandler.publish: %s\n", e.message); + } + } + + public void close () { + try { + os.close (); + } catch (IOError e) { + stderr.printf ("Error in FileHandler.close: %s\n", e.message); + } + } + + private void rotate () throws Error { + if (this.os != null) + this.close (); + + File file = this.get_next_file (); + + FileOutputStream fos; + if (file.query_exists (null)) { + fos = file.replace (null, false, FileCreateFlags.NONE, null); + } else { + fos = file.create (FileCreateFlags.NONE, null); + } + this.os = new BufferedOutputStream (fos); + this.file_size = 0; + } + + private File get_next_file () { + if (this.file_index == this.count) { + this.file_index = 0; + } + + string filename = this.pattern.printf (this.file_index++); + return File.new_for_path (filename); + } + +} + +public class Logger : GLib.Object { + + public string name {get; set;} + private Gee.HashSet handlers; + + construct { + this.handlers = new Gee.HashSet (GLib.direct_hash, GLib.direct_equal); + } + + public void addHandler (Handler handler) { + lock (this.handlers) { + this.handlers.add (handler); + } + } + + public void removeHandler (Handler handler) { + lock (this.handlers) { + this.handlers.remove (handler); + } + } + + public Gee.HashSet getHandlers () { + return this.handlers; + } + + private inline void log_full (LogLevel level, string format, va_list args) { + lock (this.handlers) { + foreach (Handler handler in this.handlers) { + var l = args.copy (args); + handler.publish (this.name, level, format, l); + } + } + } + + [Diagnostics] + [PrintfFormat] + public void log (string format, ...) { + var l = va_list (); + this.log_full (LogLevel.LOG, format, l); + } + + [Diagnostics] + [PrintfFormat] + public void debug (string format, ...) { + var l = va_list (); + this.log_full (LogLevel.DEBUG, format, l); + } + + [Diagnostics] + [PrintfFormat] + public void info (string format, ...) { + var l = va_list (); + this.log_full (LogLevel.INFO, format, l); + } + + [Diagnostics] + [PrintfFormat] + public void warning (string format, ...) { + var l = va_list (); + this.log_full (LogLevel.WARNING, format, l); + } + + [Diagnostics] + [PrintfFormat] + public void error (string format, ...) { + var l = va_list (); + this.log_full (LogLevel.ERROR, format, l); + } + +} + +public class LogManager : GLib.Object { + + private static const string DEFAULT_NAME = "default"; + + private static LogManager instance; + private static StaticRecMutex instance_mutex = StaticRecMutex (); + + private Gee.HashMap loggers; + + construct { + this.loggers = new Gee.HashMap (GLib.str_hash, + GLib.str_equal, GLib.direct_equal); + } + + public static unowned LogManager getLogManager () { + instance_mutex.lock (); + if (instance == null) { + instance = new LogManager (); + } + instance_mutex.unlock (); + return instance; + } + + public Logger getDefaultLogger () { + return this.getLogger (DEFAULT_NAME); + } + + public Logger getLogger (string name) { + Logger l; + lock (this.loggers) { + if (this.loggers.has_key (name)) { + l = this.loggers.get (name); + } else { + l = createLogger (name); + } + } + return l; + } + + private Logger createLogger (string name) { + Logger l = new Logger (); + l.name = name; + this.loggers.set (name, l); + return l; + } + + public void cleanup () { + lock (this.loggers) { + foreach (Logger logger in this.loggers.values) { + foreach (Handler handler in logger.getHandlers ()) { + handler.close (); + } + } + this.loggers.clear (); + } + } + +} + +} diff -Nru gnome-dvb-daemon-0.1.23/src/Main.c gnome-dvb-daemon-0.2.7/src/Main.c --- gnome-dvb-daemon-0.1.23/src/Main.c 2011-01-14 16:56:06.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Main.c 2011-12-09 11:14:15.000000000 +0000 @@ -1,8 +1,8 @@ -/* Main.c generated by valac 0.11.3, the Vala compiler +/* Main.c generated by valac 0.14.0, the Vala compiler * generated from Main.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2011 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -22,13 +22,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include +#include #define DVB_TYPE_MANAGER (dvb_manager_get_type ()) @@ -50,10 +51,66 @@ typedef struct _DVBRecordingsStore DVBRecordingsStore; typedef struct _DVBRecordingsStoreClass DVBRecordingsStoreClass; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_TYPE_ID_BUS_MANAGER (dvb_id_bus_manager_get_type ()) +#define DVB_ID_BUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_MANAGER, DVBIDBusManager)) +#define DVB_IS_ID_BUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_MANAGER)) +#define DVB_ID_BUS_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_MANAGER, DVBIDBusManagerIface)) + +typedef struct _DVBIDBusManager DVBIDBusManager; +typedef struct _DVBIDBusManagerIface DVBIDBusManagerIface; + +#define DVB_TYPE_ID_BUS_MANAGER_PROXY (dvb_id_bus_manager_proxy_get_type ()) + +#define DVB_TYPE_CHANNEL_GROUP_INFO (dvb_channel_group_info_get_type ()) +typedef struct _DVBChannelGroupInfo DVBChannelGroupInfo; + +#define DVB_TYPE_ADAPTER_INFO (dvb_adapter_info_get_type ()) +typedef struct _DVBAdapterInfo DVBAdapterInfo; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) -typedef struct _DBusObjectVTable _DBusObjectVTable; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define DVB_TYPE_ID_BUS_RECORDINGS_STORE (dvb_id_bus_recordings_store_get_type ()) +#define DVB_ID_BUS_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_RECORDINGS_STORE, DVBIDBusRecordingsStore)) +#define DVB_IS_ID_BUS_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_RECORDINGS_STORE)) +#define DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_RECORDINGS_STORE, DVBIDBusRecordingsStoreIface)) + +typedef struct _DVBIDBusRecordingsStore DVBIDBusRecordingsStore; +typedef struct _DVBIDBusRecordingsStoreIface DVBIDBusRecordingsStoreIface; + +#define DVB_TYPE_ID_BUS_RECORDINGS_STORE_PROXY (dvb_id_bus_recordings_store_proxy_get_type ()) + +#define DVB_TYPE_RECORDING_INFO (dvb_recording_info_get_type ()) +typedef struct _DVBRecordingInfo DVBRecordingInfo; + +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_free0(var) (var = (g_free (var), NULL)) #define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) @@ -104,11 +161,125 @@ typedef struct _DVBChannel DVBChannel; typedef struct _DVBChannelClass DVBChannelClass; +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define DVB_TYPE_SETTINGS (dvb_settings_get_type ()) +#define DVB_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SETTINGS, DVBSettings)) +#define DVB_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SETTINGS, DVBSettingsClass)) +#define DVB_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_SETTINGS)) +#define DVB_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_SETTINGS)) +#define DVB_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_SETTINGS, DVBSettingsClass)) + +typedef struct _DVBSettings DVBSettings; +typedef struct _DVBSettingsClass DVBSettingsClass; + +#define DVB_LOGGING_TYPE_FILE_HANDLER (dvb_logging_file_handler_get_type ()) +#define DVB_LOGGING_FILE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_FILE_HANDLER, DVBLoggingFileHandler)) +#define DVB_LOGGING_FILE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_FILE_HANDLER, DVBLoggingFileHandlerClass)) +#define DVB_LOGGING_IS_FILE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_FILE_HANDLER)) +#define DVB_LOGGING_IS_FILE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_FILE_HANDLER)) +#define DVB_LOGGING_FILE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_FILE_HANDLER, DVBLoggingFileHandlerClass)) + +typedef struct _DVBLoggingFileHandler DVBLoggingFileHandler; +typedef struct _DVBLoggingFileHandlerClass DVBLoggingFileHandlerClass; + +#define DVB_LOGGING_TYPE_HANDLER (dvb_logging_handler_get_type ()) +#define DVB_LOGGING_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_HANDLER, DVBLoggingHandler)) +#define DVB_LOGGING_IS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_HANDLER)) +#define DVB_LOGGING_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_LOGGING_TYPE_HANDLER, DVBLoggingHandlerIface)) + +typedef struct _DVBLoggingHandler DVBLoggingHandler; +typedef struct _DVBLoggingHandlerIface DVBLoggingHandlerIface; + +#define DVB_LOGGING_TYPE_LOG_LEVEL (dvb_logging_log_level_get_type ()) + +#define DVB_LOGGING_TYPE_FORMATTER (dvb_logging_formatter_get_type ()) +#define DVB_LOGGING_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_FORMATTER, DVBLoggingFormatter)) +#define DVB_LOGGING_IS_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_FORMATTER)) +#define DVB_LOGGING_FORMATTER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_LOGGING_TYPE_FORMATTER, DVBLoggingFormatterIface)) + +typedef struct _DVBLoggingFormatter DVBLoggingFormatter; +typedef struct _DVBLoggingFormatterIface DVBLoggingFormatterIface; + +#define DVB_LOGGING_TYPE_CONSOLE_HANDLER (dvb_logging_console_handler_get_type ()) +#define DVB_LOGGING_CONSOLE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_CONSOLE_HANDLER, DVBLoggingConsoleHandler)) +#define DVB_LOGGING_CONSOLE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_CONSOLE_HANDLER, DVBLoggingConsoleHandlerClass)) +#define DVB_LOGGING_IS_CONSOLE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_CONSOLE_HANDLER)) +#define DVB_LOGGING_IS_CONSOLE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_CONSOLE_HANDLER)) +#define DVB_LOGGING_CONSOLE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_CONSOLE_HANDLER, DVBLoggingConsoleHandlerClass)) + +typedef struct _DVBLoggingConsoleHandler DVBLoggingConsoleHandler; +typedef struct _DVBLoggingConsoleHandlerClass DVBLoggingConsoleHandlerClass; + +#define DVB_LOGGING_TYPE_DEFAULT_FORMATTER (dvb_logging_default_formatter_get_type ()) +#define DVB_LOGGING_DEFAULT_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_DEFAULT_FORMATTER, DVBLoggingDefaultFormatter)) +#define DVB_LOGGING_DEFAULT_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_DEFAULT_FORMATTER, DVBLoggingDefaultFormatterClass)) +#define DVB_LOGGING_IS_DEFAULT_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_DEFAULT_FORMATTER)) +#define DVB_LOGGING_IS_DEFAULT_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_DEFAULT_FORMATTER)) +#define DVB_LOGGING_DEFAULT_FORMATTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_DEFAULT_FORMATTER, DVBLoggingDefaultFormatterClass)) + +typedef struct _DVBLoggingDefaultFormatter DVBLoggingDefaultFormatter; +typedef struct _DVBLoggingDefaultFormatterClass DVBLoggingDefaultFormatterClass; + +#define DVB_LOGGING_TYPE_COLOR_FORMATTER (dvb_logging_color_formatter_get_type ()) +#define DVB_LOGGING_COLOR_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_COLOR_FORMATTER, DVBLoggingColorFormatter)) +#define DVB_LOGGING_COLOR_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_COLOR_FORMATTER, DVBLoggingColorFormatterClass)) +#define DVB_LOGGING_IS_COLOR_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_COLOR_FORMATTER)) +#define DVB_LOGGING_IS_COLOR_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_COLOR_FORMATTER)) +#define DVB_LOGGING_COLOR_FORMATTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_COLOR_FORMATTER, DVBLoggingColorFormatterClass)) + +typedef struct _DVBLoggingColorFormatter DVBLoggingColorFormatter; +typedef struct _DVBLoggingColorFormatterClass DVBLoggingColorFormatterClass; #define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL))) #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL))) -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); +struct _DVBChannelGroupInfo { + gint id; + gchar* name; +}; + +struct _DVBAdapterInfo { + gchar* name; + gchar* type; +}; + +struct _DVBIDBusManagerIface { + GTypeInterface parent_iface; + gboolean (*GetScannerForDevice) (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); + char** (*GetRegisteredDeviceGroups) (DVBIDBusManager* self, int* result_length1, GError** error); + gboolean (*GetDeviceGroup) (DVBIDBusManager* self, guint group_id, char** opath, GError** error); + gboolean (*AddDeviceToNewGroup) (DVBIDBusManager* self, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error); + gboolean (*GetNameOfRegisteredDevice) (DVBIDBusManager* self, guint adapter, guint frontend, gchar** name, GError** error); + gint (*GetDeviceGroupSize) (DVBIDBusManager* self, GError** error); + DVBChannelGroupInfo* (*GetChannelGroups) (DVBIDBusManager* self, int* result_length1, GError** error); + gboolean (*AddChannelGroup) (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); + gboolean (*RemoveChannelGroup) (DVBIDBusManager* self, gint channel_group_id, GError** error); + GHashTable** (*GetDevices) (DVBIDBusManager* self, int* result_length1, GError** error); + gboolean (*GetAdapterInfo) (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error); +}; + +struct _DVBRecordingInfo { + guint32 id; + gchar* name; + gchar* description; + gint64 length; + gint64 start_timestamp; + gchar* channel; + gchar* location; +}; + +struct _DVBIDBusRecordingsStoreIface { + GTypeInterface parent_iface; + guint32* (*GetRecordings) (DVBIDBusRecordingsStore* self, int* result_length1, GError** error); + gboolean (*GetLocation) (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** location, GError** error); + gboolean (*GetName) (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error); + gboolean (*GetDescription) (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** description, GError** error); + gboolean (*GetStartTime) (DVBIDBusRecordingsStore* self, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error); + gboolean (*GetStartTimestamp) (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* timestamp, GError** error); + gboolean (*GetLength) (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* length, GError** error); + gboolean (*Delete) (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error); + gboolean (*GetChannelName) (DVBIDBusRecordingsStore* self, guint32 rec_id, gchar** name, GError** error); + gboolean (*GetAllInformations) (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error); }; typedef enum { @@ -157,6 +328,29 @@ gboolean (*remove_channel_from_group) (DVBdatabaseConfigStore* self, DVBChannel* channel, gint group_id, GError** error); }; +typedef enum { + DVB_LOGGING_LOG_LEVEL_LOG, + DVB_LOGGING_LOG_LEVEL_DEBUG, + DVB_LOGGING_LOG_LEVEL_INFO, + DVB_LOGGING_LOG_LEVEL_WARNING, + DVB_LOGGING_LOG_LEVEL_ERROR +} DVBLoggingLogLevel; + +struct _DVBLoggingFormatterIface { + GTypeInterface parent_iface; + gchar* (*format) (DVBLoggingFormatter* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format); +}; + +struct _DVBLoggingHandlerIface { + GTypeInterface parent_iface; + void (*publish) (DVBLoggingHandler* self, const gchar* logger_name, DVBLoggingLogLevel level, const gchar* format, va_list args); + void (*close) (DVBLoggingHandler* self); + DVBLoggingFormatter* (*get_formatter) (DVBLoggingHandler* self); + void (*set_formatter) (DVBLoggingHandler* self, DVBLoggingFormatter* value); + DVBLoggingLogLevel (*get_threshold) (DVBLoggingHandler* self); + void (*set_threshold) (DVBLoggingHandler* self, DVBLoggingLogLevel value); +}; + extern DVBManager* main_manager; DVBManager* main_manager = NULL; @@ -170,218 +364,198 @@ gboolean main_disable_epg_scanner = FALSE; extern gboolean main_disable_mediaserver; gboolean main_disable_mediaserver = FALSE; -extern gboolean main_enable_mediaserver2; -gboolean main_enable_mediaserver2 = FALSE; extern GMainLoop* main_mainloop; GMainLoop* main_mainloop = NULL; +extern DVBLoggingLogger* main_log; +DVBLoggingLogger* main_log = NULL; +extern GDBusConnection* main_conn; +GDBusConnection* main_conn = NULL; GType dvb_manager_get_type (void) G_GNUC_CONST; GType dvb_recordings_store_get_type (void) G_GNUC_CONST; -gboolean main_start_manager (void); -#define DVB_CONSTANTS_DBUS_SERVICE "org.gnome.DVB" -static guint _dynamic_RequestName0 (DBusGProxy* self, const gchar* param1, guint param2, GError** error); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +void main_start_manager (void); DVBManager* dvb_manager_get_instance (void); +void dvb_utils_dbus_own_name (const gchar* service_name, GBusAcquiredCallback cb, void* cb_target); +#define DVB_CONSTANTS_DBUS_SERVICE "org.gnome.DVB" +void main_on_bus_acquired (GDBusConnection* _conn); +static void _main_on_bus_acquired_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self); +void dvb_utils_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* conn, const gchar* object_path, gconstpointer obj); #define DVB_CONSTANTS_DBUS_MANAGER_PATH "/org/gnome/DVB/Manager" -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -gboolean main_start_recordings_store (void); +GType dvb_id_bus_manager_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_channel_group_info_get_type (void) G_GNUC_CONST; +DVBChannelGroupInfo* dvb_channel_group_info_dup (const DVBChannelGroupInfo* self); +void dvb_channel_group_info_free (DVBChannelGroupInfo* self); +void dvb_channel_group_info_copy (const DVBChannelGroupInfo* self, DVBChannelGroupInfo* dest); +void dvb_channel_group_info_destroy (DVBChannelGroupInfo* self); +GType dvb_adapter_info_get_type (void) G_GNUC_CONST; +DVBAdapterInfo* dvb_adapter_info_dup (const DVBAdapterInfo* self); +void dvb_adapter_info_free (DVBAdapterInfo* self); +void dvb_adapter_info_copy (const DVBAdapterInfo* self, DVBAdapterInfo* dest); +void dvb_adapter_info_destroy (DVBAdapterInfo* self); +GType dvb_id_bus_manager_get_type (void) G_GNUC_CONST; +void main_start_recordings_store (void); +void main_restore_device_groups (void); +void dvb_logging_logger_info (DVBLoggingLogger* self, const gchar* format, ...); DVBRecordingsStore* dvb_recordings_store_get_instance (void); #define DVB_CONSTANTS_DBUS_RECORDINGS_STORE_PATH "/org/gnome/DVB/RecordingsStore" +GType dvb_id_bus_recordings_store_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_recordings_store_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_recording_info_get_type (void) G_GNUC_CONST; +DVBRecordingInfo* dvb_recording_info_dup (const DVBRecordingInfo* self); +void dvb_recording_info_free (DVBRecordingInfo* self); +void dvb_recording_info_copy (const DVBRecordingInfo* self, DVBRecordingInfo* dest); +void dvb_recording_info_destroy (DVBRecordingInfo* self); +GType dvb_id_bus_recordings_store_get_type (void) G_GNUC_CONST; void main_on_exit (gint signum); void dvb_rtsp_server_shutdown (void); void dvb_manager_shutdown (void); -void dvb_factory_shutdown (void); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; +void dvb_factory_shutdown (DVBFactory* self); void dvb_recordings_store_shutdown (void); -void main_log_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message); +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +void dvb_logging_log_manager_cleanup (DVBLoggingLogManager* self); gboolean main_get_disable_epg_scanner (void); gboolean main_check_feature_version (const gchar* name, guint major, guint minor, guint micro); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); gboolean main_check_requirements (void); -void main_restore_device_groups (void); GType dvb_device_group_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); GType dvb_device_get_type (void) G_GNUC_CONST; GType dvb_channel_group_get_type (void) G_GNUC_CONST; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_database_config_store_get_type (void) G_GNUC_CONST; -DVBdatabaseConfigStore* dvb_factory_get_config_store (void); +DVBdatabaseConfigStore* dvb_factory_get_config_store (DVBFactory* self); GeeList* dvb_database_config_store_get_all_device_groups (DVBdatabaseConfigStore* self, GError** error); void dvb_manager_restore_device_group_and_timers (DVBManager* self, DVBDeviceGroup* device_group); +guint dvb_device_group_get_Id (DVBDeviceGroup* self); +void main_restore_fake_devices (guint max_group_id); +GType dvb_settings_get_type (void) G_GNUC_CONST; +DVBSettings* dvb_factory_get_settings (DVBFactory* self); +GeeList* dvb_settings_get_fake_devices (DVBSettings* self); +DVBDeviceGroup* dvb_device_group_new (guint id, DVBDevice* reference_device, gboolean with_epg_scanner); +DVBDeviceGroup* dvb_device_group_construct (GType object_type, guint id, DVBDevice* reference_device, gboolean with_epg_scanner); +void dvb_device_group_set_Name (DVBDeviceGroup* self, const gchar* value); +gboolean dvb_device_group_add (DVBDeviceGroup* self, DVBDevice* device); +gboolean dvb_manager_restore_device_group (DVBManager* self, DVBDeviceGroup* device_group, gboolean store); +void main_configure_logging (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); +DVBLoggingFileHandler* dvb_logging_file_handler_new (const gchar* file_pattern, GError** error); +DVBLoggingFileHandler* dvb_logging_file_handler_construct (GType object_type, const gchar* file_pattern, GError** error); +GType dvb_logging_file_handler_get_type (void) G_GNUC_CONST; +void dvb_logging_file_handler_set_limit (DVBLoggingFileHandler* self, gint value); +gint dvb_logging_file_handler_get_limit (DVBLoggingFileHandler* self); +GType dvb_logging_log_level_get_type (void) G_GNUC_CONST; +GType dvb_logging_formatter_get_type (void) G_GNUC_CONST; +GType dvb_logging_handler_get_type (void) G_GNUC_CONST; +void dvb_logging_handler_set_threshold (DVBLoggingHandler* self, DVBLoggingLogLevel value); +void dvb_logging_logger_addHandler (DVBLoggingLogger* self, DVBLoggingHandler* handler); +DVBLoggingConsoleHandler* dvb_logging_console_handler_new (void); +DVBLoggingConsoleHandler* dvb_logging_console_handler_construct (GType object_type); +GType dvb_logging_console_handler_get_type (void) G_GNUC_CONST; +DVBLoggingColorFormatter* dvb_logging_color_formatter_new (void); +DVBLoggingColorFormatter* dvb_logging_color_formatter_construct (GType object_type); +GType dvb_logging_default_formatter_get_type (void) G_GNUC_CONST; +GType dvb_logging_color_formatter_get_type (void) G_GNUC_CONST; +void dvb_logging_handler_set_formatter (DVBLoggingHandler* self, DVBLoggingFormatter* value); gint main_main (gchar** args, int args_length1); static void _main_on_exit_cutils_signal_signal_handler (gint signum); -static void _main_log_func_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self); -gboolean dvb_rtsp_server_start (void); -static gboolean _dvb_rtsp_server_start_gsource_func (gpointer self); -gboolean dvb_media_server2_start_rygel_services (void); -static gboolean _dvb_media_server2_start_rygel_services_gsource_func (gpointer self); -gboolean dvb_media_server_start_rygel_services (void); -static gboolean _dvb_media_server_start_rygel_services_gsource_func (gpointer self); - -const GOptionEntry MAIN_options[6] = {{"debug", 'd', 0, G_OPTION_ARG_NONE, &main_has_debug, "Display debug statements on stdout", NULL}, {"version", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_has_version, "Display version number", NULL}, {"disable-epg-scanner", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_disable_epg_scanner, "Disable scanning for EPG data", NULL}, {"disable-mediaserver", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_disable_mediaserver, "Disable exporting devices and channels for Rygel", NULL}, {"enable-mediaserver2", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_enable_mediaserver2, "Export devices and channels according to Rygel's MediaServer2 specific" \ -"ation", NULL}, {NULL}}; - -static guint _dynamic_RequestName0 (DBusGProxy* self, const gchar* param1, guint param2, GError** error) { - guint result; - dbus_g_proxy_call (self, "RequestName", error, G_TYPE_STRING, param1, G_TYPE_UINT, param2, G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID); - if (*error) { - return 0U; - } - return result; -} +void dvb_rtsp_server_start (GAsyncReadyCallback _callback_, gpointer _user_data_); +void dvb_rtsp_server_start_finish (GAsyncResult* _res_); +void dvb_media_server2_start_rygel_services (GAsyncReadyCallback _callback_, gpointer _user_data_); +void dvb_media_server2_start_rygel_services_finish (GAsyncResult* _res_); +const GOptionEntry MAIN_options[5] = {{"debug", 'd', 0, G_OPTION_ARG_NONE, &main_has_debug, "Display debug statements on stdout", NULL}, {"version", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_has_version, "Display version number", NULL}, {"disable-epg-scanner", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_disable_epg_scanner, "Disable scanning for EPG data", NULL}, {"disable-mediaserver2", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_disable_mediaserver, "Disable exporting devices and channels according to Rygel's MediaServe" \ +"r2 specification", NULL}, {NULL}}; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } +static void _main_on_bus_acquired_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) { + main_on_bus_acquired (connection); } -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); +void main_start_manager (void) { + DVBManager* _tmp0_ = NULL; + _tmp0_ = dvb_manager_get_instance (); + main_manager = _tmp0_; + dvb_utils_dbus_own_name (DVB_CONSTANTS_DBUS_SERVICE, _main_on_bus_acquired_gbus_acquired_callback, NULL); } -gboolean main_start_manager (void) { - gboolean result = FALSE; - DBusGConnection* _tmp0_ = NULL; - DBusGConnection* conn; - DBusGProxy* _tmp1_ = NULL; - DBusGProxy* bus; - guint _tmp2_; - guint request_name_result; - GError * _inner_error_ = NULL; - _tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); - conn = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch70_g_error; - } - _tmp1_ = dbus_g_proxy_new_for_name (conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); - bus = _tmp1_; - _tmp2_ = _dynamic_RequestName0 (bus, DVB_CONSTANTS_DBUS_SERVICE, (guint) 0, &_inner_error_); - request_name_result = _tmp2_; - if (_inner_error_ != NULL) { - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - goto __catch70_g_error; - } - if (request_name_result == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - DVBManager* _tmp3_ = NULL; - g_message ("Main.vala:59: Creating new Manager D-Bus service"); - _tmp3_ = dvb_manager_get_instance (); - main_manager = _tmp3_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), DVB_CONSTANTS_DBUS_MANAGER_PATH, (GObject*) main_manager); - } else { - g_warning ("Main.vala:67: Manager D-Bus service is already running"); - result = FALSE; - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - return result; - } - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - goto __finally70; - __catch70_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Main.vala:72: Oops %s", e->message); - result = FALSE; - _g_error_free0 (e); - return result; - } - __finally70: - if (_inner_error_ != NULL) { - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - result = TRUE; - return result; +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; } -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; +void main_on_bus_acquired (GDBusConnection* _conn) { + GDBusConnection* _tmp0_; + DVBManager* _tmp1_; + GDBusConnection* _tmp2_; + GDBusConnection* _tmp3_; + g_return_if_fail (_conn != NULL); + _tmp0_ = _conn; + _tmp1_ = main_manager; + dvb_utils_dbus_register_object (DVB_TYPE_ID_BUS_MANAGER, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp0_, DVB_CONSTANTS_DBUS_MANAGER_PATH, (DVBIDBusManager*) _tmp1_); + _tmp2_ = _conn; + _tmp3_ = _g_object_ref0 (_tmp2_); + _g_object_unref0 (main_conn); + main_conn = _tmp3_; + main_start_recordings_store (); + main_restore_device_groups (); } -gboolean main_start_recordings_store (void) { - gboolean result = FALSE; - DBusGConnection* _tmp0_ = NULL; - DBusGConnection* conn; +void main_start_recordings_store (void) { + DVBLoggingLogger* _tmp0_; DVBRecordingsStore* _tmp1_ = NULL; DVBRecordingsStore* _tmp2_; - DVBRecordingsStore* _tmp3_; - GError * _inner_error_ = NULL; - g_message ("Main.vala:80: Creating new RecordingsStore D-Bus service"); - _tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); - conn = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch71_g_error; - } + GDBusConnection* _tmp3_; + DVBRecordingsStore* _tmp4_; + _tmp0_ = main_log; + dvb_logging_logger_info (_tmp0_, "Main.vala:63: Creating new RecordingsStore D-Bus service"); _tmp1_ = dvb_recordings_store_get_instance (); _tmp2_ = _g_object_ref0 (_tmp1_); - _tmp3_ = _tmp2_; _g_object_unref0 (main_recstore); - main_recstore = _tmp3_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), DVB_CONSTANTS_DBUS_RECORDINGS_STORE_PATH, (GObject*) main_recstore); - _dbus_g_connection_unref0 (conn); - goto __finally71; - __catch71_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Main.vala:91: Oops %s", e->message); - result = FALSE; - _g_error_free0 (e); - return result; - } - __finally71: - if (_inner_error_ != NULL) { - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - result = TRUE; - return result; + main_recstore = _tmp2_; + _tmp3_ = main_conn; + _tmp4_ = main_recstore; + dvb_utils_dbus_register_object (DVB_TYPE_ID_BUS_RECORDINGS_STORE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp3_, DVB_CONSTANTS_DBUS_RECORDINGS_STORE_PATH, (DVBIDBusRecordingsStore*) _tmp4_); } void main_on_exit (gint signum) { - DVBRecordingsStore* _tmp0_; - g_message ("Main.vala:99: Exiting"); + DVBLoggingLogger* _tmp0_; + DVBFactory* _tmp1_; + DVBFactory* _tmp2_; + DVBLoggingLogManager* _tmp3_ = NULL; + GMainLoop* _tmp4_; + _tmp0_ = main_log; + dvb_logging_logger_info (_tmp0_, "Main.vala:71: Exiting"); dvb_rtsp_server_shutdown (); dvb_manager_shutdown (); - dvb_factory_shutdown (); + _tmp1_ = dvb_factory_new (); + _tmp2_ = _tmp1_; + dvb_factory_shutdown (_tmp2_); + _g_object_unref0 (_tmp2_); dvb_recordings_store_shutdown (); - _tmp0_ = NULL; + _tmp3_ = dvb_logging_log_manager_getLogManager (); + dvb_logging_log_manager_cleanup (_tmp3_); _g_object_unref0 (main_recstore); - main_recstore = _tmp0_; + main_recstore = NULL; main_manager = NULL; - g_main_loop_quit (main_mainloop); -} - - -void main_log_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message) { - g_return_if_fail (message != NULL); - if (main_has_debug) { - g_log_default_handler (log_domain, log_levels, message, NULL); - } + _tmp4_ = main_mainloop; + g_main_loop_quit (_tmp4_); } gboolean main_get_disable_epg_scanner (void) { gboolean result = FALSE; - result = main_disable_epg_scanner; + gboolean _tmp0_; + _tmp0_ = main_disable_epg_scanner; + result = _tmp0_; return result; } @@ -412,28 +586,54 @@ GstRegistry* _tmp0_ = NULL; GstRegistry* _tmp1_; GstRegistry* reg; - GstPluginFeature* _tmp2_ = NULL; + GstRegistry* _tmp2_; + const gchar* _tmp3_; + GstPluginFeature* _tmp4_ = NULL; GstPluginFeature* feature; gboolean ret = FALSE; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; + GstPluginFeature* _tmp5_; + DVBLoggingLogger* _tmp11_; + const gchar* _tmp12_; + guint _tmp13_; + guint _tmp14_; + guint _tmp15_; + gboolean _tmp16_; + gchar* _tmp17_ = NULL; + gchar* _tmp18_; g_return_val_if_fail (name != NULL, FALSE); _tmp0_ = gst_registry_get_default (); _tmp1_ = _gst_object_ref0 (_tmp0_); reg = _tmp1_; - _tmp2_ = gst_registry_lookup_feature (reg, name); - feature = _tmp2_; - if (feature == NULL) { + _tmp2_ = reg; + _tmp3_ = name; + _tmp4_ = gst_registry_lookup_feature (_tmp2_, _tmp3_); + feature = _tmp4_; + _tmp5_ = feature; + if (_tmp5_ == NULL) { ret = FALSE; } else { - gboolean _tmp3_; - _tmp3_ = gst_plugin_feature_check_version (feature, major, minor, micro); - ret = _tmp3_; - } - _tmp4_ = bool_to_string (ret); - _tmp5_ = _tmp4_; - g_debug ("Main.vala:131: Has %s >= %u.%u.%u: %s", name, major, minor, micro, _tmp5_); - _g_free0 (_tmp5_); + GstPluginFeature* _tmp6_; + guint _tmp7_; + guint _tmp8_; + guint _tmp9_; + gboolean _tmp10_ = FALSE; + _tmp6_ = feature; + _tmp7_ = major; + _tmp8_ = minor; + _tmp9_ = micro; + _tmp10_ = gst_plugin_feature_check_version (_tmp6_, _tmp7_, _tmp8_, _tmp9_); + ret = _tmp10_; + } + _tmp11_ = main_log; + _tmp12_ = name; + _tmp13_ = major; + _tmp14_ = minor; + _tmp15_ = micro; + _tmp16_ = ret; + _tmp17_ = bool_to_string (_tmp16_); + _tmp18_ = _tmp17_; + dvb_logging_logger_debug (_tmp11_, "Main.vala:98: Has %s >= %u.%u.%u: %s", _tmp12_, _tmp13_, _tmp14_, _tmp15_, _tmp18_); + _g_free0 (_tmp18_); result = ret; _gst_object_unref0 (feature); _gst_object_unref0 (reg); @@ -444,75 +644,98 @@ gboolean main_check_requirements (void) { gboolean result = FALSE; gboolean val = FALSE; - gboolean _tmp0_; + gboolean _tmp0_ = FALSE; gboolean _tmp1_; - gboolean _tmp2_; + gboolean _tmp2_ = FALSE; gboolean _tmp3_; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_; + gboolean _tmp6_ = FALSE; _tmp0_ = main_check_feature_version ("dvbsrc", (guint) 0, (guint) 10, (guint) 13); val = _tmp0_; - if (!val) { + _tmp1_ = val; + if (!_tmp1_) { result = FALSE; return result; } - _tmp1_ = main_check_feature_version ("dvbbasebin", (guint) 0, (guint) 10, (guint) 13); - val = _tmp1_; - if (!val) { + _tmp2_ = main_check_feature_version ("dvbbasebin", (guint) 0, (guint) 10, (guint) 13); + val = _tmp2_; + _tmp3_ = val; + if (!_tmp3_) { result = FALSE; return result; } - _tmp2_ = main_check_feature_version ("mpegtsparse", (guint) 0, (guint) 10, (guint) 13); - val = _tmp2_; - if (!val) { + _tmp4_ = main_check_feature_version ("mpegtsparse", (guint) 0, (guint) 10, (guint) 13); + val = _tmp4_; + _tmp5_ = val; + if (!_tmp5_) { result = FALSE; return result; } - _tmp3_ = main_check_feature_version ("rtpmp2tpay", (guint) 0, (guint) 10, (guint) 14); - val = _tmp3_; + _tmp6_ = main_check_feature_version ("rtpmp2tpay", (guint) 0, (guint) 10, (guint) 14); + val = _tmp6_; result = val; return result; } void main_restore_device_groups (void) { - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config_store; - GeeList* device_groups; - GeeList* _tmp1_ = NULL; - GeeList* _tmp2_; - GeeList* _tmp3_; - gint _tmp4_; + GeeList* device_groups = NULL; + guint max_group_id; + DVBLoggingLogger* _tmp9_; + GeeList* _tmp10_; + gint _tmp11_; + gint _tmp12_; + guint _tmp33_; GError * _inner_error_ = NULL; - _tmp0_ = dvb_factory_get_config_store (); - config_store = _tmp0_; - device_groups = NULL; - _tmp1_ = dvb_database_config_store_get_all_device_groups (config_store, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch72_dvb_database_sql_error; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + config_store = _tmp3_; + { + DVBdatabaseConfigStore* _tmp4_; + GeeList* _tmp5_ = NULL; + GeeList* _tmp6_; + _tmp4_ = config_store; + _tmp5_ = dvb_database_config_store_get_all_device_groups (_tmp4_, &_inner_error_); + _tmp6_ = _tmp5_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch82_dvb_database_sql_error; + } + _g_object_unref0 (device_groups); + _g_object_unref0 (config_store); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } _g_object_unref0 (device_groups); - _g_object_unref0 (config_store); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + device_groups = _tmp6_; } - _tmp3_ = _tmp2_; - _g_object_unref0 (device_groups); - device_groups = _tmp3_; - goto __finally72; - __catch72_dvb_database_sql_error: + goto __finally82; + __catch82_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + GError* _tmp7_; + const gchar* _tmp8_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Main.vala:157: %s", e->message); + _tmp7_ = e; + _tmp8_ = _tmp7_->message; + g_critical ("Main.vala:124: %s", _tmp8_); _g_error_free0 (e); _g_object_unref0 (device_groups); _g_object_unref0 (config_store); return; } - __finally72: + __finally82: if (_inner_error_ != NULL) { _g_object_unref0 (device_groups); _g_object_unref0 (config_store); @@ -520,161 +743,405 @@ g_clear_error (&_inner_error_); return; } - _tmp4_ = gee_collection_get_size ((GeeCollection*) device_groups); - g_message ("Main.vala:161: Restoring %d device groups", _tmp4_); + max_group_id = (guint) 0; + _tmp9_ = main_log; + _tmp10_ = device_groups; + _tmp11_ = gee_collection_get_size ((GeeCollection*) _tmp10_); + _tmp12_ = _tmp11_; + dvb_logging_logger_info (_tmp9_, "Main.vala:129: Restoring %d device groups", _tmp12_); { - GeeList* _tmp5_; + GeeList* _tmp13_; + GeeList* _tmp14_; GeeList* _device_group_list; - gint _tmp6_; + GeeList* _tmp15_; + gint _tmp16_; + gint _tmp17_; gint _device_group_size; gint _device_group_index; - _tmp5_ = _g_object_ref0 (device_groups); - _device_group_list = _tmp5_; - _tmp6_ = gee_collection_get_size ((GeeCollection*) _device_group_list); - _device_group_size = _tmp6_; + _tmp13_ = device_groups; + _tmp14_ = _g_object_ref0 (_tmp13_); + _device_group_list = _tmp14_; + _tmp15_ = _device_group_list; + _tmp16_ = gee_collection_get_size ((GeeCollection*) _tmp15_); + _tmp17_ = _tmp16_; + _device_group_size = _tmp17_; _device_group_index = -1; while (TRUE) { - gpointer _tmp7_ = NULL; + gint _tmp18_; + gint _tmp19_; + gint _tmp20_; + GeeList* _tmp21_; + gint _tmp22_; + gpointer _tmp23_ = NULL; DVBDeviceGroup* device_group; - _device_group_index = _device_group_index + 1; - if (!(_device_group_index < _device_group_size)) { + DVBManager* _tmp24_; + DVBDeviceGroup* _tmp25_; + DVBDeviceGroup* _tmp26_; + guint _tmp27_; + guint _tmp28_; + guint _tmp29_; + _tmp18_ = _device_group_index; + _device_group_index = _tmp18_ + 1; + _tmp19_ = _device_group_index; + _tmp20_ = _device_group_size; + if (!(_tmp19_ < _tmp20_)) { break; } - _tmp7_ = gee_list_get (_device_group_list, _device_group_index); - device_group = (DVBDeviceGroup*) _tmp7_; - dvb_manager_restore_device_group_and_timers (main_manager, device_group); + _tmp21_ = _device_group_list; + _tmp22_ = _device_group_index; + _tmp23_ = gee_list_get (_tmp21_, _tmp22_); + device_group = (DVBDeviceGroup*) _tmp23_; + _tmp24_ = main_manager; + _tmp25_ = device_group; + dvb_manager_restore_device_group_and_timers (_tmp24_, _tmp25_); + _tmp26_ = device_group; + _tmp27_ = dvb_device_group_get_Id (_tmp26_); + _tmp28_ = _tmp27_; + _tmp29_ = max_group_id; + if (_tmp28_ > _tmp29_) { + DVBDeviceGroup* _tmp30_; + guint _tmp31_; + guint _tmp32_; + _tmp30_ = device_group; + _tmp31_ = dvb_device_group_get_Id (_tmp30_); + _tmp32_ = _tmp31_; + max_group_id = _tmp32_; + } _g_object_unref0 (device_group); } _g_object_unref0 (_device_group_list); } + _tmp33_ = max_group_id; + main_restore_fake_devices (_tmp33_); _g_object_unref0 (device_groups); _g_object_unref0 (config_store); } -static void _main_on_exit_cutils_signal_signal_handler (gint signum) { - main_on_exit (signum); -} - - -static void _main_log_func_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) { - main_log_func (log_domain, log_levels, message); -} - - -static gboolean _dvb_rtsp_server_start_gsource_func (gpointer self) { - gboolean result; - result = dvb_rtsp_server_start (); - return result; +void main_restore_fake_devices (guint max_group_id) { + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBSettings* _tmp2_ = NULL; + DVBSettings* _tmp3_; + DVBSettings* settings; + DVBSettings* _tmp4_; + GeeList* _tmp5_ = NULL; + GeeList* devices; + GeeList* _tmp6_; + gint _tmp7_; + gint _tmp8_; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_settings (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + settings = _tmp3_; + _tmp4_ = settings; + _tmp5_ = dvb_settings_get_fake_devices (_tmp4_); + devices = _tmp5_; + _tmp6_ = devices; + _tmp7_ = gee_collection_get_size ((GeeCollection*) _tmp6_); + _tmp8_ = _tmp7_; + if (_tmp8_ > 0) { + GeeList* _tmp9_; + gpointer _tmp10_ = NULL; + DVBDevice* ref_dev; + guint _tmp11_; + DVBDevice* _tmp12_; + DVBDeviceGroup* _tmp13_; + DVBDeviceGroup* group; + DVBDeviceGroup* _tmp14_; + DVBManager* _tmp27_; + DVBDeviceGroup* _tmp28_; + _tmp9_ = devices; + _tmp10_ = gee_list_get (_tmp9_, 0); + ref_dev = (DVBDevice*) _tmp10_; + _tmp11_ = max_group_id; + _tmp12_ = ref_dev; + _tmp13_ = dvb_device_group_new (_tmp11_ + 1, _tmp12_, FALSE); + group = _tmp13_; + _tmp14_ = group; + dvb_device_group_set_Name (_tmp14_, "Fake Devices"); + { + gint i; + i = 1; + { + gboolean _tmp15_; + _tmp15_ = TRUE; + while (TRUE) { + gboolean _tmp16_; + gint _tmp18_; + GeeList* _tmp19_; + gint _tmp20_; + gint _tmp21_; + DVBDeviceGroup* _tmp22_; + GeeList* _tmp23_; + gint _tmp24_; + gpointer _tmp25_ = NULL; + DVBDevice* _tmp26_; + _tmp16_ = _tmp15_; + if (!_tmp16_) { + gint _tmp17_; + _tmp17_ = i; + i = _tmp17_ + 1; + } + _tmp15_ = FALSE; + _tmp18_ = i; + _tmp19_ = devices; + _tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_); + _tmp21_ = _tmp20_; + if (!(_tmp18_ < _tmp21_)) { + break; + } + _tmp22_ = group; + _tmp23_ = devices; + _tmp24_ = i; + _tmp25_ = gee_list_get (_tmp23_, _tmp24_); + _tmp26_ = (DVBDevice*) _tmp25_; + dvb_device_group_add (_tmp22_, _tmp26_); + _g_object_unref0 (_tmp26_); + } + } + } + _tmp27_ = main_manager; + _tmp28_ = group; + dvb_manager_restore_device_group (_tmp27_, _tmp28_, FALSE); + _g_object_unref0 (group); + _g_object_unref0 (ref_dev); + } + _g_object_unref0 (devices); + _g_object_unref0 (settings); } -static gboolean _dvb_media_server2_start_rygel_services_gsource_func (gpointer self) { - gboolean result; - result = dvb_media_server2_start_rygel_services (); - return result; +void main_configure_logging (void) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogManager* _tmp1_; + DVBLoggingLogManager* manager; + DVBLoggingLogger* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + GFile* _tmp4_ = NULL; + GFile* cache_dir; + GFile* _tmp5_ = NULL; + GFile* our_cache; + GFile* _tmp6_ = NULL; + GFile* log_file; + DVBLoggingConsoleHandler* _tmp18_; + DVBLoggingConsoleHandler* chandler; + DVBLoggingConsoleHandler* _tmp19_; + DVBLoggingColorFormatter* _tmp20_; + DVBLoggingColorFormatter* _tmp21_; + gboolean _tmp22_; + DVBLoggingLogger* _tmp24_; + DVBLoggingConsoleHandler* _tmp25_; + GError * _inner_error_ = NULL; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = _g_object_ref0 (_tmp0_); + manager = _tmp1_; + _tmp2_ = dvb_logging_log_manager_getDefaultLogger (manager); + _g_object_unref0 (main_log); + main_log = _tmp2_; + _tmp3_ = g_get_user_cache_dir (); + _tmp4_ = g_file_new_for_path (_tmp3_); + cache_dir = _tmp4_; + _tmp5_ = g_file_get_child (cache_dir, "gnome-dvb-daemon"); + our_cache = _tmp5_; + _tmp6_ = g_file_get_child (our_cache, "debug%d.log"); + log_file = _tmp6_; + { + gchar* _tmp7_ = NULL; + gchar* _tmp8_; + DVBLoggingFileHandler* _tmp9_; + DVBLoggingFileHandler* _tmp10_; + DVBLoggingFileHandler* fhandler; + gboolean _tmp11_; + DVBLoggingLogger* _tmp14_; + _tmp7_ = g_file_get_path (log_file); + _tmp8_ = _tmp7_; + _tmp9_ = dvb_logging_file_handler_new (_tmp8_, &_inner_error_); + _tmp10_ = _tmp9_; + _g_free0 (_tmp8_); + fhandler = _tmp10_; + if (_inner_error_ != NULL) { + goto __catch83_g_error; + } + dvb_logging_file_handler_set_limit (fhandler, 1024 * 1024); + _tmp11_ = main_has_debug; + if (_tmp11_) { + gint _tmp12_; + gint _tmp13_; + _tmp12_ = dvb_logging_file_handler_get_limit (fhandler); + _tmp13_ = _tmp12_; + dvb_logging_file_handler_set_limit (fhandler, _tmp13_ * 5); + } else { + dvb_logging_handler_set_threshold ((DVBLoggingHandler*) fhandler, DVB_LOGGING_LOG_LEVEL_WARNING); + } + _tmp14_ = main_log; + dvb_logging_logger_addHandler (_tmp14_, (DVBLoggingHandler*) fhandler); + _g_object_unref0 (fhandler); + } + goto __finally83; + __catch83_g_error: + { + GError* e = NULL; + FILE* _tmp15_; + GError* _tmp16_; + const gchar* _tmp17_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp15_ = stderr; + _tmp16_ = e; + _tmp17_ = _tmp16_->message; + fprintf (_tmp15_, "*** Failed creating DVB.Logging.FileHandler: %s\n", _tmp17_); + _g_error_free0 (e); + } + __finally83: + if (_inner_error_ != NULL) { + _g_object_unref0 (log_file); + _g_object_unref0 (our_cache); + _g_object_unref0 (cache_dir); + _g_object_unref0 (manager); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + _tmp18_ = dvb_logging_console_handler_new (); + chandler = _tmp18_; + _tmp19_ = chandler; + _tmp20_ = dvb_logging_color_formatter_new (); + _tmp21_ = _tmp20_; + dvb_logging_handler_set_formatter ((DVBLoggingHandler*) _tmp19_, (DVBLoggingFormatter*) _tmp21_); + _g_object_unref0 (_tmp21_); + _tmp22_ = main_has_debug; + if (!_tmp22_) { + DVBLoggingConsoleHandler* _tmp23_; + _tmp23_ = chandler; + dvb_logging_handler_set_threshold ((DVBLoggingHandler*) _tmp23_, DVB_LOGGING_LOG_LEVEL_ERROR); + } + _tmp24_ = main_log; + _tmp25_ = chandler; + dvb_logging_logger_addHandler (_tmp24_, (DVBLoggingHandler*) _tmp25_); + _g_object_unref0 (chandler); + _g_object_unref0 (log_file); + _g_object_unref0 (our_cache); + _g_object_unref0 (cache_dir); + _g_object_unref0 (manager); } -static gboolean _dvb_media_server_start_rygel_services_gsource_func (gpointer self) { - gboolean result; - result = dvb_media_server_start_rygel_services (); - return result; +static void _main_on_exit_cutils_signal_signal_handler (gint signum) { + main_on_exit (signum); } gint main_main (gchar** args, int args_length1) { gint result = 0; - GOptionContext* _tmp0_ = NULL; + GOptionContext* _tmp0_; GOptionContext* context; - GOptionGroup* _tmp1_ = NULL; - GMainLoop* _tmp2_ = NULL; - GMainLoop* _tmp3_; - gboolean _tmp4_; - gboolean _tmp5_; - gboolean _tmp6_; + GOptionContext* _tmp1_; + GOptionContext* _tmp2_; + GOptionGroup* _tmp3_ = NULL; + gboolean _tmp11_; + GMainLoop* _tmp14_; + gboolean _tmp15_ = FALSE; + gboolean _tmp18_; + GMainLoop* _tmp19_; GError * _inner_error_ = NULL; g_setenv ("TZ", "/etc/localtime", FALSE); signal (SIGINT, _main_on_exit_cutils_signal_signal_handler); signal (SIGTERM, _main_on_exit_cutils_signal_signal_handler); _tmp0_ = g_option_context_new ("- record and watch TV shows using one or more DVB adapters"); context = _tmp0_; - g_option_context_add_main_entries (context, MAIN_options, NULL); - _tmp1_ = gst_init_get_option_group (); - g_option_context_add_group (context, _tmp1_); - g_option_context_parse (context, &args_length1, &args, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_OPTION_ERROR) { - goto __catch73_g_option_error; + _tmp1_ = context; + g_option_context_add_main_entries (_tmp1_, MAIN_options, NULL); + _tmp2_ = context; + _tmp3_ = gst_init_get_option_group (); + g_option_context_add_group (_tmp2_, _tmp3_); + { + GOptionContext* _tmp4_; + _tmp4_ = context; + g_option_context_parse (_tmp4_, &args_length1, &args, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_OPTION_ERROR) { + goto __catch84_g_option_error; + } + _g_option_context_free0 (context); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; } - _g_option_context_free0 (context); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; } - goto __finally73; - __catch73_g_option_error: + goto __finally84; + __catch84_g_option_error: { - GError * e; + GError* e = NULL; + FILE* _tmp5_; + GError* _tmp6_; + const gchar* _tmp7_; + FILE* _tmp8_; + gchar** _tmp9_; + gint _tmp9__length1; + const gchar* _tmp10_; e = _inner_error_; _inner_error_ = NULL; - fprintf (stderr, "%s\n", e->message); - fprintf (stderr, "Run '%s --help' to see a full list of available command line options.\n", args[0]); + _tmp5_ = stderr; + _tmp6_ = e; + _tmp7_ = _tmp6_->message; + fprintf (_tmp5_, "%s\n", _tmp7_); + _tmp8_ = stderr; + _tmp9_ = args; + _tmp9__length1 = args_length1; + _tmp10_ = _tmp9_[0]; + fprintf (_tmp8_, "Run '%s --help' to see a full list of available command line options.\n", _tmp10_); result = 1; _g_error_free0 (e); _g_option_context_free0 (context); return result; } - __finally73: + __finally84: if (_inner_error_ != NULL) { _g_option_context_free0 (context); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return 0; } - if (main_has_version) { - fprintf (stdout, "%s", PACKAGE_NAME); - fprintf (stdout, " %s\n", PACKAGE_VERSION); + _tmp11_ = main_has_version; + if (_tmp11_) { + FILE* _tmp12_; + FILE* _tmp13_; + _tmp12_ = stdout; + fprintf (_tmp12_, "%s", PACKAGE_NAME); + _tmp13_ = stdout; + fprintf (_tmp13_, " %s\n", PACKAGE_VERSION); result = 0; _g_option_context_free0 (context); return result; } - g_log_set_handler (NULL, (G_LOG_LEVEL_DEBUG | G_LOG_FLAG_FATAL) | G_LOG_FLAG_RECURSION, _main_log_func_glog_func, NULL); - _tmp2_ = g_main_loop_new (NULL, FALSE); - _tmp3_ = _tmp2_; + _tmp14_ = g_main_loop_new (NULL, FALSE); _g_main_loop_unref0 (main_mainloop); - main_mainloop = _tmp3_; + main_mainloop = _tmp14_; gst_init (&args_length1, &args); - _tmp4_ = main_check_requirements (); - if (!_tmp4_) { - fprintf (stderr, "You don't have all of the necessary requirements to run %s.\n", PACKAGE_NAME); - fprintf (stderr, "Start the daemon with the --debug flag for more details.\n"); + main_configure_logging (); + _tmp15_ = main_check_requirements (); + if (!_tmp15_) { + FILE* _tmp16_; + FILE* _tmp17_; + _tmp16_ = stderr; + fprintf (_tmp16_, "You don't have all of the necessary requirements to run %s.\n", PACKAGE_NAME); + _tmp17_ = stderr; + fprintf (_tmp17_, "Start the daemon with the --debug flag for more details.\n"); result = -1; _g_option_context_free0 (context); return result; } - _tmp5_ = main_start_manager (); - if (!_tmp5_) { - result = -1; - _g_option_context_free0 (context); - return result; - } - _tmp6_ = main_start_recordings_store (); - if (!_tmp6_) { - result = -1; - _g_option_context_free0 (context); - return result; - } - main_restore_device_groups (); - g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _dvb_rtsp_server_start_gsource_func, NULL, NULL); - if (!main_disable_mediaserver) { - if (main_enable_mediaserver2) { - g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _dvb_media_server2_start_rygel_services_gsource_func, NULL, NULL); - } else { - g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _dvb_media_server_start_rygel_services_gsource_func, NULL, NULL); - } + main_start_manager (); + dvb_rtsp_server_start (NULL, NULL); + _tmp18_ = main_disable_mediaserver; + if (!_tmp18_) { + dvb_media_server2_start_rygel_services (NULL, NULL); } - g_main_loop_run (main_mainloop); + _tmp19_ = main_mainloop; + g_main_loop_run (_tmp19_); result = 0; _g_option_context_free0 (context); return result; diff -Nru gnome-dvb-daemon-0.1.23/src/Main.vala gnome-dvb-daemon-0.2.7/src/Main.vala --- gnome-dvb-daemon-0.1.23/src/Main.vala 2010-08-11 13:08:59.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Main.vala 2011-09-29 20:27:47.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2011 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -27,8 +27,9 @@ private static bool has_version; private static bool disable_epg_scanner; private static bool disable_mediaserver; - private static bool enable_mediaserver2; private static MainLoop mainloop; + public static DVB.Logging.Logger log; + public static DBusConnection conn; const OptionEntry[] options = { { "debug", 'd', 0, OptionArg.NONE, out has_debug, @@ -37,84 +38,50 @@ "Display version number", null}, { "disable-epg-scanner", 0, 0, OptionArg.NONE, out disable_epg_scanner, "Disable scanning for EPG data", null}, - { "disable-mediaserver", 0, 0, OptionArg.NONE, - out disable_mediaserver, "Disable exporting devices and channels for Rygel", null}, - { "enable-mediaserver2", 0 ,0, OptionArg.NONE, out enable_mediaserver2, - "Export devices and channels according to Rygel's MediaServer2 specification", + { "disable-mediaserver2", 0 ,0, OptionArg.NONE, out disable_mediaserver, + "Disable exporting devices and channels according to Rygel's MediaServer2 specification", null}, { null } }; - - private static bool start_manager () { - try { - var conn = DBus.Bus.get (DBus.BusType.SESSION); - - dynamic DBus.Object bus = conn.get_object ( - "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); - - // try to register service in session bus - uint request_name_result = bus.RequestName (DVB.Constants.DBUS_SERVICE, (uint) 0); - - if (request_name_result == DBus.RequestNameReply.PRIMARY_OWNER) { - message ("Creating new Manager D-Bus service"); - - manager = DVB.Manager.get_instance (); - - conn.register_object ( - DVB.Constants.DBUS_MANAGER_PATH, - manager); - } else { - warning ("Manager D-Bus service is already running"); - return false; - } - } catch (Error e) { - critical ("Oops %s", e.message); - return false; - } - - return true; + private static void start_manager () { + manager = DVB.Manager.get_instance (); + DVB.Utils.dbus_own_name (DVB.Constants.DBUS_SERVICE, + on_bus_acquired); } - - private static bool start_recordings_store () { - message ("Creating new RecordingsStore D-Bus service"); - - try { - var conn = DBus.Bus.get (DBus.BusType.SESSION); - - recstore = DVB.RecordingsStore.get_instance (); - - conn.register_object ( - DVB.Constants.DBUS_RECORDINGS_STORE_PATH, - recstore); - } catch (Error e) { - critical ("Oops %s", e.message); - return false; - } - - return true; + + private static void on_bus_acquired (DBusConnection _conn) { + DVB.Utils.dbus_register_object (_conn, + DVB.Constants.DBUS_MANAGER_PATH, manager); + conn = _conn; + start_recordings_store (); + + restore_device_groups (); } - + + private static void start_recordings_store () { + log.info ("Creating new RecordingsStore D-Bus service"); + + recstore = DVB.RecordingsStore.get_instance (); + DVB.Utils.dbus_register_object (conn, + DVB.Constants.DBUS_RECORDINGS_STORE_PATH, recstore); + } + private static void on_exit (int signum) { - message ("Exiting"); - + log.info ("Exiting"); + DVB.RTSPServer.shutdown (); DVB.Manager.shutdown (); - DVB.Factory.shutdown (); + new DVB.Factory().shutdown (); DVB.RecordingsStore.shutdown (); - + DVB.Logging.LogManager.getLogManager().cleanup (); + recstore = null; manager = null; - + mainloop.quit (); } - - private static void log_func (string? log_domain, LogLevelFlags log_levels, - string message) { - if (has_debug) - cUtils.log_default_handler (log_domain, log_levels, message, null); - } - + public static bool get_disable_epg_scanner () { return Main.disable_epg_scanner; } @@ -128,7 +95,7 @@ ret = false; else ret = feature.check_version (major, minor, micro); - debug ("Has %s >= %u.%u.%u: %s", name, major, minor, micro, ret.to_string ()); + log.debug ("Has %s >= %u.%u.%u: %s", name, major, minor, micro, ret.to_string ()); return ret; } @@ -148,8 +115,8 @@ } private static void restore_device_groups () { - DVB.database.ConfigStore config_store = DVB.Factory.get_config_store (); - + DVB.database.ConfigStore config_store = new DVB.Factory().get_config_store (); + Gee.List device_groups; try { device_groups = config_store.get_all_device_groups (); @@ -158,23 +125,75 @@ return; } - message ("Restoring %d device groups", device_groups.size); + uint max_group_id = 0; + log.info ("Restoring %d device groups", device_groups.size); foreach (DVB.DeviceGroup device_group in device_groups) { manager.restore_device_group_and_timers (device_group); + if (device_group.Id > max_group_id) + max_group_id = device_group.Id; + } + + restore_fake_devices (max_group_id); + } + + private static void restore_fake_devices (uint max_group_id) { + DVB.Settings settings = new DVB.Factory().get_settings (); + Gee.List devices = settings.get_fake_devices (); + if (devices.size > 0) { + DVB.Device ref_dev = devices.get (0); + DVB.DeviceGroup group = new DVB.DeviceGroup (max_group_id + 1, + ref_dev, false); + group.Name = "Fake Devices"; + for (int i=1; i #include -#include +#include #include #include -#include #include #include -#include -#include +#include #include @@ -41,9 +39,14 @@ typedef struct _DVBIDBusManager DVBIDBusManager; typedef struct _DVBIDBusManagerIface DVBIDBusManagerIface; +#define DVB_TYPE_ID_BUS_MANAGER_PROXY (dvb_id_bus_manager_proxy_get_type ()) + #define DVB_TYPE_CHANNEL_GROUP_INFO (dvb_channel_group_info_get_type ()) typedef struct _DVBChannelGroupInfo DVBChannelGroupInfo; +#define DVB_TYPE_ADAPTER_INFO (dvb_adapter_info_get_type ()) +typedef struct _DVBAdapterInfo DVBAdapterInfo; + #define DVB_TYPE_MANAGER (dvb_manager_get_type ()) #define DVB_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_MANAGER, DVBManager)) #define DVB_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_MANAGER, DVBManagerClass)) @@ -55,15 +58,15 @@ typedef struct _DVBManagerClass DVBManagerClass; typedef struct _DVBManagerPrivate DVBManagerPrivate; -#define DVB_TYPE_SCANNER (dvb_scanner_get_type ()) -#define DVB_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCANNER, DVBScanner)) -#define DVB_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SCANNER, DVBScannerClass)) -#define DVB_IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_SCANNER)) -#define DVB_IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_SCANNER)) -#define DVB_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_SCANNER, DVBScannerClass)) +#define DVB_MANAGER_TYPE_SCANNER_DATA (dvb_manager_scanner_data_get_type ()) +#define DVB_MANAGER_SCANNER_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_MANAGER_TYPE_SCANNER_DATA, DVBManagerScannerData)) +#define DVB_MANAGER_SCANNER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_MANAGER_TYPE_SCANNER_DATA, DVBManagerScannerDataClass)) +#define DVB_MANAGER_IS_SCANNER_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_MANAGER_TYPE_SCANNER_DATA)) +#define DVB_MANAGER_IS_SCANNER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_MANAGER_TYPE_SCANNER_DATA)) +#define DVB_MANAGER_SCANNER_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_MANAGER_TYPE_SCANNER_DATA, DVBManagerScannerDataClass)) -typedef struct _DVBScanner DVBScanner; -typedef struct _DVBScannerClass DVBScannerClass; +typedef struct _DVBManagerScannerData DVBManagerScannerData; +typedef struct _DVBManagerScannerDataClass DVBManagerScannerDataClass; #define DVB_TYPE_DEVICE_GROUP (dvb_device_group_get_type ()) #define DVB_DEVICE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_DEVICE_GROUP, DVBDeviceGroup)) @@ -74,8 +77,38 @@ typedef struct _DVBDeviceGroup DVBDeviceGroup; typedef struct _DVBDeviceGroupClass DVBDeviceGroupClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +typedef struct _DVBManagerScannerDataPrivate DVBManagerScannerDataPrivate; + +#define DVB_TYPE_SCANNER (dvb_scanner_get_type ()) +#define DVB_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCANNER, DVBScanner)) +#define DVB_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SCANNER, DVBScannerClass)) +#define DVB_IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_SCANNER)) +#define DVB_IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_SCANNER)) +#define DVB_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_SCANNER, DVBScannerClass)) + +typedef struct _DVBScanner DVBScanner; +typedef struct _DVBScannerClass DVBScannerClass; #define _g_free0(var) (var = (g_free (var), NULL)) #define DVB_TYPE_DEVICE (dvb_device_get_type ()) @@ -119,9 +152,28 @@ typedef struct _DVBCableScanner DVBCableScanner; typedef struct _DVBCableScannerClass DVBCableScannerClass; -#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) + +#define DVB_TYPE_ID_BUS_SCANNER (dvb_id_bus_scanner_get_type ()) +#define DVB_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScanner)) +#define DVB_IS_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_SCANNER)) +#define DVB_ID_BUS_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScannerIface)) + +typedef struct _DVBIDBusScanner DVBIDBusScanner; +typedef struct _DVBIDBusScannerIface DVBIDBusScannerIface; + +#define DVB_TYPE_ID_BUS_SCANNER_PROXY (dvb_id_bus_scanner_proxy_get_type ()) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + #define DVB_DATABASE_TYPE_CONFIG_STORE (dvb_database_config_store_get_type ()) #define DVB_DATABASE_CONFIG_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_CONFIG_STORE, DVBdatabaseConfigStore)) #define DVB_DATABASE_IS_CONFIG_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_TYPE_CONFIG_STORE)) @@ -152,6 +204,9 @@ #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) #define __g_list_free__g_hash_table_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_hash_table_unref0_ (var), NULL))) #define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL))) +#define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) +#define _gst_message_unref0(var) ((var == NULL) ? NULL : (var = (gst_message_unref (var), NULL))) +#define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) #define DVB_TYPE_ID_BUS_DEVICE_GROUP (dvb_id_bus_device_group_get_type ()) #define DVB_ID_BUS_DEVICE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_DEVICE_GROUP, DVBIDBusDeviceGroup)) @@ -161,6 +216,8 @@ typedef struct _DVBIDBusDeviceGroup DVBIDBusDeviceGroup; typedef struct _DVBIDBusDeviceGroupIface DVBIDBusDeviceGroupIface; +#define DVB_TYPE_ID_BUS_DEVICE_GROUP_PROXY (dvb_id_bus_device_group_proxy_get_type ()) + #define DVB_TYPE_CHANNEL_LIST (dvb_channel_list_get_type ()) #define DVB_CHANNEL_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL_LIST, DVBChannelList)) #define DVB_CHANNEL_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL_LIST, DVBChannelListClass)) @@ -232,6 +289,11 @@ gchar* name; }; +struct _DVBAdapterInfo { + gchar* name; + gchar* type; +}; + struct _DVBIDBusManagerIface { GTypeInterface parent_iface; gboolean (*GetScannerForDevice) (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); @@ -244,6 +306,7 @@ gboolean (*AddChannelGroup) (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); gboolean (*RemoveChannelGroup) (DVBIDBusManager* self, gint channel_group_id, GError** error); GHashTable** (*GetDevices) (DVBIDBusManager* self, int* result_length1, GError** error); + gboolean (*GetAdapterInfo) (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error); }; struct _DVBManager { @@ -264,8 +327,15 @@ GUdevClient* udev_client; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); +struct _DVBManagerScannerData { + GObject parent_instance; + DVBManagerScannerDataPrivate * priv; + DVBScanner* scanner; + gulong signal_id; +}; + +struct _DVBManagerScannerDataClass { + GObjectClass parent_class; }; typedef enum { @@ -275,6 +345,16 @@ DVB_ADAPTER_TYPE_DVB_C } DVBAdapterType; +struct _DVBIDBusScannerIface { + GTypeInterface parent_iface; + void (*Run) (DVBIDBusScanner* self, GError** error); + void (*Destroy) (DVBIDBusScanner* self, GError** error); + gboolean (*WriteAllChannelsToFile) (DVBIDBusScanner* self, const gchar* path, GError** error); + gboolean (*WriteChannelsToFile) (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); + gboolean (*AddScanningData) (DVBIDBusScanner* self, GHashTable* data, GError** error); + gboolean (*AddScanningDataFromFile) (DVBIDBusScanner* self, const gchar* path, GError** error); +}; + typedef enum { DVB_DEVICE_ERROR_UNKNOWN_TYPE } DVBDeviceError; @@ -361,37 +441,47 @@ static gpointer dvb_manager_parent_class = NULL; +static DVBLoggingLogger* dvb_manager_log; +static DVBLoggingLogger* dvb_manager_log = NULL; static DVBManager* dvb_manager_instance; static DVBManager* dvb_manager_instance = NULL; static GStaticRecMutex dvb_manager_instance_mutex; static GStaticRecMutex dvb_manager_instance_mutex = {0}; +extern GDBusConnection* main_conn; +static gpointer dvb_manager_scanner_data_parent_class = NULL; static DVBIDBusManagerIface* dvb_manager_dvb_id_bus_manager_parent_iface = NULL; -DVBIDBusManager* dvb_id_bus_manager_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_manager_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_channel_group_info_get_type (void) G_GNUC_CONST; DVBChannelGroupInfo* dvb_channel_group_info_dup (const DVBChannelGroupInfo* self); void dvb_channel_group_info_free (DVBChannelGroupInfo* self); void dvb_channel_group_info_copy (const DVBChannelGroupInfo* self, DVBChannelGroupInfo* dest); void dvb_channel_group_info_destroy (DVBChannelGroupInfo* self); +GType dvb_adapter_info_get_type (void) G_GNUC_CONST; +DVBAdapterInfo* dvb_adapter_info_dup (const DVBAdapterInfo* self); +void dvb_adapter_info_free (DVBAdapterInfo* self); +void dvb_adapter_info_copy (const DVBAdapterInfo* self, DVBAdapterInfo* dest); +void dvb_adapter_info_destroy (DVBAdapterInfo* self); GType dvb_id_bus_manager_get_type (void) G_GNUC_CONST; GType dvb_manager_get_type (void) G_GNUC_CONST; -GType dvb_scanner_get_type (void) G_GNUC_CONST; +static GType dvb_manager_scanner_data_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; GType dvb_device_group_get_type (void) G_GNUC_CONST; #define DVB_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_MANAGER, DVBManagerPrivate)) enum { DVB_MANAGER_DUMMY_PROPERTY, DVB_MANAGER_DEVICE_GROUPS }; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_manager_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_manager_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_manager_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_manager_introspect (DVBManager* self, DBusConnection* connection, DBusMessage* message); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBManager* dvb_manager_get_instance (void); DVBManager* dvb_manager_new (void); DVBManager* dvb_manager_construct (GType object_type); void dvb_manager_shutdown (void); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); +GType dvb_scanner_get_type (void) G_GNUC_CONST; void dvb_scanner_do_destroy (DVBScanner* self); void dvb_device_group_destroy (DVBDeviceGroup* self); static gboolean dvb_manager_real_GetScannerForDevice (DVBIDBusManager* base, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); @@ -403,6 +493,9 @@ void dvb_device_group_stop_epg_scanner (DVBDeviceGroup* self); GType dvb_adapter_type_get_type (void) G_GNUC_CONST; DVBAdapterType dvb_device_get_Type (DVBDevice* self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); +static DVBManagerScannerData* dvb_manager_scanner_data_new (void); +static DVBManagerScannerData* dvb_manager_scanner_data_construct (GType object_type); DVBTerrestrialScanner* dvb_terrestrial_scanner_new (DVBDevice* device); DVBTerrestrialScanner* dvb_terrestrial_scanner_construct (GType object_type, DVBDevice* device); GType dvb_terrestrial_scanner_get_type (void) G_GNUC_CONST; @@ -412,29 +505,35 @@ DVBCableScanner* dvb_cable_scanner_new (DVBDevice* device); DVBCableScanner* dvb_cable_scanner_construct (GType object_type, DVBDevice* device); GType dvb_cable_scanner_get_type (void) G_GNUC_CONST; +void dvb_utils_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* conn, const gchar* object_path, gconstpointer obj); +GType dvb_id_bus_scanner_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_scanner_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_id_bus_scanner_get_type (void) G_GNUC_CONST; static void dvb_manager_on_scanner_destroyed (DVBManager* self, DVBScanner* scanner); static void _dvb_manager_on_scanner_destroyed_dvb_scanner_destroyed (DVBScanner* _sender, gpointer self); -DBusGConnection* dvb_utils_get_dbus_connection (void); static gboolean dvb_manager_real_GetDeviceGroup (DVBIDBusManager* base, guint group_id, char** opath, GError** error); #define DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH "/org/gnome/DVB/DeviceGroup/%u" static char** dvb_manager_real_GetRegisteredDeviceGroups (DVBIDBusManager* base, int* result_length1, GError** error); static gboolean dvb_manager_real_AddDeviceToNewGroup (DVBIDBusManager* base, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error); GQuark dvb_device_error_quark (void); -DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, guint group_id, GError** error); +DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, GError** error); gboolean dvb_manager_device_is_in_any_group (DVBManager* self, DVBDevice* device); DVBDeviceGroup* dvb_device_group_new (guint id, DVBDevice* reference_device, gboolean with_epg_scanner); DVBDeviceGroup* dvb_device_group_construct (GType object_type, guint id, DVBDevice* reference_device, gboolean with_epg_scanner); void dvb_device_group_set_Name (DVBDeviceGroup* self, const gchar* value); -gboolean dvb_manager_restore_device_group (DVBManager* self, DVBDeviceGroup* device_group); +gboolean dvb_manager_restore_device_group (DVBManager* self, DVBDeviceGroup* device_group, gboolean store); static gboolean dvb_manager_real_GetNameOfRegisteredDevice (DVBIDBusManager* base, guint adapter, guint frontend, gchar** name, GError** error); const gchar* dvb_device_get_Name (DVBDevice* self); static gint dvb_manager_real_GetDeviceGroupSize (DVBIDBusManager* base, GError** error); static DVBChannelGroupInfo* dvb_manager_real_GetChannelGroups (DVBIDBusManager* base, int* result_length1, GError** error); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); GType dvb_channel_group_get_type (void) G_GNUC_CONST; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_database_config_store_get_type (void) G_GNUC_CONST; -DVBdatabaseConfigStore* dvb_factory_get_config_store (void); +DVBdatabaseConfigStore* dvb_factory_get_config_store (DVBFactory* self); GeeList* dvb_database_config_store_get_channel_groups (DVBdatabaseConfigStore* self, GError** error); gint dvb_channel_group_get_id (DVBChannelGroup* self); const gchar* dvb_channel_group_get_name (DVBChannelGroup* self); @@ -448,12 +547,15 @@ static void _g_list_free__g_hash_table_unref0_ (GList* self); static void _g_object_unref0_ (gpointer var); static void _g_list_free__g_object_unref0_ (GList* self); -gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup); +static gboolean dvb_manager_real_GetAdapterInfo (DVBIDBusManager* base, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error); +void dvb_logging_logger_warning (DVBLoggingLogger* self, const gchar* format, ...); +gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup, gboolean store); guint dvb_device_group_get_Id (DVBDeviceGroup* self); gint dvb_device_group_get_size (DVBDeviceGroup* self); DVBAdapterType dvb_device_group_get_Type (DVBDeviceGroup* self); gboolean dvb_database_config_store_add_device_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* dev_group, GError** error); -DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_device_group_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_device_group_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_device_group_get_type (void) G_GNUC_CONST; static void dvb_manager_on_device_removed_from_group (DVBManager* self, DVBIDBusDeviceGroup* idevgroup, guint adapter, guint frontend); static void _dvb_manager_on_device_removed_from_group_dvb_id_bus_device_group_device_removed (DVBIDBusDeviceGroup* _sender, guint adapter, guint frontend, gpointer self); @@ -462,9 +564,10 @@ DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); void dvb_channel_list_load (DVBChannelList* self, DVBAdapterType type, GError** error); void dvb_manager_restore_timers (DVBManager* self, DVBDeviceGroup* device_group); +void dvb_logging_logger_info (DVBLoggingLogger* self, const gchar* format, ...); GType dvb_timer_get_type (void) G_GNUC_CONST; GType dvb_database_timers_store_get_type (void) G_GNUC_CONST; -DVBdatabaseTimersStore* dvb_factory_get_timers_store (void); +DVBdatabaseTimersStore* dvb_factory_get_timers_store (DVBFactory* self); GeeList* dvb_database_timers_store_get_all_timers_of_device_group (DVBdatabaseTimersStore* self, DVBDeviceGroup* dev, GError** error); GType dvb_recorder_get_type (void) G_GNUC_CONST; DVBRecorder* dvb_device_group_get_recorder (DVBDeviceGroup* self); @@ -492,7 +595,7 @@ gpointer dvb_value_get_event (const GValue* value); GType dvb_event_get_type (void) G_GNUC_CONST; GType dvb_database_epg_store_get_type (void) G_GNUC_CONST; -DVBdatabaseEPGStore* dvb_factory_get_epg_store (void); +DVBdatabaseEPGStore* dvb_factory_get_epg_store (DVBFactory* self); gboolean dvb_database_epg_store_remove_events_of_group (DVBdatabaseEPGStore* self, guint group_id, GError** error); gboolean dvb_database_timers_store_remove_all_timers_from_device_group (DVBdatabaseTimersStore* self, guint group_id, GError** error); static void dvb_manager_create_device_group_by_id (DVBManager* self, guint group_id); @@ -504,105 +607,32 @@ GeeCollection* dvb_manager_get_device_groups (DVBManager* self); static GObject * dvb_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); static void _dvb_manager_on_udev_event_g_udev_client_uevent (GUdevClient* _sender, const gchar* action, GUdevDevice* device, gpointer self); +enum { + DVB_MANAGER_SCANNER_DATA_DUMMY_PROPERTY +}; +static void dvb_manager_scanner_data_finalize (GObject* obj); static void dvb_manager_finalize (GObject* obj); static void _vala_dvb_manager_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static const DBusObjectPathVTable _dvb_manager_dbus_path_vtable = {_dvb_manager_dbus_unregister, dvb_manager_dbus_message}; -static const _DBusObjectVTable _dvb_manager_dbus_vtable = {dvb_manager_dbus_register_object}; static const gchar* DVB_MANAGER_UDEV_SUBSYSTEMS[2] = {"dvb", NULL}; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_manager_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_manager_introspect (DVBManager* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_manager_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_manager_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_manager_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_manager_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_manager_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - dvb_id_bus_manager_dbus_register_object (connection, path, object); -} - - DVBManager* dvb_manager_get_instance (void) { DVBManager* result = NULL; + DVBManager* _tmp0_; + DVBManager* _tmp2_; g_static_rec_mutex_lock (&dvb_manager_instance_mutex); - if (dvb_manager_instance == NULL) { - DVBManager* _tmp0_ = NULL; + _tmp0_ = dvb_manager_instance; + if (_tmp0_ == NULL) { DVBManager* _tmp1_; - _tmp0_ = dvb_manager_new (); - _tmp1_ = _tmp0_; + _tmp1_ = dvb_manager_new (); _g_object_unref0 (dvb_manager_instance); dvb_manager_instance = _tmp1_; } g_static_rec_mutex_unlock (&dvb_manager_instance_mutex); - result = dvb_manager_instance; + _tmp2_ = dvb_manager_instance; + result = _tmp2_; return result; } @@ -614,48 +644,94 @@ void dvb_manager_shutdown (void) { DVBManager* _tmp0_; + DVBManager* _tmp1_; DVBManager* m; + DVBManager* _tmp2_; GError * _inner_error_ = NULL; g_static_rec_mutex_lock (&dvb_manager_instance_mutex); - _tmp0_ = _g_object_ref0 (dvb_manager_instance); - m = _tmp0_; - if (dvb_manager_instance != NULL) { - GUdevClient* _tmp1_; - DVBManager* _tmp14_; - _tmp1_ = NULL; - _g_object_unref0 (m->priv->udev_client); - m->priv->udev_client = _tmp1_; + _tmp0_ = dvb_manager_instance; + _tmp1_ = _g_object_ref0 (_tmp0_); + m = _tmp1_; + _tmp2_ = dvb_manager_instance; + if (_tmp2_ != NULL) { + DVBManager* _tmp3_; + _tmp3_ = m; + _g_object_unref0 (_tmp3_->priv->udev_client); + _tmp3_->priv->udev_client = NULL; { - g_static_rec_mutex_lock (&m->priv->__lock_scanners); + DVBManager* _tmp4_; + GeeHashMap* _tmp5_; + _tmp4_ = m; + _tmp5_ = _tmp4_->priv->scanners; + g_static_rec_mutex_lock (&_tmp4_->priv->__lock_scanners); { - GeeCollection* _tmp2_ = NULL; - GeeCollection* _tmp3_; - GeeIterator* _tmp4_ = NULL; - GeeIterator* _tmp5_; - GeeIterator* _scanner_it; - _tmp2_ = gee_map_get_values ((GeeMap*) m->priv->scanners); - _tmp3_ = _tmp2_; - _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_); - _scanner_it = (_tmp5_ = _tmp4_, _g_object_unref0 (_tmp3_), _tmp5_); - while (TRUE) { - gboolean _tmp6_; - gpointer _tmp7_ = NULL; - DVBScanner* scanner; - _tmp6_ = gee_iterator_next (_scanner_it); - if (!_tmp6_) { - break; + DVBManager* _tmp24_; + GeeHashMap* _tmp25_; + { + DVBManager* _tmp6_; + GeeHashMap* _tmp7_; + GeeCollection* _tmp8_; + GeeCollection* _tmp9_; + GeeCollection* _tmp10_; + GeeIterator* _tmp11_ = NULL; + GeeIterator* _tmp12_; + GeeIterator* _data_it; + _tmp6_ = m; + _tmp7_ = _tmp6_->priv->scanners; + _tmp8_ = gee_map_get_values ((GeeMap*) _tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = _tmp9_; + _tmp11_ = gee_iterable_iterator ((GeeIterable*) _tmp10_); + _tmp12_ = _tmp11_; + _g_object_unref0 (_tmp10_); + _data_it = _tmp12_; + while (TRUE) { + GeeIterator* _tmp13_; + gboolean _tmp14_ = FALSE; + GeeIterator* _tmp15_; + gpointer _tmp16_ = NULL; + DVBManagerScannerData* data; + DVBLoggingLogger* _tmp17_; + DVBManagerScannerData* _tmp18_; + DVBScanner* _tmp19_; + DVBManagerScannerData* _tmp20_; + gulong _tmp21_; + DVBManagerScannerData* _tmp22_; + DVBScanner* _tmp23_; + _tmp13_ = _data_it; + _tmp14_ = gee_iterator_next (_tmp13_); + if (!_tmp14_) { + break; + } + _tmp15_ = _data_it; + _tmp16_ = gee_iterator_get (_tmp15_); + data = (DVBManagerScannerData*) _tmp16_; + _tmp17_ = dvb_manager_log; + dvb_logging_logger_debug (_tmp17_, "Manager.vala:80: Stopping scanner"); + _tmp18_ = data; + _tmp19_ = _tmp18_->scanner; + _tmp20_ = data; + _tmp21_ = _tmp20_->signal_id; + g_signal_handler_disconnect ((GObject*) _tmp19_, _tmp21_); + _tmp22_ = data; + _tmp23_ = _tmp22_->scanner; + dvb_scanner_do_destroy (_tmp23_); + _g_object_unref0 (data); } - _tmp7_ = gee_iterator_get (_scanner_it); - scanner = (DVBScanner*) _tmp7_; - g_debug ("Manager.vala:73: Stopping scanner"); - dvb_scanner_do_destroy (scanner); - _g_object_unref0 (scanner); - } - _g_object_unref0 (_scanner_it); - } - gee_abstract_map_clear ((GeeAbstractMap*) m->priv->scanners); - __finally74: - g_static_rec_mutex_unlock (&m->priv->__lock_scanners); + _g_object_unref0 (_data_it); + } + _tmp24_ = m; + _tmp25_ = _tmp24_->priv->scanners; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp25_); + } + __finally85: + { + DVBManager* _tmp26_; + GeeHashMap* _tmp27_; + _tmp26_ = m; + _tmp27_ = _tmp26_->priv->scanners; + g_static_rec_mutex_unlock (&_tmp26_->priv->__lock_scanners); + } if (_inner_error_ != NULL) { _g_object_unref0 (m); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -664,35 +740,65 @@ } } { - g_static_rec_mutex_lock (&m->priv->__lock_devices); + DVBManager* _tmp28_; + GeeHashMap* _tmp29_; + _tmp28_ = m; + _tmp29_ = _tmp28_->priv->devices; + g_static_rec_mutex_lock (&_tmp28_->priv->__lock_devices); { - GeeCollection* _tmp8_ = NULL; - GeeCollection* _tmp9_; - GeeIterator* _tmp10_ = NULL; - GeeIterator* _tmp11_; - GeeIterator* _devgrp_it; - _tmp8_ = gee_map_get_values ((GeeMap*) m->priv->devices); - _tmp9_ = _tmp8_; - _tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_); - _devgrp_it = (_tmp11_ = _tmp10_, _g_object_unref0 (_tmp9_), _tmp11_); - while (TRUE) { - gboolean _tmp12_; - gpointer _tmp13_ = NULL; - DVBDeviceGroup* devgrp; - _tmp12_ = gee_iterator_next (_devgrp_it); - if (!_tmp12_) { - break; + DVBManager* _tmp42_; + GeeHashMap* _tmp43_; + { + DVBManager* _tmp30_; + GeeHashMap* _tmp31_; + GeeCollection* _tmp32_; + GeeCollection* _tmp33_; + GeeCollection* _tmp34_; + GeeIterator* _tmp35_ = NULL; + GeeIterator* _tmp36_; + GeeIterator* _devgrp_it; + _tmp30_ = m; + _tmp31_ = _tmp30_->priv->devices; + _tmp32_ = gee_map_get_values ((GeeMap*) _tmp31_); + _tmp33_ = _tmp32_; + _tmp34_ = _tmp33_; + _tmp35_ = gee_iterable_iterator ((GeeIterable*) _tmp34_); + _tmp36_ = _tmp35_; + _g_object_unref0 (_tmp34_); + _devgrp_it = _tmp36_; + while (TRUE) { + GeeIterator* _tmp37_; + gboolean _tmp38_ = FALSE; + GeeIterator* _tmp39_; + gpointer _tmp40_ = NULL; + DVBDeviceGroup* devgrp; + DVBDeviceGroup* _tmp41_; + _tmp37_ = _devgrp_it; + _tmp38_ = gee_iterator_next (_tmp37_); + if (!_tmp38_) { + break; + } + _tmp39_ = _devgrp_it; + _tmp40_ = gee_iterator_get (_tmp39_); + devgrp = (DVBDeviceGroup*) _tmp40_; + _tmp41_ = devgrp; + dvb_device_group_destroy (_tmp41_); + _g_object_unref0 (devgrp); } - _tmp13_ = gee_iterator_get (_devgrp_it); - devgrp = (DVBDeviceGroup*) _tmp13_; - dvb_device_group_destroy (devgrp); - _g_object_unref0 (devgrp); - } - _g_object_unref0 (_devgrp_it); - } - gee_abstract_map_clear ((GeeAbstractMap*) m->priv->devices); - __finally75: - g_static_rec_mutex_unlock (&m->priv->__lock_devices); + _g_object_unref0 (_devgrp_it); + } + _tmp42_ = m; + _tmp43_ = _tmp42_->priv->devices; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp43_); + } + __finally86: + { + DVBManager* _tmp44_; + GeeHashMap* _tmp45_; + _tmp44_ = m; + _tmp45_ = _tmp44_->priv->devices; + g_static_rec_mutex_unlock (&_tmp44_->priv->__lock_devices); + } if (_inner_error_ != NULL) { _g_object_unref0 (m); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -700,9 +806,8 @@ return; } } - _tmp14_ = NULL; _g_object_unref0 (dvb_manager_instance); - dvb_manager_instance = _tmp14_; + dvb_manager_instance = NULL; } g_static_rec_mutex_unlock (&dvb_manager_instance_mutex); _g_object_unref0 (m); @@ -725,211 +830,219 @@ static gboolean dvb_manager_real_GetScannerForDevice (DVBIDBusManager* base, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error) { DVBManager * self; - char* _opath = NULL; - gchar* _dbusiface = NULL; + char* _vala_opath = NULL; + gchar* _vala_dbusiface = NULL; gboolean result = FALSE; - gchar* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + gchar* _tmp2_ = NULL; gchar* path; - char* _tmp1_ = NULL; - char* _tmp2_; - DVBDevice* device; - DVBDevice* _tmp3_ = NULL; + const gchar* _tmp3_; + char* _tmp4_; + DVBDevice* device = NULL; + guint _tmp5_; + guint _tmp6_; + DVBDevice* _tmp7_ = NULL; DVBDevice* reg_dev; - DVBAdapterType _tmp10_; + DVBDevice* _tmp8_; + DVBDevice* _tmp17_; + DVBAdapterType _tmp18_; + DVBAdapterType _tmp19_; + const gchar* _tmp21_; GError * _inner_error_ = NULL; self = (DVBManager*) base; - _tmp0_ = g_strdup_printf (DVB_CONSTANTS_DBUS_SCANNER_PATH, adapter, frontend); - path = _tmp0_; - _tmp1_ = g_strdup (path); - _tmp2_ = _tmp1_; - _g_free0 (_opath); - _opath = _tmp2_; - device = NULL; - _tmp3_ = dvb_manager_get_registered_device (self, adapter, frontend); - reg_dev = _tmp3_; - if (reg_dev == NULL) { - DVBDevice* _tmp4_ = NULL; - DVBDevice* _tmp5_; - _tmp4_ = dvb_device_new_with_type (adapter, frontend); - _tmp5_ = _tmp4_; + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = g_strdup_printf (DVB_CONSTANTS_DBUS_SCANNER_PATH, _tmp0_, _tmp1_); + path = _tmp2_; + _tmp3_ = path; + _tmp4_ = g_strdup (_tmp3_); + _g_free0 (_vala_opath); + _vala_opath = _tmp4_; + _tmp5_ = adapter; + _tmp6_ = frontend; + _tmp7_ = dvb_manager_get_registered_device (self, _tmp5_, _tmp6_); + reg_dev = _tmp7_; + _tmp8_ = reg_dev; + if (_tmp8_ == NULL) { + guint _tmp9_; + guint _tmp10_; + DVBDevice* _tmp11_ = NULL; + _tmp9_ = adapter; + _tmp10_ = frontend; + _tmp11_ = dvb_device_new_with_type (_tmp9_, _tmp10_); _g_object_unref0 (device); - device = _tmp5_; + device = _tmp11_; } else { - DVBDeviceGroup* _tmp6_ = NULL; - DVBDeviceGroup* _tmp7_; - DVBDevice* _tmp8_; - DVBDevice* _tmp9_; - _tmp6_ = dvb_manager_get_device_group_of_device (self, reg_dev); - _tmp7_ = _tmp6_; - dvb_device_group_stop_epg_scanner (_tmp7_); - _g_object_unref0 (_tmp7_); - _tmp8_ = _g_object_ref0 (reg_dev); - _tmp9_ = _tmp8_; + DVBDevice* _tmp12_; + DVBDeviceGroup* _tmp13_ = NULL; + DVBDeviceGroup* _tmp14_; + DVBDevice* _tmp15_; + DVBDevice* _tmp16_; + _tmp12_ = reg_dev; + _tmp13_ = dvb_manager_get_device_group_of_device (self, _tmp12_); + _tmp14_ = _tmp13_; + dvb_device_group_stop_epg_scanner (_tmp14_); + _g_object_unref0 (_tmp14_); + _tmp15_ = reg_dev; + _tmp16_ = _g_object_ref0 (_tmp15_); _g_object_unref0 (device); - device = _tmp9_; + device = _tmp16_; } - _tmp10_ = dvb_device_get_Type (device); - switch (_tmp10_) { - case DVB_ADAPTER_TYPE_DVB_T: - { - gchar* _tmp11_; - gchar* _tmp12_; - _tmp11_ = g_strdup ("org.gnome.DVB.Scanner.Terrestrial"); - _tmp12_ = _tmp11_; - _g_free0 (_dbusiface); - _dbusiface = _tmp12_; - break; - } - case DVB_ADAPTER_TYPE_DVB_S: - { - gchar* _tmp13_; - gchar* _tmp14_; - _tmp13_ = g_strdup ("org.gnome.DVB.Scanner.Satellite"); - _tmp14_ = _tmp13_; - _g_free0 (_dbusiface); - _dbusiface = _tmp14_; - break; - } + _tmp17_ = device; + _tmp18_ = dvb_device_get_Type (_tmp17_); + _tmp19_ = _tmp18_; + switch (_tmp19_) { case DVB_ADAPTER_TYPE_DVB_C: + case DVB_ADAPTER_TYPE_DVB_S: + case DVB_ADAPTER_TYPE_DVB_T: { - gchar* _tmp15_; - gchar* _tmp16_; - _tmp15_ = g_strdup ("org.gnome.DVB.Scanner.Cable"); - _tmp16_ = _tmp15_; - _g_free0 (_dbusiface); - _dbusiface = _tmp16_; + gchar* _tmp20_; + _tmp20_ = g_strdup ("org.gnome.DVB.Scanner"); + _g_free0 (_vala_dbusiface); + _vala_dbusiface = _tmp20_; break; } default: { - gchar* _tmp17_; - _tmp17_ = NULL; - _g_free0 (_dbusiface); - _dbusiface = _tmp17_; + _g_free0 (_vala_dbusiface); + _vala_dbusiface = NULL; break; } } - if (_dbusiface == NULL) { - gchar* _tmp18_; - gchar* _tmp19_; - g_critical ("Manager.vala:138: Unknown adapter type"); - _tmp18_ = g_strdup (""); - _tmp19_ = _tmp18_; - _g_free0 (_dbusiface); - _dbusiface = _tmp19_; + _tmp21_ = _vala_dbusiface; + if (_tmp21_ == NULL) { + DVBLoggingLogger* _tmp22_; + gchar* _tmp23_; + _tmp22_ = dvb_manager_log; + dvb_logging_logger_error (_tmp22_, "Manager.vala:141: Unknown adapter type"); + _tmp23_ = g_strdup (""); + _g_free0 (_vala_dbusiface); + _vala_dbusiface = _tmp23_; result = FALSE; _g_object_unref0 (reg_dev); _g_object_unref0 (device); _g_free0 (path); if (opath) { - *opath = _opath; + *opath = _vala_opath; } else { - _g_free0 (_opath); + _g_free0 (_vala_opath); } if (dbusiface) { - *dbusiface = _dbusiface; + *dbusiface = _vala_dbusiface; } else { - _g_free0 (_dbusiface); + _g_free0 (_vala_dbusiface); } return result; } { - gboolean _tmp20_; + GeeHashMap* _tmp24_; + _tmp24_ = self->priv->scanners; g_static_rec_mutex_lock (&self->priv->__lock_scanners); - _tmp20_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->scanners, path); - if (!_tmp20_) { - DVBScanner* scanner; - DVBAdapterType _tmp21_; - DBusGConnection* _tmp28_ = NULL; - DBusGConnection* conn; - scanner = NULL; - _tmp21_ = dvb_device_get_Type (device); - switch (_tmp21_) { - case DVB_ADAPTER_TYPE_DVB_T: - { - DVBTerrestrialScanner* _tmp22_ = NULL; - DVBScanner* _tmp23_; - _tmp22_ = dvb_terrestrial_scanner_new (device); - _tmp23_ = (DVBScanner*) _tmp22_; - _g_object_unref0 (scanner); - scanner = _tmp23_; - break; - } - case DVB_ADAPTER_TYPE_DVB_S: - { - DVBSatelliteScanner* _tmp24_ = NULL; - DVBScanner* _tmp25_; - _tmp24_ = dvb_satellite_scanner_new (device); - _tmp25_ = (DVBScanner*) _tmp24_; - _g_object_unref0 (scanner); - scanner = _tmp25_; - break; - } - case DVB_ADAPTER_TYPE_DVB_C: - { - DVBCableScanner* _tmp26_ = NULL; - DVBScanner* _tmp27_; - _tmp26_ = dvb_cable_scanner_new (device); - _tmp27_ = (DVBScanner*) _tmp26_; - _g_object_unref0 (scanner); - scanner = _tmp27_; + { + GeeHashMap* _tmp25_; + const gchar* _tmp26_; + gboolean _tmp27_ = FALSE; + _tmp25_ = self->priv->scanners; + _tmp26_ = path; + _tmp27_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp25_, _tmp26_); + if (!_tmp27_) { + DVBManagerScannerData* _tmp28_; + DVBManagerScannerData* data; + DVBDevice* _tmp29_; + DVBAdapterType _tmp30_; + DVBAdapterType _tmp31_; + GDBusConnection* _tmp41_; + const gchar* _tmp42_; + DVBManagerScannerData* _tmp43_; + DVBScanner* _tmp44_; + DVBManagerScannerData* _tmp45_; + DVBManagerScannerData* _tmp46_; + DVBScanner* _tmp47_; + gulong _tmp48_ = 0UL; + GeeHashMap* _tmp49_; + const gchar* _tmp50_; + DVBManagerScannerData* _tmp51_; + DVBLoggingLogger* _tmp52_; + guint _tmp53_; + guint _tmp54_; + const gchar* _tmp55_; + _tmp28_ = dvb_manager_scanner_data_new (); + data = _tmp28_; + _tmp29_ = device; + _tmp30_ = dvb_device_get_Type (_tmp29_); + _tmp31_ = _tmp30_; + switch (_tmp31_) { + case DVB_ADAPTER_TYPE_DVB_T: + { + DVBManagerScannerData* _tmp32_; + DVBDevice* _tmp33_; + DVBTerrestrialScanner* _tmp34_; + _tmp32_ = data; + _tmp33_ = device; + _tmp34_ = dvb_terrestrial_scanner_new (_tmp33_); + _g_object_unref0 (_tmp32_->scanner); + _tmp32_->scanner = (DVBScanner*) _tmp34_; + break; + } + case DVB_ADAPTER_TYPE_DVB_S: + { + DVBManagerScannerData* _tmp35_; + DVBDevice* _tmp36_; + DVBSatelliteScanner* _tmp37_; + _tmp35_ = data; + _tmp36_ = device; + _tmp37_ = dvb_satellite_scanner_new (_tmp36_); + _g_object_unref0 (_tmp35_->scanner); + _tmp35_->scanner = (DVBScanner*) _tmp37_; + break; + } + case DVB_ADAPTER_TYPE_DVB_C: + { + DVBManagerScannerData* _tmp38_; + DVBDevice* _tmp39_; + DVBCableScanner* _tmp40_; + _tmp38_ = data; + _tmp39_ = device; + _tmp40_ = dvb_cable_scanner_new (_tmp39_); + _g_object_unref0 (_tmp38_->scanner); + _tmp38_->scanner = (DVBScanner*) _tmp40_; + break; + } + default: break; } + _tmp41_ = main_conn; + _tmp42_ = path; + _tmp43_ = data; + _tmp44_ = _tmp43_->scanner; + dvb_utils_dbus_register_object (DVB_TYPE_ID_BUS_SCANNER, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp41_, _tmp42_, DVB_ID_BUS_SCANNER (_tmp44_)); + _tmp45_ = data; + _tmp46_ = data; + _tmp47_ = _tmp46_->scanner; + _tmp48_ = g_signal_connect_object (_tmp47_, "destroyed", (GCallback) _dvb_manager_on_scanner_destroyed_dvb_scanner_destroyed, self, 0); + _tmp45_->signal_id = _tmp48_; + _tmp49_ = self->priv->scanners; + _tmp50_ = path; + _tmp51_ = data; + gee_abstract_map_set ((GeeAbstractMap*) _tmp49_, _tmp50_, _tmp51_); + _tmp52_ = dvb_manager_log; + _tmp53_ = adapter; + _tmp54_ = frontend; + _tmp55_ = _vala_dbusiface; + dvb_logging_logger_debug (_tmp52_, "Manager.vala:169: Created new Scanner D-Bus service for adapter %u, fr" \ +"ontend %u (%s)", _tmp53_, _tmp54_, _tmp55_); + _g_object_unref0 (data); } - if (scanner == NULL) { - g_critical ("Manager.vala:161: Unknown adapter type"); - result = FALSE; - _g_object_unref0 (scanner); - g_static_rec_mutex_unlock (&self->priv->__lock_scanners); - _g_object_unref0 (reg_dev); - _g_object_unref0 (device); - _g_free0 (path); - if (opath) { - *opath = _opath; - } else { - _g_free0 (_opath); - } - if (dbusiface) { - *dbusiface = _dbusiface; - } else { - _g_free0 (_dbusiface); - } - return result; - } - g_signal_connect_object (scanner, "destroyed", (GCallback) _dvb_manager_on_scanner_destroyed_dvb_scanner_destroyed, self, 0); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->scanners, path, scanner); - _tmp28_ = dvb_utils_get_dbus_connection (); - conn = _tmp28_; - if (conn == NULL) { - result = FALSE; - _dbus_g_connection_unref0 (conn); - _g_object_unref0 (scanner); - g_static_rec_mutex_unlock (&self->priv->__lock_scanners); - _g_object_unref0 (reg_dev); - _g_object_unref0 (device); - _g_free0 (path); - if (opath) { - *opath = _opath; - } else { - _g_free0 (_opath); - } - if (dbusiface) { - *dbusiface = _dbusiface; - } else { - _g_free0 (_dbusiface); - } - return result; - } - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) scanner); - g_debug ("Manager.vala:176: Created new Scanner D-Bus service for adapter %u, fr" \ -"ontend %u (%s)", adapter, frontend, _dbusiface); - _dbus_g_connection_unref0 (conn); - _g_object_unref0 (scanner); } - __finally76: - g_static_rec_mutex_unlock (&self->priv->__lock_scanners); + __finally87: + { + GeeHashMap* _tmp56_; + _tmp56_ = self->priv->scanners; + g_static_rec_mutex_unlock (&self->priv->__lock_scanners); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (reg_dev); _g_object_unref0 (device); @@ -950,14 +1063,14 @@ _g_object_unref0 (device); _g_free0 (path); if (opath) { - *opath = _opath; + *opath = _vala_opath; } else { - _g_free0 (_opath); + _g_free0 (_vala_opath); } if (dbusiface) { - *dbusiface = _dbusiface; + *dbusiface = _vala_dbusiface; } else { - _g_free0 (_dbusiface); + _g_free0 (_vala_dbusiface); } return result; } @@ -970,41 +1083,51 @@ */ static gboolean dvb_manager_real_GetDeviceGroup (DVBIDBusManager* base, guint group_id, char** opath, GError** error) { DVBManager * self; - char* _opath = NULL; + char* _vala_opath = NULL; gboolean result = FALSE; gboolean ret = FALSE; GError * _inner_error_ = NULL; self = (DVBManager*) base; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - if (_tmp0_) { - gchar* _tmp1_ = NULL; - gchar* _tmp2_; - char* _tmp3_ = NULL; - char* _tmp4_; - _tmp1_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, group_id); - _tmp2_ = _tmp1_; - _tmp3_ = g_strdup (_tmp2_); - _tmp4_ = _tmp3_; - _g_free0 (_opath); - _opath = _tmp4_; - _g_free0 (_tmp2_); - ret = TRUE; - } else { - char* _tmp5_ = NULL; - char* _tmp6_; - _tmp5_ = g_strdup (""); - _tmp6_ = _tmp5_; - _g_free0 (_opath); - _opath = _tmp6_; - ret = FALSE; + { + GeeHashMap* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->devices; + _tmp2_ = group_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + guint _tmp4_; + gchar* _tmp5_ = NULL; + gchar* _tmp6_; + char* _tmp7_; + _tmp4_ = group_id; + _tmp5_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, _tmp4_); + _tmp6_ = _tmp5_; + _tmp7_ = g_strdup (_tmp6_); + _g_free0 (_vala_opath); + _vala_opath = _tmp7_; + _g_free0 (_tmp6_); + ret = TRUE; + } else { + char* _tmp8_; + _tmp8_ = g_strdup (""); + _g_free0 (_vala_opath); + _vala_opath = _tmp8_; + ret = FALSE; + } + } + __finally88: + { + GeeHashMap* _tmp9_; + _tmp9_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); } - __finally77: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1016,9 +1139,9 @@ } result = ret; if (opath) { - *opath = _opath; + *opath = _vala_opath; } else { - _g_free0 (_opath); + _g_free0 (_vala_opath); } return result; } @@ -1030,64 +1153,95 @@ static char** dvb_manager_real_GetRegisteredDeviceGroups (DVBIDBusManager* base, int* result_length1, GError** error) { DVBManager * self; char** result = NULL; - gint _tmp0_; - char** _tmp1_ = NULL; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; + char** _tmp3_ = NULL; + char** devs; gint devs_length1; gint _devs_size_; - char** _tmp2_; - char** devs; gint i; - char** _tmp13_; + char** _tmp24_; + gint _tmp24__length1; GError * _inner_error_ = NULL; self = (DVBManager*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->devices); - _tmp1_ = g_new0 (char*, _tmp0_ + 1); + _tmp0_ = self->priv->devices; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); _tmp2_ = _tmp1_; - devs_length1 = _tmp0_; + _tmp3_ = g_new0 (char*, _tmp2_ + 1); + devs = _tmp3_; + devs_length1 = _tmp2_; _devs_size_ = devs_length1; - devs = _tmp2_; i = 0; { + GeeHashMap* _tmp4_; + _tmp4_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp3_ = NULL; - GeeSet* _tmp4_; - GeeIterator* _tmp5_ = NULL; - GeeIterator* _tmp6_; - GeeIterator* _key_it; - _tmp3_ = gee_map_get_keys ((GeeMap*) self->priv->devices); - _tmp4_ = _tmp3_; - _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); - _key_it = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - guint key; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - char* _tmp11_ = NULL; - char* _tmp12_; - _tmp7_ = gee_iterator_next (_key_it); - if (!_tmp7_) { - break; - } - _tmp8_ = gee_iterator_get (_key_it); - key = GPOINTER_TO_UINT (_tmp8_); - _tmp9_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, key); + { + GeeHashMap* _tmp5_; + GeeSet* _tmp6_; + GeeSet* _tmp7_; + GeeSet* _tmp8_; + GeeIterator* _tmp9_ = NULL; + GeeIterator* _tmp10_; + GeeIterator* _key_it; + _tmp5_ = self->priv->devices; + _tmp6_ = gee_map_get_keys ((GeeMap*) _tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = _tmp7_; + _tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_); _tmp10_ = _tmp9_; - _tmp11_ = g_strdup (_tmp10_); - _tmp12_ = _tmp11_; - _g_free0 (devs[i]); - devs[i] = _tmp12_; - _g_free0 (_tmp10_); - i++; + _g_object_unref0 (_tmp8_); + _key_it = _tmp10_; + while (TRUE) { + GeeIterator* _tmp11_; + gboolean _tmp12_ = FALSE; + GeeIterator* _tmp13_; + gpointer _tmp14_ = NULL; + guint key; + char** _tmp15_; + gint _tmp15__length1; + gint _tmp16_; + guint _tmp17_; + gchar* _tmp18_ = NULL; + gchar* _tmp19_; + char* _tmp20_; + char* _tmp21_; + gint _tmp22_; + _tmp11_ = _key_it; + _tmp12_ = gee_iterator_next (_tmp11_); + if (!_tmp12_) { + break; + } + _tmp13_ = _key_it; + _tmp14_ = gee_iterator_get (_tmp13_); + key = GPOINTER_TO_UINT (_tmp14_); + _tmp15_ = devs; + _tmp15__length1 = devs_length1; + _tmp16_ = i; + _tmp17_ = key; + _tmp18_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, _tmp17_); + _tmp19_ = _tmp18_; + _tmp20_ = g_strdup (_tmp19_); + _g_free0 (_tmp15_[_tmp16_]); + _tmp15_[_tmp16_] = _tmp20_; + _tmp21_ = _tmp15_[_tmp16_]; + _g_free0 (_tmp19_); + _tmp22_ = i; + i = _tmp22_ + 1; + } + _g_object_unref0 (_key_it); } - _g_object_unref0 (_key_it); } - __finally78: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + __finally89: + { + GeeHashMap* _tmp23_; + _tmp23_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); devs = (_vala_array_free (devs, devs_length1, (GDestroyNotify) g_free), NULL); return NULL; @@ -1099,9 +1253,12 @@ } } } - _tmp13_ = devs; - *result_length1 = devs_length1; - result = _tmp13_; + _tmp24_ = devs; + _tmp24__length1 = devs_length1; + if (result_length1) { + *result_length1 = _tmp24__length1; + } + result = _tmp24_; return result; } @@ -1122,50 +1279,75 @@ static gboolean dvb_manager_real_AddDeviceToNewGroup (DVBIDBusManager* base, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error) { DVBManager * self; gboolean result = FALSE; - GFile* _tmp0_ = NULL; - GFile* chan_file; + const gchar* _tmp0_; GFile* _tmp1_ = NULL; + GFile* chan_file; + const gchar* _tmp2_; + GFile* _tmp3_ = NULL; GFile* rec_dir; - DVBDevice* device; - DVBDevice* _tmp2_ = NULL; - DVBDevice* _tmp3_; - DVBDevice* _tmp4_; - gboolean _tmp5_; - DVBDeviceGroup* _tmp6_ = NULL; + DVBDevice* device = NULL; + DVBDevice* _tmp13_; + gboolean _tmp14_ = FALSE; + guint _tmp15_; + guint _tmp16_; + DVBDevice* _tmp17_; + DVBDeviceGroup* _tmp18_; DVBDeviceGroup* devgroup; + DVBDeviceGroup* _tmp19_; + const gchar* _tmp20_; + DVBDeviceGroup* _tmp21_; + guint _tmp22_; GError * _inner_error_ = NULL; self = (DVBManager*) base; g_return_val_if_fail (channels_conf != NULL, FALSE); g_return_val_if_fail (recordings_dir != NULL, FALSE); g_return_val_if_fail (name != NULL, FALSE); - _tmp0_ = g_file_new_for_path (channels_conf); - chan_file = _tmp0_; - _tmp1_ = g_file_new_for_path (recordings_dir); - rec_dir = _tmp1_; - device = NULL; - _tmp2_ = dvb_device_new_full (adapter, frontend, chan_file, rec_dir, self->priv->device_group_counter + 1, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DEVICE_ERROR) { - goto __catch79_dvb_device_error; + _tmp0_ = channels_conf; + _tmp1_ = g_file_new_for_path (_tmp0_); + chan_file = _tmp1_; + _tmp2_ = recordings_dir; + _tmp3_ = g_file_new_for_path (_tmp2_); + rec_dir = _tmp3_; + { + guint _tmp4_; + guint _tmp5_; + GFile* _tmp6_; + GFile* _tmp7_; + DVBDevice* _tmp8_ = NULL; + DVBDevice* _tmp9_; + _tmp4_ = adapter; + _tmp5_ = frontend; + _tmp6_ = chan_file; + _tmp7_ = rec_dir; + _tmp8_ = dvb_device_new_full (_tmp4_, _tmp5_, _tmp6_, _tmp7_, &_inner_error_); + _tmp9_ = _tmp8_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DEVICE_ERROR) { + goto __catch90_dvb_device_error; + } + _g_object_unref0 (device); + _g_object_unref0 (rec_dir); + _g_object_unref0 (chan_file); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } _g_object_unref0 (device); - _g_object_unref0 (rec_dir); - _g_object_unref0 (chan_file); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + device = _tmp9_; } - _tmp4_ = _tmp3_; - _g_object_unref0 (device); - device = _tmp4_; - goto __finally79; - __catch79_dvb_device_error: + goto __finally90; + __catch90_dvb_device_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp10_; + GError* _tmp11_; + const gchar* _tmp12_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:246: Could not create device: %s", e->message); + _tmp10_ = dvb_manager_log; + _tmp11_ = e; + _tmp12_ = _tmp11_->message; + dvb_logging_logger_error (_tmp10_, "Manager.vala:239: Could not create device: %s", _tmp12_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (device); @@ -1173,9 +1355,9 @@ _g_object_unref0 (chan_file); return result; } - __finally79: + __finally90: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (device); _g_object_unref0 (rec_dir); @@ -1190,20 +1372,28 @@ return FALSE; } } - _tmp5_ = dvb_manager_device_is_in_any_group (self, device); - if (_tmp5_) { + _tmp13_ = device; + _tmp14_ = dvb_manager_device_is_in_any_group (self, _tmp13_); + if (_tmp14_) { result = FALSE; _g_object_unref0 (device); _g_object_unref0 (rec_dir); _g_object_unref0 (chan_file); return result; } - self->priv->device_group_counter++; - _tmp6_ = dvb_device_group_new (self->priv->device_group_counter, device, TRUE); - devgroup = _tmp6_; - dvb_device_group_set_Name (devgroup, name); - dvb_manager_restore_device_group (self, devgroup); - g_signal_emit_by_name ((DVBIDBusManager*) self, "group-added", self->priv->device_group_counter); + _tmp15_ = self->priv->device_group_counter; + self->priv->device_group_counter = _tmp15_ + 1; + _tmp16_ = self->priv->device_group_counter; + _tmp17_ = device; + _tmp18_ = dvb_device_group_new (_tmp16_, _tmp17_, TRUE); + devgroup = _tmp18_; + _tmp19_ = devgroup; + _tmp20_ = name; + dvb_device_group_set_Name (_tmp19_, _tmp20_); + _tmp21_ = devgroup; + dvb_manager_restore_device_group (self, _tmp21_, TRUE); + _tmp22_ = self->priv->device_group_counter; + g_signal_emit_by_name ((DVBIDBusManager*) self, "group-added", _tmp22_); result = TRUE; _g_object_unref0 (devgroup); _g_object_unref0 (device); @@ -1224,51 +1414,57 @@ */ static gboolean dvb_manager_real_GetNameOfRegisteredDevice (DVBIDBusManager* base, guint adapter, guint frontend, gchar** name, GError** error) { DVBManager * self; - gchar* _name = NULL; + gchar* _vala_name = NULL; gboolean result = FALSE; - DVBDevice* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_ = NULL; DVBDevice* dev; + DVBDevice* _tmp3_; self = (DVBManager*) base; - _tmp0_ = dvb_manager_get_registered_device (self, adapter, frontend); - dev = _tmp0_; - if (dev == NULL) { - gchar* _tmp1_; - gchar* _tmp2_; - _tmp1_ = g_strdup (""); - _tmp2_ = _tmp1_; - _g_free0 (_name); - _name = _tmp2_; + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_manager_get_registered_device (self, _tmp0_, _tmp1_); + dev = _tmp2_; + _tmp3_ = dev; + if (_tmp3_ == NULL) { + gchar* _tmp4_; + _tmp4_ = g_strdup (""); + _g_free0 (_vala_name); + _vala_name = _tmp4_; result = FALSE; _g_object_unref0 (dev); if (name) { - *name = _name; + *name = _vala_name; } else { - _g_free0 (_name); + _g_free0 (_vala_name); } return result; } else { - const gchar* _tmp3_ = NULL; - gchar* _tmp4_; - gchar* _tmp5_; - _tmp3_ = dvb_device_get_Name (dev); - _tmp4_ = g_strdup (_tmp3_); - _tmp5_ = _tmp4_; - _g_free0 (_name); - _name = _tmp5_; + DVBDevice* _tmp5_; + const gchar* _tmp6_; + const gchar* _tmp7_; + gchar* _tmp8_; + _tmp5_ = dev; + _tmp6_ = dvb_device_get_Name (_tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = g_strdup (_tmp7_); + _g_free0 (_vala_name); + _vala_name = _tmp8_; result = TRUE; _g_object_unref0 (dev); if (name) { - *name = _name; + *name = _vala_name; } else { - _g_free0 (_name); + _g_free0 (_vala_name); } return result; } _g_object_unref0 (dev); if (name) { - *name = _name; + *name = _vala_name; } else { - _g_free0 (_name); + _g_free0 (_vala_name); } } @@ -1279,10 +1475,14 @@ static gint dvb_manager_real_GetDeviceGroupSize (DVBIDBusManager* base, GError** error) { DVBManager * self; gint result = 0; - gint _tmp0_; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; self = (DVBManager*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->devices); - result = _tmp0_; + _tmp0_ = self->priv->devices; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + result = _tmp2_; return result; } @@ -1304,60 +1504,80 @@ static DVBChannelGroupInfo* dvb_manager_real_GetChannelGroups (DVBIDBusManager* base, int* result_length1, GError** error) { DVBManager * self; DVBChannelGroupInfo* result = NULL; - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config; - GeeList* groups; - GeeList* _tmp1_ = NULL; - GeeList* _tmp2_; - GeeList* _tmp3_; - gint _tmp6_; - DVBChannelGroupInfo* _tmp7_ = NULL; + GeeList* groups = NULL; + GeeList* _tmp12_; + gint _tmp13_; + gint _tmp14_; + DVBChannelGroupInfo* _tmp15_ = NULL; + DVBChannelGroupInfo* arr; gint arr_length1; gint _arr_size_; - DVBChannelGroupInfo* _tmp8_; - DVBChannelGroupInfo* arr; - DVBChannelGroupInfo* _tmp18_; + DVBChannelGroupInfo* _tmp39_; + gint _tmp39__length1; GError * _inner_error_ = NULL; self = (DVBManager*) base; - _tmp0_ = dvb_factory_get_config_store (); - config = _tmp0_; - groups = NULL; - _tmp1_ = dvb_database_config_store_get_channel_groups (config, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch80_dvb_database_sql_error; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + config = _tmp3_; + { + DVBdatabaseConfigStore* _tmp4_; + GeeList* _tmp5_ = NULL; + GeeList* _tmp6_; + _tmp4_ = config; + _tmp5_ = dvb_database_config_store_get_channel_groups (_tmp4_, &_inner_error_); + _tmp6_ = _tmp5_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch91_dvb_database_sql_error; + } + _g_object_unref0 (groups); + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_object_unref0 (groups); - _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + groups = _tmp6_; } - _tmp3_ = _tmp2_; - _g_object_unref0 (groups); - groups = _tmp3_; - goto __finally80; - __catch80_dvb_database_sql_error: - { - GError * e; - DVBChannelGroupInfo* _tmp4_ = NULL; - DVBChannelGroupInfo* _tmp5_; + goto __finally91; + __catch91_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp7_; + GError* _tmp8_; + const gchar* _tmp9_; + DVBChannelGroupInfo* _tmp10_ = NULL; + DVBChannelGroupInfo* _tmp11_; + gint _tmp11__length1; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:304: %s", e->message); - _tmp4_ = g_new0 (DVBChannelGroupInfo, 0); - _tmp5_ = _tmp4_; - *result_length1 = 0; - result = _tmp5_; + _tmp7_ = dvb_manager_log; + _tmp8_ = e; + _tmp9_ = _tmp8_->message; + dvb_logging_logger_error (_tmp7_, "Manager.vala:297: %s", _tmp9_); + _tmp10_ = g_new0 (DVBChannelGroupInfo, 0); + _tmp11_ = _tmp10_; + _tmp11__length1 = 0; + if (result_length1) { + *result_length1 = _tmp11__length1; + } + result = _tmp11_; _g_error_free0 (e); _g_object_unref0 (groups); _g_object_unref0 (config); return result; } - __finally80: + __finally91: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (groups); _g_object_unref0 (config); @@ -1370,56 +1590,96 @@ return NULL; } } - _tmp6_ = gee_collection_get_size ((GeeCollection*) groups); - _tmp7_ = g_new0 (DVBChannelGroupInfo, _tmp6_); - _tmp8_ = _tmp7_; - arr_length1 = _tmp6_; + _tmp12_ = groups; + _tmp13_ = gee_collection_get_size ((GeeCollection*) _tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = g_new0 (DVBChannelGroupInfo, _tmp14_); + arr = _tmp15_; + arr_length1 = _tmp14_; _arr_size_ = arr_length1; - arr = _tmp8_; { gint i; i = 0; { - gboolean _tmp9_; - _tmp9_ = TRUE; + gboolean _tmp16_; + _tmp16_ = TRUE; while (TRUE) { - gpointer _tmp10_ = NULL; + gboolean _tmp17_; + gint _tmp19_; + DVBChannelGroupInfo* _tmp20_; + gint _tmp20__length1; + GeeList* _tmp21_; + gint _tmp22_; + gpointer _tmp23_ = NULL; DVBChannelGroup* cg; - DVBChannelGroupInfo _tmp11_ = {0}; - DVBChannelGroupInfo _tmp12_ = {0}; - DVBChannelGroupInfo _tmp13_; - gint _tmp14_; - const gchar* _tmp15_ = NULL; - gchar* _tmp16_; - gchar* _tmp17_; - if (!_tmp9_) { - i++; - } - _tmp9_ = FALSE; - if (!(i < arr_length1)) { + DVBChannelGroupInfo* _tmp24_; + gint _tmp24__length1; + gint _tmp25_; + DVBChannelGroupInfo _tmp26_ = {0}; + DVBChannelGroupInfo _tmp27_; + DVBChannelGroupInfo* _tmp28_; + gint _tmp28__length1; + gint _tmp29_; + DVBChannelGroup* _tmp30_; + gint _tmp31_; + gint _tmp32_; + DVBChannelGroupInfo* _tmp33_; + gint _tmp33__length1; + gint _tmp34_; + DVBChannelGroup* _tmp35_; + const gchar* _tmp36_; + const gchar* _tmp37_; + gchar* _tmp38_; + _tmp17_ = _tmp16_; + if (!_tmp17_) { + gint _tmp18_; + _tmp18_ = i; + i = _tmp18_ + 1; + } + _tmp16_ = FALSE; + _tmp19_ = i; + _tmp20_ = arr; + _tmp20__length1 = arr_length1; + if (!(_tmp19_ < _tmp20__length1)) { break; } - _tmp10_ = gee_list_get (groups, i); - cg = (DVBChannelGroup*) _tmp10_; - memset (&_tmp11_, 0, sizeof (DVBChannelGroupInfo)); - _tmp12_ = _tmp11_; - _tmp13_ = _tmp12_; - dvb_channel_group_info_destroy (&arr[i]); - arr[i] = _tmp13_; - _tmp14_ = dvb_channel_group_get_id (cg); - arr[i].id = _tmp14_; - _tmp15_ = dvb_channel_group_get_name (cg); - _tmp16_ = g_strdup (_tmp15_); - _tmp17_ = _tmp16_; - _g_free0 (arr[i].name); - arr[i].name = _tmp17_; + _tmp21_ = groups; + _tmp22_ = i; + _tmp23_ = gee_list_get (_tmp21_, _tmp22_); + cg = (DVBChannelGroup*) _tmp23_; + _tmp24_ = arr; + _tmp24__length1 = arr_length1; + _tmp25_ = i; + memset (&_tmp26_, 0, sizeof (DVBChannelGroupInfo)); + dvb_channel_group_info_destroy (&_tmp24_[_tmp25_]); + _tmp24_[_tmp25_] = _tmp26_; + _tmp27_ = _tmp24_[_tmp25_]; + _tmp28_ = arr; + _tmp28__length1 = arr_length1; + _tmp29_ = i; + _tmp30_ = cg; + _tmp31_ = dvb_channel_group_get_id (_tmp30_); + _tmp32_ = _tmp31_; + _tmp28_[_tmp29_].id = _tmp32_; + _tmp33_ = arr; + _tmp33__length1 = arr_length1; + _tmp34_ = i; + _tmp35_ = cg; + _tmp36_ = dvb_channel_group_get_name (_tmp35_); + _tmp37_ = _tmp36_; + _tmp38_ = g_strdup (_tmp37_); + _g_free0 (_tmp33_[_tmp34_].name); + _tmp33_[_tmp34_].name = _tmp38_; _g_object_unref0 (cg); } } } - _tmp18_ = arr; - *result_length1 = arr_length1; - result = _tmp18_; + _tmp39_ = arr; + _tmp39__length1 = arr_length1; + if (result_length1) { + *result_length1 = _tmp39__length1; + } + result = _tmp39_; _g_object_unref0 (groups); _g_object_unref0 (config); return result; @@ -1432,45 +1692,62 @@ */ static gboolean dvb_manager_real_AddChannelGroup (DVBIDBusManager* base, const gchar* name, gint* channel_group_id, GError** error) { DVBManager * self; - gint _channel_group_id = 0; + gint _vala_channel_group_id = 0; gboolean result = FALSE; - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config; gboolean ret = FALSE; - gint _tmp1_; - gboolean _tmp2_; - gboolean _tmp3_; GError * _inner_error_ = NULL; self = (DVBManager*) base; g_return_val_if_fail (name != NULL, FALSE); - _tmp0_ = dvb_factory_get_config_store (); - config = _tmp0_; - _tmp2_ = dvb_database_config_store_add_channel_group (config, name, &_tmp1_, &_inner_error_); - _channel_group_id = _tmp1_; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch81_dvb_database_sql_error; + _g_object_unref0 (_tmp1_); + config = _tmp3_; + { + const gchar* _tmp4_; + gint _tmp5_ = 0; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_; + _tmp4_ = name; + _tmp6_ = dvb_database_config_store_add_channel_group (config, _tmp4_, &_tmp5_, &_inner_error_); + _vala_channel_group_id = _tmp5_; + _tmp7_ = _tmp6_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch92_dvb_database_sql_error; + } + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + ret = _tmp7_; } - ret = _tmp3_; - goto __finally81; - __catch81_dvb_database_sql_error: + goto __finally92; + __catch92_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp8_; + GError* _tmp9_; + const gchar* _tmp10_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:327: %s", e->message); + _tmp8_ = dvb_manager_log; + _tmp9_ = e; + _tmp10_ = _tmp9_->message; + dvb_logging_logger_error (_tmp8_, "Manager.vala:320: %s", _tmp10_); ret = FALSE; _g_error_free0 (e); } - __finally81: + __finally92: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (config); return FALSE; @@ -1484,7 +1761,7 @@ result = ret; _g_object_unref0 (config); if (channel_group_id) { - *channel_group_id = _channel_group_id; + *channel_group_id = _vala_channel_group_id; } return result; } @@ -1497,40 +1774,57 @@ static gboolean dvb_manager_real_RemoveChannelGroup (DVBIDBusManager* base, gint channel_group_id, GError** error) { DVBManager * self; gboolean result = FALSE; - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config; gboolean ret = FALSE; - gboolean _tmp1_; - gboolean _tmp2_; GError * _inner_error_ = NULL; self = (DVBManager*) base; - _tmp0_ = dvb_factory_get_config_store (); - config = _tmp0_; - _tmp1_ = dvb_database_config_store_remove_channel_group (config, channel_group_id, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch82_dvb_database_sql_error; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + config = _tmp3_; + { + gint _tmp4_; + gboolean _tmp5_ = FALSE; + gboolean _tmp6_; + _tmp4_ = channel_group_id; + _tmp5_ = dvb_database_config_store_remove_channel_group (config, _tmp4_, &_inner_error_); + _tmp6_ = _tmp5_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch93_dvb_database_sql_error; + } + _g_object_unref0 (config); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - _g_object_unref0 (config); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + ret = _tmp6_; } - ret = _tmp2_; - goto __finally82; - __catch82_dvb_database_sql_error: + goto __finally93; + __catch93_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp7_; + GError* _tmp8_; + const gchar* _tmp9_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:343: %s", e->message); + _tmp7_ = dvb_manager_log; + _tmp8_ = e; + _tmp9_ = _tmp8_->message; + dvb_logging_logger_error (_tmp7_, "Manager.vala:336: %s", _tmp9_); ret = FALSE; _g_error_free0 (e); } - __finally82: + __finally93: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (config); return FALSE; @@ -1553,11 +1847,13 @@ */ static gboolean string_contains (const gchar* self, const gchar* needle) { gboolean result = FALSE; - const gchar* _tmp0_ = NULL; + const gchar* _tmp0_; + gchar* _tmp1_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (needle != NULL, FALSE); - _tmp0_ = strstr (self, needle); - result = _tmp0_ != NULL; + _tmp0_ = needle; + _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_); + result = _tmp1_ != NULL; return result; } @@ -1592,111 +1888,161 @@ static GHashTable** dvb_manager_real_GetDevices (DVBIDBusManager* base, int* result_length1, GError** error) { DVBManager * self; GHashTable** result = NULL; - GList* _tmp0_ = NULL; + GUdevClient* _tmp0_; + GList* _tmp1_ = NULL; GList* devices; GList* devices_list; - guint _tmp25_; - GHashTable** _tmp26_ = NULL; + GList* _tmp50_; + guint _tmp51_ = 0U; + GHashTable** _tmp52_ = NULL; + GHashTable** arr; gint arr_length1; gint _arr_size_; - GHashTable** _tmp27_; - GHashTable** arr; - GHashTable** _tmp33_; + GHashTable** _tmp66_; + gint _tmp66__length1; self = (DVBManager*) base; - _tmp0_ = g_udev_client_query_by_subsystem (self->priv->udev_client, "dvb"); - devices = _tmp0_; + _tmp0_ = self->priv->udev_client; + _tmp1_ = g_udev_client_query_by_subsystem (_tmp0_, "dvb"); + devices = _tmp1_; devices_list = NULL; { gint i; i = 0; { - gboolean _tmp1_; - _tmp1_ = TRUE; + gboolean _tmp2_; + _tmp2_ = TRUE; while (TRUE) { - guint _tmp2_; - gconstpointer _tmp3_ = NULL; - GUdevDevice* _tmp4_; + gboolean _tmp3_; + gint _tmp5_; + GList* _tmp6_; + guint _tmp7_ = 0U; + GList* _tmp8_; + gint _tmp9_; + gconstpointer _tmp10_ = NULL; + GUdevDevice* _tmp11_; GUdevDevice* dev; - const gchar* _tmp5_ = NULL; - gchar* _tmp6_; + GUdevDevice* _tmp12_; + const gchar* _tmp13_ = NULL; + gchar* _tmp14_; gchar* device_file; - gboolean _tmp7_ = FALSE; - GHashTable* _tmp9_ = NULL; + gboolean _tmp15_ = FALSE; + const gchar* _tmp16_; + gboolean _tmp19_; + GHashFunc _tmp20_; + GEqualFunc _tmp21_; + GDestroyNotify _tmp22_; + GDestroyNotify _tmp23_; + GHashTable* _tmp24_; GHashTable* map; - GHashTable* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; - GUdevDevice* _tmp13_ = NULL; - GUdevDevice* _tmp14_; + GHashTable* _tmp25_; + GHashTable* _tmp26_; + GHashTable* _tmp27_; + gchar* _tmp28_; + const gchar* _tmp29_; + gchar* _tmp30_; + GUdevDevice* _tmp31_; + GUdevDevice* _tmp32_ = NULL; GUdevDevice* parent; - if (!_tmp1_) { - i++; - } - _tmp1_ = FALSE; - _tmp2_ = g_list_length (devices); - if (!(i < _tmp2_)) { + GUdevDevice* _tmp33_; + _tmp3_ = _tmp2_; + if (!_tmp3_) { + gint _tmp4_; + _tmp4_ = i; + i = _tmp4_ + 1; + } + _tmp2_ = FALSE; + _tmp5_ = i; + _tmp6_ = devices; + _tmp7_ = g_list_length (_tmp6_); + if (!(((guint) _tmp5_) < _tmp7_)) { break; } - _tmp3_ = g_list_nth_data (devices, (guint) i); - _tmp4_ = _g_object_ref0 ((GUdevDevice*) _tmp3_); - dev = _tmp4_; - _tmp5_ = g_udev_device_get_device_file (dev); - _tmp6_ = g_strdup (_tmp5_); - device_file = _tmp6_; - if (device_file == NULL) { - _tmp7_ = TRUE; + _tmp8_ = devices; + _tmp9_ = i; + _tmp10_ = g_list_nth_data (_tmp8_, (guint) _tmp9_); + _tmp11_ = _g_object_ref0 ((GUdevDevice*) _tmp10_); + dev = _tmp11_; + _tmp12_ = dev; + _tmp13_ = g_udev_device_get_device_file (_tmp12_); + _tmp14_ = g_strdup (_tmp13_); + device_file = _tmp14_; + _tmp16_ = device_file; + if (_tmp16_ == NULL) { + _tmp15_ = TRUE; } else { - gboolean _tmp8_; - _tmp8_ = string_contains (device_file, "frontend"); - _tmp7_ = !_tmp8_; + const gchar* _tmp17_; + gboolean _tmp18_ = FALSE; + _tmp17_ = device_file; + _tmp18_ = string_contains (_tmp17_, "frontend"); + _tmp15_ = !_tmp18_; } - if (_tmp7_) { + _tmp19_ = _tmp15_; + if (_tmp19_) { _g_free0 (device_file); _g_object_unref0 (dev); continue; } - _tmp9_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); - map = _tmp9_; - _tmp10_ = _g_hash_table_ref0 (map); - devices_list = g_list_prepend (devices_list, _tmp10_); - _tmp11_ = g_strdup ("device_file"); - _tmp12_ = g_strdup (device_file); - g_hash_table_insert (map, _tmp11_, _tmp12_); - _tmp13_ = g_udev_device_get_parent (dev); - _tmp14_ = _g_object_ref0 (_tmp13_); - parent = _tmp14_; - if (parent != NULL) { - gchar* attr; - const gchar* _tmp15_ = NULL; - gchar* _tmp16_; - gchar* _tmp17_; - const gchar* _tmp20_ = NULL; - gchar* _tmp21_; - gchar* _tmp22_; - attr = NULL; - _tmp15_ = g_udev_device_get_sysfs_attr (parent, "manufacturer"); - _tmp16_ = g_strdup (_tmp15_); - _tmp17_ = _tmp16_; + _tmp20_ = g_str_hash; + _tmp21_ = g_str_equal; + _tmp22_ = g_free; + _tmp23_ = g_free; + _tmp24_ = g_hash_table_new_full (_tmp20_, _tmp21_, _tmp22_, _tmp23_); + map = _tmp24_; + _tmp25_ = map; + _tmp26_ = _g_hash_table_ref0 (_tmp25_); + devices_list = g_list_prepend (devices_list, _tmp26_); + _tmp27_ = map; + _tmp28_ = g_strdup ("device_file"); + _tmp29_ = device_file; + _tmp30_ = g_strdup (_tmp29_); + g_hash_table_insert (_tmp27_, _tmp28_, _tmp30_); + _tmp31_ = dev; + _tmp32_ = g_udev_device_get_parent (_tmp31_); + parent = _tmp32_; + _tmp33_ = parent; + if (_tmp33_ != NULL) { + gchar* attr = NULL; + GUdevDevice* _tmp34_; + const gchar* _tmp35_ = NULL; + gchar* _tmp36_; + const gchar* _tmp37_; + GUdevDevice* _tmp42_; + const gchar* _tmp43_ = NULL; + gchar* _tmp44_; + const gchar* _tmp45_; + _tmp34_ = parent; + _tmp35_ = g_udev_device_get_sysfs_attr (_tmp34_, "manufacturer"); + _tmp36_ = g_strdup (_tmp35_); _g_free0 (attr); - attr = _tmp17_; - if (attr != NULL) { - gchar* _tmp18_; - gchar* _tmp19_; - _tmp18_ = g_strdup ("manufacturer"); - _tmp19_ = g_strdup (attr); - g_hash_table_insert (map, _tmp18_, _tmp19_); + attr = _tmp36_; + _tmp37_ = attr; + if (_tmp37_ != NULL) { + GHashTable* _tmp38_; + gchar* _tmp39_; + const gchar* _tmp40_; + gchar* _tmp41_; + _tmp38_ = map; + _tmp39_ = g_strdup ("manufacturer"); + _tmp40_ = attr; + _tmp41_ = g_strdup (_tmp40_); + g_hash_table_insert (_tmp38_, _tmp39_, _tmp41_); } - _tmp20_ = g_udev_device_get_sysfs_attr (parent, "product"); - _tmp21_ = g_strdup (_tmp20_); - _tmp22_ = _tmp21_; + _tmp42_ = parent; + _tmp43_ = g_udev_device_get_sysfs_attr (_tmp42_, "product"); + _tmp44_ = g_strdup (_tmp43_); _g_free0 (attr); - attr = _tmp22_; - if (attr != NULL) { - gchar* _tmp23_; - gchar* _tmp24_; - _tmp23_ = g_strdup ("product"); - _tmp24_ = g_strdup (attr); - g_hash_table_insert (map, _tmp23_, _tmp24_); + attr = _tmp44_; + _tmp45_ = attr; + if (_tmp45_ != NULL) { + GHashTable* _tmp46_; + gchar* _tmp47_; + const gchar* _tmp48_; + gchar* _tmp49_; + _tmp46_ = map; + _tmp47_ = g_strdup ("product"); + _tmp48_ = attr; + _tmp49_ = g_strdup (_tmp48_); + g_hash_table_insert (_tmp46_, _tmp47_, _tmp49_); } _g_free0 (attr); } @@ -1707,48 +2053,243 @@ } } } - _tmp25_ = g_list_length (devices_list); - _tmp26_ = g_new0 (GHashTable*, _tmp25_ + 1); - _tmp27_ = _tmp26_; - arr_length1 = _tmp25_; + _tmp50_ = devices_list; + _tmp51_ = g_list_length (_tmp50_); + _tmp52_ = g_new0 (GHashTable*, _tmp51_ + 1); + arr = _tmp52_; + arr_length1 = _tmp51_; _arr_size_ = arr_length1; - arr = _tmp27_; { gint i; i = 0; { - gboolean _tmp28_; - _tmp28_ = TRUE; + gboolean _tmp53_; + _tmp53_ = TRUE; while (TRUE) { - guint _tmp29_; - gconstpointer _tmp30_ = NULL; - GHashTable* _tmp31_; - GHashTable* _tmp32_; - if (!_tmp28_) { - i++; - } - _tmp28_ = FALSE; - _tmp29_ = g_list_length (devices_list); - if (!(i < _tmp29_)) { + gboolean _tmp54_; + gint _tmp56_; + GList* _tmp57_; + guint _tmp58_ = 0U; + GHashTable** _tmp59_; + gint _tmp59__length1; + gint _tmp60_; + GList* _tmp61_; + gint _tmp62_; + gconstpointer _tmp63_ = NULL; + GHashTable* _tmp64_; + GHashTable* _tmp65_; + _tmp54_ = _tmp53_; + if (!_tmp54_) { + gint _tmp55_; + _tmp55_ = i; + i = _tmp55_ + 1; + } + _tmp53_ = FALSE; + _tmp56_ = i; + _tmp57_ = devices_list; + _tmp58_ = g_list_length (_tmp57_); + if (!(((guint) _tmp56_) < _tmp58_)) { break; } - _tmp30_ = g_list_nth_data (devices_list, (guint) i); - _tmp31_ = _g_hash_table_ref0 ((GHashTable*) _tmp30_); - _tmp32_ = _tmp31_; - _g_hash_table_unref0 (arr[i]); - arr[i] = _tmp32_; + _tmp59_ = arr; + _tmp59__length1 = arr_length1; + _tmp60_ = i; + _tmp61_ = devices_list; + _tmp62_ = i; + _tmp63_ = g_list_nth_data (_tmp61_, (guint) _tmp62_); + _tmp64_ = _g_hash_table_ref0 ((GHashTable*) _tmp63_); + _g_hash_table_unref0 (_tmp59_[_tmp60_]); + _tmp59_[_tmp60_] = _tmp64_; + _tmp65_ = _tmp59_[_tmp60_]; } } } - _tmp33_ = arr; - *result_length1 = arr_length1; - result = _tmp33_; + _tmp66_ = arr; + _tmp66__length1 = arr_length1; + if (result_length1) { + *result_length1 = _tmp66__length1; + } + result = _tmp66_; __g_list_free__g_hash_table_unref0_0 (devices_list); __g_list_free__g_object_unref0_0 (devices); return result; } +static gpointer _gst_object_ref0 (gpointer self) { + return self ? gst_object_ref (self) : NULL; +} + + +static gpointer _gst_structure_copy0 (gpointer self) { + return self ? gst_structure_copy (self) : NULL; +} + + +static gboolean dvb_manager_real_GetAdapterInfo (DVBIDBusManager* base, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error) { + DVBManager * self; + DVBAdapterInfo _vala_info = {0}; + gboolean result = FALSE; + GstElement* _tmp0_ = NULL; + GstElement* dvbelement; + GstElement* _tmp1_; + guint _tmp2_; + GstElement* _tmp3_; + guint _tmp4_; + GstPipeline* _tmp5_; + GstElement* pipeline; + GstElement* _tmp6_; + GstElement* _tmp7_; + GstElement* _tmp8_; + GstElement* _tmp9_; + GstElement* _tmp10_; + GstBus* _tmp11_ = NULL; + GstBus* bus; + DVBAdapterInfo _tmp12_ = {0}; + gboolean success; + GstElement* _tmp42_; + gboolean _tmp43_; + self = (DVBManager*) base; + _tmp0_ = gst_element_factory_make ("dvbsrc", NULL); + dvbelement = _tmp0_; + _tmp1_ = dvbelement; + _tmp2_ = adapter; + g_object_set ((GObject*) _tmp1_, "adapter", _tmp2_, NULL); + _tmp3_ = dvbelement; + _tmp4_ = frontend; + g_object_set ((GObject*) _tmp3_, "frontend", _tmp4_, NULL); + _tmp5_ = (GstPipeline*) gst_pipeline_new (NULL); + gst_object_ref_sink (_tmp5_); + pipeline = (GstElement*) _tmp5_; + _tmp6_ = pipeline; + _tmp7_ = dvbelement; + _tmp8_ = _gst_object_ref0 (_tmp7_); + gst_bin_add (GST_BIN (_tmp6_), _tmp8_); + _tmp9_ = pipeline; + gst_element_set_state (_tmp9_, GST_STATE_READY); + _tmp10_ = pipeline; + _tmp11_ = gst_element_get_bus (_tmp10_); + bus = _tmp11_; + memset (&_tmp12_, 0, sizeof (DVBAdapterInfo)); + dvb_adapter_info_destroy (&_vala_info); + _vala_info = _tmp12_; + success = FALSE; + while (TRUE) { + GstBus* _tmp13_; + gboolean _tmp14_ = FALSE; + GstBus* _tmp15_; + GstMessage* _tmp16_ = NULL; + GstMessage* msg; + gboolean _tmp17_ = FALSE; + GstMessage* _tmp18_; + GstMessageType _tmp19_; + gboolean _tmp23_; + _tmp13_ = bus; + _tmp14_ = gst_bus_have_pending (_tmp13_); + if (!_tmp14_) { + break; + } + _tmp15_ = bus; + _tmp16_ = gst_bus_pop (_tmp15_); + msg = _tmp16_; + _tmp18_ = msg; + _tmp19_ = _tmp18_->type; + if (_tmp19_ == GST_MESSAGE_ELEMENT) { + GstMessage* _tmp20_; + GstObject* _tmp21_; + GstElement* _tmp22_; + _tmp20_ = msg; + _tmp21_ = _tmp20_->src; + _tmp22_ = dvbelement; + _tmp17_ = _tmp21_ == GST_OBJECT (_tmp22_); + } else { + _tmp17_ = FALSE; + } + _tmp23_ = _tmp17_; + if (_tmp23_) { + GstMessage* _tmp24_; + const GstStructure* _tmp25_ = NULL; + GstStructure* _tmp26_; + GstStructure* structure; + const GstStructure* _tmp27_; + const gchar* _tmp28_ = NULL; + _tmp24_ = msg; + _tmp25_ = gst_message_get_structure (_tmp24_); + _tmp26_ = _gst_structure_copy0 (_tmp25_); + structure = _tmp26_; + _tmp27_ = structure; + _tmp28_ = gst_structure_get_name (_tmp27_); + if (g_strcmp0 (_tmp28_, "dvb-adapter") == 0) { + const GstStructure* _tmp29_; + const gchar* _tmp30_ = NULL; + gchar* _tmp31_; + const GstStructure* _tmp32_; + const gchar* _tmp33_ = NULL; + gchar* _tmp34_; + _tmp29_ = structure; + _tmp30_ = gst_structure_get_string (_tmp29_, "name"); + _tmp31_ = g_strdup (_tmp30_); + _g_free0 (_vala_info.name); + _vala_info.name = _tmp31_; + _tmp32_ = structure; + _tmp33_ = gst_structure_get_string (_tmp32_, "type"); + _tmp34_ = g_strdup (_tmp33_); + _g_free0 (_vala_info.type); + _vala_info.type = _tmp34_; + success = TRUE; + _gst_structure_free0 (structure); + _gst_message_unref0 (msg); + break; + } + _gst_structure_free0 (structure); + } else { + GstMessage* _tmp35_; + GstMessageType _tmp36_; + _tmp35_ = msg; + _tmp36_ = _tmp35_->type; + if (_tmp36_ == GST_MESSAGE_ERROR) { + DVBLoggingLogger* _tmp37_; + GstMessage* _tmp38_; + const GstStructure* _tmp39_ = NULL; + gchar* _tmp40_ = NULL; + gchar* _tmp41_; + _tmp37_ = dvb_manager_log; + _tmp38_ = msg; + _tmp39_ = gst_message_get_structure (_tmp38_); + _tmp40_ = gst_structure_to_string (_tmp39_); + _tmp41_ = _tmp40_; + dvb_logging_logger_warning (_tmp37_, "Manager.vala:407: Could not retrieve adapter infos: %s", _tmp41_); + _g_free0 (_tmp41_); + } + } + _gst_message_unref0 (msg); + } + _tmp42_ = pipeline; + gst_element_set_state (_tmp42_, GST_STATE_NULL); + _tmp43_ = success; + if (!_tmp43_) { + gchar* _tmp44_; + gchar* _tmp45_; + _tmp44_ = g_strdup ("unknown"); + _g_free0 (_vala_info.name); + _vala_info.name = _tmp44_; + _tmp45_ = g_strdup ("unknown"); + _g_free0 (_vala_info.type); + _vala_info.type = _tmp45_; + } + result = success; + _gst_object_unref0 (bus); + _gst_object_unref0 (pipeline); + _gst_object_unref0 (dvbelement); + if (info) { + *info = _vala_info; + } else { + dvb_adapter_info_destroy (&_vala_info); + } + return result; +} + + /** * @returns: Whether the device has been added successfully * @@ -1759,188 +2300,307 @@ } -gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup) { +gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup, gboolean store) { gboolean result = FALSE; - guint _tmp0_; + DVBDeviceGroup* _tmp0_; + guint _tmp1_; + guint _tmp2_; guint group_id; - gint _tmp1_; - DVBAdapterType _tmp2_; - DVBdatabaseConfigStore* _tmp4_ = NULL; - DVBdatabaseConfigStore* _tmp5_; - DBusGConnection* _tmp6_ = NULL; - DBusGConnection* conn; - gchar* _tmp7_ = NULL; + DVBLoggingLogger* _tmp3_; + guint _tmp4_; + DVBDeviceGroup* _tmp5_; + gint _tmp6_; + gint _tmp7_; + DVBDeviceGroup* _tmp8_; + DVBAdapterType _tmp9_; + DVBAdapterType _tmp10_; + gboolean _tmp20_; + DVBDeviceGroup* _tmp29_; + guint _tmp30_; + gchar* _tmp31_ = NULL; gchar* path; + GDBusConnection* _tmp32_; + const gchar* _tmp33_; + DVBDeviceGroup* _tmp34_; + guint _tmp35_; + guint _tmp36_; + DVBDeviceGroup* _tmp38_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (devgroup != NULL, FALSE); - _tmp0_ = dvb_device_group_get_Id (devgroup); - group_id = _tmp0_; - _tmp1_ = dvb_device_group_get_size (devgroup); - g_debug ("Manager.vala:397: Adding device group %u with %d devices", group_id, _tmp1_); - _tmp2_ = dvb_device_group_get_Type (devgroup); - if (_tmp2_ == DVB_ADAPTER_TYPE_UNKNOWN) { - guint _tmp3_; - _tmp3_ = dvb_device_group_get_Id (devgroup); - g_warning ("Manager.vala:401: Not adding device group %u of unknown type", _tmp3_); + _tmp0_ = devgroup; + _tmp1_ = dvb_device_group_get_Id (_tmp0_); + _tmp2_ = _tmp1_; + group_id = _tmp2_; + _tmp3_ = dvb_manager_log; + _tmp4_ = group_id; + _tmp5_ = devgroup; + _tmp6_ = dvb_device_group_get_size (_tmp5_); + _tmp7_ = _tmp6_; + dvb_logging_logger_debug (_tmp3_, "Manager.vala:428: Adding device group %u with %d devices", _tmp4_, _tmp7_); + _tmp8_ = devgroup; + _tmp9_ = dvb_device_group_get_Type (_tmp8_); + _tmp10_ = _tmp9_; + if (_tmp10_ == DVB_ADAPTER_TYPE_UNKNOWN) { + DVBLoggingLogger* _tmp11_; + DVBDeviceGroup* _tmp12_; + guint _tmp13_; + guint _tmp14_; + _tmp11_ = dvb_manager_log; + _tmp12_ = devgroup; + _tmp13_ = dvb_device_group_get_Id (_tmp12_); + _tmp14_ = _tmp13_; + dvb_logging_logger_warning (_tmp11_, "Manager.vala:432: Not adding device group %u of unknown type", _tmp14_); result = FALSE; return result; } { + GeeHashMap* _tmp15_; + _tmp15_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id), devgroup); - __finally83: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeHashMap* _tmp16_; + guint _tmp17_; + DVBDeviceGroup* _tmp18_; + _tmp16_ = self->priv->devices; + _tmp17_ = group_id; + _tmp18_ = devgroup; + gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, GUINT_TO_POINTER (_tmp17_), _tmp18_); + } + __finally94: + { + GeeHashMap* _tmp19_; + _tmp19_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return FALSE; } } - _tmp4_ = dvb_factory_get_config_store (); - _tmp5_ = _tmp4_; - dvb_database_config_store_add_device_group (_tmp5_, devgroup, &_inner_error_); - _g_object_unref0 (_tmp5_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch84_dvb_database_sql_error; + _tmp20_ = store; + if (_tmp20_) { + { + DVBFactory* _tmp21_; + DVBFactory* _tmp22_; + DVBdatabaseConfigStore* _tmp23_ = NULL; + DVBdatabaseConfigStore* _tmp24_; + DVBDeviceGroup* _tmp25_; + _tmp21_ = dvb_factory_new (); + _tmp22_ = _tmp21_; + _tmp23_ = dvb_factory_get_config_store (_tmp22_); + _tmp24_ = _tmp23_; + _tmp25_ = devgroup; + dvb_database_config_store_add_device_group (_tmp24_, _tmp25_, &_inner_error_); + _g_object_unref0 (_tmp24_); + _g_object_unref0 (_tmp22_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch95_dvb_database_sql_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } + } + goto __finally95; + __catch95_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp26_; + GError* _tmp27_; + const gchar* _tmp28_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp26_ = dvb_manager_log; + _tmp27_ = e; + _tmp28_ = _tmp27_->message; + dvb_logging_logger_error (_tmp26_, "Manager.vala:444: %s", _tmp28_); + result = FALSE; + _g_error_free0 (e); + return result; + } + __finally95: + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - goto __finally84; - __catch84_dvb_database_sql_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Manager.vala:412: %s", e->message); - result = FALSE; - _g_error_free0 (e); - return result; - } - __finally84: - if (_inner_error_ != NULL) { - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - g_signal_connect_object ((DVBIDBusDeviceGroup*) devgroup, "device-removed", (GCallback) _dvb_manager_on_device_removed_from_group_dvb_id_bus_device_group_device_removed, self, 0); - _tmp6_ = dvb_utils_get_dbus_connection (); - conn = _tmp6_; - if (conn == NULL) { - result = FALSE; - _dbus_g_connection_unref0 (conn); - return result; } - _tmp7_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, group_id); - path = _tmp7_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) devgroup); - if (group_id > self->priv->device_group_counter) { - self->priv->device_group_counter = group_id; + _tmp29_ = devgroup; + g_signal_connect_object ((DVBIDBusDeviceGroup*) _tmp29_, "device-removed", (GCallback) _dvb_manager_on_device_removed_from_group_dvb_id_bus_device_group_device_removed, self, 0); + _tmp30_ = group_id; + _tmp31_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, _tmp30_); + path = _tmp31_; + _tmp32_ = main_conn; + _tmp33_ = path; + _tmp34_ = devgroup; + dvb_utils_dbus_register_object (DVB_TYPE_ID_BUS_DEVICE_GROUP, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp32_, _tmp33_, (DVBIDBusDeviceGroup*) _tmp34_); + _tmp35_ = group_id; + _tmp36_ = self->priv->device_group_counter; + if (_tmp35_ > _tmp36_) { + guint _tmp37_; + _tmp37_ = group_id; + self->priv->device_group_counter = _tmp37_; } - dvb_device_group_start_epg_scanner (devgroup); + _tmp38_ = devgroup; + dvb_device_group_start_epg_scanner (_tmp38_); result = TRUE; _g_free0 (path); - _dbus_g_connection_unref0 (conn); return result; } -gboolean dvb_manager_restore_device_group (DVBManager* self, DVBDeviceGroup* device_group) { +gboolean dvb_manager_restore_device_group (DVBManager* self, DVBDeviceGroup* device_group, gboolean store) { gboolean result = FALSE; - guint _tmp0_; - DVBChannelList* _tmp1_ = NULL; - DVBAdapterType _tmp2_; - gboolean _tmp3_; + DVBLoggingLogger* _tmp0_; + DVBDeviceGroup* _tmp1_; + guint _tmp2_; + guint _tmp3_; + DVBDeviceGroup* _tmp13_; + gboolean _tmp14_; + gboolean _tmp15_ = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device_group != NULL, FALSE); - _tmp0_ = dvb_device_group_get_Id (device_group); - g_debug ("Manager.vala:435: Restoring group %u", _tmp0_); - _tmp1_ = dvb_device_group_get_Channels (device_group); - _tmp2_ = dvb_device_group_get_Type (device_group); - dvb_channel_list_load (_tmp1_, _tmp2_, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch85_g_error; + _tmp0_ = dvb_manager_log; + _tmp1_ = device_group; + _tmp2_ = dvb_device_group_get_Id (_tmp1_); + _tmp3_ = _tmp2_; + dvb_logging_logger_debug (_tmp0_, "Manager.vala:463: Restoring group %u", _tmp3_); + { + DVBDeviceGroup* _tmp4_; + DVBChannelList* _tmp5_; + DVBChannelList* _tmp6_; + DVBDeviceGroup* _tmp7_; + DVBAdapterType _tmp8_; + DVBAdapterType _tmp9_; + _tmp4_ = device_group; + _tmp5_ = dvb_device_group_get_Channels (_tmp4_); + _tmp6_ = _tmp5_; + _tmp7_ = device_group; + _tmp8_ = dvb_device_group_get_Type (_tmp7_); + _tmp9_ = _tmp8_; + dvb_channel_list_load (_tmp6_, _tmp9_, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch96_g_error; + } } - goto __finally85; - __catch85_g_error: + goto __finally96; + __catch96_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp10_; + GError* _tmp11_; + const gchar* _tmp12_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:440: Error reading channels from file: %s", e->message); + _tmp10_ = dvb_manager_log; + _tmp11_ = e; + _tmp12_ = _tmp11_->message; + dvb_logging_logger_error (_tmp10_, "Manager.vala:468: Error reading channels from file: %s", _tmp12_); result = FALSE; _g_error_free0 (e); return result; } - __finally85: + __finally96: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return FALSE; } - _tmp3_ = dvb_manager_add_device_group (self, device_group); - result = _tmp3_; + _tmp13_ = device_group; + _tmp14_ = store; + _tmp15_ = dvb_manager_add_device_group (self, _tmp13_, _tmp14_); + result = _tmp15_; return result; } void dvb_manager_restore_timers (DVBManager* self, DVBDeviceGroup* device_group) { - guint _tmp0_; - DVBdatabaseTimersStore* _tmp1_ = NULL; + DVBLoggingLogger* _tmp0_; + DVBDeviceGroup* _tmp1_; + guint _tmp2_; + guint _tmp3_; + DVBFactory* _tmp4_; + DVBFactory* _tmp5_; + DVBdatabaseTimersStore* _tmp6_ = NULL; + DVBdatabaseTimersStore* _tmp7_; DVBdatabaseTimersStore* timers_store; - GeeList* timers; - GeeList* _tmp2_ = NULL; - GeeList* _tmp3_; - GeeList* _tmp4_; + GeeList* timers = NULL; guint32 max_id; - DVBRecorder* _tmp6_ = NULL; - DVBRecorder* _tmp7_; + DVBDeviceGroup* _tmp18_; + DVBRecorder* _tmp19_; + DVBRecorder* _tmp20_; + DVBRecorder* _tmp21_; DVBRecorder* rec; - DVBRecordingsStore* _tmp16_ = NULL; - DVBRecordingsStore* _tmp17_; + DVBRecordingsStore* _tmp52_ = NULL; + DVBRecordingsStore* _tmp53_; DVBRecordingsStore* recstore; + DVBRecordingsStore* _tmp54_; + guint32 _tmp55_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (device_group != NULL); - _tmp0_ = dvb_device_group_get_Id (device_group); - g_message ("Manager.vala:448: Restoring timers of device group %u", _tmp0_); - _tmp1_ = dvb_factory_get_timers_store (); - timers_store = _tmp1_; - timers = NULL; - _tmp2_ = dvb_database_timers_store_get_all_timers_of_device_group (timers_store, device_group, &_inner_error_); + _tmp0_ = dvb_manager_log; + _tmp1_ = device_group; + _tmp2_ = dvb_device_group_get_Id (_tmp1_); _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch86_dvb_database_sql_error; + dvb_logging_logger_info (_tmp0_, "Manager.vala:476: Restoring timers of device group %u", _tmp3_); + _tmp4_ = dvb_factory_new (); + _tmp5_ = _tmp4_; + _tmp6_ = dvb_factory_get_timers_store (_tmp5_); + _tmp7_ = _tmp6_; + _g_object_unref0 (_tmp5_); + timers_store = _tmp7_; + { + DVBdatabaseTimersStore* _tmp8_; + DVBDeviceGroup* _tmp9_; + GeeList* _tmp10_ = NULL; + GeeList* _tmp11_; + _tmp8_ = timers_store; + _tmp9_ = device_group; + _tmp10_ = dvb_database_timers_store_get_all_timers_of_device_group (_tmp8_, _tmp9_, &_inner_error_); + _tmp11_ = _tmp10_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch97_dvb_database_sql_error; + } + _g_object_unref0 (timers); + _g_object_unref0 (timers_store); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } _g_object_unref0 (timers); - _g_object_unref0 (timers_store); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + timers = _tmp11_; } - _tmp4_ = _tmp3_; - _g_object_unref0 (timers); - timers = _tmp4_; - goto __finally86; - __catch86_dvb_database_sql_error: + goto __finally97; + __catch97_dvb_database_sql_error: { - GError * e; - guint _tmp5_; + GError* e = NULL; + DVBLoggingLogger* _tmp12_; + DVBDeviceGroup* _tmp13_; + guint _tmp14_; + guint _tmp15_; + GError* _tmp16_; + const gchar* _tmp17_; e = _inner_error_; _inner_error_ = NULL; - _tmp5_ = dvb_device_group_get_Id (device_group); - g_critical ("Manager.vala:456: Failed retrieving timers of group %u: %s", _tmp5_, e->message); + _tmp12_ = dvb_manager_log; + _tmp13_ = device_group; + _tmp14_ = dvb_device_group_get_Id (_tmp13_); + _tmp15_ = _tmp14_; + _tmp16_ = e; + _tmp17_ = _tmp16_->message; + dvb_logging_logger_error (_tmp12_, "Manager.vala:484: Failed retrieving timers of group %u: %s", _tmp15_, _tmp17_); _g_error_free0 (e); _g_object_unref0 (timers); _g_object_unref0 (timers_store); return; } - __finally86: + __finally97: if (_inner_error_ != NULL) { _g_object_unref0 (timers); _g_object_unref0 (timers_store); @@ -1949,68 +2609,116 @@ return; } max_id = (guint32) 0; - _tmp6_ = dvb_device_group_get_recorder (device_group); - _tmp7_ = _g_object_ref0 (_tmp6_); - rec = _tmp7_; + _tmp18_ = device_group; + _tmp19_ = dvb_device_group_get_recorder (_tmp18_); + _tmp20_ = _tmp19_; + _tmp21_ = _g_object_ref0 (_tmp20_); + rec = _tmp21_; { - GeeList* _tmp8_; + GeeList* _tmp22_; + GeeList* _tmp23_; GeeList* _t_list; - gint _tmp9_; + GeeList* _tmp24_; + gint _tmp25_; + gint _tmp26_; gint _t_size; gint _t_index; - _tmp8_ = _g_object_ref0 (timers); - _t_list = _tmp8_; - _tmp9_ = gee_collection_get_size ((GeeCollection*) _t_list); - _t_size = _tmp9_; + _tmp22_ = timers; + _tmp23_ = _g_object_ref0 (_tmp22_); + _t_list = _tmp23_; + _tmp24_ = _t_list; + _tmp25_ = gee_collection_get_size ((GeeCollection*) _tmp24_); + _tmp26_ = _tmp25_; + _t_size = _tmp26_; _t_index = -1; while (TRUE) { - gpointer _tmp10_ = NULL; + gint _tmp27_; + gint _tmp28_; + gint _tmp29_; + GeeList* _tmp30_; + gint _tmp31_; + gpointer _tmp32_ = NULL; DVBTimer* t; - guint32 _tmp11_; + DVBTimer* _tmp33_; + guint32 _tmp34_; + guint32 _tmp35_; + guint32 _tmp36_; guint32 rec_id = 0U; - guint32 _tmp13_; - gboolean _tmp14_; - _t_index = _t_index + 1; - if (!(_t_index < _t_size)) { + DVBRecorder* _tmp40_; + DVBTimer* _tmp41_; + guint32 _tmp42_ = 0U; + gboolean _tmp43_ = FALSE; + _tmp27_ = _t_index; + _t_index = _tmp27_ + 1; + _tmp28_ = _t_index; + _tmp29_ = _t_size; + if (!(_tmp28_ < _tmp29_)) { break; } - _tmp10_ = gee_list_get (_t_list, _t_index); - t = (DVBTimer*) _tmp10_; - _tmp11_ = dvb_timer_get_Id (t); - if (_tmp11_ > max_id) { - guint32 _tmp12_; - _tmp12_ = dvb_timer_get_Id (t); - max_id = _tmp12_; - } - _tmp14_ = dvb_recorder_add_timer (rec, t, &_tmp13_); - rec_id = _tmp13_; - if (!_tmp14_) { - guint32 _tmp15_; - _tmp15_ = dvb_timer_get_Id (t); - dvb_database_timers_store_remove_timer_from_device_group (timers_store, (guint) _tmp15_, device_group, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch87_dvb_database_sql_error; + _tmp30_ = _t_list; + _tmp31_ = _t_index; + _tmp32_ = gee_list_get (_tmp30_, _tmp31_); + t = (DVBTimer*) _tmp32_; + _tmp33_ = t; + _tmp34_ = dvb_timer_get_Id (_tmp33_); + _tmp35_ = _tmp34_; + _tmp36_ = max_id; + if (_tmp35_ > _tmp36_) { + DVBTimer* _tmp37_; + guint32 _tmp38_; + guint32 _tmp39_; + _tmp37_ = t; + _tmp38_ = dvb_timer_get_Id (_tmp37_); + _tmp39_ = _tmp38_; + max_id = _tmp39_; + } + _tmp40_ = rec; + _tmp41_ = t; + _tmp43_ = dvb_recorder_add_timer (_tmp40_, _tmp41_, &_tmp42_); + rec_id = _tmp42_; + if (!_tmp43_) { + { + DVBdatabaseTimersStore* _tmp44_; + DVBTimer* _tmp45_; + guint32 _tmp46_; + guint32 _tmp47_; + DVBDeviceGroup* _tmp48_; + _tmp44_ = timers_store; + _tmp45_ = t; + _tmp46_ = dvb_timer_get_Id (_tmp45_); + _tmp47_ = _tmp46_; + _tmp48_ = device_group; + dvb_database_timers_store_remove_timer_from_device_group (_tmp44_, (guint) _tmp47_, _tmp48_, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch98_dvb_database_sql_error; + } + _g_object_unref0 (t); + _g_object_unref0 (_t_list); + _g_object_unref0 (rec); + _g_object_unref0 (timers); + _g_object_unref0 (timers_store); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - _g_object_unref0 (t); - _g_object_unref0 (_t_list); - _g_object_unref0 (rec); - _g_object_unref0 (timers); - _g_object_unref0 (timers_store); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } - goto __finally87; - __catch87_dvb_database_sql_error: + goto __finally98; + __catch98_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp49_; + GError* _tmp50_; + const gchar* _tmp51_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:470: Failed removing timer: %s", e->message); + _tmp49_ = dvb_manager_log; + _tmp50_ = e; + _tmp51_ = _tmp50_->message; + dvb_logging_logger_error (_tmp49_, "Manager.vala:498: Failed removing timer: %s", _tmp51_); _g_error_free0 (e); } - __finally87: + __finally98: if (_inner_error_ != NULL) { _g_object_unref0 (t); _g_object_unref0 (_t_list); @@ -2026,10 +2734,12 @@ } _g_object_unref0 (_t_list); } - _tmp16_ = dvb_recordings_store_get_instance (); - _tmp17_ = _g_object_ref0 (_tmp16_); - recstore = _tmp17_; - dvb_recordings_store_update_last_id (recstore, max_id); + _tmp52_ = dvb_recordings_store_get_instance (); + _tmp53_ = _g_object_ref0 (_tmp52_); + recstore = _tmp53_; + _tmp54_ = recstore; + _tmp55_ = max_id; + dvb_recordings_store_update_last_id (_tmp54_, _tmp55_); _g_object_unref0 (recstore); _g_object_unref0 (rec); _g_object_unref0 (timers); @@ -2038,12 +2748,16 @@ void dvb_manager_restore_device_group_and_timers (DVBManager* self, DVBDeviceGroup* device_group) { - gboolean _tmp0_; + DVBDeviceGroup* _tmp0_; + gboolean _tmp1_ = FALSE; g_return_if_fail (self != NULL); g_return_if_fail (device_group != NULL); - _tmp0_ = dvb_manager_restore_device_group (self, device_group); - if (_tmp0_) { - dvb_manager_restore_timers (self, device_group); + _tmp0_ = device_group; + _tmp1_ = dvb_manager_restore_device_group (self, _tmp0_, TRUE); + if (_tmp1_) { + DVBDeviceGroup* _tmp2_; + _tmp2_ = device_group; + dvb_manager_restore_timers (self, _tmp2_); } } @@ -2055,19 +2769,33 @@ g_return_val_if_fail (self != NULL, NULL); _result_ = NULL; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBDeviceGroup* _tmp2_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - _tmp2_ = (DVBDeviceGroup*) _tmp1_; - _g_object_unref0 (_result_); - _result_ = _tmp2_; + { + GeeHashMap* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->devices; + _tmp2_ = group_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint _tmp5_; + gpointer _tmp6_ = NULL; + _tmp4_ = self->priv->devices; + _tmp5_ = group_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _g_object_unref0 (_result_); + _result_ = (DVBDeviceGroup*) _tmp6_; + } + } + __finally99: + { + GeeHashMap* _tmp7_; + _tmp7_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); } - __finally88: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); if (_inner_error_ != NULL) { _g_object_unref0 (_result_); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2088,44 +2816,70 @@ g_return_val_if_fail (device != NULL, FALSE); _result_ = FALSE; { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _group_id_it; - _tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _group_id_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - guint group_id; - gpointer _tmp6_ = NULL; - DVBDeviceGroup* devgroup; - gboolean _tmp7_; - _tmp4_ = gee_iterator_next (_group_id_it); - if (!_tmp4_) { - break; - } - _tmp5_ = gee_iterator_get (_group_id_it); - group_id = GPOINTER_TO_UINT (_tmp5_); - _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - devgroup = (DVBDeviceGroup*) _tmp6_; - _tmp7_ = dvb_device_group_contains (devgroup, device); - if (_tmp7_) { - _result_ = TRUE; + { + GeeHashMap* _tmp1_; + GeeSet* _tmp2_; + GeeSet* _tmp3_; + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _group_id_it; + _tmp1_ = self->priv->devices; + _tmp2_ = gee_map_get_keys ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _group_id_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + guint group_id; + GeeHashMap* _tmp11_; + guint _tmp12_; + gpointer _tmp13_ = NULL; + DVBDeviceGroup* devgroup; + DVBDeviceGroup* _tmp14_; + DVBDevice* _tmp15_; + gboolean _tmp16_ = FALSE; + _tmp7_ = _group_id_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _group_id_it; + _tmp10_ = gee_iterator_get (_tmp9_); + group_id = GPOINTER_TO_UINT (_tmp10_); + _tmp11_ = self->priv->devices; + _tmp12_ = group_id; + _tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, GUINT_TO_POINTER (_tmp12_)); + devgroup = (DVBDeviceGroup*) _tmp13_; + _tmp14_ = devgroup; + _tmp15_ = device; + _tmp16_ = dvb_device_group_contains (_tmp14_, _tmp15_); + if (_tmp16_) { + _result_ = TRUE; + _g_object_unref0 (devgroup); + break; + } _g_object_unref0 (devgroup); - break; } - _g_object_unref0 (devgroup); + _g_object_unref0 (_group_id_it); } - _g_object_unref0 (_group_id_it); } - __finally89: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + __finally100: + { + GeeHashMap* _tmp17_; + _tmp17_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -2138,33 +2892,59 @@ static void dvb_manager_on_scanner_destroyed (DVBManager* self, DVBScanner* scanner) { - DVBDevice* _tmp0_ = NULL; - guint _tmp1_; - guint adapter; - DVBDevice* _tmp2_ = NULL; + DVBScanner* _tmp0_; + DVBDevice* _tmp1_; + DVBDevice* _tmp2_; guint _tmp3_; + guint _tmp4_; + guint adapter; + DVBScanner* _tmp5_; + DVBDevice* _tmp6_; + DVBDevice* _tmp7_; + guint _tmp8_; + guint _tmp9_; guint frontend; - gchar* _tmp4_ = NULL; + gchar* _tmp10_ = NULL; gchar* path; - DVBDevice* _tmp5_ = NULL; - DVBDeviceGroup* _tmp6_ = NULL; + DVBLoggingLogger* _tmp14_; + DVBScanner* _tmp15_; + DVBDevice* _tmp16_; + DVBDevice* _tmp17_; + DVBDeviceGroup* _tmp18_ = NULL; DVBDeviceGroup* devgroup; + DVBDeviceGroup* _tmp19_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (scanner != NULL); - _tmp0_ = dvb_scanner_get_Device (scanner); - _tmp1_ = dvb_device_get_Adapter (_tmp0_); - adapter = _tmp1_; - _tmp2_ = dvb_scanner_get_Device (scanner); - _tmp3_ = dvb_device_get_Frontend (_tmp2_); - frontend = _tmp3_; - _tmp4_ = g_strdup_printf (DVB_CONSTANTS_DBUS_SCANNER_PATH, adapter, frontend); - path = _tmp4_; + _tmp0_ = scanner; + _tmp1_ = dvb_scanner_get_Device (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_device_get_Adapter (_tmp2_); + _tmp4_ = _tmp3_; + adapter = _tmp4_; + _tmp5_ = scanner; + _tmp6_ = dvb_scanner_get_Device (_tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = dvb_device_get_Frontend (_tmp7_); + _tmp9_ = _tmp8_; + frontend = _tmp9_; + _tmp10_ = g_strdup_printf (DVB_CONSTANTS_DBUS_SCANNER_PATH, adapter, frontend); + path = _tmp10_; { + GeeHashMap* _tmp11_; + _tmp11_ = self->priv->scanners; g_static_rec_mutex_lock (&self->priv->__lock_scanners); - gee_abstract_map_unset ((GeeAbstractMap*) self->priv->scanners, path, NULL); - __finally90: - g_static_rec_mutex_unlock (&self->priv->__lock_scanners); + { + GeeHashMap* _tmp12_; + _tmp12_ = self->priv->scanners; + gee_abstract_map_unset ((GeeAbstractMap*) _tmp12_, path, NULL); + } + __finally101: + { + GeeHashMap* _tmp13_; + _tmp13_ = self->priv->scanners; + g_static_rec_mutex_unlock (&self->priv->__lock_scanners); + } if (_inner_error_ != NULL) { _g_free0 (path); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2172,12 +2952,18 @@ return; } } - g_debug ("Manager.vala:518: Destroying scanner for adapter %u, frontend %u (%s)", adapter, frontend, path); - _tmp5_ = dvb_scanner_get_Device (scanner); - _tmp6_ = dvb_manager_get_device_group_of_device (self, _tmp5_); - devgroup = _tmp6_; - if (devgroup != NULL) { - dvb_device_group_start_epg_scanner (devgroup); + _tmp14_ = dvb_manager_log; + dvb_logging_logger_debug (_tmp14_, "Manager.vala:546: Destroying scanner for adapter %u, frontend %u (%s)", adapter, frontend, path); + _tmp15_ = scanner; + _tmp16_ = dvb_scanner_get_Device (_tmp15_); + _tmp17_ = _tmp16_; + _tmp18_ = dvb_manager_get_device_group_of_device (self, _tmp17_); + devgroup = _tmp18_; + _tmp19_ = devgroup; + if (_tmp19_ != NULL) { + DVBDeviceGroup* _tmp20_; + _tmp20_ = devgroup; + dvb_device_group_start_epg_scanner (_tmp20_); } _g_object_unref0 (devgroup); _g_free0 (path); @@ -2187,80 +2973,120 @@ static DVBDevice* dvb_manager_get_registered_device (DVBManager* self, guint adapter, guint frontend) { DVBDevice* result = NULL; DVBDevice* _result_; - DVBDevice* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + DVBDevice* _tmp2_; DVBDevice* fake_device; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); _result_ = NULL; - _tmp0_ = dvb_device_new (adapter, frontend); - fake_device = _tmp0_; + _tmp0_ = adapter; + _tmp1_ = frontend; + _tmp2_ = dvb_device_new (_tmp0_, _tmp1_); + fake_device = _tmp2_; { + GeeHashMap* _tmp3_; + _tmp3_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp1_ = NULL; - GeeSet* _tmp2_; - GeeIterator* _tmp3_ = NULL; - GeeIterator* _tmp4_; - GeeIterator* _group_id_it; - _tmp1_ = gee_map_get_keys ((GeeMap*) self->priv->devices); - _tmp2_ = _tmp1_; - _tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_); - _group_id_it = (_tmp4_ = _tmp3_, _g_object_unref0 (_tmp2_), _tmp4_); - while (TRUE) { - gboolean _tmp5_; - gpointer _tmp6_ = NULL; - guint group_id; - gpointer _tmp7_ = NULL; - DVBDeviceGroup* devgroup; - gboolean _tmp8_; - _tmp5_ = gee_iterator_next (_group_id_it); - if (!_tmp5_) { - break; - } - _tmp6_ = gee_iterator_get (_group_id_it); - group_id = GPOINTER_TO_UINT (_tmp6_); - _tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - devgroup = (DVBDeviceGroup*) _tmp7_; - _tmp8_ = dvb_device_group_contains (devgroup, fake_device); - if (_tmp8_) { - { - GeeIterator* _tmp9_ = NULL; - GeeIterator* _device_it; - _tmp9_ = gee_iterable_iterator ((GeeIterable*) devgroup); - _device_it = _tmp9_; - while (TRUE) { - gboolean _tmp10_; - gpointer _tmp11_ = NULL; - DVBDevice* device; - gboolean _tmp12_; - _tmp10_ = gee_iterator_next (_device_it); - if (!_tmp10_) { - break; - } - _tmp11_ = gee_iterator_get (_device_it); - device = (DVBDevice*) _tmp11_; - _tmp12_ = dvb_device_equal (fake_device, device); - if (_tmp12_) { - DVBDevice* _tmp13_; - DVBDevice* _tmp14_; - _tmp13_ = _g_object_ref0 (device); - _tmp14_ = _tmp13_; - _g_object_unref0 (_result_); - _result_ = _tmp14_; + { + GeeHashMap* _tmp4_; + GeeSet* _tmp5_; + GeeSet* _tmp6_; + GeeSet* _tmp7_; + GeeIterator* _tmp8_ = NULL; + GeeIterator* _tmp9_; + GeeIterator* _group_id_it; + _tmp4_ = self->priv->devices; + _tmp5_ = gee_map_get_keys ((GeeMap*) _tmp4_); + _tmp6_ = _tmp5_; + _tmp7_ = _tmp6_; + _tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_); + _tmp9_ = _tmp8_; + _g_object_unref0 (_tmp7_); + _group_id_it = _tmp9_; + while (TRUE) { + GeeIterator* _tmp10_; + gboolean _tmp11_ = FALSE; + GeeIterator* _tmp12_; + gpointer _tmp13_ = NULL; + guint group_id; + GeeHashMap* _tmp14_; + guint _tmp15_; + gpointer _tmp16_ = NULL; + DVBDeviceGroup* devgroup; + DVBDeviceGroup* _tmp17_; + DVBDevice* _tmp18_; + gboolean _tmp19_ = FALSE; + _tmp10_ = _group_id_it; + _tmp11_ = gee_iterator_next (_tmp10_); + if (!_tmp11_) { + break; + } + _tmp12_ = _group_id_it; + _tmp13_ = gee_iterator_get (_tmp12_); + group_id = GPOINTER_TO_UINT (_tmp13_); + _tmp14_ = self->priv->devices; + _tmp15_ = group_id; + _tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp14_, GUINT_TO_POINTER (_tmp15_)); + devgroup = (DVBDeviceGroup*) _tmp16_; + _tmp17_ = devgroup; + _tmp18_ = fake_device; + _tmp19_ = dvb_device_group_contains (_tmp17_, _tmp18_); + if (_tmp19_) { + { + DVBDeviceGroup* _tmp20_; + GeeIterator* _tmp21_ = NULL; + GeeIterator* _device_it; + _tmp20_ = devgroup; + _tmp21_ = gee_iterable_iterator ((GeeIterable*) _tmp20_); + _device_it = _tmp21_; + while (TRUE) { + GeeIterator* _tmp22_; + gboolean _tmp23_ = FALSE; + GeeIterator* _tmp24_; + gpointer _tmp25_ = NULL; + DVBDevice* device; + DVBDevice* _tmp26_; + DVBDevice* _tmp27_; + gboolean _tmp28_ = FALSE; + _tmp22_ = _device_it; + _tmp23_ = gee_iterator_next (_tmp22_); + if (!_tmp23_) { + break; + } + _tmp24_ = _device_it; + _tmp25_ = gee_iterator_get (_tmp24_); + device = (DVBDevice*) _tmp25_; + _tmp26_ = fake_device; + _tmp27_ = device; + _tmp28_ = dvb_device_equal (_tmp26_, _tmp27_); + if (_tmp28_) { + DVBDevice* _tmp29_; + DVBDevice* _tmp30_; + _tmp29_ = device; + _tmp30_ = _g_object_ref0 (_tmp29_); + _g_object_unref0 (_result_); + _result_ = _tmp30_; + _g_object_unref0 (device); + break; + } _g_object_unref0 (device); - break; } - _g_object_unref0 (device); + _g_object_unref0 (_device_it); } - _g_object_unref0 (_device_it); } + _g_object_unref0 (devgroup); } - _g_object_unref0 (devgroup); + _g_object_unref0 (_group_id_it); } - _g_object_unref0 (_group_id_it); } - __finally91: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + __finally102: + { + GeeHashMap* _tmp31_; + _tmp31_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { _g_object_unref0 (fake_device); _g_object_unref0 (_result_); @@ -2283,72 +3109,108 @@ g_return_val_if_fail (device != NULL, NULL); _result_ = NULL; { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _group_id_it; - _tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _group_id_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - guint group_id; - gpointer _tmp6_ = NULL; - DVBDeviceGroup* devgroup; - gboolean _tmp7_; - _tmp4_ = gee_iterator_next (_group_id_it); - if (!_tmp4_) { - break; - } - _tmp5_ = gee_iterator_get (_group_id_it); - group_id = GPOINTER_TO_UINT (_tmp5_); - _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - devgroup = (DVBDeviceGroup*) _tmp6_; - _tmp7_ = dvb_device_group_contains (devgroup, device); - if (_tmp7_) { - { - GeeIterator* _tmp8_ = NULL; - GeeIterator* _grp_device_it; - _tmp8_ = gee_iterable_iterator ((GeeIterable*) devgroup); - _grp_device_it = _tmp8_; - while (TRUE) { - gboolean _tmp9_; - gpointer _tmp10_ = NULL; - DVBDevice* grp_device; - gboolean _tmp11_; - _tmp9_ = gee_iterator_next (_grp_device_it); - if (!_tmp9_) { - break; - } - _tmp10_ = gee_iterator_get (_grp_device_it); - grp_device = (DVBDevice*) _tmp10_; - _tmp11_ = dvb_device_equal (grp_device, device); - if (_tmp11_) { - DVBDeviceGroup* _tmp12_; - DVBDeviceGroup* _tmp13_; - _tmp12_ = _g_object_ref0 (devgroup); - _tmp13_ = _tmp12_; - _g_object_unref0 (_result_); - _result_ = _tmp13_; + { + GeeHashMap* _tmp1_; + GeeSet* _tmp2_; + GeeSet* _tmp3_; + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _group_id_it; + _tmp1_ = self->priv->devices; + _tmp2_ = gee_map_get_keys ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _group_id_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + guint group_id; + GeeHashMap* _tmp11_; + guint _tmp12_; + gpointer _tmp13_ = NULL; + DVBDeviceGroup* devgroup; + DVBDeviceGroup* _tmp14_; + DVBDevice* _tmp15_; + gboolean _tmp16_ = FALSE; + _tmp7_ = _group_id_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _group_id_it; + _tmp10_ = gee_iterator_get (_tmp9_); + group_id = GPOINTER_TO_UINT (_tmp10_); + _tmp11_ = self->priv->devices; + _tmp12_ = group_id; + _tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, GUINT_TO_POINTER (_tmp12_)); + devgroup = (DVBDeviceGroup*) _tmp13_; + _tmp14_ = devgroup; + _tmp15_ = device; + _tmp16_ = dvb_device_group_contains (_tmp14_, _tmp15_); + if (_tmp16_) { + { + DVBDeviceGroup* _tmp17_; + GeeIterator* _tmp18_ = NULL; + GeeIterator* _grp_device_it; + _tmp17_ = devgroup; + _tmp18_ = gee_iterable_iterator ((GeeIterable*) _tmp17_); + _grp_device_it = _tmp18_; + while (TRUE) { + GeeIterator* _tmp19_; + gboolean _tmp20_ = FALSE; + GeeIterator* _tmp21_; + gpointer _tmp22_ = NULL; + DVBDevice* grp_device; + DVBDevice* _tmp23_; + DVBDevice* _tmp24_; + gboolean _tmp25_ = FALSE; + _tmp19_ = _grp_device_it; + _tmp20_ = gee_iterator_next (_tmp19_); + if (!_tmp20_) { + break; + } + _tmp21_ = _grp_device_it; + _tmp22_ = gee_iterator_get (_tmp21_); + grp_device = (DVBDevice*) _tmp22_; + _tmp23_ = grp_device; + _tmp24_ = device; + _tmp25_ = dvb_device_equal (_tmp23_, _tmp24_); + if (_tmp25_) { + DVBDeviceGroup* _tmp26_; + DVBDeviceGroup* _tmp27_; + _tmp26_ = devgroup; + _tmp27_ = _g_object_ref0 (_tmp26_); + _g_object_unref0 (_result_); + _result_ = _tmp27_; + _g_object_unref0 (grp_device); + break; + } _g_object_unref0 (grp_device); - break; } - _g_object_unref0 (grp_device); + _g_object_unref0 (_grp_device_it); } - _g_object_unref0 (_grp_device_it); } + _g_object_unref0 (devgroup); } - _g_object_unref0 (devgroup); + _g_object_unref0 (_group_id_it); } - _g_object_unref0 (_group_id_it); } - __finally92: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + __finally103: + { + GeeHashMap* _tmp28_; + _tmp28_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { _g_object_unref0 (_result_); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2362,28 +3224,51 @@ static void dvb_manager_on_device_removed_from_group (DVBManager* self, DVBIDBusDeviceGroup* idevgroup, guint adapter, guint frontend) { - DVBDeviceGroup* _tmp0_; + DVBIDBusDeviceGroup* _tmp0_; + DVBDeviceGroup* _tmp1_; DVBDeviceGroup* devgroup; - guint _tmp1_; + DVBDeviceGroup* _tmp2_; + guint _tmp3_; + guint _tmp4_; guint group_id; - gint _tmp2_; + DVBDeviceGroup* _tmp5_; + gint _tmp6_; + gint _tmp7_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (idevgroup != NULL); - _tmp0_ = _g_object_ref0 (DVB_DEVICE_GROUP (idevgroup)); - devgroup = _tmp0_; - _tmp1_ = dvb_device_group_get_Id (devgroup); - group_id = _tmp1_; - _tmp2_ = dvb_device_group_get_size (devgroup); - if (_tmp2_ == 0) { + _tmp0_ = idevgroup; + _tmp1_ = _g_object_ref0 (DVB_DEVICE_GROUP (_tmp0_)); + devgroup = _tmp1_; + _tmp2_ = devgroup; + _tmp3_ = dvb_device_group_get_Id (_tmp2_); + _tmp4_ = _tmp3_; + group_id = _tmp4_; + _tmp5_ = devgroup; + _tmp6_ = dvb_device_group_get_size (_tmp5_); + _tmp7_ = _tmp6_; + if (_tmp7_ == 0) { gboolean success = FALSE; + gboolean _tmp13_; { - gboolean _tmp3_; + GeeHashMap* _tmp8_; + _tmp8_ = self->priv->devices; g_static_rec_mutex_lock (&self->priv->__lock_devices); - _tmp3_ = gee_abstract_map_unset ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id), NULL); - success = _tmp3_; - __finally93: - g_static_rec_mutex_unlock (&self->priv->__lock_devices); + { + GeeHashMap* _tmp9_; + guint _tmp10_; + gboolean _tmp11_ = FALSE; + _tmp9_ = self->priv->devices; + _tmp10_ = group_id; + _tmp11_ = gee_abstract_map_unset ((GeeAbstractMap*) _tmp9_, GUINT_TO_POINTER (_tmp10_), NULL); + success = _tmp11_; + } + __finally104: + { + GeeHashMap* _tmp12_; + _tmp12_ = self->priv->devices; + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } if (_inner_error_ != NULL) { _g_object_unref0 (devgroup); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2391,68 +3276,106 @@ return; } } - if (success) { - DVBdatabaseConfigStore* _tmp4_ = NULL; - DVBdatabaseConfigStore* _tmp5_; - DVBdatabaseEPGStore* _tmp6_ = NULL; - DVBdatabaseEPGStore* _tmp7_; - guint _tmp8_; - DVBdatabaseTimersStore* _tmp9_ = NULL; - DVBdatabaseTimersStore* _tmp10_; - guint _tmp11_; - dvb_device_group_destroy (devgroup); - _tmp4_ = dvb_factory_get_config_store (); - _tmp5_ = _tmp4_; - dvb_database_config_store_remove_device_group (_tmp5_, devgroup, &_inner_error_); - _g_object_unref0 (_tmp5_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch94_dvb_database_sql_error; + _tmp13_ = success; + if (_tmp13_) { + DVBDeviceGroup* _tmp14_; + _tmp14_ = devgroup; + dvb_device_group_destroy (_tmp14_); + { + DVBFactory* _tmp15_; + DVBFactory* _tmp16_; + DVBdatabaseConfigStore* _tmp17_ = NULL; + DVBdatabaseConfigStore* _tmp18_; + DVBDeviceGroup* _tmp19_; + DVBFactory* _tmp20_; + DVBFactory* _tmp21_; + DVBdatabaseEPGStore* _tmp22_ = NULL; + DVBdatabaseEPGStore* _tmp23_; + DVBDeviceGroup* _tmp24_; + guint _tmp25_; + guint _tmp26_; + DVBFactory* _tmp27_; + DVBFactory* _tmp28_; + DVBdatabaseTimersStore* _tmp29_ = NULL; + DVBdatabaseTimersStore* _tmp30_; + DVBDeviceGroup* _tmp31_; + guint _tmp32_; + guint _tmp33_; + guint _tmp34_; + _tmp15_ = dvb_factory_new (); + _tmp16_ = _tmp15_; + _tmp17_ = dvb_factory_get_config_store (_tmp16_); + _tmp18_ = _tmp17_; + _tmp19_ = devgroup; + dvb_database_config_store_remove_device_group (_tmp18_, _tmp19_, &_inner_error_); + _g_object_unref0 (_tmp18_); + _g_object_unref0 (_tmp16_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch105_dvb_database_sql_error; + } + _g_object_unref0 (devgroup); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - _g_object_unref0 (devgroup); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; - } - _tmp6_ = dvb_factory_get_epg_store (); - _tmp7_ = _tmp6_; - _tmp8_ = dvb_device_group_get_Id (devgroup); - dvb_database_epg_store_remove_events_of_group (_tmp7_, _tmp8_, &_inner_error_); - _g_object_unref0 (_tmp7_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch94_dvb_database_sql_error; + _tmp20_ = dvb_factory_new (); + _tmp21_ = _tmp20_; + _tmp22_ = dvb_factory_get_epg_store (_tmp21_); + _tmp23_ = _tmp22_; + _tmp24_ = devgroup; + _tmp25_ = dvb_device_group_get_Id (_tmp24_); + _tmp26_ = _tmp25_; + dvb_database_epg_store_remove_events_of_group (_tmp23_, _tmp26_, &_inner_error_); + _g_object_unref0 (_tmp23_); + _g_object_unref0 (_tmp21_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch105_dvb_database_sql_error; + } + _g_object_unref0 (devgroup); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - _g_object_unref0 (devgroup); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; - } - _tmp9_ = dvb_factory_get_timers_store (); - _tmp10_ = _tmp9_; - _tmp11_ = dvb_device_group_get_Id (devgroup); - dvb_database_timers_store_remove_all_timers_from_device_group (_tmp10_, _tmp11_, &_inner_error_); - _g_object_unref0 (_tmp10_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch94_dvb_database_sql_error; + _tmp27_ = dvb_factory_new (); + _tmp28_ = _tmp27_; + _tmp29_ = dvb_factory_get_timers_store (_tmp28_); + _tmp30_ = _tmp29_; + _tmp31_ = devgroup; + _tmp32_ = dvb_device_group_get_Id (_tmp31_); + _tmp33_ = _tmp32_; + dvb_database_timers_store_remove_all_timers_from_device_group (_tmp30_, _tmp33_, &_inner_error_); + _g_object_unref0 (_tmp30_); + _g_object_unref0 (_tmp28_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch105_dvb_database_sql_error; + } + _g_object_unref0 (devgroup); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - _g_object_unref0 (devgroup); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + _tmp34_ = group_id; + g_signal_emit_by_name ((DVBIDBusManager*) self, "group-removed", _tmp34_); } - g_signal_emit_by_name ((DVBIDBusManager*) self, "group-removed", group_id); - goto __finally94; - __catch94_dvb_database_sql_error: + goto __finally105; + __catch105_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp35_; + GError* _tmp36_; + const gchar* _tmp37_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:590: %s", e->message); + _tmp35_ = dvb_manager_log; + _tmp36_ = e; + _tmp37_ = _tmp36_->message; + dvb_logging_logger_error (_tmp35_, "Manager.vala:618: %s", _tmp37_); _g_error_free0 (e); } - __finally94: + __finally105: if (_inner_error_ != NULL) { _g_object_unref0 (devgroup); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2466,45 +3389,61 @@ static void dvb_manager_create_device_group_by_id (DVBManager* self, guint group_id) { - DVBdatabaseConfigStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseConfigStore* _tmp2_ = NULL; + DVBdatabaseConfigStore* _tmp3_; DVBdatabaseConfigStore* config_store; - GeeList* groups; - GeeList* _tmp1_ = NULL; - GeeList* _tmp2_; - GeeList* _tmp3_; + GeeList* groups = NULL; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _tmp0_ = dvb_factory_get_config_store (); - config_store = _tmp0_; - groups = NULL; - _tmp1_ = dvb_database_config_store_get_all_device_groups (config_store, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch95_dvb_database_sql_error; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_config_store (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + config_store = _tmp3_; + { + DVBdatabaseConfigStore* _tmp4_; + GeeList* _tmp5_ = NULL; + GeeList* _tmp6_; + _tmp4_ = config_store; + _tmp5_ = dvb_database_config_store_get_all_device_groups (_tmp4_, &_inner_error_); + _tmp6_ = _tmp5_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch106_dvb_database_sql_error; + } + _g_object_unref0 (groups); + _g_object_unref0 (config_store); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } _g_object_unref0 (groups); - _g_object_unref0 (config_store); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + groups = _tmp6_; } - _tmp3_ = _tmp2_; - _g_object_unref0 (groups); - groups = _tmp3_; - goto __finally95; - __catch95_dvb_database_sql_error: + goto __finally106; + __catch106_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp7_; + guint _tmp8_; + GError* _tmp9_; + const gchar* _tmp10_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:603: Error restoring group %u: %s", group_id, e->message); + _tmp7_ = dvb_manager_log; + _tmp8_ = group_id; + _tmp9_ = e; + _tmp10_ = _tmp9_->message; + dvb_logging_logger_error (_tmp7_, "Manager.vala:631: Error restoring group %u: %s", _tmp8_, _tmp10_); _g_error_free0 (e); _g_object_unref0 (groups); _g_object_unref0 (config_store); return; } - __finally95: + __finally106: if (_inner_error_ != NULL) { _g_object_unref0 (groups); _g_object_unref0 (config_store); @@ -2513,29 +3452,53 @@ return; } { - GeeList* _tmp4_; + GeeList* _tmp11_; + GeeList* _tmp12_; GeeList* _group_list; - gint _tmp5_; + GeeList* _tmp13_; + gint _tmp14_; + gint _tmp15_; gint _group_size; gint _group_index; - _tmp4_ = _g_object_ref0 (groups); - _group_list = _tmp4_; - _tmp5_ = gee_collection_get_size ((GeeCollection*) _group_list); - _group_size = _tmp5_; + _tmp11_ = groups; + _tmp12_ = _g_object_ref0 (_tmp11_); + _group_list = _tmp12_; + _tmp13_ = _group_list; + _tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_); + _tmp15_ = _tmp14_; + _group_size = _tmp15_; _group_index = -1; while (TRUE) { - gpointer _tmp6_ = NULL; + gint _tmp16_; + gint _tmp17_; + gint _tmp18_; + GeeList* _tmp19_; + gint _tmp20_; + gpointer _tmp21_ = NULL; DVBDeviceGroup* group; - guint _tmp7_; - _group_index = _group_index + 1; - if (!(_group_index < _group_size)) { + DVBDeviceGroup* _tmp22_; + guint _tmp23_; + guint _tmp24_; + guint _tmp25_; + _tmp16_ = _group_index; + _group_index = _tmp16_ + 1; + _tmp17_ = _group_index; + _tmp18_ = _group_size; + if (!(_tmp17_ < _tmp18_)) { break; } - _tmp6_ = gee_list_get (_group_list, _group_index); - group = (DVBDeviceGroup*) _tmp6_; - _tmp7_ = dvb_device_group_get_Id (group); - if (_tmp7_ == group_id) { - dvb_manager_restore_device_group_and_timers (self, group); + _tmp19_ = _group_list; + _tmp20_ = _group_index; + _tmp21_ = gee_list_get (_tmp19_, _tmp20_); + group = (DVBDeviceGroup*) _tmp21_; + _tmp22_ = group; + _tmp23_ = dvb_device_group_get_Id (_tmp22_); + _tmp24_ = _tmp23_; + _tmp25_ = group_id; + if (_tmp24_ == _tmp25_) { + DVBDeviceGroup* _tmp26_; + _tmp26_ = group; + dvb_manager_restore_device_group_and_timers (self, _tmp26_); } _g_object_unref0 (group); } @@ -2548,68 +3511,106 @@ static void dvb_manager_on_udev_event (DVBManager* self, const gchar* action, GUdevDevice* device) { gboolean _tmp0_ = FALSE; + const gchar* _tmp1_; + gboolean _tmp3_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (action != NULL); g_return_if_fail (device != NULL); - if (g_strcmp0 (action, "add") == 0) { + _tmp1_ = action; + if (g_strcmp0 (_tmp1_, "add") == 0) { _tmp0_ = TRUE; } else { - _tmp0_ = g_strcmp0 (action, "remove") == 0; - } - if (_tmp0_) { - const gchar* _tmp1_ = NULL; - gchar* _tmp2_; + const gchar* _tmp2_; + _tmp2_ = action; + _tmp0_ = g_strcmp0 (_tmp2_, "remove") == 0; + } + _tmp3_ = _tmp0_; + if (_tmp3_) { + GUdevDevice* _tmp4_; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_; gchar* dev_file; guint adapter; guint frontend; - gint _tmp3_; + const gchar* _tmp7_; + gint _tmp8_ = 0; guint group_id = 0U; gboolean found; - DVBdatabaseConfigStore* _tmp4_ = NULL; + DVBFactory* _tmp9_; + DVBFactory* _tmp10_; + DVBdatabaseConfigStore* _tmp11_ = NULL; + DVBdatabaseConfigStore* _tmp12_; DVBdatabaseConfigStore* config_store; - guint _tmp5_; - gboolean _tmp6_; - gboolean _tmp7_; - DVBDeviceGroup* _tmp8_ = NULL; + gboolean _tmp21_; + DVBLoggingLogger* _tmp22_; + const gchar* _tmp23_; + const gchar* _tmp24_; + guint _tmp25_; + guint _tmp26_; + DVBDeviceGroup* _tmp27_ = NULL; DVBDeviceGroup* group; - _tmp1_ = g_udev_device_get_device_file (device); - _tmp2_ = g_strdup (_tmp1_); - dev_file = _tmp2_; + DVBDeviceGroup* _tmp28_; + const gchar* _tmp30_; + DVBDeviceGroup* _tmp44_; + _tmp4_ = device; + _tmp5_ = g_udev_device_get_device_file (_tmp4_); + _tmp6_ = g_strdup (_tmp5_); + dev_file = _tmp6_; adapter = (guint) (-1); frontend = (guint) (-1); - _tmp3_ = sscanf (dev_file, "/dev/dvb/adapter%u/frontend%u", &adapter, &frontend); - if (_tmp3_ != 2) { + _tmp7_ = dev_file; + _tmp8_ = sscanf (_tmp7_, "/dev/dvb/adapter%u/frontend%u", &adapter, &frontend); + if (_tmp8_ != 2) { _g_free0 (dev_file); return; } found = FALSE; - _tmp4_ = dvb_factory_get_config_store (); - config_store = _tmp4_; - _tmp6_ = dvb_database_config_store_get_parent_group (config_store, adapter, frontend, &_tmp5_, &_inner_error_); - group_id = _tmp5_; - _tmp7_ = _tmp6_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch96_dvb_database_sql_error; + _tmp9_ = dvb_factory_new (); + _tmp10_ = _tmp9_; + _tmp11_ = dvb_factory_get_config_store (_tmp10_); + _tmp12_ = _tmp11_; + _g_object_unref0 (_tmp10_); + config_store = _tmp12_; + { + DVBdatabaseConfigStore* _tmp13_; + guint _tmp14_; + guint _tmp15_; + guint _tmp16_ = 0U; + gboolean _tmp17_ = FALSE; + gboolean _tmp18_; + _tmp13_ = config_store; + _tmp14_ = adapter; + _tmp15_ = frontend; + _tmp17_ = dvb_database_config_store_get_parent_group (_tmp13_, _tmp14_, _tmp15_, &_tmp16_, &_inner_error_); + group_id = _tmp16_; + _tmp18_ = _tmp17_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch107_dvb_database_sql_error; + } + _g_object_unref0 (config_store); + _g_free0 (dev_file); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - _g_object_unref0 (config_store); - _g_free0 (dev_file); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + found = _tmp18_; } - found = _tmp7_; - goto __finally96; - __catch96_dvb_database_sql_error: + goto __finally107; + __catch107_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + GError* _tmp19_; + const gchar* _tmp20_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Manager.vala:631: %s", e->message); + _tmp19_ = e; + _tmp20_ = _tmp19_->message; + g_critical ("Manager.vala:659: %s", _tmp20_); _g_error_free0 (e); } - __finally96: + __finally107: if (_inner_error_ != NULL) { _g_object_unref0 (config_store); _g_free0 (dev_file); @@ -2617,45 +3618,80 @@ g_clear_error (&_inner_error_); return; } - if (!found) { + _tmp21_ = found; + if (!_tmp21_) { _g_object_unref0 (config_store); _g_free0 (dev_file); return; } - g_debug ("Manager.vala:636: %s device %s, part of group %u", action, dev_file, group_id); - _tmp8_ = dvb_manager_get_device_group_if_exists (self, group_id); - group = _tmp8_; - if (group != NULL) { - dvb_device_group_stop_epg_scanner (group); - } - if (g_strcmp0 (action, "add") == 0) { - if (group == NULL) { - dvb_manager_create_device_group_by_id (self, group_id); + _tmp22_ = dvb_manager_log; + _tmp23_ = action; + _tmp24_ = dev_file; + _tmp25_ = group_id; + dvb_logging_logger_debug (_tmp22_, "Manager.vala:664: %s device %s, part of group %u", _tmp23_, _tmp24_, _tmp25_); + _tmp26_ = group_id; + _tmp27_ = dvb_manager_get_device_group_if_exists (self, _tmp26_); + group = _tmp27_; + _tmp28_ = group; + if (_tmp28_ != NULL) { + DVBDeviceGroup* _tmp29_; + _tmp29_ = group; + dvb_device_group_stop_epg_scanner (_tmp29_); + } + _tmp30_ = action; + if (g_strcmp0 (_tmp30_, "add") == 0) { + DVBDeviceGroup* _tmp31_; + _tmp31_ = group; + if (_tmp31_ == NULL) { + guint _tmp32_; + _tmp32_ = group_id; + dvb_manager_create_device_group_by_id (self, _tmp32_); } else { - DVBDevice* _tmp9_ = NULL; + guint _tmp33_; + guint _tmp34_; + DVBDevice* _tmp35_ = NULL; DVBDevice* dvb_device; - _tmp9_ = dvb_device_new_with_type (adapter, frontend); - dvb_device = _tmp9_; - if (dvb_device == NULL) { + DVBDevice* _tmp36_; + DVBDeviceGroup* _tmp37_; + DVBDevice* _tmp38_; + _tmp33_ = adapter; + _tmp34_ = frontend; + _tmp35_ = dvb_device_new_with_type (_tmp33_, _tmp34_); + dvb_device = _tmp35_; + _tmp36_ = dvb_device; + if (_tmp36_ == NULL) { _g_object_unref0 (dvb_device); _g_object_unref0 (group); _g_object_unref0 (config_store); _g_free0 (dev_file); return; } - dvb_device_group_add (group, dvb_device); + _tmp37_ = group; + _tmp38_ = dvb_device; + dvb_device_group_add (_tmp37_, _tmp38_); _g_object_unref0 (dvb_device); } } else { - DVBDevice* _tmp10_ = NULL; + guint _tmp39_; + guint _tmp40_; + DVBDevice* _tmp41_; DVBDevice* dvb_device; - _tmp10_ = dvb_device_new (adapter, frontend); - dvb_device = _tmp10_; - dvb_device_group_remove (group, dvb_device); + DVBDeviceGroup* _tmp42_; + DVBDevice* _tmp43_; + _tmp39_ = adapter; + _tmp40_ = frontend; + _tmp41_ = dvb_device_new (_tmp39_, _tmp40_); + dvb_device = _tmp41_; + _tmp42_ = group; + _tmp43_ = dvb_device; + dvb_device_group_remove (_tmp42_, _tmp43_); _g_object_unref0 (dvb_device); } - if (group != NULL) { - dvb_device_group_start_epg_scanner (group); + _tmp44_ = group; + if (_tmp44_ != NULL) { + DVBDeviceGroup* _tmp45_; + _tmp45_ = group; + dvb_device_group_start_epg_scanner (_tmp45_); } _g_object_unref0 (group); _g_object_unref0 (config_store); @@ -2678,10 +3714,14 @@ GeeCollection* dvb_manager_get_device_groups (DVBManager* self) { GeeCollection* result; - GeeCollection* _tmp0_ = NULL; + GeeHashMap* _tmp0_; + GeeCollection* _tmp1_; + GeeCollection* _tmp2_; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = gee_map_get_values ((GeeMap*) self->priv->devices); - result = _tmp0_; + _tmp0_ = self->priv->devices; + _tmp1_ = gee_map_get_values ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + result = _tmp2_; return result; } @@ -2695,61 +3735,108 @@ GObject * obj; GObjectClass * parent_class; DVBManager * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; - GeeHashMap* _tmp2_ = NULL; + GHashFunc _tmp0_; + GEqualFunc _tmp1_; + GEqualFunc _tmp2_; GeeHashMap* _tmp3_; - GUdevClient* _tmp4_ = NULL; + GeeHashMap* _tmp4_; GUdevClient* _tmp5_; + GUdevClient* _tmp6_; parent_class = G_OBJECT_CLASS (dvb_manager_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_MANAGER (obj); - _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, DVB_TYPE_SCANNER, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_str_hash, g_str_equal, g_direct_equal); - _tmp1_ = _tmp0_; + _tmp0_ = g_str_hash; + _tmp1_ = g_str_equal; + _tmp2_ = g_direct_equal; + _tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, DVB_MANAGER_TYPE_SCANNER_DATA, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp0_, _tmp1_, _tmp2_); _g_object_unref0 (self->priv->scanners); - self->priv->scanners = _tmp1_; - _tmp2_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_DEVICE_GROUP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp3_ = _tmp2_; + self->priv->scanners = _tmp3_; + _tmp4_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_DEVICE_GROUP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); _g_object_unref0 (self->priv->devices); - self->priv->devices = _tmp3_; + self->priv->devices = _tmp4_; self->priv->device_group_counter = (guint) 0; - _tmp4_ = g_udev_client_new (DVB_MANAGER_UDEV_SUBSYSTEMS); - _tmp5_ = _tmp4_; + _tmp5_ = g_udev_client_new (DVB_MANAGER_UDEV_SUBSYSTEMS); _g_object_unref0 (self->priv->udev_client); self->priv->udev_client = _tmp5_; - g_signal_connect_object (self->priv->udev_client, "uevent", (GCallback) _dvb_manager_on_udev_event_g_udev_client_uevent, self, 0); + _tmp6_ = self->priv->udev_client; + g_signal_connect_object (_tmp6_, "uevent", (GCallback) _dvb_manager_on_udev_event_g_udev_client_uevent, self, 0); return obj; } +static DVBManagerScannerData* dvb_manager_scanner_data_construct (GType object_type) { + DVBManagerScannerData * self = NULL; + self = (DVBManagerScannerData*) g_object_new (object_type, NULL); + return self; +} + + +static DVBManagerScannerData* dvb_manager_scanner_data_new (void) { + return dvb_manager_scanner_data_construct (DVB_MANAGER_TYPE_SCANNER_DATA); +} + + +static void dvb_manager_scanner_data_class_init (DVBManagerScannerDataClass * klass) { + dvb_manager_scanner_data_parent_class = g_type_class_peek_parent (klass); + G_OBJECT_CLASS (klass)->finalize = dvb_manager_scanner_data_finalize; +} + + +static void dvb_manager_scanner_data_instance_init (DVBManagerScannerData * self) { +} + + +static void dvb_manager_scanner_data_finalize (GObject* obj) { + DVBManagerScannerData * self; + self = DVB_MANAGER_SCANNER_DATA (obj); + _g_object_unref0 (self->scanner); + G_OBJECT_CLASS (dvb_manager_scanner_data_parent_class)->finalize (obj); +} + + +static GType dvb_manager_scanner_data_get_type (void) { + static volatile gsize dvb_manager_scanner_data_type_id__volatile = 0; + if (g_once_init_enter (&dvb_manager_scanner_data_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBManagerScannerDataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_manager_scanner_data_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBManagerScannerData), 0, (GInstanceInitFunc) dvb_manager_scanner_data_instance_init, NULL }; + GType dvb_manager_scanner_data_type_id; + dvb_manager_scanner_data_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBManagerScannerData", &g_define_type_info, 0); + g_once_init_leave (&dvb_manager_scanner_data_type_id__volatile, dvb_manager_scanner_data_type_id); + } + return dvb_manager_scanner_data_type_id__volatile; +} + + static void dvb_manager_class_init (DVBManagerClass * klass) { - GStaticRecMutex _tmp0_ = {0}; - GStaticRecMutex _tmp1_ = {0}; + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; + GStaticRecMutex _tmp2_ = {0}; dvb_manager_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBManagerPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_manager_get_property; G_OBJECT_CLASS (klass)->constructor = dvb_manager_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_manager_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_MANAGER_DEVICE_GROUPS, g_param_spec_object ("device-groups", "device-groups", "device-groups", GEE_TYPE_COLLECTION, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_type_set_qdata (DVB_TYPE_MANAGER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_manager_dbus_vtable)); - g_static_rec_mutex_init (&_tmp0_); - _tmp1_ = _tmp0_; - dvb_manager_instance_mutex = _tmp1_; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_manager_log = _tmp1_; + g_static_rec_mutex_init (&_tmp2_); + dvb_manager_instance_mutex = _tmp2_; } static void dvb_manager_dvb_id_bus_manager_interface_init (DVBIDBusManagerIface * iface) { dvb_manager_dvb_id_bus_manager_parent_iface = g_type_interface_peek_parent (iface); - iface->GetScannerForDevice = (gboolean (*)(DVBIDBusManager* ,guint ,guint ,char** ,gchar** ,GError**)) dvb_manager_real_GetScannerForDevice; - iface->GetDeviceGroup = (gboolean (*)(DVBIDBusManager* ,guint ,char** ,GError**)) dvb_manager_real_GetDeviceGroup; - iface->GetRegisteredDeviceGroups = (char** (*)(DVBIDBusManager* ,int* ,GError**)) dvb_manager_real_GetRegisteredDeviceGroups; - iface->AddDeviceToNewGroup = (gboolean (*)(DVBIDBusManager* ,guint ,guint ,const gchar* ,const gchar* ,const gchar* ,GError**)) dvb_manager_real_AddDeviceToNewGroup; - iface->GetNameOfRegisteredDevice = (gboolean (*)(DVBIDBusManager* ,guint ,guint ,gchar** ,GError**)) dvb_manager_real_GetNameOfRegisteredDevice; - iface->GetDeviceGroupSize = (gint (*)(DVBIDBusManager* ,GError**)) dvb_manager_real_GetDeviceGroupSize; - iface->GetChannelGroups = (DVBChannelGroupInfo* (*)(DVBIDBusManager* ,int* ,GError**)) dvb_manager_real_GetChannelGroups; - iface->AddChannelGroup = (gboolean (*)(DVBIDBusManager* ,const gchar* ,gint* ,GError**)) dvb_manager_real_AddChannelGroup; - iface->RemoveChannelGroup = (gboolean (*)(DVBIDBusManager* ,gint ,GError**)) dvb_manager_real_RemoveChannelGroup; - iface->GetDevices = (GHashTable** (*)(DVBIDBusManager* ,int* ,GError**)) dvb_manager_real_GetDevices; + iface->GetScannerForDevice = (gboolean (*)(DVBIDBusManager*, guint, guint, char**, gchar**, GError**)) dvb_manager_real_GetScannerForDevice; + iface->GetDeviceGroup = (gboolean (*)(DVBIDBusManager*, guint, char**, GError**)) dvb_manager_real_GetDeviceGroup; + iface->GetRegisteredDeviceGroups = (char** (*)(DVBIDBusManager*, int*, GError**)) dvb_manager_real_GetRegisteredDeviceGroups; + iface->AddDeviceToNewGroup = (gboolean (*)(DVBIDBusManager*, guint, guint, const gchar*, const gchar*, const gchar*, GError**)) dvb_manager_real_AddDeviceToNewGroup; + iface->GetNameOfRegisteredDevice = (gboolean (*)(DVBIDBusManager*, guint, guint, gchar**, GError**)) dvb_manager_real_GetNameOfRegisteredDevice; + iface->GetDeviceGroupSize = (gint (*)(DVBIDBusManager*, GError**)) dvb_manager_real_GetDeviceGroupSize; + iface->GetChannelGroups = (DVBChannelGroupInfo* (*)(DVBIDBusManager*, int*, GError**)) dvb_manager_real_GetChannelGroups; + iface->AddChannelGroup = (gboolean (*)(DVBIDBusManager*, const gchar*, gint*, GError**)) dvb_manager_real_AddChannelGroup; + iface->RemoveChannelGroup = (gboolean (*)(DVBIDBusManager*, gint, GError**)) dvb_manager_real_RemoveChannelGroup; + iface->GetDevices = (GHashTable** (*)(DVBIDBusManager*, int*, GError**)) dvb_manager_real_GetDevices; + iface->GetAdapterInfo = (gboolean (*)(DVBIDBusManager*, guint, guint, DVBAdapterInfo*, GError**)) dvb_manager_real_GetAdapterInfo; } diff -Nru gnome-dvb-daemon-0.1.23/src/Manager.vala gnome-dvb-daemon-0.2.7/src/Manager.vala --- gnome-dvb-daemon-0.1.23/src/Manager.vala 2010-08-09 13:32:43.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Manager.vala 2011-12-09 11:13:45.000000000 +0000 @@ -20,39 +20,46 @@ using GLib; using Gee; using DVB.database; +using DVB.Logging; namespace DVB { - + public class Manager : Object, IDBusManager { - + + class ScannerData : Object { + public Scanner scanner; + public ulong signal_id; + } + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public Gee.Collection device_groups { owned get { return this.devices.values; } } - // Map object path to Scanner - private HashMap scanners; - + private HashMap scanners; + // Maps device group id to Device private HashMap devices; - + private uint device_group_counter; private GUdev.Client udev_client; - + private static Manager instance; private static StaticRecMutex instance_mutex = StaticRecMutex (); private static const string[] UDEV_SUBSYSTEMS = {"dvb", null}; - + construct { - this.scanners = new HashMap (GLib.str_hash, + this.scanners = new HashMap (GLib.str_hash, GLib.str_equal, GLib.direct_equal); this.devices = new HashMap (); this.device_group_counter = 0; this.udev_client = new GUdev.Client (UDEV_SUBSYSTEMS); this.udev_client.uevent.connect (this.on_udev_event); } - + public static unowned Manager get_instance () { instance_mutex.lock (); if (instance == null) { @@ -61,33 +68,34 @@ instance_mutex.unlock (); return instance; } - + public static void shutdown () { instance_mutex.lock (); Manager m = instance; - + if (instance != null) { m.udev_client = null; lock (m.scanners) { - foreach (Scanner scanner in m.scanners.values) { - debug ("Stopping scanner"); - scanner.do_destroy (); + foreach (ScannerData data in m.scanners.values) { + log.debug ("Stopping scanner"); + data.scanner.disconnect (data.signal_id); + data.scanner.do_destroy (); } m.scanners.clear (); } - + lock (m.devices) { foreach (DeviceGroup devgrp in m.devices.values) { devgrp.destroy (); } m.devices.clear (); } - + instance = null; } instance_mutex.unlock (); } - + /** * @adapter: Number of the device's adapter * @frontend: Number of the device's frontend @@ -98,126 +106,111 @@ * Get the object path of the channel scanner for this device. */ public bool GetScannerForDevice (uint adapter, uint frontend, - out DBus.ObjectPath opath, out string dbusiface) throws DBus.Error { + out ObjectPath opath, out string dbusiface) throws DBusError + { string path = Constants.DBUS_SCANNER_PATH.printf (adapter, frontend); - opath = new DBus.ObjectPath (path); - + opath = new ObjectPath (path); + Device device; Device? reg_dev = this.get_registered_device (adapter, frontend); - + if (reg_dev == null) { // Create new device device = Device.new_with_type (adapter, frontend); } else { // Stop epgscanner for device if there's any this.get_device_group_of_device (reg_dev).stop_epg_scanner (); - + // Assign existing device device = reg_dev; } switch (device.Type) { - case AdapterType.DVB_T: - dbusiface = "org.gnome.DVB.Scanner.Terrestrial"; - break; - - case AdapterType.DVB_S: - dbusiface = "org.gnome.DVB.Scanner.Satellite"; - break; - case AdapterType.DVB_C: - dbusiface = "org.gnome.DVB.Scanner.Cable"; + case AdapterType.DVB_S: + case AdapterType.DVB_T: + dbusiface = "org.gnome.DVB.Scanner"; break; default: dbusiface = null; break; } - + if (dbusiface == null) { - critical ("Unknown adapter type"); + log.error ("Unknown adapter type"); dbusiface = ""; return false; } - + lock (this.scanners) { if (!this.scanners.has_key (path)) { - Scanner scanner = null; + ScannerData data = new ScannerData (); switch (device.Type) { case AdapterType.DVB_T: - scanner = new TerrestrialScanner (device); + data.scanner = new TerrestrialScanner (device); break; - + case AdapterType.DVB_S: - scanner = new SatelliteScanner (device); + data.scanner = new SatelliteScanner (device); break; - + case AdapterType.DVB_C: - scanner = new CableScanner (device); + data.scanner = new CableScanner (device); break; } - - if (scanner == null) { - critical ("Unknown adapter type"); - return false; - } - - scanner.destroyed.connect (this.on_scanner_destroyed); - - this.scanners.set (path, scanner); - - var conn = Utils.get_dbus_connection (); - if (conn == null) return false; - - conn.register_object ( - path, - scanner); - - debug ("Created new Scanner D-Bus service for adapter %u, frontend %u (%s)", + + Utils.dbus_register_object (Main.conn, path, (IDBusScanner)data.scanner); + + data.signal_id = data.scanner.destroyed.connect (this.on_scanner_destroyed); + + this.scanners.set (path, data); + + log.debug ("Created new Scanner D-Bus service for adapter %u, frontend %u (%s)", adapter, frontend, dbusiface); } } - + return true; } - + /** * @group_id: A group ID * @path: Device group's DBus path * @returns: TRUE on success */ - public bool GetDeviceGroup (uint group_id, out DBus.ObjectPath opath) - throws DBus.Error + public bool GetDeviceGroup (uint group_id, out ObjectPath opath) + throws DBusError { bool ret; lock (this.devices) { if (this.devices.has_key (group_id)) { - opath = new DBus.ObjectPath (Constants.DBUS_DEVICE_GROUP_PATH.printf (group_id)); + opath = new ObjectPath (Constants.DBUS_DEVICE_GROUP_PATH.printf (group_id)); ret = true; } else { - opath = new DBus.ObjectPath (""); + opath = new ObjectPath (""); ret = false; } } return ret; } - + /** * @returns: Device groups' DBus path */ - public DBus.ObjectPath[] GetRegisteredDeviceGroups () throws DBus.Error { - DBus.ObjectPath[] devs = new DBus.ObjectPath[this.devices.size]; + public ObjectPath[] GetRegisteredDeviceGroups () throws DBusError { + ObjectPath[] devs = new ObjectPath[this.devices.size]; int i = 0; lock (this.devices) { foreach (uint key in this.devices.keys) { - devs[i] = new DBus.ObjectPath ( + devs[i] = new ObjectPath ( Constants.DBUS_DEVICE_GROUP_PATH.printf (key)); i++; } } return devs; } - + /** * @adapter: Number of the device's adapter * @frontend: Number of the device's frontend @@ -233,35 +226,35 @@ */ public bool AddDeviceToNewGroup (uint adapter, uint frontend, string channels_conf, string recordings_dir, string name) - throws DBus.Error - { + throws DBusError + { File chan_file = File.new_for_path (channels_conf); File rec_dir = File.new_for_path (recordings_dir); - + Device device; try { device = Device.new_full (adapter, frontend, chan_file, - rec_dir, device_group_counter + 1); + rec_dir); } catch (DeviceError e) { - critical ("Could not create device: %s", e.message); + log.error ("Could not create device: %s", e.message); return false; } - + // Check if device is already assigned to other group if (this.device_is_in_any_group (device)) return false; - + device_group_counter++; - + DeviceGroup devgroup = new DeviceGroup (device_group_counter, device); devgroup.Name = name; - + this.restore_device_group (devgroup); - + this.group_added (device_group_counter); - + return true; } - + /** * @adapter: Adapter of device * @frontend: Frontend of device @@ -272,10 +265,10 @@ * is returned. */ public bool GetNameOfRegisteredDevice (uint adapter, uint frontend, - out string name) throws DBus.Error + out string name) throws DBusError { Device? dev = this.get_registered_device (adapter, frontend); - + if (dev == null) { name = ""; return false; @@ -284,24 +277,24 @@ return true; } } - + /** * @returns: the numner of configured device groups */ - public int GetDeviceGroupSize () throws DBus.Error { + public int GetDeviceGroupSize () throws DBusError { return this.devices.size; } - + /** * @returns: ID and name of each channel group */ - public ChannelGroupInfo[] GetChannelGroups () throws DBus.Error { - ConfigStore config = Factory.get_config_store (); + public ChannelGroupInfo[] GetChannelGroups () throws DBusError { + ConfigStore config = new Factory().get_config_store (); Gee.List groups; try { groups = config.get_channel_groups (); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); return new ChannelGroupInfo[] {}; } ChannelGroupInfo[] arr = new ChannelGroupInfo[groups.size]; @@ -318,13 +311,13 @@ * @name: Name of the new group * @returns: TRUE on success */ - public bool AddChannelGroup (string name, out int channel_group_id) throws DBus.Error { - ConfigStore config = Factory.get_config_store (); + public bool AddChannelGroup (string name, out int channel_group_id) throws DBusError { + ConfigStore config = new Factory().get_config_store (); bool ret; try { ret = config.add_channel_group (name, out channel_group_id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); ret = false; } return ret; @@ -334,13 +327,13 @@ * @channel_group_id: ID of the ChannelGroup * @returns: TRUE on success */ - public bool RemoveChannelGroup (int channel_group_id) throws DBus.Error { - ConfigStore config = Factory.get_config_store (); + public bool RemoveChannelGroup (int channel_group_id) throws DBusError { + ConfigStore config = new Factory().get_config_store (); bool ret; try { ret = config.remove_channel_group (channel_group_id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); ret = false; } return ret; @@ -350,8 +343,8 @@ * @returns: informations about all connected * devices retrieved via udev */ - public GLib.HashTable[] GetDevices () throws DBus.Error { - GLib.List devices = + public GLib.HashTable[] GetDevices () throws DBusError { + GLib.List devices = this.udev_client.query_by_subsystem ("dvb"); var devices_list = new GLib.List> (); @@ -387,73 +380,108 @@ return arr; } + public bool GetAdapterInfo (uint adapter, uint frontend, out AdapterInfo info) throws DBusError { + Gst.Element dvbelement = Gst.ElementFactory.make ("dvbsrc", null); + dvbelement.set("adapter", adapter); + dvbelement.set("frontend", frontend); + + Gst.Element pipeline = new Gst.Pipeline(null); + ((Gst.Bin)pipeline).add(dvbelement); + pipeline.set_state(Gst.State.READY); + + Gst.Bus bus = pipeline.get_bus (); + + info = AdapterInfo(); + bool success = false; + while (bus.have_pending()) { + Gst.Message msg = bus.pop (); + if (msg.type == Gst.MessageType.ELEMENT && msg.src == dvbelement) { + Gst.Structure structure = msg.get_structure (); + if (structure.get_name () == "dvb-adapter") { + info.name = structure.get_string ("name"); + info.type = structure.get_string ("type"); + success = true; + break; + } + } else if (msg.type == Gst.MessageType.ERROR) { + log.warning ("Could not retrieve adapter infos: %s", + msg.get_structure().to_string ()); + } + } + pipeline.set_state (Gst.State.NULL); + + if (!success) { + info.name = "unknown"; + info.type = "unknown"; + } + + return success; + } + /** * @returns: Whether the device has been added successfully * * Register device, create Recorder and ChannelList D-Bus service */ - public bool add_device_group (DeviceGroup devgroup) { + public bool add_device_group (DeviceGroup devgroup, bool store) { uint group_id = devgroup.Id; - debug ("Adding device group %u with %d devices", group_id, + log.debug ("Adding device group %u with %d devices", group_id, devgroup.size); - + if (devgroup.Type == AdapterType.UNKNOWN) { - warning ("Not adding device group %u of unknown type", + log.warning ("Not adding device group %u of unknown type", devgroup.Id); return false; } - + lock (this.devices) { this.devices.set (group_id, devgroup); } - try { - Factory.get_config_store ().add_device_group (devgroup); - } catch (SqlError e) { - critical ("%s", e.message); - return false; + if (store) { + try { + new Factory().get_config_store ().add_device_group (devgroup); + } catch (SqlError e) { + log.error ("%s", e.message); + return false; + } } devgroup.device_removed.connect (this.on_device_removed_from_group); - - // Register D-Bus object - var conn = Utils.get_dbus_connection (); - if (conn == null) return false; - + string path = Constants.DBUS_DEVICE_GROUP_PATH.printf (group_id); - conn.register_object ( - path, - devgroup); - + Utils.dbus_register_object (Main.conn, + path, devgroup); + if (group_id > device_group_counter) device_group_counter = group_id; devgroup.start_epg_scanner (); - + return true; } - public bool restore_device_group (DeviceGroup device_group) { - debug ("Restoring group %u", device_group.Id); + public bool restore_device_group (DeviceGroup device_group, bool store = true) { + log.debug ("Restoring group %u", device_group.Id); - try { + try { device_group.Channels.load (device_group.Type); } catch (Error e) { - critical ("Error reading channels from file: %s", e.message); + log.error ("Error reading channels from file: %s", e.message); return false; } - - return this.add_device_group (device_group); + + return this.add_device_group (device_group, store); } - + public void restore_timers (DeviceGroup device_group) { - message ("Restoring timers of device group %u", device_group.Id); - TimersStore timers_store = Factory.get_timers_store (); + log.info ("Restoring timers of device group %u", device_group.Id); + TimersStore timers_store = new Factory().get_timers_store (); Gee.List timers; try { timers = timers_store.get_all_timers_of_device_group ( device_group); } catch (SqlError e) { - critical ("Failed retrieving timers of group %u: %s", + log.error ("Failed retrieving timers of group %u: %s", device_group.Id, e.message); return; } @@ -467,7 +495,7 @@ try { timers_store.remove_timer_from_device_group (t.Id, device_group); } catch (SqlError e) { - critical ("Failed removing timer: %s", e.message); + log.error ("Failed removing timer: %s", e.message); } } } @@ -482,7 +510,7 @@ this.restore_timers (device_group); } } - + public DeviceGroup? get_device_group_if_exists (uint group_id) { DeviceGroup? result = null; lock (this.devices) { @@ -491,7 +519,7 @@ } return result; } - + public bool device_is_in_any_group (Device device) { bool result = false; lock (this.devices) { @@ -505,26 +533,26 @@ } return result; } - + private void on_scanner_destroyed (Scanner scanner) { uint adapter = scanner.Device.Adapter; uint frontend = scanner.Device.Frontend; - + string path = Constants.DBUS_SCANNER_PATH.printf (adapter, frontend); lock (this.scanners) { this.scanners.unset (path); } - - debug ("Destroying scanner for adapter %u, frontend %u (%s)", adapter, + + log.debug ("Destroying scanner for adapter %u, frontend %u (%s)", adapter, frontend, path); - + // Start epgscanner for device again if there was one DeviceGroup? devgroup = this.get_device_group_of_device (scanner.Device); if (devgroup != null) { devgroup.start_epg_scanner (); } } - + private Device? get_registered_device (uint adapter, uint frontend) { Device? result = null; Device fake_device = new Device (adapter, frontend); @@ -541,10 +569,10 @@ } } } - + return result; } - + private DeviceGroup? get_device_group_of_device (Device device) { DeviceGroup? result = null; lock (this.devices) { @@ -560,10 +588,10 @@ } } } - + return result; } - + private void on_device_removed_from_group (IDBusDeviceGroup idevgroup, uint adapter, uint frontend) { DeviceGroup devgroup = (DeviceGroup)idevgroup; @@ -575,36 +603,36 @@ } if (success) { devgroup.destroy (); - + try { - Factory.get_config_store ().remove_device_group ( + new Factory().get_config_store ().remove_device_group ( devgroup); - Factory.get_epg_store ().remove_events_of_group ( + new Factory().get_epg_store ().remove_events_of_group ( devgroup.Id ); - Factory.get_timers_store ().remove_all_timers_from_device_group ( + new Factory().get_timers_store ().remove_all_timers_from_device_group ( devgroup.Id ); this.group_removed (group_id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } } } } private void create_device_group_by_id (uint group_id) { - ConfigStore config_store = Factory.get_config_store (); + ConfigStore config_store = new Factory().get_config_store (); Gee.List groups; try { groups = config_store.get_all_device_groups (); } catch (SqlError e) { - critical ("Error restoring group %u: %s", group_id, + log.error ("Error restoring group %u: %s", group_id, e.message); return; } - + foreach (DeviceGroup group in groups) { if (group.Id == group_id) { this.restore_device_group_and_timers (group); @@ -623,7 +651,7 @@ uint group_id; bool found = false; - ConfigStore config_store = Factory.get_config_store (); + ConfigStore config_store = new Factory().get_config_store (); try { found = config_store.get_parent_group (adapter, frontend, out group_id); @@ -633,7 +661,7 @@ if (!found) return; - debug ("%s device %s, part of group %u", action, dev_file, + log.debug ("%s device %s, part of group %u", action, dev_file, group_id); DeviceGroup? group = this.get_device_group_if_exists (group_id); @@ -665,7 +693,7 @@ group.start_epg_scanner (); } } - + } } diff -Nru gnome-dvb-daemon-0.1.23/src/MpegTsEnums.c gnome-dvb-daemon-0.2.7/src/MpegTsEnums.c --- gnome-dvb-daemon-0.1.23/src/MpegTsEnums.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/MpegTsEnums.c 2011-09-22 12:34:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* MpegTsEnums.c generated by valac 0.11.3, the Vala compiler +/* MpegTsEnums.c generated by valac 0.14.0, the Vala compiler * generated from MpegTsEnums.vala, do not modify */ /* @@ -205,7 +205,9 @@ DVBDvbSrcBandwidth dvb_get_bandwidth_val (guint bandwidth) { DVBDvbSrcBandwidth result = 0; DVBDvbSrcBandwidth val = 0; - switch (bandwidth) { + guint _tmp0_; + _tmp0_ = bandwidth; + switch (_tmp0_) { case 6: { val = DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_6_MHZ; @@ -239,7 +241,9 @@ DVBDvbSrcHierarchy dvb_get_hierarchy_val (guint hierarchy) { DVBDvbSrcHierarchy result = 0; DVBDvbSrcHierarchy val = 0; - switch (hierarchy) { + guint _tmp0_; + _tmp0_ = hierarchy; + switch (_tmp0_) { case 0: { val = DVB_DVB_SRC_HIERARCHY_HIERARCHY_NONE; @@ -278,23 +282,35 @@ DVBDvbSrcModulation dvb_get_modulation_val (const gchar* constellation) { DVBDvbSrcModulation result = 0; DVBDvbSrcModulation val = 0; + const gchar* _tmp0_; g_return_val_if_fail (constellation != NULL, 0); - if (g_strcmp0 (constellation, "QPSK") == 0) { + _tmp0_ = constellation; + if (g_strcmp0 (_tmp0_, "QPSK") == 0) { val = DVB_DVB_SRC_MODULATION_QPSK; } else { - if (g_strcmp0 (constellation, "QAM16") == 0) { + const gchar* _tmp1_; + _tmp1_ = constellation; + if (g_strcmp0 (_tmp1_, "QAM16") == 0) { val = DVB_DVB_SRC_MODULATION_QAM_16; } else { - if (g_strcmp0 (constellation, "QAM32") == 0) { + const gchar* _tmp2_; + _tmp2_ = constellation; + if (g_strcmp0 (_tmp2_, "QAM32") == 0) { val = DVB_DVB_SRC_MODULATION_QAM_32; } else { - if (g_strcmp0 (constellation, "QAM64") == 0) { + const gchar* _tmp3_; + _tmp3_ = constellation; + if (g_strcmp0 (_tmp3_, "QAM64") == 0) { val = DVB_DVB_SRC_MODULATION_QAM_64; } else { - if (g_strcmp0 (constellation, "QAM128") == 0) { + const gchar* _tmp4_; + _tmp4_ = constellation; + if (g_strcmp0 (_tmp4_, "QAM128") == 0) { val = DVB_DVB_SRC_MODULATION_QAM_128; } else { - if (g_strcmp0 (constellation, "QAM256") == 0) { + const gchar* _tmp5_; + _tmp5_ = constellation; + if (g_strcmp0 (_tmp5_, "QAM256") == 0) { val = DVB_DVB_SRC_MODULATION_QAM_256; } else { val = DVB_DVB_SRC_MODULATION_QAM_AUTO; @@ -317,32 +333,50 @@ DVBDvbSrcCodeRate dvb_get_code_rate_val (const gchar* code_rate_string) { DVBDvbSrcCodeRate result = 0; DVBDvbSrcCodeRate val = 0; + const gchar* _tmp0_; g_return_val_if_fail (code_rate_string != NULL, 0); - if (g_strcmp0 (code_rate_string, "NONE") == 0) { + _tmp0_ = code_rate_string; + if (g_strcmp0 (_tmp0_, "NONE") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_NONE; } else { - if (g_strcmp0 (code_rate_string, "1/2") == 0) { + const gchar* _tmp1_; + _tmp1_ = code_rate_string; + if (g_strcmp0 (_tmp1_, "1/2") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_1_2; } else { - if (g_strcmp0 (code_rate_string, "2/3") == 0) { + const gchar* _tmp2_; + _tmp2_ = code_rate_string; + if (g_strcmp0 (_tmp2_, "2/3") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_2_3; } else { - if (g_strcmp0 (code_rate_string, "3/4") == 0) { + const gchar* _tmp3_; + _tmp3_ = code_rate_string; + if (g_strcmp0 (_tmp3_, "3/4") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_3_4; } else { - if (g_strcmp0 (code_rate_string, "4/5") == 0) { + const gchar* _tmp4_; + _tmp4_ = code_rate_string; + if (g_strcmp0 (_tmp4_, "4/5") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_4_5; } else { - if (g_strcmp0 (code_rate_string, "5/6") == 0) { + const gchar* _tmp5_; + _tmp5_ = code_rate_string; + if (g_strcmp0 (_tmp5_, "5/6") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_5_6; } else { - if (g_strcmp0 (code_rate_string, "6/7") == 0) { + const gchar* _tmp6_; + _tmp6_ = code_rate_string; + if (g_strcmp0 (_tmp6_, "6/7") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_5_6; } else { - if (g_strcmp0 (code_rate_string, "7/8") == 0) { + const gchar* _tmp7_; + _tmp7_ = code_rate_string; + if (g_strcmp0 (_tmp7_, "7/8") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_7_8; } else { - if (g_strcmp0 (code_rate_string, "8/9") == 0) { + const gchar* _tmp8_; + _tmp8_ = code_rate_string; + if (g_strcmp0 (_tmp8_, "8/9") == 0) { val = DVB_DVB_SRC_CODE_RATE_FEC_8_9; } else { val = DVB_DVB_SRC_CODE_RATE_FEC_AUTO; @@ -367,7 +401,9 @@ DVBDvbSrcGuard dvb_get_guard_interval_val (guint guard) { DVBDvbSrcGuard result = 0; DVBDvbSrcGuard val = 0; - switch (guard) { + guint _tmp0_; + _tmp0_ = guard; + switch (_tmp0_) { case 4: { val = DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_4; @@ -406,11 +442,15 @@ DVBDvbSrcTransmissionMode dvb_get_transmission_mode_val (const gchar* transmode) { DVBDvbSrcTransmissionMode result = 0; DVBDvbSrcTransmissionMode val = 0; + const gchar* _tmp0_; g_return_val_if_fail (transmode != NULL, 0); - if (g_strcmp0 (transmode, "2k") == 0) { + _tmp0_ = transmode; + if (g_strcmp0 (_tmp0_, "2k") == 0) { val = DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_2K; } else { - if (g_strcmp0 (transmode, "8k") == 0) { + const gchar* _tmp1_; + _tmp1_ = transmode; + if (g_strcmp0 (_tmp1_, "8k") == 0) { val = DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_8K; } else { val = DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_AUTO; diff -Nru gnome-dvb-daemon-0.1.23/src/OverlapType.c gnome-dvb-daemon-0.2.7/src/OverlapType.c --- gnome-dvb-daemon-0.1.23/src/OverlapType.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/OverlapType.c 2011-09-22 12:34:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* OverlapType.c generated by valac 0.11.3, the Vala compiler +/* OverlapType.c generated by valac 0.14.0, the Vala compiler * generated from OverlapType.vala, do not modify */ /* diff -Nru gnome-dvb-daemon-0.1.23/src/Recorder.c gnome-dvb-daemon-0.2.7/src/Recorder.c --- gnome-dvb-daemon-0.1.23/src/Recorder.c 2011-01-14 16:56:07.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Recorder.c 2011-09-29 19:59:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Recorder.c generated by valac 0.11.3, the Vala compiler +/* Recorder.c generated by valac 0.14.0, the Vala compiler * generated from Recorder.vala, do not modify */ /* @@ -22,13 +22,10 @@ #include #include -#include -#include +#include #include #include #include -#include -#include #include #include @@ -41,6 +38,8 @@ typedef struct _DVBIDBusRecorder DVBIDBusRecorder; typedef struct _DVBIDBusRecorderIface DVBIDBusRecorderIface; +#define DVB_TYPE_ID_BUS_RECORDER_PROXY (dvb_id_bus_recorder_proxy_get_type ()) + #define DVB_TYPE_TIMER_INFO (dvb_timer_info_get_type ()) typedef struct _DVBTimerInfo DVBTimerInfo; @@ -86,9 +85,38 @@ typedef struct _DVBRecording DVBRecording; typedef struct _DVBRecordingClass DVBRecordingClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + #define DVB_TYPE_SETTINGS (dvb_settings_get_type ()) #define DVB_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SETTINGS, DVBSettings)) #define DVB_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SETTINGS, DVBSettingsClass)) @@ -280,10 +308,6 @@ GStaticRecMutex __lock_recordings; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - typedef enum { DVB_DATABASE_SQL_ERROR_ERROR, DVB_DATABASE_SQL_ERROR_INTERNAL, @@ -368,10 +392,13 @@ typedef void (*DVBForcedStopNotify) (DVBChannel* channel, void* user_data); static gpointer dvb_recorder_parent_class = NULL; +static DVBLoggingLogger* dvb_recorder_log; +static DVBLoggingLogger* dvb_recorder_log = NULL; static DVBIDBusRecorderIface* dvb_recorder_dvb_id_bus_recorder_parent_iface = NULL; static GeeIterableIface* dvb_recorder_gee_iterable_parent_iface = NULL; -DVBIDBusRecorder* dvb_id_bus_recorder_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_recorder_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_recorder_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_timer_info_get_type (void) G_GNUC_CONST; DVBTimerInfo* dvb_timer_info_dup (const DVBTimerInfo* self); void dvb_timer_info_free (DVBTimerInfo* self); @@ -390,12 +417,10 @@ DVB_RECORDER_COUNT, DVB_RECORDER_ELEMENT_TYPE }; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_recorder_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_recorder_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_recorder_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_recorder_introspect (DVBRecorder* self, DBusConnection* connection, DBusMessage* message); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_RECORDER_CHECK_TIMERS_INTERVAL 5 #define DVB_RECORDER_ATTRIBUTES G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE DVBRecorder* dvb_recorder_new (DVBDeviceGroup* dev); @@ -405,8 +430,11 @@ DVBTimer* dvb_recorder_create_timer (DVBRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration); gboolean dvb_recorder_add_timer (DVBRecorder* self, DVBTimer* new_timer, guint32* timer_id); static gboolean dvb_recorder_real_AddTimerWithMargin (DVBIDBusRecorder* base, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; GType dvb_settings_get_type (void) G_GNUC_CONST; -DVBSettings* dvb_factory_get_settings (void); +DVBSettings* dvb_factory_get_settings (DVBFactory* self); gint dvb_settings_get_timers_margin_start (DVBSettings* self); gint dvb_settings_get_timers_margin_end (DVBSettings* self); guint dvb_timer_get_Duration (DVBTimer* self); @@ -416,12 +444,14 @@ gboolean dvb_timer_conflicts_with (DVBTimer* self, DVBTimer* t2); DVBDeviceGroup* dvb_recorder_get_DeviceGroup (DVBRecorder* self); gint dvb_device_group_get_size (DVBDeviceGroup* self); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); gchar* dvb_timer_to_string (DVBTimer* self); guint32 dvb_timer_get_Id (DVBTimer* self); GQuark dvb_database_sql_error_quark (void); GType dvb_database_timers_store_get_type (void) G_GNUC_CONST; -DVBdatabaseTimersStore* dvb_factory_get_timers_store (void); +DVBdatabaseTimersStore* dvb_factory_get_timers_store (DVBFactory* self); gboolean dvb_database_timers_store_add_timer_to_device_group (DVBdatabaseTimersStore* self, DVBTimer* timer, DVBDeviceGroup* dev, GError** error); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); GType dvb_change_type_get_type (void) G_GNUC_CONST; static gboolean dvb_recorder_check_timers (DVBRecorder* self); static gboolean _dvb_recorder_check_timers_gsource_func (gpointer self); @@ -434,7 +464,7 @@ gpointer dvb_value_get_event (const GValue* value); GType dvb_event_get_type (void) G_GNUC_CONST; GType dvb_database_epg_store_get_type (void) G_GNUC_CONST; -DVBdatabaseEPGStore* dvb_factory_get_epg_store (void); +DVBdatabaseEPGStore* dvb_factory_get_epg_store (DVBFactory* self); DVBEvent* dvb_database_epg_store_get_event (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); guint dvb_device_group_get_Id (DVBDeviceGroup* self); void dvb_event_get_local_start_time (DVBEvent* self, struct tm* result); @@ -551,90 +581,13 @@ static void _vala_dvb_recorder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void _vala_dvb_recorder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static const DBusObjectPathVTable _dvb_recorder_dbus_path_vtable = {_dvb_recorder_dbus_unregister, dvb_recorder_dbus_message}; -static const _DBusObjectVTable _dvb_recorder_dbus_vtable = {dvb_recorder_dbus_register_object}; - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_recorder_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_recorder_introspect (DVBRecorder* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_recorder_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_recorder_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_recorder_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_recorder_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_recorder_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - dvb_id_bus_recorder_dbus_register_object (connection, path, object); -} - DVBRecorder* dvb_recorder_construct (GType object_type, DVBDeviceGroup* dev) { DVBRecorder * self = NULL; + DVBDeviceGroup* _tmp0_; g_return_val_if_fail (dev != NULL, NULL); - self = (DVBRecorder*) g_object_new (object_type, "DeviceGroup", dev, NULL); + _tmp0_ = dev; + self = (DVBRecorder*) g_object_new (object_type, "DeviceGroup", _tmp0_, NULL); return self; } @@ -647,15 +600,21 @@ static GeeIterator* dvb_recorder_real_iterator (GeeIterable* base) { DVBRecorder * self; GeeIterator* result = NULL; - GeeCollection* _tmp0_ = NULL; + GeeHashMap* _tmp0_; GeeCollection* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; + GeeCollection* _tmp2_; + GeeCollection* _tmp3_; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_; self = (DVBRecorder*) base; - _tmp0_ = gee_map_get_values ((GeeMap*) self->priv->timers); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - result = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); + _tmp0_ = self->priv->timers; + _tmp1_ = gee_map_get_values ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = _tmp2_; + _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_); + _tmp5_ = _tmp4_; + _g_object_unref0 (_tmp3_); + result = _tmp5_; return result; } @@ -676,36 +635,54 @@ */ static gboolean dvb_recorder_real_AddTimer (DVBIDBusRecorder* base, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { DVBRecorder * self; - guint32 _timer_id = 0U; + guint32 _vala_timer_id = 0U; gboolean result = FALSE; - DVBTimer* _tmp0_ = NULL; + guint _tmp0_; + gint _tmp1_; + gint _tmp2_; + gint _tmp3_; + gint _tmp4_; + gint _tmp5_; + guint _tmp6_; + DVBTimer* _tmp7_ = NULL; DVBTimer* new_timer; + DVBTimer* _tmp8_; self = (DVBRecorder*) base; - _tmp0_ = dvb_recorder_create_timer (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration); - new_timer = _tmp0_; - if (new_timer == NULL) { - _timer_id = (guint32) 0; + _tmp0_ = channel; + _tmp1_ = start_year; + _tmp2_ = start_month; + _tmp3_ = start_day; + _tmp4_ = start_hour; + _tmp5_ = start_minute; + _tmp6_ = duration; + _tmp7_ = dvb_recorder_create_timer (self, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_); + new_timer = _tmp7_; + _tmp8_ = new_timer; + if (_tmp8_ == NULL) { + _vala_timer_id = (guint32) 0; result = FALSE; _g_object_unref0 (new_timer); if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } else { - guint32 _tmp1_; - gboolean _tmp2_; - _tmp2_ = dvb_recorder_add_timer (self, new_timer, &_tmp1_); - _timer_id = _tmp1_; - result = _tmp2_; + DVBTimer* _tmp9_; + guint32 _tmp10_ = 0U; + gboolean _tmp11_ = FALSE; + _tmp9_ = new_timer; + _tmp11_ = dvb_recorder_add_timer (self, _tmp9_, &_tmp10_); + _vala_timer_id = _tmp10_; + result = _tmp11_; _g_object_unref0 (new_timer); if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } _g_object_unref0 (new_timer); if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } } @@ -720,60 +697,115 @@ */ static gboolean dvb_recorder_real_AddTimerWithMargin (DVBIDBusRecorder* base, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration, guint32* timer_id, GError** error) { DVBRecorder * self; - guint32 _timer_id = 0U; + guint32 _vala_timer_id = 0U; gboolean result = FALSE; - DVBTimer* _tmp0_ = NULL; + guint _tmp0_; + gint _tmp1_; + gint _tmp2_; + gint _tmp3_; + gint _tmp4_; + gint _tmp5_; + guint _tmp6_; + DVBTimer* _tmp7_ = NULL; DVBTimer* new_timer; - DVBSettings* _tmp1_ = NULL; + DVBTimer* _tmp8_; + DVBFactory* _tmp9_; + DVBFactory* _tmp10_; + DVBSettings* _tmp11_ = NULL; + DVBSettings* _tmp12_; DVBSettings* settings; - gint _tmp2_; + DVBSettings* _tmp13_; + gint _tmp14_ = 0; gint start_margin; - gint _tmp3_; + DVBSettings* _tmp15_; + gint _tmp16_ = 0; guint end_margin; - guint _tmp4_; + DVBTimer* _tmp17_; + DVBTimer* _tmp18_; + guint _tmp19_; + guint _tmp20_; + guint _tmp21_; + DVBTimer* _tmp22_; + gint _tmp23_; gboolean ret; - guint32 _tmp5_; - gboolean _tmp6_; + DVBTimer* _tmp24_; + guint32 _tmp25_ = 0U; + gboolean _tmp26_ = FALSE; self = (DVBRecorder*) base; - _tmp0_ = dvb_recorder_create_timer (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration); - new_timer = _tmp0_; - if (new_timer == NULL) { - _timer_id = (guint32) 0; + _tmp0_ = channel; + _tmp1_ = start_year; + _tmp2_ = start_month; + _tmp3_ = start_day; + _tmp4_ = start_hour; + _tmp5_ = start_minute; + _tmp6_ = duration; + _tmp7_ = dvb_recorder_create_timer (self, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_); + new_timer = _tmp7_; + _tmp8_ = new_timer; + if (_tmp8_ == NULL) { + _vala_timer_id = (guint32) 0; result = FALSE; _g_object_unref0 (new_timer); if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } - _tmp1_ = dvb_factory_get_settings (); - settings = _tmp1_; - _tmp2_ = dvb_settings_get_timers_margin_start (settings); - start_margin = (-1) * _tmp2_; - _tmp3_ = dvb_settings_get_timers_margin_end (settings); - end_margin = (guint) (2 * _tmp3_); - _tmp4_ = dvb_timer_get_Duration (new_timer); - dvb_timer_set_Duration (new_timer, _tmp4_ + end_margin); - dvb_timer_add_to_start_time (new_timer, start_margin); + _tmp9_ = dvb_factory_new (); + _tmp10_ = _tmp9_; + _tmp11_ = dvb_factory_get_settings (_tmp10_); + _tmp12_ = _tmp11_; + _g_object_unref0 (_tmp10_); + settings = _tmp12_; + _tmp13_ = settings; + _tmp14_ = dvb_settings_get_timers_margin_start (_tmp13_); + start_margin = (-1) * _tmp14_; + _tmp15_ = settings; + _tmp16_ = dvb_settings_get_timers_margin_end (_tmp15_); + end_margin = (guint) (2 * _tmp16_); + _tmp17_ = new_timer; + _tmp18_ = new_timer; + _tmp19_ = dvb_timer_get_Duration (_tmp18_); + _tmp20_ = _tmp19_; + _tmp21_ = end_margin; + dvb_timer_set_Duration (_tmp18_, _tmp20_ + _tmp21_); + _tmp22_ = new_timer; + _tmp23_ = start_margin; + dvb_timer_add_to_start_time (_tmp22_, _tmp23_); ret = TRUE; - _tmp6_ = dvb_recorder_add_timer (self, new_timer, &_tmp5_); - _timer_id = _tmp5_; - if (!_tmp6_) { - guint _tmp7_; - guint32 _tmp8_; - gboolean _tmp9_; - _tmp7_ = dvb_timer_get_Duration (new_timer); - dvb_timer_set_Duration (new_timer, _tmp7_ - end_margin); - dvb_timer_add_to_start_time (new_timer, (-1) * start_margin); - _tmp9_ = dvb_recorder_add_timer (self, new_timer, &_tmp8_); - _timer_id = _tmp8_; - ret = _tmp9_; + _tmp24_ = new_timer; + _tmp26_ = dvb_recorder_add_timer (self, _tmp24_, &_tmp25_); + _vala_timer_id = _tmp25_; + if (!_tmp26_) { + DVBTimer* _tmp27_; + DVBTimer* _tmp28_; + guint _tmp29_; + guint _tmp30_; + guint _tmp31_; + DVBTimer* _tmp32_; + gint _tmp33_; + DVBTimer* _tmp34_; + guint32 _tmp35_ = 0U; + gboolean _tmp36_ = FALSE; + _tmp27_ = new_timer; + _tmp28_ = new_timer; + _tmp29_ = dvb_timer_get_Duration (_tmp28_); + _tmp30_ = _tmp29_; + _tmp31_ = end_margin; + dvb_timer_set_Duration (_tmp28_, _tmp30_ - _tmp31_); + _tmp32_ = new_timer; + _tmp33_ = start_margin; + dvb_timer_add_to_start_time (_tmp32_, (-1) * _tmp33_); + _tmp34_ = new_timer; + _tmp36_ = dvb_recorder_add_timer (self, _tmp34_, &_tmp35_); + _vala_timer_id = _tmp35_; + ret = _tmp36_; } result = ret; _g_object_unref0 (settings); _g_object_unref0 (new_timer); if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } @@ -787,138 +819,234 @@ gboolean dvb_recorder_add_timer (DVBRecorder* self, DVBTimer* new_timer, guint32* timer_id) { - guint32 _timer_id = 0U; + guint32 _vala_timer_id = 0U; gboolean result = FALSE; - gboolean _tmp0_; gboolean ret; + DVBTimer* _tmp0_; + gboolean _tmp1_ = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (new_timer != NULL, FALSE); - _tmp0_ = dvb_timer_has_expired (new_timer); - if (_tmp0_) { - result = FALSE; + ret = FALSE; + _vala_timer_id = (guint32) 0; + _tmp0_ = new_timer; + _tmp1_ = dvb_timer_has_expired (_tmp0_); + if (_tmp1_) { + result = ret; if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } - ret = FALSE; { - gboolean has_conflict; - gint conflict_count; + GeeHashMap* _tmp2_; + _tmp2_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - has_conflict = FALSE; - conflict_count = 0; { - GeeSet* _tmp1_ = NULL; - GeeSet* _tmp2_; - GeeIterator* _tmp3_ = NULL; - GeeIterator* _tmp4_; - GeeIterator* _key_it; - _tmp1_ = gee_map_get_keys ((GeeMap*) self->priv->timers); - _tmp2_ = _tmp1_; - _tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_); - _key_it = (_tmp4_ = _tmp3_, _g_object_unref0 (_tmp2_), _tmp4_); - while (TRUE) { - gboolean _tmp5_; - gpointer _tmp6_ = NULL; - guint32 key; - gpointer _tmp7_ = NULL; - DVBTimer* _tmp8_; - gboolean _tmp9_; - gboolean _tmp10_; - _tmp5_ = gee_iterator_next (_key_it); - if (!_tmp5_) { - break; - } - _tmp6_ = gee_iterator_get (_key_it); - key = GPOINTER_TO_UINT (_tmp6_); - _tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - _tmp8_ = (DVBTimer*) _tmp7_; - _tmp9_ = dvb_timer_conflicts_with (_tmp8_, new_timer); - if ((_tmp10_ = _tmp9_, _g_object_unref0 (_tmp8_), _tmp10_)) { - gint _tmp11_; - conflict_count++; - _tmp11_ = dvb_device_group_get_size (self->priv->_DeviceGroup); - if (conflict_count >= _tmp11_) { - gpointer _tmp12_ = NULL; - DVBTimer* _tmp13_; - gchar* _tmp14_ = NULL; - gchar* _tmp15_; - _tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - _tmp13_ = (DVBTimer*) _tmp12_; - _tmp14_ = dvb_timer_to_string (_tmp13_); - _tmp15_ = _tmp14_; - g_debug ("Recorder.vala:153: Timer is conflicting with another timer: %s", _tmp15_); - _g_free0 (_tmp15_); - _g_object_unref0 (_tmp13_); - has_conflict = TRUE; + gboolean has_conflict; + gint conflict_count; + gboolean _tmp32_; + has_conflict = FALSE; + conflict_count = 0; + { + GeeHashMap* _tmp3_; + GeeSet* _tmp4_; + GeeSet* _tmp5_; + GeeSet* _tmp6_; + GeeIterator* _tmp7_ = NULL; + GeeIterator* _tmp8_; + GeeIterator* _key_it; + _tmp3_ = self->priv->timers; + _tmp4_ = gee_map_get_keys ((GeeMap*) _tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = _tmp5_; + _tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_); + _tmp8_ = _tmp7_; + _g_object_unref0 (_tmp6_); + _key_it = _tmp8_; + while (TRUE) { + GeeIterator* _tmp9_; + gboolean _tmp10_ = FALSE; + GeeIterator* _tmp11_; + gpointer _tmp12_ = NULL; + guint32 key; + GeeHashMap* _tmp13_; + guint32 _tmp14_; + gpointer _tmp15_ = NULL; + DVBTimer* _tmp16_; + DVBTimer* _tmp17_; + gboolean _tmp18_ = FALSE; + gboolean _tmp19_; + _tmp9_ = _key_it; + _tmp10_ = gee_iterator_next (_tmp9_); + if (!_tmp10_) { break; } + _tmp11_ = _key_it; + _tmp12_ = gee_iterator_get (_tmp11_); + key = GPOINTER_TO_UINT (_tmp12_); + _tmp13_ = self->priv->timers; + _tmp14_ = key; + _tmp15_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp13_, GUINT_TO_POINTER (_tmp14_)); + _tmp16_ = (DVBTimer*) _tmp15_; + _tmp17_ = new_timer; + _tmp18_ = dvb_timer_conflicts_with (_tmp16_, _tmp17_); + _tmp19_ = _tmp18_; + _g_object_unref0 (_tmp16_); + if (_tmp19_) { + gint _tmp20_; + gint _tmp21_; + DVBDeviceGroup* _tmp22_; + gint _tmp23_; + gint _tmp24_; + _tmp20_ = conflict_count; + conflict_count = _tmp20_ + 1; + _tmp21_ = conflict_count; + _tmp22_ = self->priv->_DeviceGroup; + _tmp23_ = dvb_device_group_get_size (_tmp22_); + _tmp24_ = _tmp23_; + if (_tmp21_ >= _tmp24_) { + DVBLoggingLogger* _tmp25_; + GeeHashMap* _tmp26_; + guint32 _tmp27_; + gpointer _tmp28_ = NULL; + DVBTimer* _tmp29_; + gchar* _tmp30_ = NULL; + gchar* _tmp31_; + _tmp25_ = dvb_recorder_log; + _tmp26_ = self->priv->timers; + _tmp27_ = key; + _tmp28_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp26_, GUINT_TO_POINTER (_tmp27_)); + _tmp29_ = (DVBTimer*) _tmp28_; + _tmp30_ = dvb_timer_to_string (_tmp29_); + _tmp31_ = _tmp30_; + dvb_logging_logger_debug (_tmp25_, "Recorder.vala:159: Timer is conflicting with another timer: %s", _tmp31_); + _g_free0 (_tmp31_); + _g_object_unref0 (_tmp29_); + has_conflict = TRUE; + break; + } + } } + _g_object_unref0 (_key_it); } - _g_object_unref0 (_key_it); - } - if (!has_conflict) { - guint32 _tmp16_; - DVBdatabaseTimersStore* _tmp17_ = NULL; - DVBdatabaseTimersStore* _tmp18_; - guint32 _tmp19_; - gboolean _tmp20_ = FALSE; - gint _tmp21_; - guint32 _tmp23_; - _tmp16_ = dvb_timer_get_Id (new_timer); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (_tmp16_), new_timer); - _tmp17_ = dvb_factory_get_timers_store (); - _tmp18_ = _tmp17_; - dvb_database_timers_store_add_timer_to_device_group (_tmp18_, new_timer, self->priv->_DeviceGroup, &_inner_error_); - _g_object_unref0 (_tmp18_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch98_dvb_database_sql_error; + _tmp32_ = has_conflict; + if (!_tmp32_) { + GeeHashMap* _tmp33_; + DVBTimer* _tmp34_; + guint32 _tmp35_; + guint32 _tmp36_; + DVBTimer* _tmp37_; + DVBTimer* _tmp49_; + guint32 _tmp50_; + guint32 _tmp51_; + gboolean _tmp52_ = FALSE; + GeeHashMap* _tmp53_; + gint _tmp54_; + gint _tmp55_; + gboolean _tmp57_; + DVBTimer* _tmp60_; + guint32 _tmp61_; + guint32 _tmp62_; + _tmp33_ = self->priv->timers; + _tmp34_ = new_timer; + _tmp35_ = dvb_timer_get_Id (_tmp34_); + _tmp36_ = _tmp35_; + _tmp37_ = new_timer; + gee_abstract_map_set ((GeeAbstractMap*) _tmp33_, GUINT_TO_POINTER (_tmp36_), _tmp37_); + { + DVBFactory* _tmp38_; + DVBFactory* _tmp39_; + DVBdatabaseTimersStore* _tmp40_ = NULL; + DVBdatabaseTimersStore* _tmp41_; + DVBTimer* _tmp42_; + DVBDeviceGroup* _tmp43_; + _tmp38_ = dvb_factory_new (); + _tmp39_ = _tmp38_; + _tmp40_ = dvb_factory_get_timers_store (_tmp39_); + _tmp41_ = _tmp40_; + _tmp42_ = new_timer; + _tmp43_ = self->priv->_DeviceGroup; + dvb_database_timers_store_add_timer_to_device_group (_tmp41_, _tmp42_, _tmp43_, &_inner_error_); + _g_object_unref0 (_tmp41_); + _g_object_unref0 (_tmp39_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch109_dvb_database_sql_error; + } + { + GeeHashMap* _tmp44_; + _tmp44_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - goto __finally98; - __catch98_dvb_database_sql_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Recorder.vala:167: %s", e->message); - _g_error_free0 (e); - } - __finally98: - if (_inner_error_ != NULL) { - g_static_rec_mutex_unlock (&self->priv->__lock_timers); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - _tmp19_ = dvb_timer_get_Id (new_timer); - g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", _tmp19_, (guint) DVB_CHANGE_TYPE_ADDED); - _tmp21_ = gee_map_get_size ((GeeMap*) self->priv->timers); - if (_tmp21_ == 1) { - _tmp20_ = !self->priv->have_check_timers_timeout; - } else { - _tmp20_ = FALSE; + goto __finally109; + __catch109_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp45_; + GError* _tmp46_; + const gchar* _tmp47_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp45_ = dvb_recorder_log; + _tmp46_ = e; + _tmp47_ = _tmp46_->message; + dvb_logging_logger_error (_tmp45_, "Recorder.vala:173: %s", _tmp47_); + _g_error_free0 (e); + } + __finally109: + if (_inner_error_ != NULL) { + { + GeeHashMap* _tmp48_; + _tmp48_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } + _tmp49_ = new_timer; + _tmp50_ = dvb_timer_get_Id (_tmp49_); + _tmp51_ = _tmp50_; + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", _tmp51_, (guint) DVB_CHANGE_TYPE_ADDED); + _tmp53_ = self->priv->timers; + _tmp54_ = gee_map_get_size ((GeeMap*) _tmp53_); + _tmp55_ = _tmp54_; + if (_tmp55_ == 1) { + gboolean _tmp56_; + _tmp56_ = self->priv->have_check_timers_timeout; + _tmp52_ = !_tmp56_; + } else { + _tmp52_ = FALSE; + } + _tmp57_ = _tmp52_; + if (_tmp57_) { + DVBLoggingLogger* _tmp58_; + guint _tmp59_ = 0U; + _tmp58_ = dvb_recorder_log; + dvb_logging_logger_debug (_tmp58_, "Recorder.vala:178: Creating new check timers"); + _tmp59_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) DVB_RECORDER_CHECK_TIMERS_INTERVAL, _dvb_recorder_check_timers_gsource_func, g_object_ref (self), g_object_unref); + self->priv->check_timers_event_id = _tmp59_; + self->priv->have_check_timers_timeout = TRUE; + } + _tmp60_ = new_timer; + _tmp61_ = dvb_timer_get_Id (_tmp60_); + _tmp62_ = _tmp61_; + _vala_timer_id = _tmp62_; + ret = TRUE; } - if (_tmp20_) { - guint _tmp22_; - g_debug ("Recorder.vala:172: Creating new check timers"); - _tmp22_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) DVB_RECORDER_CHECK_TIMERS_INTERVAL, _dvb_recorder_check_timers_gsource_func, g_object_ref (self), g_object_unref); - self->priv->check_timers_event_id = _tmp22_; - self->priv->have_check_timers_timeout = TRUE; - } - _tmp23_ = dvb_timer_get_Id (new_timer); - _timer_id = _tmp23_; - ret = TRUE; } - __finally97: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally108: + { + GeeHashMap* _tmp63_; + _tmp63_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -927,7 +1055,7 @@ } result = ret; if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } @@ -942,54 +1070,91 @@ */ static gboolean dvb_recorder_real_AddTimerForEPGEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, guint32* timer_id, GError** error) { DVBRecorder * self; - guint32 _timer_id = 0U; + guint32 _vala_timer_id = 0U; gboolean result = FALSE; - DVBdatabaseEPGStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseEPGStore* _tmp2_ = NULL; + DVBdatabaseEPGStore* _tmp3_; DVBdatabaseEPGStore* epgstore; DVBEvent* event; - guint _tmp1_; - DVBEvent* _tmp2_ = NULL; - DVBEvent* _tmp3_; - DVBEvent* _tmp4_; - struct tm _tmp5_ = {0}; - struct tm _tmp6_ = {0}; + DVBEvent* _tmp15_; + DVBEvent* _tmp18_; + struct tm _tmp19_ = {0}; struct tm start; - guint32 _tmp7_; - gboolean _tmp8_; - gboolean _tmp9_; + guint _tmp20_; + struct tm _tmp21_; + gint _tmp22_; + struct tm _tmp23_; + gint _tmp24_; + struct tm _tmp25_; + gint _tmp26_; + struct tm _tmp27_; + gint _tmp28_; + struct tm _tmp29_; + gint _tmp30_; + DVBEvent* _tmp31_; + guint _tmp32_; + guint32 _tmp33_ = 0U; + gboolean _tmp34_ = FALSE; + gboolean _tmp35_; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - _tmp0_ = dvb_factory_get_epg_store (); - epgstore = _tmp0_; - event = NULL; - _tmp1_ = dvb_device_group_get_Id (self->priv->_DeviceGroup); - _tmp2_ = dvb_database_epg_store_get_event (epgstore, event_id, channel_sid, _tmp1_, &_inner_error_); + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_epg_store (_tmp1_); _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch99_dvb_database_sql_error; + _g_object_unref0 (_tmp1_); + epgstore = _tmp3_; + event = NULL; + { + DVBdatabaseEPGStore* _tmp4_; + guint _tmp5_; + guint _tmp6_; + DVBDeviceGroup* _tmp7_; + guint _tmp8_; + guint _tmp9_; + DVBEvent* _tmp10_ = NULL; + DVBEvent* _tmp11_; + _tmp4_ = epgstore; + _tmp5_ = event_id; + _tmp6_ = channel_sid; + _tmp7_ = self->priv->_DeviceGroup; + _tmp8_ = dvb_device_group_get_Id (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = dvb_database_epg_store_get_event (_tmp4_, _tmp5_, _tmp6_, _tmp9_, &_inner_error_); + _tmp11_ = _tmp10_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch110_dvb_database_sql_error; + } + _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } _dvb_event_unref0 (event); - _g_object_unref0 (epgstore); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + event = _tmp11_; } - _tmp4_ = _tmp3_; - _dvb_event_unref0 (event); - event = _tmp4_; - goto __finally99; - __catch99_dvb_database_sql_error: + goto __finally110; + __catch110_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp12_; + GError* _tmp13_; + const gchar* _tmp14_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Recorder.vala:201: %s", e->message); + _tmp12_ = dvb_recorder_log; + _tmp13_ = e; + _tmp14_ = _tmp13_->message; + dvb_logging_logger_error (_tmp12_, "Recorder.vala:207: %s", _tmp14_); _g_error_free0 (e); } - __finally99: + __finally110: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _dvb_event_unref0 (event); _g_object_unref0 (epgstore); @@ -1002,24 +1167,43 @@ return FALSE; } } - if (event == NULL) { - g_debug ("Recorder.vala:204: Could not find event with id %u", event_id); - _timer_id = (guint32) 0; + _tmp15_ = event; + if (_tmp15_ == NULL) { + DVBLoggingLogger* _tmp16_; + guint _tmp17_; + _tmp16_ = dvb_recorder_log; + _tmp17_ = event_id; + dvb_logging_logger_debug (_tmp16_, "Recorder.vala:210: Could not find event with id %u", _tmp17_); + _vala_timer_id = (guint32) 0; result = FALSE; _dvb_event_unref0 (event); _g_object_unref0 (epgstore); if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } - _tmp6_ = (dvb_event_get_local_start_time (event, &_tmp5_), _tmp5_); - start = _tmp6_; - _tmp8_ = dvb_id_bus_recorder_AddTimerWithMargin ((DVBIDBusRecorder*) self, channel_sid, start.tm_year + 1900, start.tm_mon + 1, start.tm_mday, start.tm_hour, start.tm_min, event->duration / 60, &_tmp7_, &_inner_error_); - _timer_id = _tmp7_; - _tmp9_ = _tmp8_; + _tmp18_ = event; + dvb_event_get_local_start_time (_tmp18_, &_tmp19_); + start = _tmp19_; + _tmp20_ = channel_sid; + _tmp21_ = start; + _tmp22_ = _tmp21_.tm_year; + _tmp23_ = start; + _tmp24_ = _tmp23_.tm_mon; + _tmp25_ = start; + _tmp26_ = _tmp25_.tm_mday; + _tmp27_ = start; + _tmp28_ = _tmp27_.tm_hour; + _tmp29_ = start; + _tmp30_ = _tmp29_.tm_min; + _tmp31_ = event; + _tmp32_ = _tmp31_->duration; + _tmp34_ = dvb_id_bus_recorder_AddTimerWithMargin ((DVBIDBusRecorder*) self, _tmp20_, _tmp22_ + 1900, _tmp24_ + 1, _tmp26_, _tmp28_, _tmp30_, _tmp32_ / 60, &_tmp33_, &_inner_error_); + _vala_timer_id = _tmp33_; + _tmp35_ = _tmp34_; if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _dvb_event_unref0 (event); _g_object_unref0 (epgstore); @@ -1032,11 +1216,11 @@ return FALSE; } } - result = _tmp9_; + result = _tmp35_; _dvb_event_unref0 (event); _g_object_unref0 (epgstore); if (timer_id) { - *timer_id = _timer_id; + *timer_id = _vala_timer_id; } return result; } @@ -1052,10 +1236,12 @@ static gboolean dvb_recorder_real_DeleteTimer (DVBIDBusRecorder* base, guint32 timer_id, GError** error) { DVBRecorder * self; gboolean result = FALSE; - gboolean _tmp0_; + guint32 _tmp0_; + gboolean _tmp1_ = FALSE; self = (DVBRecorder*) base; - _tmp0_ = dvb_recorder_delete_timer (self, timer_id); - result = _tmp0_; + _tmp0_ = timer_id; + _tmp1_ = dvb_recorder_delete_timer (self, _tmp0_); + result = _tmp1_; return result; } @@ -1066,59 +1252,110 @@ GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp0_) { - gboolean _tmp1_; - DVBdatabaseTimersStore* _tmp3_ = NULL; - DVBdatabaseTimersStore* _tmp4_; - _tmp1_ = dvb_recorder_is_timer_active (self, timer_id); - if (_tmp1_) { - gpointer _tmp2_ = NULL; - DVBTimer* timer; - _tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - timer = (DVBTimer*) _tmp2_; - dvb_recorder_stop_recording (self, timer); - _g_object_unref0 (timer); - } - gee_abstract_map_unset ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id), NULL); - _tmp3_ = dvb_factory_get_timers_store (); - _tmp4_ = _tmp3_; - dvb_database_timers_store_remove_timer_from_device_group (_tmp4_, (guint) timer_id, self->priv->_DeviceGroup, &_inner_error_); - _g_object_unref0 (_tmp4_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch101_dvb_database_sql_error; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + guint32 _tmp4_; + gboolean _tmp5_ = FALSE; + GeeHashMap* _tmp10_; + guint32 _tmp11_; + guint32 _tmp23_; + _tmp4_ = timer_id; + _tmp5_ = dvb_recorder_is_timer_active (self, _tmp4_); + if (_tmp5_) { + GeeHashMap* _tmp6_; + guint32 _tmp7_; + gpointer _tmp8_ = NULL; + DVBTimer* timer; + DVBTimer* _tmp9_; + _tmp6_ = self->priv->timers; + _tmp7_ = timer_id; + _tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, GUINT_TO_POINTER (_tmp7_)); + timer = (DVBTimer*) _tmp8_; + _tmp9_ = timer; + dvb_recorder_stop_recording (self, _tmp9_); + _g_object_unref0 (timer); } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - goto __finally101; - __catch101_dvb_database_sql_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Recorder.vala:241: %s", e->message); - _g_error_free0 (e); - } - __finally101: - if (_inner_error_ != NULL) { - g_static_rec_mutex_unlock (&self->priv->__lock_timers); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + _tmp10_ = self->priv->timers; + _tmp11_ = timer_id; + gee_abstract_map_unset ((GeeAbstractMap*) _tmp10_, GUINT_TO_POINTER (_tmp11_), NULL); + { + DVBFactory* _tmp12_; + DVBFactory* _tmp13_; + DVBdatabaseTimersStore* _tmp14_ = NULL; + DVBdatabaseTimersStore* _tmp15_; + guint32 _tmp16_; + DVBDeviceGroup* _tmp17_; + _tmp12_ = dvb_factory_new (); + _tmp13_ = _tmp12_; + _tmp14_ = dvb_factory_get_timers_store (_tmp13_); + _tmp15_ = _tmp14_; + _tmp16_ = timer_id; + _tmp17_ = self->priv->_DeviceGroup; + dvb_database_timers_store_remove_timer_from_device_group (_tmp15_, (guint) _tmp16_, _tmp17_, &_inner_error_); + _g_object_unref0 (_tmp15_); + _g_object_unref0 (_tmp13_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch112_dvb_database_sql_error; + } + { + GeeHashMap* _tmp18_; + _tmp18_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } + } + goto __finally112; + __catch112_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp19_; + GError* _tmp20_; + const gchar* _tmp21_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp19_ = dvb_recorder_log; + _tmp20_ = e; + _tmp21_ = _tmp20_->message; + dvb_logging_logger_error (_tmp19_, "Recorder.vala:247: %s", _tmp21_); + _g_error_free0 (e); + } + __finally112: + if (_inner_error_ != NULL) { + { + GeeHashMap* _tmp22_; + _tmp22_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } + _tmp23_ = timer_id; + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", _tmp23_, (guint) DVB_CHANGE_TYPE_DELETED); + val = TRUE; + } else { + val = FALSE; } - g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (guint) DVB_CHANGE_TYPE_DELETED); - val = TRUE; - } else { - val = FALSE; } - __finally100: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally111: + { + GeeHashMap* _tmp24_; + _tmp24_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1137,64 +1374,99 @@ static guint32* dvb_recorder_real_GetTimers (DVBIDBusRecorder* base, int* result_length1, GError** error) { DVBRecorder * self; guint32* result = NULL; - gint timer_arr_length1; - gint _timer_arr_size_; - guint32* timer_arr; - guint32* _tmp12_; + guint32* timer_arr = NULL; + gint timer_arr_length1 = 0; + gint _timer_arr_size_ = 0; + guint32* _tmp26_; + gint _tmp26__length1; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - timer_arr_length1 = 0; - timer_arr = NULL; { - gint _tmp0_; - guint32* _tmp1_ = NULL; - guint32* _tmp2_; - gint i; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->timers); - _tmp1_ = g_new0 (guint32, _tmp0_); - _tmp2_ = _tmp1_; - timer_arr = (g_free (timer_arr), NULL); - timer_arr_length1 = _tmp0_; - _timer_arr_size_ = timer_arr_length1; - timer_arr = _tmp2_; - i = 0; - { - GeeSet* _tmp3_ = NULL; - GeeSet* _tmp4_; - GeeIterator* _tmp5_ = NULL; - GeeIterator* _tmp6_; - GeeIterator* _key_it; - _tmp3_ = gee_map_get_keys ((GeeMap*) self->priv->timers); - _tmp4_ = _tmp3_; - _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); - _key_it = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - guint32 key; - gpointer _tmp9_ = NULL; - DVBTimer* _tmp10_; - guint32 _tmp11_; - _tmp7_ = gee_iterator_next (_key_it); - if (!_tmp7_) { - break; - } - _tmp8_ = gee_iterator_get (_key_it); - key = GPOINTER_TO_UINT (_tmp8_); - _tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - _tmp10_ = (DVBTimer*) _tmp9_; - _tmp11_ = dvb_timer_get_Id (_tmp10_); - timer_arr[i] = _tmp11_; - _g_object_unref0 (_tmp10_); - i++; + { + GeeHashMap* _tmp1_; + gint _tmp2_; + gint _tmp3_; + guint32* _tmp4_ = NULL; + gint i; + _tmp1_ = self->priv->timers; + _tmp2_ = gee_map_get_size ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = g_new0 (guint32, _tmp3_); + timer_arr = (g_free (timer_arr), NULL); + timer_arr = _tmp4_; + timer_arr_length1 = _tmp3_; + _timer_arr_size_ = timer_arr_length1; + i = 0; + { + GeeHashMap* _tmp5_; + GeeSet* _tmp6_; + GeeSet* _tmp7_; + GeeSet* _tmp8_; + GeeIterator* _tmp9_ = NULL; + GeeIterator* _tmp10_; + GeeIterator* _key_it; + _tmp5_ = self->priv->timers; + _tmp6_ = gee_map_get_keys ((GeeMap*) _tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = _tmp7_; + _tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_); + _tmp10_ = _tmp9_; + _g_object_unref0 (_tmp8_); + _key_it = _tmp10_; + while (TRUE) { + GeeIterator* _tmp11_; + gboolean _tmp12_ = FALSE; + GeeIterator* _tmp13_; + gpointer _tmp14_ = NULL; + guint32 key; + guint32* _tmp15_; + gint _tmp15__length1; + gint _tmp16_; + GeeHashMap* _tmp17_; + guint32 _tmp18_; + gpointer _tmp19_ = NULL; + DVBTimer* _tmp20_; + guint32 _tmp21_; + guint32 _tmp22_; + guint32 _tmp23_; + gint _tmp24_; + _tmp11_ = _key_it; + _tmp12_ = gee_iterator_next (_tmp11_); + if (!_tmp12_) { + break; + } + _tmp13_ = _key_it; + _tmp14_ = gee_iterator_get (_tmp13_); + key = GPOINTER_TO_UINT (_tmp14_); + _tmp15_ = timer_arr; + _tmp15__length1 = timer_arr_length1; + _tmp16_ = i; + _tmp17_ = self->priv->timers; + _tmp18_ = key; + _tmp19_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp17_, GUINT_TO_POINTER (_tmp18_)); + _tmp20_ = (DVBTimer*) _tmp19_; + _tmp21_ = dvb_timer_get_Id (_tmp20_); + _tmp22_ = _tmp21_; + _tmp15_[_tmp16_] = _tmp22_; + _tmp23_ = _tmp15_[_tmp16_]; + _g_object_unref0 (_tmp20_); + _tmp24_ = i; + i = _tmp24_ + 1; + } + _g_object_unref0 (_key_it); } - _g_object_unref0 (_key_it); } - __finally102: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally113: + { + GeeHashMap* _tmp25_; + _tmp25_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); timer_arr = (g_free (timer_arr), NULL); return NULL; @@ -1206,9 +1478,12 @@ } } } - _tmp12_ = timer_arr; - *result_length1 = timer_arr_length1; - result = _tmp12_; + _tmp26_ = timer_arr; + _tmp26__length1 = timer_arr_length1; + if (result_length1) { + *result_length1 = _tmp26__length1; + } + result = _tmp26_; return result; } @@ -1221,45 +1496,57 @@ */ static gboolean dvb_recorder_real_GetStartTime (DVBIDBusRecorder* base, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error) { DVBRecorder * self; - guint32* _start_time = NULL; - int _start_time_length1 = 0; + guint32* _vala_start_time = NULL; + int _vala_start_time_length1 = 0; gboolean result = FALSE; gboolean ret = FALSE; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBTimer* _tmp2_; - gint _tmp3_; - guint* _tmp4_ = NULL; - guint32* _tmp5_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - _tmp2_ = (DVBTimer*) _tmp1_; - _tmp4_ = dvb_timer_get_start_time (_tmp2_, &_tmp3_); - _tmp5_ = _tmp4_; - _start_time = (g_free (_start_time), NULL); - _start_time_length1 = _tmp3_; - _start_time = _tmp5_; - _g_object_unref0 (_tmp2_); - ret = TRUE; - } else { - guint* _tmp6_ = NULL; - guint32* _tmp7_; - _tmp6_ = g_new0 (guint, 0); - _tmp7_ = _tmp6_; - _start_time = (g_free (_start_time), NULL); - _start_time_length1 = 0; - _start_time = _tmp7_; - ret = FALSE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBTimer* _tmp7_; + gint _tmp8_ = 0; + guint* _tmp9_ = NULL; + _tmp4_ = self->priv->timers; + _tmp5_ = timer_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBTimer*) _tmp6_; + _tmp9_ = dvb_timer_get_start_time (_tmp7_, &_tmp8_); + _vala_start_time = (g_free (_vala_start_time), NULL); + _vala_start_time = _tmp9_; + _vala_start_time_length1 = _tmp8_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } else { + guint* _tmp10_ = NULL; + _tmp10_ = g_new0 (guint, 0); + _vala_start_time = (g_free (_vala_start_time), NULL); + _vala_start_time = _tmp10_; + _vala_start_time_length1 = 0; + ret = FALSE; + } + } + __finally114: + { + GeeHashMap* _tmp11_; + _tmp11_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); } - __finally103: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1271,12 +1558,12 @@ } result = ret; if (start_time) { - *start_time = _start_time; + *start_time = _vala_start_time; } else { - _start_time = (g_free (_start_time), NULL); + _vala_start_time = (g_free (_vala_start_time), NULL); } if (start_time_length1) { - *start_time_length1 = _start_time_length1; + *start_time_length1 = _vala_start_time_length1; } return result; } @@ -1296,37 +1583,68 @@ DVBRecorder * self; gboolean result = FALSE; gboolean ret; + gboolean _tmp17_; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp0_) { - gboolean _tmp1_; - gboolean _tmp2_; - _tmp1_ = dvb_id_bus_recorder_IsTimerActive ((DVBIDBusRecorder*) self, timer_id, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - goto __finally104; - } - if (_tmp2_) { - g_warning ("Recorder.vala:311: Cannot change start time of already active timer"); - } else { - gpointer _tmp3_ = NULL; - DVBTimer* timer; - _tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - timer = (DVBTimer*) _tmp3_; - dvb_timer_set_start_time (timer, start_year, start_month, start_day, start_hour, start_minute); - ret = TRUE; - _g_object_unref0 (timer); + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + guint32 _tmp4_; + gboolean _tmp5_ = FALSE; + gboolean _tmp6_; + _tmp4_ = timer_id; + _tmp5_ = dvb_id_bus_recorder_IsTimerActive ((DVBIDBusRecorder*) self, _tmp4_, &_inner_error_); + _tmp6_ = _tmp5_; + if (_inner_error_ != NULL) { + goto __finally115; + } + if (_tmp6_) { + g_warning ("Recorder.vala:317: Cannot change start time of already active timer"); + } else { + GeeHashMap* _tmp7_; + guint32 _tmp8_; + gpointer _tmp9_ = NULL; + DVBTimer* timer; + DVBTimer* _tmp10_; + gint _tmp11_; + gint _tmp12_; + gint _tmp13_; + gint _tmp14_; + gint _tmp15_; + _tmp7_ = self->priv->timers; + _tmp8_ = timer_id; + _tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, GUINT_TO_POINTER (_tmp8_)); + timer = (DVBTimer*) _tmp9_; + _tmp10_ = timer; + _tmp11_ = start_year; + _tmp12_ = start_month; + _tmp13_ = start_day; + _tmp14_ = start_hour; + _tmp15_ = start_minute; + dvb_timer_set_start_time (_tmp10_, _tmp11_, _tmp12_, _tmp13_, _tmp14_, _tmp15_); + ret = TRUE; + _g_object_unref0 (timer); + } } } - __finally104: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally115: + { + GeeHashMap* _tmp16_; + _tmp16_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1336,8 +1654,11 @@ } } } - if (ret) { - g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (guint) DVB_CHANGE_TYPE_UPDATED); + _tmp17_ = ret; + if (_tmp17_) { + guint32 _tmp18_; + _tmp18_ = timer_id; + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", _tmp18_, (guint) DVB_CHANGE_TYPE_UPDATED); } result = ret; return result; @@ -1351,45 +1672,57 @@ */ static gboolean dvb_recorder_real_GetEndTime (DVBIDBusRecorder* base, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error) { DVBRecorder * self; - guint* _end_time = NULL; - int _end_time_length1 = 0; + guint* _vala_end_time = NULL; + int _vala_end_time_length1 = 0; gboolean result = FALSE; gboolean ret = FALSE; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBTimer* _tmp2_; - gint _tmp3_; - guint* _tmp4_ = NULL; - guint* _tmp5_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - _tmp2_ = (DVBTimer*) _tmp1_; - _tmp4_ = dvb_timer_get_end_time (_tmp2_, &_tmp3_); - _tmp5_ = _tmp4_; - _end_time = (g_free (_end_time), NULL); - _end_time_length1 = _tmp3_; - _end_time = _tmp5_; - _g_object_unref0 (_tmp2_); - ret = TRUE; - } else { - guint* _tmp6_ = NULL; - guint* _tmp7_; - _tmp6_ = g_new0 (guint, 0); - _tmp7_ = _tmp6_; - _end_time = (g_free (_end_time), NULL); - _end_time_length1 = 0; - _end_time = _tmp7_; - ret = FALSE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBTimer* _tmp7_; + gint _tmp8_ = 0; + guint* _tmp9_ = NULL; + _tmp4_ = self->priv->timers; + _tmp5_ = timer_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBTimer*) _tmp6_; + _tmp9_ = dvb_timer_get_end_time (_tmp7_, &_tmp8_); + _vala_end_time = (g_free (_vala_end_time), NULL); + _vala_end_time = _tmp9_; + _vala_end_time_length1 = _tmp8_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } else { + guint* _tmp10_ = NULL; + _tmp10_ = g_new0 (guint, 0); + _vala_end_time = (g_free (_vala_end_time), NULL); + _vala_end_time = _tmp10_; + _vala_end_time_length1 = 0; + ret = FALSE; + } + } + __finally116: + { + GeeHashMap* _tmp11_; + _tmp11_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); } - __finally105: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1401,12 +1734,12 @@ } result = ret; if (end_time) { - *end_time = _end_time; + *end_time = _vala_end_time; } else { - _end_time = (g_free (_end_time), NULL); + _vala_end_time = (g_free (_vala_end_time), NULL); } if (end_time_length1) { - *end_time_length1 = _end_time_length1; + *end_time_length1 = _vala_end_time_length1; } return result; } @@ -1420,31 +1753,51 @@ */ static gboolean dvb_recorder_real_GetDuration (DVBIDBusRecorder* base, guint32 timer_id, guint* duration, GError** error) { DVBRecorder * self; - guint _duration = 0U; + guint _vala_duration = 0U; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBTimer* _tmp2_; - guint _tmp3_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - _tmp2_ = (DVBTimer*) _tmp1_; - _tmp3_ = dvb_timer_get_Duration (_tmp2_); - _duration = _tmp3_; - _g_object_unref0 (_tmp2_); - ret = TRUE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBTimer* _tmp7_; + guint _tmp8_; + guint _tmp9_; + _tmp4_ = self->priv->timers; + _tmp5_ = timer_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBTimer*) _tmp6_; + _tmp8_ = dvb_timer_get_Duration (_tmp7_); + _tmp9_ = _tmp8_; + _vala_duration = _tmp9_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } else { + _vala_duration = (guint) 0; + } + } + __finally117: + { + GeeHashMap* _tmp10_; + _tmp10_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); } - __finally106: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1456,7 +1809,7 @@ } result = ret; if (duration) { - *duration = _duration; + *duration = _vala_duration; } return result; } @@ -1471,25 +1824,48 @@ DVBRecorder * self; gboolean result = FALSE; gboolean ret = FALSE; + gboolean _tmp11_; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - ret = _tmp0_; - if (ret) { - gpointer _tmp1_ = NULL; - DVBTimer* timer; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - timer = (DVBTimer*) _tmp1_; - dvb_timer_set_Duration (timer, duration); - _g_object_unref0 (timer); + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + ret = _tmp3_; + _tmp4_ = ret; + if (_tmp4_) { + GeeHashMap* _tmp5_; + guint32 _tmp6_; + gpointer _tmp7_ = NULL; + DVBTimer* timer; + DVBTimer* _tmp8_; + guint _tmp9_; + _tmp5_ = self->priv->timers; + _tmp6_ = timer_id; + _tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, GUINT_TO_POINTER (_tmp6_)); + timer = (DVBTimer*) _tmp7_; + _tmp8_ = timer; + _tmp9_ = duration; + dvb_timer_set_Duration (_tmp8_, _tmp9_); + _g_object_unref0 (timer); + } + } + __finally118: + { + GeeHashMap* _tmp10_; + _tmp10_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); } - __finally107: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1499,8 +1875,11 @@ } } } - if (ret) { - g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (guint) DVB_CHANGE_TYPE_UPDATED); + _tmp11_ = ret; + if (_tmp11_) { + guint32 _tmp12_; + _tmp12_ = timer_id; + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", _tmp12_, (guint) DVB_CHANGE_TYPE_UPDATED); } result = ret; return result; @@ -1515,45 +1894,63 @@ */ static gboolean dvb_recorder_real_GetChannelName (DVBIDBusRecorder* base, guint32 timer_id, gchar** name, GError** error) { DVBRecorder * self; - gchar* _name = NULL; + gchar* _vala_name = NULL; gboolean result = FALSE; gboolean ret = FALSE; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBTimer* t; - DVBChannel* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; - gchar* _tmp4_; - gchar* _tmp5_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - t = (DVBTimer*) _tmp1_; - _tmp2_ = dvb_timer_get_Channel (t); - _tmp3_ = dvb_channel_get_Name (_tmp2_); - _tmp4_ = g_strdup (_tmp3_); - _tmp5_ = _tmp4_; - _g_free0 (_name); - _name = _tmp5_; - ret = TRUE; - _g_object_unref0 (t); - } else { - gchar* _tmp6_; - gchar* _tmp7_; - _tmp6_ = g_strdup (""); - _tmp7_ = _tmp6_; - _g_free0 (_name); - _name = _tmp7_; - ret = FALSE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBTimer* t; + DVBTimer* _tmp7_; + DVBChannel* _tmp8_; + DVBChannel* _tmp9_; + const gchar* _tmp10_; + const gchar* _tmp11_; + gchar* _tmp12_; + _tmp4_ = self->priv->timers; + _tmp5_ = timer_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + t = (DVBTimer*) _tmp6_; + _tmp7_ = t; + _tmp8_ = dvb_timer_get_Channel (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = dvb_channel_get_Name (_tmp9_); + _tmp11_ = _tmp10_; + _tmp12_ = g_strdup (_tmp11_); + _g_free0 (_vala_name); + _vala_name = _tmp12_; + ret = TRUE; + _g_object_unref0 (t); + } else { + gchar* _tmp13_; + _tmp13_ = g_strdup (""); + _g_free0 (_vala_name); + _vala_name = _tmp13_; + ret = FALSE; + } + } + __finally119: + { + GeeHashMap* _tmp14_; + _tmp14_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); } - __finally108: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1565,9 +1962,9 @@ } result = ret; if (name) { - *name = _name; + *name = _vala_name; } else { - _g_free0 (_name); + _g_free0 (_vala_name); } return result; } @@ -1582,52 +1979,88 @@ */ static gboolean dvb_recorder_real_GetTitle (DVBIDBusRecorder* base, guint32 timer_id, gchar** title, GError** error) { DVBRecorder * self; - gchar* _title = NULL; + gchar* _vala_title = NULL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBTimer* t; - DVBChannel* _tmp2_ = NULL; - DVBSchedule* _tmp3_ = NULL; - guint _tmp4_; - DVBEvent* _tmp5_ = NULL; - DVBEvent* event; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - t = (DVBTimer*) _tmp1_; - _tmp2_ = dvb_timer_get_Channel (t); - _tmp3_ = dvb_channel_get_Schedule (_tmp2_); - _tmp4_ = dvb_timer_get_EventID (t); - _tmp5_ = dvb_schedule_get_event (_tmp3_, _tmp4_); - event = _tmp5_; - _tmp6_ = NULL; - if (event == NULL) { - _tmp6_ = ""; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->timers; + _tmp2_ = timer_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBTimer* t; + DVBTimer* _tmp7_; + DVBChannel* _tmp8_; + DVBChannel* _tmp9_; + DVBSchedule* _tmp10_; + DVBSchedule* _tmp11_; + DVBTimer* _tmp12_; + guint _tmp13_; + guint _tmp14_; + DVBEvent* _tmp15_ = NULL; + DVBEvent* event; + const gchar* _tmp16_ = NULL; + DVBEvent* _tmp17_; + const gchar* _tmp20_; + gchar* _tmp21_; + _tmp4_ = self->priv->timers; + _tmp5_ = timer_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + t = (DVBTimer*) _tmp6_; + _tmp7_ = t; + _tmp8_ = dvb_timer_get_Channel (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = dvb_channel_get_Schedule (_tmp9_); + _tmp11_ = _tmp10_; + _tmp12_ = t; + _tmp13_ = dvb_timer_get_EventID (_tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = dvb_schedule_get_event (_tmp11_, _tmp14_); + event = _tmp15_; + _tmp17_ = event; + if (_tmp17_ == NULL) { + _tmp16_ = ""; + } else { + DVBEvent* _tmp18_; + const gchar* _tmp19_; + _tmp18_ = event; + _tmp19_ = _tmp18_->name; + _tmp16_ = _tmp19_; + } + _tmp20_ = _tmp16_; + _tmp21_ = g_strdup (_tmp20_); + _g_free0 (_vala_title); + _vala_title = _tmp21_; + ret = TRUE; + _dvb_event_unref0 (event); + _g_object_unref0 (t); } else { - _tmp6_ = event->name; + gchar* _tmp22_; + _tmp22_ = g_strdup (""); + _g_free0 (_vala_title); + _vala_title = _tmp22_; } - _tmp7_ = g_strdup (_tmp6_); - _tmp8_ = _tmp7_; - _g_free0 (_title); - _title = _tmp8_; - ret = TRUE; - _dvb_event_unref0 (event); - _g_object_unref0 (t); } - __finally109: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally120: + { + GeeHashMap* _tmp23_; + _tmp23_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1637,19 +2070,11 @@ } } } - if (!ret) { - gchar* _tmp9_; - gchar* _tmp10_; - _tmp9_ = g_strdup (""); - _tmp10_ = _tmp9_; - _g_free0 (_title); - _title = _tmp10_; - } result = ret; if (title) { - *title = _title; + *title = _vala_title; } else { - _g_free0 (_title); + _g_free0 (_vala_title); } return result; } @@ -1662,98 +2087,132 @@ static gboolean dvb_recorder_real_GetAllInformations (DVBIDBusRecorder* base, guint32 timer_id, DVBTimerInfo* info, GError** error) { DVBRecorder * self; - DVBTimerInfo _info = {0}; + DVBTimerInfo _vala_info = {0}; gboolean result = FALSE; DVBTimerInfo _tmp0_ = {0}; - DVBTimerInfo _tmp1_ = {0}; - DVBTimerInfo _tmp2_; gboolean ret = FALSE; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; memset (&_tmp0_, 0, sizeof (DVBTimerInfo)); - _tmp1_ = _tmp0_; - _tmp2_ = _tmp1_; - dvb_timer_info_destroy (&_info); - _info = _tmp2_; + dvb_timer_info_destroy (&_vala_info); + _vala_info = _tmp0_; { - gboolean _tmp3_; + GeeHashMap* _tmp1_; + _tmp1_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (_tmp3_) { - gpointer _tmp4_ = NULL; - DVBTimer* t; - guint _tmp5_; - gboolean _tmp6_; - DVBChannel* _tmp7_ = NULL; - DVBChannel* _tmp8_; - DVBChannel* chan; - const gchar* _tmp9_ = NULL; - gchar* _tmp10_; - gchar* _tmp11_; - DVBSchedule* _tmp12_ = NULL; - guint _tmp13_; - DVBEvent* _tmp14_ = NULL; - DVBEvent* event; - _tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - t = (DVBTimer*) _tmp4_; - _info.id = timer_id; - _tmp5_ = dvb_timer_get_Duration (t); - _info.duration = _tmp5_; - _tmp6_ = gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (timer_id)); - _info.active = _tmp6_; - _tmp7_ = dvb_timer_get_Channel (t); - _tmp8_ = _g_object_ref0 (_tmp7_); - chan = _tmp8_; - _tmp9_ = dvb_channel_get_Name (chan); - _tmp10_ = g_strdup (_tmp9_); - _tmp11_ = _tmp10_; - _g_free0 (_info.channel_name); - _info.channel_name = _tmp11_; - _tmp12_ = dvb_channel_get_Schedule (chan); - _tmp13_ = dvb_timer_get_EventID (t); - _tmp14_ = dvb_schedule_get_event (_tmp12_, _tmp13_); - event = _tmp14_; - if (event != NULL) { - gchar* _tmp15_; - gchar* _tmp16_; - _tmp15_ = g_strdup (event->name); - _tmp16_ = _tmp15_; - _g_free0 (_info.title); - _info.title = _tmp16_; + { + GeeHashMap* _tmp2_; + guint32 _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->priv->timers; + _tmp3_ = timer_id; + _tmp4_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, GUINT_TO_POINTER (_tmp3_)); + if (_tmp4_) { + GeeHashMap* _tmp5_; + guint32 _tmp6_; + gpointer _tmp7_ = NULL; + DVBTimer* t; + guint32 _tmp8_; + DVBTimer* _tmp9_; + guint _tmp10_; + guint _tmp11_; + GeeSet* _tmp12_; + guint32 _tmp13_; + gboolean _tmp14_ = FALSE; + DVBTimer* _tmp15_; + DVBChannel* _tmp16_; + DVBChannel* _tmp17_; + DVBChannel* _tmp18_; + DVBChannel* chan; + DVBChannel* _tmp19_; + const gchar* _tmp20_; + const gchar* _tmp21_; + gchar* _tmp22_; + DVBChannel* _tmp23_; + DVBSchedule* _tmp24_; + DVBSchedule* _tmp25_; + DVBTimer* _tmp26_; + guint _tmp27_; + guint _tmp28_; + DVBEvent* _tmp29_ = NULL; + DVBEvent* event; + DVBEvent* _tmp30_; + _tmp5_ = self->priv->timers; + _tmp6_ = timer_id; + _tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, GUINT_TO_POINTER (_tmp6_)); + t = (DVBTimer*) _tmp7_; + _tmp8_ = timer_id; + _vala_info.id = _tmp8_; + _tmp9_ = t; + _tmp10_ = dvb_timer_get_Duration (_tmp9_); + _tmp11_ = _tmp10_; + _vala_info.duration = _tmp11_; + _tmp12_ = self->priv->active_timers; + _tmp13_ = timer_id; + _tmp14_ = gee_collection_contains ((GeeCollection*) _tmp12_, GUINT_TO_POINTER (_tmp13_)); + _vala_info.active = _tmp14_; + _tmp15_ = t; + _tmp16_ = dvb_timer_get_Channel (_tmp15_); + _tmp17_ = _tmp16_; + _tmp18_ = _g_object_ref0 (_tmp17_); + chan = _tmp18_; + _tmp19_ = chan; + _tmp20_ = dvb_channel_get_Name (_tmp19_); + _tmp21_ = _tmp20_; + _tmp22_ = g_strdup (_tmp21_); + _g_free0 (_vala_info.channel_name); + _vala_info.channel_name = _tmp22_; + _tmp23_ = chan; + _tmp24_ = dvb_channel_get_Schedule (_tmp23_); + _tmp25_ = _tmp24_; + _tmp26_ = t; + _tmp27_ = dvb_timer_get_EventID (_tmp26_); + _tmp28_ = _tmp27_; + _tmp29_ = dvb_schedule_get_event (_tmp25_, _tmp28_); + event = _tmp29_; + _tmp30_ = event; + if (_tmp30_ != NULL) { + DVBEvent* _tmp31_; + const gchar* _tmp32_; + gchar* _tmp33_; + _tmp31_ = event; + _tmp32_ = _tmp31_->name; + _tmp33_ = g_strdup (_tmp32_); + _g_free0 (_vala_info.title); + _vala_info.title = _tmp33_; + } else { + gchar* _tmp34_; + _tmp34_ = g_strdup (""); + _g_free0 (_vala_info.title); + _vala_info.title = _tmp34_; + } + ret = TRUE; + _dvb_event_unref0 (event); + _g_object_unref0 (chan); + _g_object_unref0 (t); } else { - gchar* _tmp17_; - gchar* _tmp18_; - _tmp17_ = g_strdup (""); - _tmp18_ = _tmp17_; - _g_free0 (_info.title); - _info.title = _tmp18_; + gchar* _tmp35_; + gchar* _tmp36_; + _vala_info.id = (guint32) 0; + _vala_info.duration = (guint) 0; + _vala_info.active = FALSE; + _tmp35_ = g_strdup (""); + _g_free0 (_vala_info.channel_name); + _vala_info.channel_name = _tmp35_; + _tmp36_ = g_strdup (""); + _g_free0 (_vala_info.title); + _vala_info.title = _tmp36_; + ret = FALSE; } - ret = TRUE; - _dvb_event_unref0 (event); - _g_object_unref0 (chan); - _g_object_unref0 (t); - } else { - gchar* _tmp19_; - gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; - _info.id = (guint32) 0; - _info.duration = (guint) 0; - _info.active = FALSE; - _tmp19_ = g_strdup (""); - _tmp20_ = _tmp19_; - _g_free0 (_info.channel_name); - _info.channel_name = _tmp20_; - _tmp21_ = g_strdup (""); - _tmp22_ = _tmp21_; - _g_free0 (_info.title); - _info.title = _tmp22_; - ret = FALSE; } - __finally110: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally121: + { + GeeHashMap* _tmp37_; + _tmp37_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1765,9 +2224,9 @@ } result = ret; if (info) { - *info = _info; + *info = _vala_info; } else { - dvb_timer_info_destroy (&_info); + dvb_timer_info_destroy (&_vala_info); } return result; } @@ -1779,52 +2238,82 @@ static guint32* dvb_recorder_real_GetActiveTimers (DVBIDBusRecorder* base, int* result_length1, GError** error) { DVBRecorder * self; guint32* result = NULL; - gint _tmp0_; - guint32* _tmp1_ = NULL; + GeeSet* _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint32* _tmp3_ = NULL; + guint32* val; gint val_length1; gint _val_size_; - guint32* _tmp2_; - guint32* val; gint i; - guint32* _tmp8_; + guint32* _tmp20_; + gint _tmp20__length1; self = (DVBRecorder*) base; - _tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->active_timers); - _tmp1_ = g_new0 (guint32, _tmp0_); + _tmp0_ = self->priv->active_timers; + _tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_); _tmp2_ = _tmp1_; - val_length1 = _tmp0_; + _tmp3_ = g_new0 (guint32, _tmp2_); + val = _tmp3_; + val_length1 = _tmp2_; _val_size_ = val_length1; - val = _tmp2_; i = 0; { - GeeIterator* _tmp3_ = NULL; + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; GeeIterator* _timer_id_it; - _tmp3_ = gee_iterable_iterator ((GeeIterable*) self->priv->active_timers); - _timer_id_it = _tmp3_; + _tmp4_ = self->priv->active_timers; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _timer_id_it = _tmp5_; while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; + GeeIterator* _tmp6_; + gboolean _tmp7_ = FALSE; + GeeIterator* _tmp8_; + gpointer _tmp9_ = NULL; guint32 timer_id; - gpointer _tmp6_ = NULL; + GeeHashMap* _tmp10_; + guint32 _tmp11_; + gpointer _tmp12_ = NULL; DVBTimer* timer; - guint32 _tmp7_; - _tmp4_ = gee_iterator_next (_timer_id_it); - if (!_tmp4_) { + guint32* _tmp13_; + gint _tmp13__length1; + gint _tmp14_; + DVBTimer* _tmp15_; + guint32 _tmp16_; + guint32 _tmp17_; + guint32 _tmp18_; + gint _tmp19_; + _tmp6_ = _timer_id_it; + _tmp7_ = gee_iterator_next (_tmp6_); + if (!_tmp7_) { break; } - _tmp5_ = gee_iterator_get (_timer_id_it); - timer_id = GPOINTER_TO_UINT (_tmp5_); - _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - timer = (DVBTimer*) _tmp6_; - _tmp7_ = dvb_timer_get_Id (timer); - val[i] = _tmp7_; - i++; + _tmp8_ = _timer_id_it; + _tmp9_ = gee_iterator_get (_tmp8_); + timer_id = GPOINTER_TO_UINT (_tmp9_); + _tmp10_ = self->priv->timers; + _tmp11_ = timer_id; + _tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp10_, GUINT_TO_POINTER (_tmp11_)); + timer = (DVBTimer*) _tmp12_; + _tmp13_ = val; + _tmp13__length1 = val_length1; + _tmp14_ = i; + _tmp15_ = timer; + _tmp16_ = dvb_timer_get_Id (_tmp15_); + _tmp17_ = _tmp16_; + _tmp13_[_tmp14_] = _tmp17_; + _tmp18_ = _tmp13_[_tmp14_]; + _tmp19_ = i; + i = _tmp19_ + 1; _g_object_unref0 (timer); } _g_object_unref0 (_timer_id_it); } - _tmp8_ = val; - *result_length1 = val_length1; - result = _tmp8_; + _tmp20_ = val; + _tmp20__length1 = val_length1; + if (result_length1) { + *result_length1 = _tmp20__length1; + } + result = _tmp20_; return result; } @@ -1836,20 +2325,26 @@ static gboolean dvb_recorder_real_IsTimerActive (DVBIDBusRecorder* base, guint32 timer_id, GError** error) { DVBRecorder * self; gboolean result = FALSE; - gboolean _tmp0_; + guint32 _tmp0_; + gboolean _tmp1_ = FALSE; self = (DVBRecorder*) base; - _tmp0_ = dvb_recorder_is_timer_active (self, timer_id); - result = _tmp0_; + _tmp0_ = timer_id; + _tmp1_ = dvb_recorder_is_timer_active (self, _tmp0_); + result = _tmp1_; return result; } gboolean dvb_recorder_is_timer_active (DVBRecorder* self, guint32 timer_id) { gboolean result = FALSE; - gboolean _tmp0_; + GeeSet* _tmp0_; + guint32 _tmp1_; + gboolean _tmp2_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); - _tmp0_ = gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (timer_id)); - result = _tmp0_; + _tmp0_ = self->priv->active_timers; + _tmp1_ = timer_id; + _tmp2_ = gee_collection_contains ((GeeCollection*) _tmp0_, GUINT_TO_POINTER (_tmp1_)); + result = _tmp2_; return result; } @@ -1866,53 +2361,95 @@ self = (DVBRecorder*) base; val = FALSE; { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeIterator* _tmp2_ = NULL; - GeeIterator* _tmp3_; - GeeIterator* _key_it; - _tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->timers); - _tmp1_ = _tmp0_; - _tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_); - _key_it = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - while (TRUE) { - gboolean _tmp4_; - gpointer _tmp5_ = NULL; - guint32 key; - gpointer _tmp6_ = NULL; - DVBTimer* _tmp7_; - DVBOverlapType _tmp8_; - DVBOverlapType _tmp9_; - DVBOverlapType overlap; - gboolean _tmp10_ = FALSE; - _tmp4_ = gee_iterator_next (_key_it); - if (!_tmp4_) { - break; - } - _tmp5_ = gee_iterator_get (_key_it); - key = GPOINTER_TO_UINT (_tmp5_); - _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - _tmp7_ = (DVBTimer*) _tmp6_; - _tmp8_ = dvb_timer_get_overlap_local (_tmp7_, start_year, start_month, start_day, start_hour, start_minute, duration); - overlap = (_tmp9_ = _tmp8_, _g_object_unref0 (_tmp7_), _tmp9_); - if (overlap == DVB_OVERLAP_TYPE_PARTIAL) { - _tmp10_ = TRUE; - } else { - _tmp10_ = overlap == DVB_OVERLAP_TYPE_COMPLETE; - } - if (_tmp10_) { - val = TRUE; - break; + { + GeeHashMap* _tmp1_; + GeeSet* _tmp2_; + GeeSet* _tmp3_; + GeeSet* _tmp4_; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_; + GeeIterator* _key_it; + _tmp1_ = self->priv->timers; + _tmp2_ = gee_map_get_keys ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = _tmp3_; + _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); + _tmp6_ = _tmp5_; + _g_object_unref0 (_tmp4_); + _key_it = _tmp6_; + while (TRUE) { + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; + guint32 key; + GeeHashMap* _tmp11_; + guint32 _tmp12_; + gpointer _tmp13_ = NULL; + DVBTimer* _tmp14_; + guint _tmp15_; + guint _tmp16_; + guint _tmp17_; + guint _tmp18_; + guint _tmp19_; + guint _tmp20_; + DVBOverlapType _tmp21_ = 0; + DVBOverlapType _tmp22_; + DVBOverlapType overlap; + gboolean _tmp23_ = FALSE; + DVBOverlapType _tmp24_; + gboolean _tmp26_; + _tmp7_ = _key_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { + break; + } + _tmp9_ = _key_it; + _tmp10_ = gee_iterator_get (_tmp9_); + key = GPOINTER_TO_UINT (_tmp10_); + _tmp11_ = self->priv->timers; + _tmp12_ = key; + _tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, GUINT_TO_POINTER (_tmp12_)); + _tmp14_ = (DVBTimer*) _tmp13_; + _tmp15_ = start_year; + _tmp16_ = start_month; + _tmp17_ = start_day; + _tmp18_ = start_hour; + _tmp19_ = start_minute; + _tmp20_ = duration; + _tmp21_ = dvb_timer_get_overlap_local (_tmp14_, _tmp15_, _tmp16_, _tmp17_, _tmp18_, _tmp19_, _tmp20_); + _tmp22_ = _tmp21_; + _g_object_unref0 (_tmp14_); + overlap = _tmp22_; + _tmp24_ = overlap; + if (_tmp24_ == DVB_OVERLAP_TYPE_PARTIAL) { + _tmp23_ = TRUE; + } else { + DVBOverlapType _tmp25_; + _tmp25_ = overlap; + _tmp23_ = _tmp25_ == DVB_OVERLAP_TYPE_COMPLETE; + } + _tmp26_ = _tmp23_; + if (_tmp26_) { + val = TRUE; + break; + } } + _g_object_unref0 (_key_it); } - _g_object_unref0 (_key_it); } - __finally111: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally122: + { + GeeHashMap* _tmp27_; + _tmp27_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1930,47 +2467,69 @@ static DVBOverlapType dvb_recorder_real_HasTimerForEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, GError** error) { DVBRecorder * self; DVBOverlapType result = 0; - DVBdatabaseEPGStore* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBdatabaseEPGStore* _tmp2_ = NULL; + DVBdatabaseEPGStore* _tmp3_; DVBdatabaseEPGStore* epgstore; DVBEvent* event; - guint _tmp1_; - DVBEvent* _tmp2_ = NULL; - DVBEvent* _tmp3_; - DVBEvent* _tmp4_; + DVBEvent* _tmp14_; DVBOverlapType val; GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - _tmp0_ = dvb_factory_get_epg_store (); - epgstore = _tmp0_; - event = NULL; - _tmp1_ = dvb_device_group_get_Id (self->priv->_DeviceGroup); - _tmp2_ = dvb_database_epg_store_get_event (epgstore, event_id, channel_sid, _tmp1_, &_inner_error_); + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_epg_store (_tmp1_); _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch112_dvb_database_sql_error; + _g_object_unref0 (_tmp1_); + epgstore = _tmp3_; + event = NULL; + { + guint _tmp4_; + guint _tmp5_; + DVBDeviceGroup* _tmp6_; + guint _tmp7_; + guint _tmp8_; + DVBEvent* _tmp9_ = NULL; + DVBEvent* _tmp10_; + _tmp4_ = event_id; + _tmp5_ = channel_sid; + _tmp6_ = self->priv->_DeviceGroup; + _tmp7_ = dvb_device_group_get_Id (_tmp6_); + _tmp8_ = _tmp7_; + _tmp9_ = dvb_database_epg_store_get_event (epgstore, _tmp4_, _tmp5_, _tmp8_, &_inner_error_); + _tmp10_ = _tmp9_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch123_dvb_database_sql_error; + } + _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; } _dvb_event_unref0 (event); - _g_object_unref0 (epgstore); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; + event = _tmp10_; } - _tmp4_ = _tmp3_; - _dvb_event_unref0 (event); - event = _tmp4_; - goto __finally112; - __catch112_dvb_database_sql_error: + goto __finally123; + __catch123_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp11_; + GError* _tmp12_; + const gchar* _tmp13_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Recorder.vala:534: %s", e->message); + _tmp11_ = dvb_recorder_log; + _tmp12_ = e; + _tmp13_ = _tmp12_->message; + dvb_logging_logger_error (_tmp11_, "Recorder.vala:544: %s", _tmp13_); _g_error_free0 (e); } - __finally112: + __finally123: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _dvb_event_unref0 (event); _g_object_unref0 (epgstore); @@ -1983,8 +2542,13 @@ return 0; } } - if (event == NULL) { - g_debug ("Recorder.vala:537: Could not find event with id %u", event_id); + _tmp14_ = event; + if (_tmp14_ == NULL) { + DVBLoggingLogger* _tmp15_; + guint _tmp16_; + _tmp15_ = dvb_recorder_log; + _tmp16_ = event_id; + dvb_logging_logger_debug (_tmp15_, "Recorder.vala:547: Could not find event with id %u", _tmp16_); result = DVB_OVERLAP_TYPE_UNKNOWN; _dvb_event_unref0 (event); _g_object_unref0 (epgstore); @@ -1992,60 +2556,124 @@ } val = DVB_OVERLAP_TYPE_NONE; { + GeeHashMap* _tmp17_; + _tmp17_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeSet* _tmp5_ = NULL; - GeeSet* _tmp6_; - GeeIterator* _tmp7_ = NULL; - GeeIterator* _tmp8_; - GeeIterator* _key_it; - _tmp5_ = gee_map_get_keys ((GeeMap*) self->priv->timers); - _tmp6_ = _tmp5_; - _tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_); - _key_it = (_tmp8_ = _tmp7_, _g_object_unref0 (_tmp6_), _tmp8_); - while (TRUE) { - gboolean _tmp9_; - gpointer _tmp10_ = NULL; - guint32 key; - gpointer _tmp11_ = NULL; - DVBTimer* timer; - DVBChannel* _tmp12_ = NULL; - guint _tmp13_; - _tmp9_ = gee_iterator_next (_key_it); - if (!_tmp9_) { - break; - } - _tmp10_ = gee_iterator_get (_key_it); - key = GPOINTER_TO_UINT (_tmp10_); - _tmp11_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - timer = (DVBTimer*) _tmp11_; - _tmp12_ = dvb_timer_get_Channel (timer); - _tmp13_ = dvb_channel_get_Sid (_tmp12_); - if (_tmp13_ == channel_sid) { - DVBOverlapType _tmp14_; - DVBOverlapType overlap; - gboolean _tmp15_ = FALSE; - _tmp14_ = dvb_timer_get_overlap_utc (timer, event->year, event->month, event->day, event->hour, event->minute, event->duration / 60); - overlap = _tmp14_; - if (overlap == DVB_OVERLAP_TYPE_PARTIAL) { - _tmp15_ = TRUE; - } else { - _tmp15_ = overlap == DVB_OVERLAP_TYPE_COMPLETE; - } - if (_tmp15_) { - val = overlap; - _g_object_unref0 (timer); + { + GeeHashMap* _tmp18_; + GeeSet* _tmp19_; + GeeSet* _tmp20_; + GeeSet* _tmp21_; + GeeIterator* _tmp22_ = NULL; + GeeIterator* _tmp23_; + GeeIterator* _key_it; + _tmp18_ = self->priv->timers; + _tmp19_ = gee_map_get_keys ((GeeMap*) _tmp18_); + _tmp20_ = _tmp19_; + _tmp21_ = _tmp20_; + _tmp22_ = gee_iterable_iterator ((GeeIterable*) _tmp21_); + _tmp23_ = _tmp22_; + _g_object_unref0 (_tmp21_); + _key_it = _tmp23_; + while (TRUE) { + GeeIterator* _tmp24_; + gboolean _tmp25_ = FALSE; + GeeIterator* _tmp26_; + gpointer _tmp27_ = NULL; + guint32 key; + GeeHashMap* _tmp28_; + guint32 _tmp29_; + gpointer _tmp30_ = NULL; + DVBTimer* timer; + DVBTimer* _tmp31_; + DVBChannel* _tmp32_; + DVBChannel* _tmp33_; + guint _tmp34_; + guint _tmp35_; + guint _tmp36_; + _tmp24_ = _key_it; + _tmp25_ = gee_iterator_next (_tmp24_); + if (!_tmp25_) { break; } + _tmp26_ = _key_it; + _tmp27_ = gee_iterator_get (_tmp26_); + key = GPOINTER_TO_UINT (_tmp27_); + _tmp28_ = self->priv->timers; + _tmp29_ = key; + _tmp30_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp28_, GUINT_TO_POINTER (_tmp29_)); + timer = (DVBTimer*) _tmp30_; + _tmp31_ = timer; + _tmp32_ = dvb_timer_get_Channel (_tmp31_); + _tmp33_ = _tmp32_; + _tmp34_ = dvb_channel_get_Sid (_tmp33_); + _tmp35_ = _tmp34_; + _tmp36_ = channel_sid; + if (_tmp35_ == _tmp36_) { + DVBTimer* _tmp37_; + DVBEvent* _tmp38_; + guint _tmp39_; + DVBEvent* _tmp40_; + guint _tmp41_; + DVBEvent* _tmp42_; + guint _tmp43_; + DVBEvent* _tmp44_; + guint _tmp45_; + DVBEvent* _tmp46_; + guint _tmp47_; + DVBEvent* _tmp48_; + guint _tmp49_; + DVBOverlapType _tmp50_ = 0; + DVBOverlapType overlap; + gboolean _tmp51_ = FALSE; + DVBOverlapType _tmp52_; + gboolean _tmp54_; + _tmp37_ = timer; + _tmp38_ = event; + _tmp39_ = _tmp38_->year; + _tmp40_ = event; + _tmp41_ = _tmp40_->month; + _tmp42_ = event; + _tmp43_ = _tmp42_->day; + _tmp44_ = event; + _tmp45_ = _tmp44_->hour; + _tmp46_ = event; + _tmp47_ = _tmp46_->minute; + _tmp48_ = event; + _tmp49_ = _tmp48_->duration; + _tmp50_ = dvb_timer_get_overlap_utc (_tmp37_, _tmp39_, _tmp41_, _tmp43_, _tmp45_, _tmp47_, _tmp49_ / 60); + overlap = _tmp50_; + _tmp52_ = overlap; + if (_tmp52_ == DVB_OVERLAP_TYPE_PARTIAL) { + _tmp51_ = TRUE; + } else { + DVBOverlapType _tmp53_; + _tmp53_ = overlap; + _tmp51_ = _tmp53_ == DVB_OVERLAP_TYPE_COMPLETE; + } + _tmp54_ = _tmp51_; + if (_tmp54_) { + DVBOverlapType _tmp55_; + _tmp55_ = overlap; + val = _tmp55_; + _g_object_unref0 (timer); + break; + } + } + _g_object_unref0 (timer); } - _g_object_unref0 (timer); + _g_object_unref0 (_key_it); } - _g_object_unref0 (_key_it); } - __finally113: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally124: + { + GeeHashMap* _tmp56_; + _tmp56_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _dvb_event_unref0 (event); _g_object_unref0 (epgstore); @@ -2067,39 +2695,63 @@ void dvb_recorder_stop (DVBRecorder* self) { + guint _tmp0_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - if (self->priv->check_timers_event_id > 0) { - g_source_remove (self->priv->check_timers_event_id); + _tmp0_ = self->priv->check_timers_event_id; + if (_tmp0_ > ((guint) 0)) { + guint _tmp1_; + _tmp1_ = self->priv->check_timers_event_id; + g_source_remove (_tmp1_); } { + GeeHashMap* _tmp2_; + _tmp2_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeIterator* _tmp0_ = NULL; - GeeIterator* _timer_id_it; - _tmp0_ = gee_iterable_iterator ((GeeIterable*) self->priv->active_timers); - _timer_id_it = _tmp0_; - while (TRUE) { - gboolean _tmp1_; - gpointer _tmp2_ = NULL; - guint32 timer_id; - gpointer _tmp3_ = NULL; - DVBTimer* timer; - _tmp1_ = gee_iterator_next (_timer_id_it); - if (!_tmp1_) { - break; - } - _tmp2_ = gee_iterator_get (_timer_id_it); - timer_id = GPOINTER_TO_UINT (_tmp2_); - _tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - timer = (DVBTimer*) _tmp3_; - dvb_recorder_stop_recording (self, timer); - _g_object_unref0 (timer); + { + GeeSet* _tmp3_; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _timer_id_it; + _tmp3_ = self->priv->active_timers; + _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_); + _timer_id_it = _tmp4_; + while (TRUE) { + GeeIterator* _tmp5_; + gboolean _tmp6_ = FALSE; + GeeIterator* _tmp7_; + gpointer _tmp8_ = NULL; + guint32 timer_id; + GeeHashMap* _tmp9_; + guint32 _tmp10_; + gpointer _tmp11_ = NULL; + DVBTimer* timer; + DVBTimer* _tmp12_; + _tmp5_ = _timer_id_it; + _tmp6_ = gee_iterator_next (_tmp5_); + if (!_tmp6_) { + break; + } + _tmp7_ = _timer_id_it; + _tmp8_ = gee_iterator_get (_tmp7_); + timer_id = GPOINTER_TO_UINT (_tmp8_); + _tmp9_ = self->priv->timers; + _tmp10_ = timer_id; + _tmp11_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, GUINT_TO_POINTER (_tmp10_)); + timer = (DVBTimer*) _tmp11_; + _tmp12_ = timer; + dvb_recorder_stop_recording (self, _tmp12_); + _g_object_unref0 (timer); + } + _g_object_unref0 (_timer_id_it); } - _g_object_unref0 (_timer_id_it); } - __finally114: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + __finally125: + { + GeeHashMap* _tmp13_; + _tmp13_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -2111,42 +2763,94 @@ DVBTimer* dvb_recorder_create_timer (DVBRecorder* self, guint channel, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, guint duration) { DVBTimer* result = NULL; - DVBChannelList* _tmp0_ = NULL; - DVBChannelList* _tmp1_; + DVBLoggingLogger* _tmp0_; + guint _tmp1_; + gint _tmp2_; + gint _tmp3_; + gint _tmp4_; + gint _tmp5_; + gint _tmp6_; + guint _tmp7_; + DVBDeviceGroup* _tmp8_; + DVBChannelList* _tmp9_; + DVBChannelList* _tmp10_; + DVBChannelList* _tmp11_; DVBChannelList* channels; - gboolean _tmp2_; - DVBRecordingsStore* _tmp4_ = NULL; - guint32 _tmp5_; + DVBChannelList* _tmp12_; + guint _tmp13_; + gboolean _tmp14_ = FALSE; + DVBRecordingsStore* _tmp19_ = NULL; + guint32 _tmp20_ = 0U; guint32 timer_id; - DVBChannelList* _tmp6_ = NULL; - DVBChannel* _tmp7_ = NULL; - DVBChannel* _tmp8_; - DVBTimer* _tmp9_ = NULL; - DVBTimer* _tmp10_; + guint32 _tmp21_; + DVBDeviceGroup* _tmp22_; + DVBChannelList* _tmp23_; + DVBChannelList* _tmp24_; + guint _tmp25_; + DVBChannel* _tmp26_ = NULL; + DVBChannel* _tmp27_; + gint _tmp28_; + gint _tmp29_; + gint _tmp30_; + gint _tmp31_; + gint _tmp32_; + guint _tmp33_; + DVBTimer* _tmp34_; + DVBTimer* _tmp35_; DVBTimer* new_timer; g_return_val_if_fail (self != NULL, NULL); - g_debug ("Recorder.vala:577: Creating new timer: channel: %u, start: %04d-%02d-%" \ -"02d %02d:%02d, duration: %u", channel, start_year, start_month, start_day, start_hour, start_minute, duration); - _tmp0_ = dvb_device_group_get_Channels (self->priv->_DeviceGroup); - _tmp1_ = _g_object_ref0 (_tmp0_); - channels = _tmp1_; - _tmp2_ = dvb_channel_list_contains (channels, channel); - if (!_tmp2_) { - guint _tmp3_; - _tmp3_ = dvb_device_group_get_Id (self->priv->_DeviceGroup); - g_warning ("Recorder.vala:583: No channel %u for device group %u", channel, _tmp3_); + _tmp0_ = dvb_recorder_log; + _tmp1_ = channel; + _tmp2_ = start_year; + _tmp3_ = start_month; + _tmp4_ = start_day; + _tmp5_ = start_hour; + _tmp6_ = start_minute; + _tmp7_ = duration; + dvb_logging_logger_debug (_tmp0_, "Recorder.vala:587: Creating new timer: channel: %u, start: %04d-%02d-%" \ +"02d %02d:%02d, duration: %u", _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_, _tmp7_); + _tmp8_ = self->priv->_DeviceGroup; + _tmp9_ = dvb_device_group_get_Channels (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = _g_object_ref0 (_tmp10_); + channels = _tmp11_; + _tmp12_ = channels; + _tmp13_ = channel; + _tmp14_ = dvb_channel_list_contains (_tmp12_, _tmp13_); + if (!_tmp14_) { + guint _tmp15_; + DVBDeviceGroup* _tmp16_; + guint _tmp17_; + guint _tmp18_; + _tmp15_ = channel; + _tmp16_ = self->priv->_DeviceGroup; + _tmp17_ = dvb_device_group_get_Id (_tmp16_); + _tmp18_ = _tmp17_; + g_warning ("Recorder.vala:593: No channel %u for device group %u", _tmp15_, _tmp18_); result = NULL; _g_object_unref0 (channels); return result; } - _tmp4_ = dvb_recordings_store_get_instance (); - _tmp5_ = dvb_recordings_store_get_next_id (_tmp4_); - timer_id = _tmp5_; - _tmp6_ = dvb_device_group_get_Channels (self->priv->_DeviceGroup); - _tmp7_ = dvb_channel_list_get_channel (_tmp6_, channel); - _tmp8_ = _tmp7_; - _tmp9_ = dvb_timer_new (timer_id, _tmp8_, start_year, start_month, start_day, start_hour, start_minute, duration); - new_timer = (_tmp10_ = _tmp9_, _g_object_unref0 (_tmp8_), _tmp10_); + _tmp19_ = dvb_recordings_store_get_instance (); + _tmp20_ = dvb_recordings_store_get_next_id (_tmp19_); + timer_id = _tmp20_; + _tmp21_ = timer_id; + _tmp22_ = self->priv->_DeviceGroup; + _tmp23_ = dvb_device_group_get_Channels (_tmp22_); + _tmp24_ = _tmp23_; + _tmp25_ = channel; + _tmp26_ = dvb_channel_list_get_channel (_tmp24_, _tmp25_); + _tmp27_ = _tmp26_; + _tmp28_ = start_year; + _tmp29_ = start_month; + _tmp30_ = start_day; + _tmp31_ = start_hour; + _tmp32_ = start_minute; + _tmp33_ = duration; + _tmp34_ = dvb_timer_new (_tmp21_, _tmp27_, _tmp28_, _tmp29_, _tmp30_, _tmp31_, _tmp32_, _tmp33_); + _tmp35_ = _tmp34_; + _g_object_unref0 (_tmp27_); + new_timer = _tmp35_; result = new_timer; _g_object_unref0 (channels); return result; @@ -2167,87 +2871,162 @@ void dvb_recorder_start_recording (DVBRecorder* self, DVBTimer* timer) { - DVBChannel* _tmp0_ = NULL; + DVBTimer* _tmp0_; DVBChannel* _tmp1_; + DVBChannel* _tmp2_; + DVBChannel* _tmp3_; DVBChannel* channel; - gint _tmp2_; - guint* _tmp3_ = NULL; - guint* _tmp4_; - gint _tmp4__length1; - GFile* _tmp5_ = NULL; - GFile* _tmp6_; + DVBChannel* _tmp4_; + DVBTimer* _tmp5_; + gint _tmp6_ = 0; + guint* _tmp7_ = NULL; + guint* _tmp8_; + gint _tmp8__length1; + GFile* _tmp9_ = NULL; + GFile* _tmp10_; GFile* location; - GstElement* _tmp7_ = NULL; + GFile* _tmp11_; + GstElement* _tmp12_ = NULL; GstElement* filesink; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - DVBChannelFactory* _tmp10_ = NULL; - DVBChannelFactory* _tmp11_; + GstElement* _tmp13_; + GstElement* _tmp15_; + GFile* _tmp16_; + gchar* _tmp17_ = NULL; + gchar* _tmp18_; + DVBTimer* _tmp19_; + GstElement* _tmp20_; + DVBDeviceGroup* _tmp21_; + DVBChannelFactory* _tmp22_; + DVBChannelFactory* _tmp23_; + DVBChannelFactory* _tmp24_; DVBChannelFactory* channel_factory; - GstElement* _tmp12_; - DVBPlayerThread* _tmp13_ = NULL; + DVBChannelFactory* _tmp25_; + DVBChannel* _tmp26_; + GstElement* _tmp27_; + GstElement* _tmp28_; + DVBPlayerThread* _tmp29_ = NULL; DVBPlayerThread* player; - guint32 _tmp32_; - guint32 _tmp33_; + DVBPlayerThread* _tmp30_; + GeeSet* _tmp94_; + DVBTimer* _tmp95_; + guint32 _tmp96_; + guint32 _tmp97_; + DVBTimer* _tmp98_; + guint32 _tmp99_; + guint32 _tmp100_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (timer != NULL); - _tmp0_ = dvb_timer_get_Channel (timer); - _tmp1_ = _g_object_ref0 (_tmp0_); - channel = _tmp1_; - _tmp3_ = dvb_timer_get_start_time (timer, &_tmp2_); - _tmp4_ = _tmp3_; - _tmp4__length1 = _tmp2_; - _tmp5_ = dvb_recorder_create_recording_dirs (self, channel, _tmp4_, _tmp2_); - location = (_tmp6_ = _tmp5_, _tmp4_ = (g_free (_tmp4_), NULL), _tmp6_); - if (location == NULL) { + _tmp0_ = timer; + _tmp1_ = dvb_timer_get_Channel (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = _g_object_ref0 (_tmp2_); + channel = _tmp3_; + _tmp4_ = channel; + _tmp5_ = timer; + _tmp7_ = dvb_timer_get_start_time (_tmp5_, &_tmp6_); + _tmp8_ = _tmp7_; + _tmp8__length1 = _tmp6_; + _tmp9_ = dvb_recorder_create_recording_dirs (self, _tmp4_, _tmp8_, _tmp6_); + _tmp10_ = _tmp9_; + _tmp8_ = (g_free (_tmp8_), NULL); + location = _tmp10_; + _tmp11_ = location; + if (_tmp11_ == NULL) { _g_object_unref0 (location); _g_object_unref0 (channel); return; } - _tmp7_ = gst_element_factory_make ("filesink", NULL); - filesink = _tmp7_; - if (filesink == NULL) { - g_critical ("Recorder.vala:609: Could not create filesink element"); + _tmp12_ = gst_element_factory_make ("filesink", NULL); + filesink = _tmp12_; + _tmp13_ = filesink; + if (_tmp13_ == NULL) { + DVBLoggingLogger* _tmp14_; + _tmp14_ = dvb_recorder_log; + dvb_logging_logger_error (_tmp14_, "Recorder.vala:619: Could not create filesink element"); _gst_object_unref0 (filesink); _g_object_unref0 (location); _g_object_unref0 (channel); return; } - _tmp8_ = g_file_get_path (location); - _tmp9_ = _tmp8_; - g_object_set ((GObject*) filesink, "location", _tmp9_, NULL); - _g_free0 (_tmp9_); - dvb_timer_set_sink (timer, filesink); - _tmp10_ = dvb_device_group_get_channel_factory (self->priv->_DeviceGroup); - _tmp11_ = _g_object_ref0 (_tmp10_); - channel_factory = _tmp11_; - _tmp12_ = _gst_object_ref0 (filesink); - _tmp13_ = dvb_channel_factory_watch_channel (channel_factory, channel, _tmp12_, TRUE, NULL, NULL); - player = _tmp13_; - if (player != NULL) { - GstElement* _tmp14_ = NULL; - GstElement* _tmp15_; - GstStateChangeReturn _tmp16_; - GstStateChangeReturn _tmp17_; + _tmp15_ = filesink; + _tmp16_ = location; + _tmp17_ = g_file_get_path (_tmp16_); + _tmp18_ = _tmp17_; + g_object_set ((GObject*) _tmp15_, "location", _tmp18_, NULL); + _g_free0 (_tmp18_); + _tmp19_ = timer; + _tmp20_ = filesink; + dvb_timer_set_sink (_tmp19_, _tmp20_); + _tmp21_ = self->priv->_DeviceGroup; + _tmp22_ = dvb_device_group_get_channel_factory (_tmp21_); + _tmp23_ = _tmp22_; + _tmp24_ = _g_object_ref0 (_tmp23_); + channel_factory = _tmp24_; + _tmp25_ = channel_factory; + _tmp26_ = channel; + _tmp27_ = filesink; + _tmp28_ = _gst_object_ref0 (_tmp27_); + _tmp29_ = dvb_channel_factory_watch_channel (_tmp25_, _tmp26_, _tmp28_, TRUE, NULL, NULL); + player = _tmp29_; + _tmp30_ = player; + if (_tmp30_ != NULL) { + DVBLoggingLogger* _tmp31_; + DVBPlayerThread* _tmp32_; + GstElement* _tmp33_ = NULL; + GstElement* _tmp34_; + GstStateChangeReturn _tmp35_ = 0; + GstStateChangeReturn _tmp36_; GstStateChangeReturn ret; - DVBRecording* _tmp18_ = NULL; + GstStateChangeReturn _tmp37_; + DVBPlayerThread* _tmp42_; + DVBRecording* _tmp43_; DVBRecording* recording; - guint32 _tmp19_; - guint _tmp20_; - const gchar* _tmp21_ = NULL; - struct tm _tmp22_ = {0}; - struct tm _tmp23_ = {0}; - guint _tmp24_; - DVBRecordingsStore* _tmp31_ = NULL; - g_debug ("Recorder.vala:619: Setting pipeline to playing"); - _tmp14_ = dvb_player_thread_get_pipeline (player); - _tmp15_ = _tmp14_; - _tmp16_ = gst_element_set_state (_tmp15_, GST_STATE_PLAYING); - ret = (_tmp17_ = _tmp16_, _gst_object_unref0 (_tmp15_), _tmp17_); - if (ret == GST_STATE_CHANGE_FAILURE) { - g_critical ("Recorder.vala:623: Failed setting pipeline to playing"); - dvb_channel_factory_stop_channel (channel_factory, channel, filesink); + DVBRecording* _tmp44_; + DVBTimer* _tmp45_; + guint32 _tmp46_; + guint32 _tmp47_; + DVBRecording* _tmp48_; + DVBChannel* _tmp49_; + guint _tmp50_; + guint _tmp51_; + DVBRecording* _tmp52_; + DVBChannel* _tmp53_; + const gchar* _tmp54_; + const gchar* _tmp55_; + DVBRecording* _tmp56_; + DVBTimer* _tmp57_; + struct tm _tmp58_ = {0}; + DVBRecording* _tmp59_; + GFile* _tmp60_; + DVBRecording* _tmp61_; + DVBRecording* _tmp62_; + DVBTimer* _tmp63_; + guint _tmp64_; + guint _tmp65_; + DVBRecordingsStore* _tmp92_ = NULL; + DVBRecording* _tmp93_; + _tmp31_ = dvb_recorder_log; + dvb_logging_logger_debug (_tmp31_, "Recorder.vala:629: Setting pipeline to playing"); + _tmp32_ = player; + _tmp33_ = dvb_player_thread_get_pipeline (_tmp32_); + _tmp34_ = _tmp33_; + _tmp35_ = gst_element_set_state (_tmp34_, GST_STATE_PLAYING); + _tmp36_ = _tmp35_; + _gst_object_unref0 (_tmp34_); + ret = _tmp36_; + _tmp37_ = ret; + if (_tmp37_ == GST_STATE_CHANGE_FAILURE) { + DVBLoggingLogger* _tmp38_; + DVBChannelFactory* _tmp39_; + DVBChannel* _tmp40_; + GstElement* _tmp41_; + _tmp38_ = dvb_recorder_log; + dvb_logging_logger_error (_tmp38_, "Recorder.vala:633: Failed setting pipeline to playing"); + _tmp39_ = channel_factory; + _tmp40_ = channel; + _tmp41_ = filesink; + dvb_channel_factory_stop_channel (_tmp39_, _tmp40_, _tmp41_); _g_object_unref0 (player); _g_object_unref0 (channel_factory); _gst_object_unref0 (filesink); @@ -2255,49 +3034,111 @@ _g_object_unref0 (channel); return; } - g_signal_connect_object (player, "eit-structure", (GCallback) _dvb_recorder_on_eit_structure_dvb_player_thread_eit_structure, self, 0); - _tmp18_ = dvb_recording_new (); - recording = _tmp18_; - _tmp19_ = dvb_timer_get_Id (timer); - dvb_recording_set_Id (recording, _tmp19_); - _tmp20_ = dvb_channel_get_Sid (channel); - dvb_recording_set_ChannelSid (recording, _tmp20_); - _tmp21_ = dvb_channel_get_Name (channel); - dvb_recording_set_ChannelName (recording, _tmp21_); - _tmp23_ = (dvb_timer_get_start_time_time (timer, &_tmp22_), _tmp22_); - dvb_recording_set_StartTime (recording, &_tmp23_); - dvb_recording_set_Location (recording, location); - dvb_recording_set_Name (recording, NULL); - dvb_recording_set_Description (recording, NULL); - _tmp24_ = dvb_timer_get_EventID (timer); - if (_tmp24_ != 0) { - DVBSchedule* _tmp25_ = NULL; - guint _tmp26_; - DVBEvent* _tmp27_ = NULL; + _tmp42_ = player; + g_signal_connect_object (_tmp42_, "eit-structure", (GCallback) _dvb_recorder_on_eit_structure_dvb_player_thread_eit_structure, self, 0); + _tmp43_ = dvb_recording_new (); + recording = _tmp43_; + _tmp44_ = recording; + _tmp45_ = timer; + _tmp46_ = dvb_timer_get_Id (_tmp45_); + _tmp47_ = _tmp46_; + dvb_recording_set_Id (_tmp44_, _tmp47_); + _tmp48_ = recording; + _tmp49_ = channel; + _tmp50_ = dvb_channel_get_Sid (_tmp49_); + _tmp51_ = _tmp50_; + dvb_recording_set_ChannelSid (_tmp48_, _tmp51_); + _tmp52_ = recording; + _tmp53_ = channel; + _tmp54_ = dvb_channel_get_Name (_tmp53_); + _tmp55_ = _tmp54_; + dvb_recording_set_ChannelName (_tmp52_, _tmp55_); + _tmp56_ = recording; + _tmp57_ = timer; + dvb_timer_get_start_time_time (_tmp57_, &_tmp58_); + dvb_recording_set_StartTime (_tmp56_, &_tmp58_); + _tmp59_ = recording; + _tmp60_ = location; + dvb_recording_set_Location (_tmp59_, _tmp60_); + _tmp61_ = recording; + dvb_recording_set_Name (_tmp61_, NULL); + _tmp62_ = recording; + dvb_recording_set_Description (_tmp62_, NULL); + _tmp63_ = timer; + _tmp64_ = dvb_timer_get_EventID (_tmp63_); + _tmp65_ = _tmp64_; + if (_tmp65_ != ((guint) 0)) { + DVBChannel* _tmp66_; + DVBSchedule* _tmp67_; + DVBSchedule* _tmp68_; + DVBTimer* _tmp69_; + guint _tmp70_; + guint _tmp71_; + DVBEvent* _tmp72_ = NULL; DVBEvent* event; - _tmp25_ = dvb_channel_get_Schedule (channel); - _tmp26_ = dvb_timer_get_EventID (timer); - _tmp27_ = dvb_schedule_get_event (_tmp25_, _tmp26_); - event = _tmp27_; - if (event != NULL) { - gchar* _tmp28_ = NULL; - gchar* _tmp29_; - g_debug ("Recorder.vala:644: Transfering event information from timer"); - dvb_recording_set_Name (recording, event->name); - _tmp28_ = g_strdup_printf ("%s\n%s", event->description, event->extended_description); - _tmp29_ = _tmp28_; - dvb_recording_set_Description (recording, _tmp29_); - _g_free0 (_tmp29_); + DVBEvent* _tmp73_; + _tmp66_ = channel; + _tmp67_ = dvb_channel_get_Schedule (_tmp66_); + _tmp68_ = _tmp67_; + _tmp69_ = timer; + _tmp70_ = dvb_timer_get_EventID (_tmp69_); + _tmp71_ = _tmp70_; + _tmp72_ = dvb_schedule_get_event (_tmp68_, _tmp71_); + event = _tmp72_; + _tmp73_ = event; + if (_tmp73_ != NULL) { + DVBLoggingLogger* _tmp74_; + DVBRecording* _tmp75_; + DVBEvent* _tmp76_; + const gchar* _tmp77_; + DVBRecording* _tmp78_; + DVBEvent* _tmp79_; + const gchar* _tmp80_; + DVBEvent* _tmp81_; + const gchar* _tmp82_; + gchar* _tmp83_ = NULL; + gchar* _tmp84_; + _tmp74_ = dvb_recorder_log; + dvb_logging_logger_debug (_tmp74_, "Recorder.vala:654: Transfering event information from timer"); + _tmp75_ = recording; + _tmp76_ = event; + _tmp77_ = _tmp76_->name; + dvb_recording_set_Name (_tmp75_, _tmp77_); + _tmp78_ = recording; + _tmp79_ = event; + _tmp80_ = _tmp79_->description; + _tmp81_ = event; + _tmp82_ = _tmp81_->extended_description; + _tmp83_ = g_strdup_printf ("%s\n%s", _tmp80_, _tmp82_); + _tmp84_ = _tmp83_; + dvb_recording_set_Description (_tmp78_, _tmp84_); + _g_free0 (_tmp84_); } _dvb_event_unref0 (event); } { - guint32 _tmp30_; + GeeMap* _tmp85_; + _tmp85_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp30_ = dvb_recording_get_Id (recording); - gee_map_set (self->priv->recordings, GUINT_TO_POINTER ((guint) _tmp30_), recording); - __finally115: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + { + GeeMap* _tmp86_; + DVBRecording* _tmp87_; + guint32 _tmp88_; + guint32 _tmp89_; + DVBRecording* _tmp90_; + _tmp86_ = self->priv->recordings; + _tmp87_ = recording; + _tmp88_ = dvb_recording_get_Id (_tmp87_); + _tmp89_ = _tmp88_; + _tmp90_ = recording; + gee_map_set (_tmp86_, GUINT_TO_POINTER ((guint) _tmp89_), _tmp90_); + } + __finally126: + { + GeeMap* _tmp91_; + _tmp91_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { _g_object_unref0 (recording); _g_object_unref0 (player); @@ -2310,14 +3151,20 @@ return; } } - _tmp31_ = dvb_recordings_store_get_instance (); - dvb_recordings_store_add (_tmp31_, recording); + _tmp92_ = dvb_recordings_store_get_instance (); + _tmp93_ = recording; + dvb_recordings_store_add (_tmp92_, _tmp93_); _g_object_unref0 (recording); } - _tmp32_ = dvb_timer_get_Id (timer); - gee_collection_add ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (_tmp32_)); - _tmp33_ = dvb_timer_get_Id (timer); - g_signal_emit_by_name ((DVBIDBusRecorder*) self, "recording-started", _tmp33_); + _tmp94_ = self->priv->active_timers; + _tmp95_ = timer; + _tmp96_ = dvb_timer_get_Id (_tmp95_); + _tmp97_ = _tmp96_; + gee_collection_add ((GeeCollection*) _tmp94_, GUINT_TO_POINTER (_tmp97_)); + _tmp98_ = timer; + _tmp99_ = dvb_timer_get_Id (_tmp98_); + _tmp100_ = _tmp99_; + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "recording-started", _tmp100_); _g_object_unref0 (player); _g_object_unref0 (channel_factory); _gst_object_unref0 (filesink); @@ -2340,57 +3187,96 @@ void dvb_recorder_stop_recording (DVBRecorder* self, DVBTimer* timer) { - DVBRecording* rec; - guint32 _tmp15_; + DVBRecording* rec = NULL; + DVBTimer* _tmp31_; + guint32 _tmp32_; + guint32 _tmp33_; guint32 timer_id; - guint32 _tmp16_; + guint32 _tmp38_; + guint32 _tmp39_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (timer != NULL); - rec = NULL; { - guint32 _tmp0_; - gpointer _tmp1_ = NULL; - DVBRecording* _tmp2_; - time_t _tmp3_; - struct tm _tmp4_ = {0}; - struct tm _tmp5_ = {0}; - struct tm _tmp6_ = {0}; - time_t _tmp7_; - const gchar* _tmp8_ = NULL; - gint64 _tmp9_; - DVBChannelFactory* _tmp10_ = NULL; - DVBChannelFactory* _tmp11_; - DVBChannelFactory* channel_factory; - DVBChannel* _tmp12_ = NULL; - GstElement* _tmp13_ = NULL; - guint32 _tmp14_; + GeeMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = dvb_timer_get_Id (timer); - _tmp1_ = gee_map_get (self->priv->recordings, GUINT_TO_POINTER ((guint) _tmp0_)); - _tmp2_ = (DVBRecording*) _tmp1_; - _g_object_unref0 (rec); - rec = _tmp2_; - _tmp3_ = time (NULL); - _tmp5_ = (g_time_local (_tmp3_, &_tmp4_), _tmp4_); - dvb_recording_get_StartTime (rec, &_tmp6_); - _tmp7_ = dvb_utils_difftime (&_tmp5_, &_tmp6_); - dvb_recording_set_Length (rec, (gint64) _tmp7_); - _tmp8_ = dvb_recording_get_ChannelName (rec); - _tmp9_ = dvb_recording_get_Length (rec); - g_debug ("Recording of channel %s stopped after %" G_GINT64_FORMAT " seconds", _tmp8_, _tmp9_); - dvb_recording_save_to_disk (rec); - _tmp10_ = dvb_device_group_get_channel_factory (self->priv->_DeviceGroup); - _tmp11_ = _g_object_ref0 (_tmp10_); - channel_factory = _tmp11_; - _tmp12_ = dvb_timer_get_Channel (timer); - _tmp13_ = dvb_timer_get_sink (timer); - dvb_channel_factory_stop_channel (channel_factory, _tmp12_, _tmp13_); - _tmp14_ = dvb_timer_get_Id (timer); - gee_map_unset (self->priv->recordings, GUINT_TO_POINTER ((guint) _tmp14_), NULL); - _g_object_unref0 (channel_factory); - __finally116: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + { + GeeMap* _tmp1_; + DVBTimer* _tmp2_; + guint32 _tmp3_; + guint32 _tmp4_; + gpointer _tmp5_ = NULL; + time_t _tmp6_; + struct tm _tmp7_ = {0}; + struct tm _tmp8_; + struct tm _tmp9_; + time_t _tmp10_ = 0; + DVBLoggingLogger* _tmp11_; + const gchar* _tmp12_; + const gchar* _tmp13_; + gint64 _tmp14_; + gint64 _tmp15_; + DVBDeviceGroup* _tmp16_; + DVBChannelFactory* _tmp17_; + DVBChannelFactory* _tmp18_; + DVBChannelFactory* _tmp19_; + DVBChannelFactory* channel_factory; + DVBTimer* _tmp20_; + DVBChannel* _tmp21_; + DVBChannel* _tmp22_; + DVBTimer* _tmp23_; + GstElement* _tmp24_; + GstElement* _tmp25_; + GeeMap* _tmp26_; + DVBTimer* _tmp27_; + guint32 _tmp28_; + guint32 _tmp29_; + _tmp1_ = self->priv->recordings; + _tmp2_ = timer; + _tmp3_ = dvb_timer_get_Id (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = gee_map_get (_tmp1_, GUINT_TO_POINTER ((guint) _tmp4_)); + _g_object_unref0 (rec); + rec = (DVBRecording*) _tmp5_; + _tmp6_ = time (NULL); + g_time_local (_tmp6_, &_tmp7_); + dvb_recording_get_StartTime (rec, &_tmp8_); + _tmp9_ = _tmp8_; + _tmp10_ = dvb_utils_difftime (&_tmp7_, &_tmp9_); + dvb_recording_set_Length (rec, (gint64) _tmp10_); + _tmp11_ = dvb_recorder_log; + _tmp12_ = dvb_recording_get_ChannelName (rec); + _tmp13_ = _tmp12_; + _tmp14_ = dvb_recording_get_Length (rec); + _tmp15_ = _tmp14_; + dvb_logging_logger_debug (_tmp11_, "Recording of channel %s stopped after %" G_GINT64_FORMAT " seconds", _tmp13_, _tmp15_); + dvb_recording_save_to_disk (rec); + _tmp16_ = self->priv->_DeviceGroup; + _tmp17_ = dvb_device_group_get_channel_factory (_tmp16_); + _tmp18_ = _tmp17_; + _tmp19_ = _g_object_ref0 (_tmp18_); + channel_factory = _tmp19_; + _tmp20_ = timer; + _tmp21_ = dvb_timer_get_Channel (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = timer; + _tmp24_ = dvb_timer_get_sink (_tmp23_); + _tmp25_ = _tmp24_; + dvb_channel_factory_stop_channel (channel_factory, _tmp22_, _tmp25_); + _tmp26_ = self->priv->recordings; + _tmp27_ = timer; + _tmp28_ = dvb_timer_get_Id (_tmp27_); + _tmp29_ = _tmp28_; + gee_map_unset (_tmp26_, GUINT_TO_POINTER ((guint) _tmp29_), NULL); + _g_object_unref0 (channel_factory); + } + __finally127: + { + GeeMap* _tmp30_; + _tmp30_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { _g_object_unref0 (rec); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2398,14 +3284,28 @@ return; } } - _tmp15_ = dvb_timer_get_Id (timer); - timer_id = _tmp15_; + _tmp31_ = timer; + _tmp32_ = dvb_timer_get_Id (_tmp31_); + _tmp33_ = _tmp32_; + timer_id = _tmp33_; { + GeeHashMap* _tmp34_; + _tmp34_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); - gee_collection_remove ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (timer_id)); - gee_abstract_map_unset ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id), NULL); - __finally117: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); + { + GeeSet* _tmp35_; + GeeHashMap* _tmp36_; + _tmp35_ = self->priv->active_timers; + gee_collection_remove ((GeeCollection*) _tmp35_, GUINT_TO_POINTER (timer_id)); + _tmp36_ = self->priv->timers; + gee_abstract_map_unset ((GeeAbstractMap*) _tmp36_, GUINT_TO_POINTER (timer_id), NULL); + } + __finally128: + { + GeeHashMap* _tmp37_; + _tmp37_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } if (_inner_error_ != NULL) { _g_object_unref0 (rec); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2415,8 +3315,9 @@ } dvb_recording_monitor_recording (rec); g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (guint) DVB_CHANGE_TYPE_DELETED); - _tmp16_ = dvb_recording_get_Id (rec); - g_signal_emit_by_name ((DVBIDBusRecorder*) self, "recording-finished", _tmp16_); + _tmp38_ = dvb_recording_get_Id (rec); + _tmp39_ = _tmp38_; + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "recording-finished", _tmp39_); _g_object_unref0 (rec); } @@ -2428,58 +3329,117 @@ */ static GFile* dvb_recorder_create_recording_dirs (DVBRecorder* self, DVBChannel* channel, guint* start, int start_length1) { GFile* result = NULL; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; + DVBChannel* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_ = NULL; gchar* channel_name; - gchar* _tmp2_ = NULL; + guint* _tmp4_; + gint _tmp4__length1; + guint _tmp5_; + guint* _tmp6_; + gint _tmp6__length1; + guint _tmp7_; + guint* _tmp8_; + gint _tmp8__length1; + guint _tmp9_; + guint* _tmp10_; + gint _tmp10__length1; + guint _tmp11_; + guint* _tmp12_; + gint _tmp12__length1; + guint _tmp13_; + gchar* _tmp14_ = NULL; gchar* time; - GFile* _tmp3_ = NULL; - GFile* _tmp4_ = NULL; - GFile* _tmp5_; - GFile* _tmp6_ = NULL; - GFile* _tmp7_; + DVBDeviceGroup* _tmp15_; + GFile* _tmp16_; + GFile* _tmp17_; + const gchar* _tmp18_; + GFile* _tmp19_ = NULL; + GFile* _tmp20_; + const gchar* _tmp21_; + GFile* _tmp22_ = NULL; + GFile* _tmp23_; GFile* dir; - gboolean _tmp8_; - GFileInfo* info; - GFileInfo* _tmp11_ = NULL; - GFileInfo* _tmp12_; - GFileInfo* _tmp13_; - guint32 _tmp14_; - gboolean _tmp17_; - GFile* _tmp20_ = NULL; + GFile* _tmp24_; + gboolean _tmp25_ = FALSE; + GFileInfo* info = NULL; + GFileInfo* _tmp39_; + guint32 _tmp40_ = 0U; + GFileInfo* _tmp45_; + gboolean _tmp46_ = FALSE; + GFile* _tmp51_; + GFile* _tmp52_ = NULL; GFile* recording; - gboolean _tmp21_; + GFile* _tmp53_; + gboolean _tmp54_ = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (channel != NULL, NULL); - _tmp0_ = dvb_channel_get_Name (channel); - _tmp1_ = dvb_utils_remove_nonalphanums (_tmp0_); - channel_name = _tmp1_; - _tmp2_ = g_strdup_printf ("%u-%u-%u_%u-%u", start[0], start[1], start[2], start[3], start[4]); - time = _tmp2_; - _tmp3_ = dvb_device_group_get_RecordingsDirectory (self->priv->_DeviceGroup); - _tmp4_ = g_file_get_child (_tmp3_, channel_name); - _tmp5_ = _tmp4_; - _tmp6_ = g_file_get_child (_tmp5_, time); - dir = (_tmp7_ = _tmp6_, _g_object_unref0 (_tmp5_), _tmp7_); - _tmp8_ = g_file_query_exists (dir, NULL); - if (!_tmp8_) { - dvb_utils_mkdirs (dir, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch118_g_error; - } - goto __finally118; - __catch118_g_error: - { - GError * e; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; + _tmp0_ = channel; + _tmp1_ = dvb_channel_get_Name (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_utils_remove_nonalphanums (_tmp2_); + channel_name = _tmp3_; + _tmp4_ = start; + _tmp4__length1 = start_length1; + _tmp5_ = _tmp4_[0]; + _tmp6_ = start; + _tmp6__length1 = start_length1; + _tmp7_ = _tmp6_[1]; + _tmp8_ = start; + _tmp8__length1 = start_length1; + _tmp9_ = _tmp8_[2]; + _tmp10_ = start; + _tmp10__length1 = start_length1; + _tmp11_ = _tmp10_[3]; + _tmp12_ = start; + _tmp12__length1 = start_length1; + _tmp13_ = _tmp12_[4]; + _tmp14_ = g_strdup_printf ("%u-%u-%u_%u-%u", _tmp5_, _tmp7_, _tmp9_, _tmp11_, _tmp13_); + time = _tmp14_; + _tmp15_ = self->priv->_DeviceGroup; + _tmp16_ = dvb_device_group_get_RecordingsDirectory (_tmp15_); + _tmp17_ = _tmp16_; + _tmp18_ = channel_name; + _tmp19_ = g_file_get_child (_tmp17_, _tmp18_); + _tmp20_ = _tmp19_; + _tmp21_ = time; + _tmp22_ = g_file_get_child (_tmp20_, _tmp21_); + _tmp23_ = _tmp22_; + _g_object_unref0 (_tmp20_); + dir = _tmp23_; + _tmp24_ = dir; + _tmp25_ = g_file_query_exists (_tmp24_, NULL); + if (!_tmp25_) { + { + GFile* _tmp26_; + _tmp26_ = dir; + dvb_utils_mkdirs (_tmp26_, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch129_g_error; + } + } + goto __finally129; + __catch129_g_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp27_; + GFile* _tmp28_; + gchar* _tmp29_ = NULL; + gchar* _tmp30_; + GError* _tmp31_; + const gchar* _tmp32_; e = _inner_error_; _inner_error_ = NULL; - _tmp9_ = g_file_get_path (dir); - _tmp10_ = _tmp9_; - g_critical ("Recorder.vala:714: Could not create directory %s: %s", _tmp10_, e->message); - _g_free0 (_tmp10_); + _tmp27_ = dvb_recorder_log; + _tmp28_ = dir; + _tmp29_ = g_file_get_path (_tmp28_); + _tmp30_ = _tmp29_; + _tmp31_ = e; + _tmp32_ = _tmp31_->message; + dvb_logging_logger_error (_tmp27_, "Recorder.vala:724: Could not create directory %s: %s", _tmp30_, _tmp32_); + _g_free0 (_tmp30_); result = NULL; _g_error_free0 (e); _g_object_unref0 (dir); @@ -2487,7 +3447,7 @@ _g_free0 (channel_name); return result; } - __finally118: + __finally129: if (_inner_error_ != NULL) { _g_object_unref0 (dir); _g_free0 (time); @@ -2497,22 +3457,32 @@ return NULL; } } - info = NULL; - _tmp11_ = g_file_query_info (dir, DVB_RECORDER_ATTRIBUTES, 0, NULL, &_inner_error_); - _tmp12_ = _tmp11_; - if (_inner_error_ != NULL) { - goto __catch119_g_error; + { + GFile* _tmp33_; + GFileInfo* _tmp34_ = NULL; + GFileInfo* _tmp35_; + _tmp33_ = dir; + _tmp34_ = g_file_query_info (_tmp33_, DVB_RECORDER_ATTRIBUTES, 0, NULL, &_inner_error_); + _tmp35_ = _tmp34_; + if (_inner_error_ != NULL) { + goto __catch130_g_error; + } + _g_object_unref0 (info); + info = _tmp35_; } - _tmp13_ = _tmp12_; - _g_object_unref0 (info); - info = _tmp13_; - goto __finally119; - __catch119_g_error: + goto __finally130; + __catch130_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp36_; + GError* _tmp37_; + const gchar* _tmp38_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Recorder.vala:724: Could not retrieve attributes: %s", e->message); + _tmp36_ = dvb_recorder_log; + _tmp37_ = e; + _tmp38_ = _tmp37_->message; + dvb_logging_logger_error (_tmp36_, "Recorder.vala:734: Could not retrieve attributes: %s", _tmp38_); result = NULL; _g_error_free0 (e); _g_object_unref0 (info); @@ -2521,7 +3491,7 @@ _g_free0 (channel_name); return result; } - __finally119: + __finally130: if (_inner_error_ != NULL) { _g_object_unref0 (info); _g_object_unref0 (dir); @@ -2531,14 +3501,19 @@ g_clear_error (&_inner_error_); return NULL; } - _tmp14_ = g_file_info_get_attribute_uint32 (info, G_FILE_ATTRIBUTE_STANDARD_TYPE); - if (_tmp14_ != G_FILE_TYPE_DIRECTORY) { - gchar* _tmp15_ = NULL; - gchar* _tmp16_; - _tmp15_ = g_file_get_path (dir); - _tmp16_ = _tmp15_; - g_critical ("Recorder.vala:730: %s is not a directory", _tmp16_); - _g_free0 (_tmp16_); + _tmp39_ = info; + _tmp40_ = g_file_info_get_attribute_uint32 (_tmp39_, G_FILE_ATTRIBUTE_STANDARD_TYPE); + if (_tmp40_ != ((guint32) G_FILE_TYPE_DIRECTORY)) { + DVBLoggingLogger* _tmp41_; + GFile* _tmp42_; + gchar* _tmp43_ = NULL; + gchar* _tmp44_; + _tmp41_ = dvb_recorder_log; + _tmp42_ = dir; + _tmp43_ = g_file_get_path (_tmp42_); + _tmp44_ = _tmp43_; + dvb_logging_logger_error (_tmp41_, "Recorder.vala:740: %s is not a directory", _tmp44_); + _g_free0 (_tmp44_); result = NULL; _g_object_unref0 (info); _g_object_unref0 (dir); @@ -2546,14 +3521,19 @@ _g_free0 (channel_name); return result; } - _tmp17_ = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE); - if (!_tmp17_) { - gchar* _tmp18_ = NULL; - gchar* _tmp19_; - _tmp18_ = g_file_get_path (dir); - _tmp19_ = _tmp18_; - g_critical ("Recorder.vala:735: Cannot write to %s", _tmp19_); - _g_free0 (_tmp19_); + _tmp45_ = info; + _tmp46_ = g_file_info_get_attribute_boolean (_tmp45_, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE); + if (!_tmp46_) { + DVBLoggingLogger* _tmp47_; + GFile* _tmp48_; + gchar* _tmp49_ = NULL; + gchar* _tmp50_; + _tmp47_ = dvb_recorder_log; + _tmp48_ = dir; + _tmp49_ = g_file_get_path (_tmp48_); + _tmp50_ = _tmp49_; + dvb_logging_logger_error (_tmp47_, "Recorder.vala:745: Cannot write to %s", _tmp50_); + _g_free0 (_tmp50_); result = NULL; _g_object_unref0 (info); _g_object_unref0 (dir); @@ -2561,16 +3541,20 @@ _g_free0 (channel_name); return result; } - _tmp20_ = g_file_get_child (dir, "001.mpeg"); - recording = _tmp20_; - _tmp21_ = g_file_query_exists (recording, NULL); - if (_tmp21_) { - gchar* _tmp22_ = NULL; - gchar* _tmp23_; - _tmp22_ = g_file_get_path (recording); - _tmp23_ = _tmp22_; - g_warning ("Recorder.vala:741: Recording %s already exists", _tmp23_); - _g_free0 (_tmp23_); + _tmp51_ = dir; + _tmp52_ = g_file_get_child (_tmp51_, "001.mpeg"); + recording = _tmp52_; + _tmp53_ = recording; + _tmp54_ = g_file_query_exists (_tmp53_, NULL); + if (_tmp54_) { + GFile* _tmp55_; + gchar* _tmp56_ = NULL; + gchar* _tmp57_; + _tmp55_ = recording; + _tmp56_ = g_file_get_path (_tmp55_); + _tmp57_ = _tmp56_; + g_warning ("Recorder.vala:751: Recording %s already exists", _tmp57_); + _g_free0 (_tmp57_); result = NULL; _g_object_unref0 (recording); _g_object_unref0 (info); @@ -2601,182 +3585,292 @@ static gboolean dvb_recorder_check_timers (DVBRecorder* self) { gboolean result = FALSE; + DVBLoggingLogger* _tmp0_; gboolean val = FALSE; GSList* ended_recordings; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - g_debug ("Recorder.vala:748: Checking timers"); + _tmp0_ = dvb_recorder_log; + dvb_logging_logger_debug (_tmp0_, "Recorder.vala:758: Checking timers"); ended_recordings = NULL; { - GSList* deleteable_items; - gboolean _tmp29_ = FALSE; - gint _tmp30_; + GeeHashMap* _tmp1_; + _tmp1_ = self->priv->timers; g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeIterator* _tmp0_ = NULL; - GeeIterator* _timer_id_it; - _tmp0_ = gee_iterable_iterator ((GeeIterable*) self->priv->active_timers); - _timer_id_it = _tmp0_; - while (TRUE) { - gboolean _tmp1_; - gpointer _tmp2_ = NULL; - guint32 timer_id; - gpointer _tmp3_ = NULL; - DVBTimer* timer; - gboolean _tmp4_; - _tmp1_ = gee_iterator_next (_timer_id_it); - if (!_tmp1_) { - break; - } - _tmp2_ = gee_iterator_get (_timer_id_it); - timer_id = GPOINTER_TO_UINT (_tmp2_); - _tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - timer = (DVBTimer*) _tmp3_; - _tmp4_ = dvb_timer_is_end_due (timer); - if (_tmp4_) { - DVBTimer* _tmp5_; - _tmp5_ = _g_object_ref0 (timer); - ended_recordings = g_slist_prepend (ended_recordings, _tmp5_); - } - _g_object_unref0 (timer); - } - _g_object_unref0 (_timer_id_it); - } - { - gint i; - i = 0; + GSList* deleteable_items; + gboolean _tmp69_ = FALSE; + GeeHashMap* _tmp70_; + gint _tmp71_; + gint _tmp72_; + gboolean _tmp76_; { - gboolean _tmp6_; - _tmp6_ = TRUE; + GeeSet* _tmp2_; + GeeIterator* _tmp3_ = NULL; + GeeIterator* _timer_id_it; + _tmp2_ = self->priv->active_timers; + _tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_); + _timer_id_it = _tmp3_; while (TRUE) { - guint _tmp7_; - gconstpointer _tmp8_ = NULL; - DVBTimer* _tmp9_; + GeeIterator* _tmp4_; + gboolean _tmp5_ = FALSE; + GeeIterator* _tmp6_; + gpointer _tmp7_ = NULL; + guint32 timer_id; + GeeHashMap* _tmp8_; + guint32 _tmp9_; + gpointer _tmp10_ = NULL; DVBTimer* timer; - if (!_tmp6_) { - i++; - } - _tmp6_ = FALSE; - _tmp7_ = g_slist_length (ended_recordings); - if (!(i < _tmp7_)) { + DVBTimer* _tmp11_; + gboolean _tmp12_ = FALSE; + _tmp4_ = _timer_id_it; + _tmp5_ = gee_iterator_next (_tmp4_); + if (!_tmp5_) { break; } - _tmp8_ = g_slist_nth_data (ended_recordings, (guint) i); - _tmp9_ = _g_object_ref0 ((DVBTimer*) _tmp8_); - timer = _tmp9_; - dvb_recorder_stop_recording (self, timer); + _tmp6_ = _timer_id_it; + _tmp7_ = gee_iterator_get (_tmp6_); + timer_id = GPOINTER_TO_UINT (_tmp7_); + _tmp8_ = self->priv->timers; + _tmp9_ = timer_id; + _tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, GUINT_TO_POINTER (_tmp9_)); + timer = (DVBTimer*) _tmp10_; + _tmp11_ = timer; + _tmp12_ = dvb_timer_is_end_due (_tmp11_); + if (_tmp12_) { + DVBTimer* _tmp13_; + DVBTimer* _tmp14_; + _tmp13_ = timer; + _tmp14_ = _g_object_ref0 (_tmp13_); + ended_recordings = g_slist_prepend (ended_recordings, _tmp14_); + } _g_object_unref0 (timer); } + _g_object_unref0 (_timer_id_it); } - } - deleteable_items = NULL; - { - GeeSet* _tmp10_ = NULL; - GeeSet* _tmp11_; - GeeIterator* _tmp12_ = NULL; - GeeIterator* _tmp13_; - GeeIterator* _key_it; - _tmp10_ = gee_map_get_keys ((GeeMap*) self->priv->timers); - _tmp11_ = _tmp10_; - _tmp12_ = gee_iterable_iterator ((GeeIterable*) _tmp11_); - _key_it = (_tmp13_ = _tmp12_, _g_object_unref0 (_tmp11_), _tmp13_); - while (TRUE) { - gboolean _tmp14_; - gpointer _tmp15_ = NULL; - guint32 key; - gpointer _tmp16_ = NULL; - DVBTimer* timer; - gchar* _tmp17_ = NULL; - gchar* _tmp18_; - gboolean _tmp19_ = FALSE; - gboolean _tmp20_; - _tmp14_ = gee_iterator_next (_key_it); - if (!_tmp14_) { - break; - } - _tmp15_ = gee_iterator_get (_key_it); - key = GPOINTER_TO_UINT (_tmp15_); - _tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - timer = (DVBTimer*) _tmp16_; - _tmp17_ = dvb_timer_to_string (timer); - _tmp18_ = _tmp17_; - g_debug ("Recorder.vala:774: Checking timer: %s", _tmp18_); - _g_free0 (_tmp18_); - _tmp20_ = dvb_timer_is_start_due (timer); - if (_tmp20_) { - guint32 _tmp21_; - gboolean _tmp22_; - _tmp21_ = dvb_timer_get_Id (timer); - _tmp22_ = gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (_tmp21_)); - _tmp19_ = !_tmp22_; - } else { - _tmp19_ = FALSE; - } - if (_tmp19_) { - dvb_recorder_start_recording (self, timer); - } else { - gboolean _tmp23_; - _tmp23_ = dvb_timer_has_expired (timer); - if (_tmp23_) { - gchar* _tmp24_ = NULL; - gchar* _tmp25_; - _tmp24_ = dvb_timer_to_string (timer); - _tmp25_ = _tmp24_; - g_debug ("Recorder.vala:782: Removing expired timer: %s", _tmp25_); - _g_free0 (_tmp25_); - deleteable_items = g_slist_prepend (deleteable_items, GUINT_TO_POINTER (key)); + { + gint i; + i = 0; + { + gboolean _tmp15_; + _tmp15_ = TRUE; + while (TRUE) { + gboolean _tmp16_; + gint _tmp18_; + GSList* _tmp19_; + guint _tmp20_ = 0U; + GSList* _tmp21_; + gint _tmp22_; + gconstpointer _tmp23_ = NULL; + DVBTimer* _tmp24_; + DVBTimer* timer; + DVBTimer* _tmp25_; + _tmp16_ = _tmp15_; + if (!_tmp16_) { + gint _tmp17_; + _tmp17_ = i; + i = _tmp17_ + 1; + } + _tmp15_ = FALSE; + _tmp18_ = i; + _tmp19_ = ended_recordings; + _tmp20_ = g_slist_length (_tmp19_); + if (!(((guint) _tmp18_) < _tmp20_)) { + break; + } + _tmp21_ = ended_recordings; + _tmp22_ = i; + _tmp23_ = g_slist_nth_data (_tmp21_, (guint) _tmp22_); + _tmp24_ = _g_object_ref0 ((DVBTimer*) _tmp23_); + timer = _tmp24_; + _tmp25_ = timer; + dvb_recorder_stop_recording (self, _tmp25_); + _g_object_unref0 (timer); } } - _g_object_unref0 (timer); } - _g_object_unref0 (_key_it); - } - { - gint i; - i = 0; + deleteable_items = NULL; { - gboolean _tmp26_; - _tmp26_ = TRUE; + GeeHashMap* _tmp26_; + GeeSet* _tmp27_; + GeeSet* _tmp28_; + GeeSet* _tmp29_; + GeeIterator* _tmp30_ = NULL; + GeeIterator* _tmp31_; + GeeIterator* _key_it; + _tmp26_ = self->priv->timers; + _tmp27_ = gee_map_get_keys ((GeeMap*) _tmp26_); + _tmp28_ = _tmp27_; + _tmp29_ = _tmp28_; + _tmp30_ = gee_iterable_iterator ((GeeIterable*) _tmp29_); + _tmp31_ = _tmp30_; + _g_object_unref0 (_tmp29_); + _key_it = _tmp31_; while (TRUE) { - guint _tmp27_; - gconstpointer _tmp28_ = NULL; - if (!_tmp26_) { - i++; - } - _tmp26_ = FALSE; - _tmp27_ = g_slist_length (deleteable_items); - if (!(i < _tmp27_)) { + GeeIterator* _tmp32_; + gboolean _tmp33_ = FALSE; + GeeIterator* _tmp34_; + gpointer _tmp35_ = NULL; + guint32 key; + GeeHashMap* _tmp36_; + guint32 _tmp37_; + gpointer _tmp38_ = NULL; + DVBTimer* timer; + DVBLoggingLogger* _tmp39_; + DVBTimer* _tmp40_; + gchar* _tmp41_ = NULL; + gchar* _tmp42_; + gboolean _tmp43_ = FALSE; + DVBTimer* _tmp44_; + gboolean _tmp45_ = FALSE; + gboolean _tmp51_; + _tmp32_ = _key_it; + _tmp33_ = gee_iterator_next (_tmp32_); + if (!_tmp33_) { break; } - _tmp28_ = g_slist_nth_data (deleteable_items, (guint) i); - dvb_recorder_delete_timer (self, GPOINTER_TO_UINT (_tmp28_)); + _tmp34_ = _key_it; + _tmp35_ = gee_iterator_get (_tmp34_); + key = GPOINTER_TO_UINT (_tmp35_); + _tmp36_ = self->priv->timers; + _tmp37_ = key; + _tmp38_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp36_, GUINT_TO_POINTER (_tmp37_)); + timer = (DVBTimer*) _tmp38_; + _tmp39_ = dvb_recorder_log; + _tmp40_ = timer; + _tmp41_ = dvb_timer_to_string (_tmp40_); + _tmp42_ = _tmp41_; + dvb_logging_logger_debug (_tmp39_, "Recorder.vala:784: Checking timer: %s", _tmp42_); + _g_free0 (_tmp42_); + _tmp44_ = timer; + _tmp45_ = dvb_timer_is_start_due (_tmp44_); + if (_tmp45_) { + GeeSet* _tmp46_; + DVBTimer* _tmp47_; + guint32 _tmp48_; + guint32 _tmp49_; + gboolean _tmp50_ = FALSE; + _tmp46_ = self->priv->active_timers; + _tmp47_ = timer; + _tmp48_ = dvb_timer_get_Id (_tmp47_); + _tmp49_ = _tmp48_; + _tmp50_ = gee_collection_contains ((GeeCollection*) _tmp46_, GUINT_TO_POINTER (_tmp49_)); + _tmp43_ = !_tmp50_; + } else { + _tmp43_ = FALSE; + } + _tmp51_ = _tmp43_; + if (_tmp51_) { + DVBTimer* _tmp52_; + _tmp52_ = timer; + dvb_recorder_start_recording (self, _tmp52_); + } else { + DVBTimer* _tmp53_; + gboolean _tmp54_ = FALSE; + _tmp53_ = timer; + _tmp54_ = dvb_timer_has_expired (_tmp53_); + if (_tmp54_) { + DVBLoggingLogger* _tmp55_; + DVBTimer* _tmp56_; + gchar* _tmp57_ = NULL; + gchar* _tmp58_; + guint32 _tmp59_; + _tmp55_ = dvb_recorder_log; + _tmp56_ = timer; + _tmp57_ = dvb_timer_to_string (_tmp56_); + _tmp58_ = _tmp57_; + dvb_logging_logger_debug (_tmp55_, "Recorder.vala:792: Removing expired timer: %s", _tmp58_); + _g_free0 (_tmp58_); + _tmp59_ = key; + deleteable_items = g_slist_prepend (deleteable_items, GUINT_TO_POINTER (_tmp59_)); + } + } + _g_object_unref0 (timer); } + _g_object_unref0 (_key_it); } + { + gint i; + i = 0; + { + gboolean _tmp60_; + _tmp60_ = TRUE; + while (TRUE) { + gboolean _tmp61_; + gint _tmp63_; + GSList* _tmp64_; + guint _tmp65_ = 0U; + GSList* _tmp66_; + gint _tmp67_; + gconstpointer _tmp68_ = NULL; + _tmp61_ = _tmp60_; + if (!_tmp61_) { + gint _tmp62_; + _tmp62_ = i; + i = _tmp62_ + 1; + } + _tmp60_ = FALSE; + _tmp63_ = i; + _tmp64_ = deleteable_items; + _tmp65_ = g_slist_length (_tmp64_); + if (!(((guint) _tmp63_) < _tmp65_)) { + break; + } + _tmp66_ = deleteable_items; + _tmp67_ = i; + _tmp68_ = g_slist_nth_data (_tmp66_, (guint) _tmp67_); + dvb_recorder_delete_timer (self, GPOINTER_TO_UINT (_tmp68_)); + } + } + } + _tmp70_ = self->priv->timers; + _tmp71_ = gee_map_get_size ((GeeMap*) _tmp70_); + _tmp72_ = _tmp71_; + if (_tmp72_ == 0) { + GeeSet* _tmp73_; + gint _tmp74_; + gint _tmp75_; + _tmp73_ = self->priv->active_timers; + _tmp74_ = gee_collection_get_size ((GeeCollection*) _tmp73_); + _tmp75_ = _tmp74_; + _tmp69_ = _tmp75_ == 0; + } else { + _tmp69_ = FALSE; + } + _tmp76_ = _tmp69_; + if (_tmp76_) { + DVBLoggingLogger* _tmp77_; + _tmp77_ = dvb_recorder_log; + dvb_logging_logger_debug (_tmp77_, "Recorder.vala:804: No timers left and no recording in progress"); + self->priv->have_check_timers_timeout = FALSE; + self->priv->check_timers_event_id = (guint) 0; + val = FALSE; + } else { + DVBLoggingLogger* _tmp78_; + GeeHashMap* _tmp79_; + gint _tmp80_; + gint _tmp81_; + GeeSet* _tmp82_; + gint _tmp83_; + gint _tmp84_; + _tmp78_ = dvb_recorder_log; + _tmp79_ = self->priv->timers; + _tmp80_ = gee_map_get_size ((GeeMap*) _tmp79_); + _tmp81_ = _tmp80_; + _tmp82_ = self->priv->active_timers; + _tmp83_ = gee_collection_get_size ((GeeCollection*) _tmp82_); + _tmp84_ = _tmp83_; + dvb_logging_logger_debug (_tmp78_, "Recorder.vala:810: %d timers and %d active recordings left", _tmp81_, _tmp84_); + val = TRUE; + } + _g_slist_free0 (deleteable_items); } - _tmp30_ = gee_map_get_size ((GeeMap*) self->priv->timers); - if (_tmp30_ == 0) { - gint _tmp31_; - _tmp31_ = gee_collection_get_size ((GeeCollection*) self->priv->active_timers); - _tmp29_ = _tmp31_ == 0; - } else { - _tmp29_ = FALSE; - } - if (_tmp29_) { - g_debug ("Recorder.vala:794: No timers left and no recording in progress"); - self->priv->have_check_timers_timeout = FALSE; - self->priv->check_timers_event_id = (guint) 0; - val = FALSE; - } else { - gint _tmp32_; - gint _tmp33_; - _tmp32_ = gee_map_get_size ((GeeMap*) self->priv->timers); - _tmp33_ = gee_collection_get_size ((GeeCollection*) self->priv->active_timers); - g_debug ("Recorder.vala:800: %d timers and %d active recordings left", _tmp32_, _tmp33_); - val = TRUE; + __finally131: + { + GeeHashMap* _tmp85_; + _tmp85_ = self->priv->timers; + g_static_rec_mutex_unlock (&self->priv->__lock_timers); } - _g_slist_free0 (deleteable_items); - __finally120: - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (_inner_error_ != NULL) { __g_slist_free__g_object_unref0_0 (ended_recordings); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2792,82 +3886,146 @@ static void dvb_recorder_on_eit_structure (DVBRecorder* self, DVBPlayerThread* player, const GstStructure* structure) { guint sid = 0U; - guint _tmp0_; + const GstStructure* _tmp0_; + guint _tmp1_ = 0U; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (player != NULL); g_return_if_fail (structure != NULL); - gst_structure_get_uint (structure, "service-id", &_tmp0_); - sid = _tmp0_; + _tmp0_ = structure; + gst_structure_get_uint (_tmp0_, "service-id", &_tmp1_); + sid = _tmp1_; { + GeeMap* _tmp2_; + _tmp2_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - GeeCollection* _tmp1_ = NULL; - GeeCollection* _tmp2_; - GeeIterator* _tmp3_ = NULL; - GeeIterator* _tmp4_; - GeeIterator* _rec_it; - _tmp1_ = gee_map_get_values (self->priv->recordings); - _tmp2_ = _tmp1_; - _tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_); - _rec_it = (_tmp4_ = _tmp3_, _g_object_unref0 (_tmp2_), _tmp4_); - while (TRUE) { - gboolean _tmp5_; - gpointer _tmp6_ = NULL; - DVBRecording* rec; - gboolean _tmp7_ = FALSE; - const gchar* _tmp8_ = NULL; - _tmp5_ = gee_iterator_next (_rec_it); - if (!_tmp5_) { - break; - } - _tmp6_ = gee_iterator_get (_rec_it); - rec = (DVBRecording*) _tmp6_; - _tmp8_ = dvb_recording_get_Name (rec); - if (_tmp8_ == NULL) { - guint _tmp9_; - _tmp9_ = dvb_recording_get_ChannelSid (rec); - _tmp7_ = sid == _tmp9_; - } else { - _tmp7_ = FALSE; - } - if (_tmp7_) { - DVBChannelList* _tmp10_ = NULL; - DVBChannel* _tmp11_ = NULL; - DVBChannel* chan; - DVBSchedule* _tmp12_ = NULL; - DVBSchedule* _tmp13_; - DVBSchedule* sched; - DVBEvent* _tmp14_ = NULL; - DVBEvent* event; - _tmp10_ = dvb_device_group_get_Channels (self->priv->_DeviceGroup); - _tmp11_ = dvb_channel_list_get_channel (_tmp10_, sid); - chan = _tmp11_; - _tmp12_ = dvb_channel_get_Schedule (chan); - _tmp13_ = _g_object_ref0 (_tmp12_); - sched = _tmp13_; - _tmp14_ = dvb_schedule_get_running_event (sched); - event = _tmp14_; - if (event != NULL) { - gchar* _tmp15_ = NULL; - gchar* _tmp16_; - g_debug ("Recorder.vala:822: Found running event for active recording"); - dvb_recording_set_Name (rec, event->name); - _tmp15_ = g_strdup_printf ("%s\n%s", event->description, event->extended_description); - _tmp16_ = _tmp15_; - dvb_recording_set_Description (rec, _tmp16_); - _g_free0 (_tmp16_); + { + GeeMap* _tmp3_; + GeeCollection* _tmp4_; + GeeCollection* _tmp5_; + GeeCollection* _tmp6_; + GeeIterator* _tmp7_ = NULL; + GeeIterator* _tmp8_; + GeeIterator* _rec_it; + _tmp3_ = self->priv->recordings; + _tmp4_ = gee_map_get_values (_tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = _tmp5_; + _tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_); + _tmp8_ = _tmp7_; + _g_object_unref0 (_tmp6_); + _rec_it = _tmp8_; + while (TRUE) { + GeeIterator* _tmp9_; + gboolean _tmp10_ = FALSE; + GeeIterator* _tmp11_; + gpointer _tmp12_ = NULL; + DVBRecording* rec; + gboolean _tmp13_ = FALSE; + DVBRecording* _tmp14_; + const gchar* _tmp15_; + const gchar* _tmp16_; + gboolean _tmp21_; + _tmp9_ = _rec_it; + _tmp10_ = gee_iterator_next (_tmp9_); + if (!_tmp10_) { + break; + } + _tmp11_ = _rec_it; + _tmp12_ = gee_iterator_get (_tmp11_); + rec = (DVBRecording*) _tmp12_; + _tmp14_ = rec; + _tmp15_ = dvb_recording_get_Name (_tmp14_); + _tmp16_ = _tmp15_; + if (_tmp16_ == NULL) { + guint _tmp17_; + DVBRecording* _tmp18_; + guint _tmp19_; + guint _tmp20_; + _tmp17_ = sid; + _tmp18_ = rec; + _tmp19_ = dvb_recording_get_ChannelSid (_tmp18_); + _tmp20_ = _tmp19_; + _tmp13_ = _tmp17_ == _tmp20_; + } else { + _tmp13_ = FALSE; + } + _tmp21_ = _tmp13_; + if (_tmp21_) { + DVBDeviceGroup* _tmp22_; + DVBChannelList* _tmp23_; + DVBChannelList* _tmp24_; + guint _tmp25_; + DVBChannel* _tmp26_ = NULL; + DVBChannel* chan; + DVBChannel* _tmp27_; + DVBSchedule* _tmp28_; + DVBSchedule* _tmp29_; + DVBSchedule* _tmp30_; + DVBSchedule* sched; + DVBSchedule* _tmp31_; + DVBEvent* _tmp32_ = NULL; + DVBEvent* event; + DVBEvent* _tmp33_; + _tmp22_ = self->priv->_DeviceGroup; + _tmp23_ = dvb_device_group_get_Channels (_tmp22_); + _tmp24_ = _tmp23_; + _tmp25_ = sid; + _tmp26_ = dvb_channel_list_get_channel (_tmp24_, _tmp25_); + chan = _tmp26_; + _tmp27_ = chan; + _tmp28_ = dvb_channel_get_Schedule (_tmp27_); + _tmp29_ = _tmp28_; + _tmp30_ = _g_object_ref0 (_tmp29_); + sched = _tmp30_; + _tmp31_ = sched; + _tmp32_ = dvb_schedule_get_running_event (_tmp31_); + event = _tmp32_; + _tmp33_ = event; + if (_tmp33_ != NULL) { + DVBLoggingLogger* _tmp34_; + DVBRecording* _tmp35_; + DVBEvent* _tmp36_; + const gchar* _tmp37_; + DVBRecording* _tmp38_; + DVBEvent* _tmp39_; + const gchar* _tmp40_; + DVBEvent* _tmp41_; + const gchar* _tmp42_; + gchar* _tmp43_ = NULL; + gchar* _tmp44_; + _tmp34_ = dvb_recorder_log; + dvb_logging_logger_debug (_tmp34_, "Recorder.vala:832: Found running event for active recording"); + _tmp35_ = rec; + _tmp36_ = event; + _tmp37_ = _tmp36_->name; + dvb_recording_set_Name (_tmp35_, _tmp37_); + _tmp38_ = rec; + _tmp39_ = event; + _tmp40_ = _tmp39_->description; + _tmp41_ = event; + _tmp42_ = _tmp41_->extended_description; + _tmp43_ = g_strdup_printf ("%s\n%s", _tmp40_, _tmp42_); + _tmp44_ = _tmp43_; + dvb_recording_set_Description (_tmp38_, _tmp44_); + _g_free0 (_tmp44_); + } + _dvb_event_unref0 (event); + _g_object_unref0 (sched); + _g_object_unref0 (chan); } - _dvb_event_unref0 (event); - _g_object_unref0 (sched); - _g_object_unref0 (chan); + _g_object_unref0 (rec); } - _g_object_unref0 (rec); + _g_object_unref0 (_rec_it); } - _g_object_unref0 (_rec_it); } - __finally121: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + __finally132: + { + GeeMap* _tmp45_; + _tmp45_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -2879,25 +4037,33 @@ DVBDeviceGroup* dvb_recorder_get_DeviceGroup (DVBRecorder* self) { DVBDeviceGroup* result; + DVBDeviceGroup* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_DeviceGroup; + _tmp0_ = self->priv->_DeviceGroup; + result = _tmp0_; return result; } static void dvb_recorder_set_DeviceGroup (DVBRecorder* self, DVBDeviceGroup* value) { + DVBDeviceGroup* _tmp0_; g_return_if_fail (self != NULL); - self->priv->_DeviceGroup = value; + _tmp0_ = value; + self->priv->_DeviceGroup = _tmp0_; g_object_notify ((GObject *) self, "DeviceGroup"); } guint dvb_recorder_get_count (DVBRecorder* self) { guint result; - gint _tmp0_; + GeeMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; g_return_val_if_fail (self != NULL, 0U); - _tmp0_ = gee_map_get_size (self->priv->recordings); - result = (guint) _tmp0_; + _tmp0_ = self->priv->recordings; + _tmp1_ = gee_map_get_size (_tmp0_); + _tmp2_ = _tmp1_; + result = (guint) _tmp2_; return result; } @@ -2915,39 +4081,39 @@ GObject * obj; GObjectClass * parent_class; DVBRecorder * self; - GeeHashSet* _tmp0_ = NULL; - GeeSet* _tmp1_; - GeeHashMap* _tmp2_ = NULL; - GeeHashMap* _tmp3_; - DVBRecordingsStore* _tmp4_ = NULL; - GFile* _tmp5_ = NULL; - GeeHashMap* _tmp6_ = NULL; - GeeMap* _tmp7_; + GeeHashSet* _tmp0_; + GeeHashMap* _tmp1_; + DVBRecordingsStore* _tmp2_ = NULL; + DVBDeviceGroup* _tmp3_; + GFile* _tmp4_; + GFile* _tmp5_; + GeeHashMap* _tmp6_; parent_class = G_OBJECT_CLASS (dvb_recorder_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_RECORDER (obj); _tmp0_ = gee_hash_set_new (G_TYPE_UINT, NULL, NULL, NULL, NULL); - _tmp1_ = (GeeSet*) _tmp0_; _g_object_unref0 (self->priv->active_timers); - self->priv->active_timers = _tmp1_; - _tmp2_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_TIMER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp3_ = _tmp2_; + self->priv->active_timers = (GeeSet*) _tmp0_; + _tmp1_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_TIMER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); _g_object_unref0 (self->priv->timers); - self->priv->timers = _tmp3_; + self->priv->timers = _tmp1_; self->priv->have_check_timers_timeout = FALSE; - _tmp4_ = dvb_recordings_store_get_instance (); - _tmp5_ = dvb_device_group_get_RecordingsDirectory (self->priv->_DeviceGroup); - dvb_recordings_store_restore_from_dir (_tmp4_, _tmp5_); + _tmp2_ = dvb_recordings_store_get_instance (); + _tmp3_ = self->priv->_DeviceGroup; + _tmp4_ = dvb_device_group_get_RecordingsDirectory (_tmp3_); + _tmp5_ = _tmp4_; + dvb_recordings_store_restore_from_dir (_tmp2_, _tmp5_); _tmp6_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_RECORDING, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp7_ = (GeeMap*) _tmp6_; _g_object_unref0 (self->priv->recordings); - self->priv->recordings = _tmp7_; + self->priv->recordings = (GeeMap*) _tmp6_; self->priv->check_timers_event_id = (guint) 0; return obj; } static void dvb_recorder_class_init (DVBRecorderClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_recorder_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBRecorderPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_recorder_get_property; @@ -2957,29 +4123,31 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_RECORDER_DEVICE_GROUP, g_param_spec_object ("DeviceGroup", "DeviceGroup", "DeviceGroup", DVB_TYPE_DEVICE_GROUP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_RECORDER_COUNT, g_param_spec_uint ("count", "count", "count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_RECORDER_ELEMENT_TYPE, "element-type"); - g_type_set_qdata (DVB_TYPE_RECORDER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_recorder_dbus_vtable)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_recorder_log = _tmp1_; } static void dvb_recorder_dvb_id_bus_recorder_interface_init (DVBIDBusRecorderIface * iface) { dvb_recorder_dvb_id_bus_recorder_parent_iface = g_type_interface_peek_parent (iface); - iface->AddTimer = (gboolean (*)(DVBIDBusRecorder* ,guint ,gint ,gint ,gint ,gint ,gint ,guint ,guint32* ,GError**)) dvb_recorder_real_AddTimer; - iface->AddTimerWithMargin = (gboolean (*)(DVBIDBusRecorder* ,guint ,gint ,gint ,gint ,gint ,gint ,guint ,guint32* ,GError**)) dvb_recorder_real_AddTimerWithMargin; - iface->AddTimerForEPGEvent = (gboolean (*)(DVBIDBusRecorder* ,guint ,guint ,guint32* ,GError**)) dvb_recorder_real_AddTimerForEPGEvent; - iface->DeleteTimer = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,GError**)) dvb_recorder_real_DeleteTimer; - iface->GetTimers = (guint32* (*)(DVBIDBusRecorder* ,int* ,GError**)) dvb_recorder_real_GetTimers; - iface->GetStartTime = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,guint32** ,int* ,GError**)) dvb_recorder_real_GetStartTime; - iface->SetStartTime = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,gint ,gint ,gint ,gint ,gint ,GError**)) dvb_recorder_real_SetStartTime; - iface->GetEndTime = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,guint** ,int* ,GError**)) dvb_recorder_real_GetEndTime; - iface->GetDuration = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,guint* ,GError**)) dvb_recorder_real_GetDuration; - iface->SetDuration = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,guint ,GError**)) dvb_recorder_real_SetDuration; - iface->GetChannelName = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,gchar** ,GError**)) dvb_recorder_real_GetChannelName; - iface->GetTitle = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,gchar** ,GError**)) dvb_recorder_real_GetTitle; - iface->GetAllInformations = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,DVBTimerInfo* ,GError**)) dvb_recorder_real_GetAllInformations; - iface->GetActiveTimers = (guint32* (*)(DVBIDBusRecorder* ,int* ,GError**)) dvb_recorder_real_GetActiveTimers; - iface->IsTimerActive = (gboolean (*)(DVBIDBusRecorder* ,guint32 ,GError**)) dvb_recorder_real_IsTimerActive; - iface->HasTimer = (gboolean (*)(DVBIDBusRecorder* ,guint ,guint ,guint ,guint ,guint ,guint ,GError**)) dvb_recorder_real_HasTimer; - iface->HasTimerForEvent = (DVBOverlapType (*)(DVBIDBusRecorder* ,guint ,guint ,GError**)) dvb_recorder_real_HasTimerForEvent; + iface->AddTimer = (gboolean (*)(DVBIDBusRecorder*, guint, gint, gint, gint, gint, gint, guint, guint32*, GError**)) dvb_recorder_real_AddTimer; + iface->AddTimerWithMargin = (gboolean (*)(DVBIDBusRecorder*, guint, gint, gint, gint, gint, gint, guint, guint32*, GError**)) dvb_recorder_real_AddTimerWithMargin; + iface->AddTimerForEPGEvent = (gboolean (*)(DVBIDBusRecorder*, guint, guint, guint32*, GError**)) dvb_recorder_real_AddTimerForEPGEvent; + iface->DeleteTimer = (gboolean (*)(DVBIDBusRecorder*, guint32, GError**)) dvb_recorder_real_DeleteTimer; + iface->GetTimers = (guint32* (*)(DVBIDBusRecorder*, int*, GError**)) dvb_recorder_real_GetTimers; + iface->GetStartTime = (gboolean (*)(DVBIDBusRecorder*, guint32, guint32**, int*, GError**)) dvb_recorder_real_GetStartTime; + iface->SetStartTime = (gboolean (*)(DVBIDBusRecorder*, guint32, gint, gint, gint, gint, gint, GError**)) dvb_recorder_real_SetStartTime; + iface->GetEndTime = (gboolean (*)(DVBIDBusRecorder*, guint32, guint**, int*, GError**)) dvb_recorder_real_GetEndTime; + iface->GetDuration = (gboolean (*)(DVBIDBusRecorder*, guint32, guint*, GError**)) dvb_recorder_real_GetDuration; + iface->SetDuration = (gboolean (*)(DVBIDBusRecorder*, guint32, guint, GError**)) dvb_recorder_real_SetDuration; + iface->GetChannelName = (gboolean (*)(DVBIDBusRecorder*, guint32, gchar**, GError**)) dvb_recorder_real_GetChannelName; + iface->GetTitle = (gboolean (*)(DVBIDBusRecorder*, guint32, gchar**, GError**)) dvb_recorder_real_GetTitle; + iface->GetAllInformations = (gboolean (*)(DVBIDBusRecorder*, guint32, DVBTimerInfo*, GError**)) dvb_recorder_real_GetAllInformations; + iface->GetActiveTimers = (guint32* (*)(DVBIDBusRecorder*, int*, GError**)) dvb_recorder_real_GetActiveTimers; + iface->IsTimerActive = (gboolean (*)(DVBIDBusRecorder*, guint32, GError**)) dvb_recorder_real_IsTimerActive; + iface->HasTimer = (gboolean (*)(DVBIDBusRecorder*, guint, guint, guint, guint, guint, guint, GError**)) dvb_recorder_real_HasTimer; + iface->HasTimerForEvent = (DVBOverlapType (*)(DVBIDBusRecorder*, guint, guint, GError**)) dvb_recorder_real_HasTimerForEvent; } diff -Nru gnome-dvb-daemon-0.1.23/src/Recorder.vala gnome-dvb-daemon-0.2.7/src/Recorder.vala --- gnome-dvb-daemon-0.1.23/src/Recorder.vala 2011-01-14 16:55:49.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Recorder.vala 2011-09-29 20:27:47.000000000 +0000 @@ -20,6 +20,7 @@ using GLib; using Gee; using DVB.database; +using DVB.Logging; namespace DVB { @@ -29,6 +30,8 @@ */ public class Recorder : GLib.Object, IDBusRecorder, Iterable { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public unowned DVB.DeviceGroup DeviceGroup { get; construct; } public uint count { @@ -85,7 +88,7 @@ public bool AddTimer (uint channel, int start_year, int start_month, int start_day, int start_hour, int start_minute, uint duration, - out uint32 timer_id) throws DBus.Error { + out uint32 timer_id) throws DBusError { Timer new_timer = this.create_timer (channel, start_year, start_month, start_day, start_hour, start_minute, duration); @@ -109,7 +112,7 @@ public bool AddTimerWithMargin (uint channel, int start_year, int start_month, int start_day, int start_hour, int start_minute, uint duration, - out uint32 timer_id) throws DBus.Error { + out uint32 timer_id) throws DBusError { Timer new_timer = this.create_timer (channel, start_year, start_month, start_day, start_hour, start_minute, duration); @@ -119,7 +122,7 @@ return false; } - Settings settings = Factory.get_settings (); + Settings settings = new Factory().get_settings (); int start_margin = -1 * settings.get_timers_margin_start (); uint end_margin = (uint)(2 * settings.get_timers_margin_end ()); @@ -135,11 +138,14 @@ } return ret; } - - public bool add_timer (Timer new_timer, out uint32 timer_id) { - if (new_timer.has_expired()) return false; + public bool add_timer (Timer new_timer, out uint32 timer_id) { bool ret = false; + timer_id = 0; + + if (new_timer.has_expired()) + return ret; + lock (this.timers) { bool has_conflict = false; int conflict_count = 0; @@ -150,7 +156,7 @@ conflict_count++; if (conflict_count >= this.DeviceGroup.size) { - debug ("Timer is conflicting with another timer: %s", + log.debug ("Timer is conflicting with another timer: %s", this.timers.get(key).to_string ()); has_conflict = true; break; @@ -161,15 +167,15 @@ if (!has_conflict) { this.timers.set (new_timer.Id, new_timer); try { - Factory.get_timers_store ().add_timer_to_device_group (new_timer, + new Factory().get_timers_store ().add_timer_to_device_group (new_timer, this.DeviceGroup); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } this.changed (new_timer.Id, ChangeType.ADDED); if (this.timers.size == 1 && !this.have_check_timers_timeout) { - debug ("Creating new check timers"); + log.debug ("Creating new check timers"); this. check_timers_event_id = Timeout.add_seconds ( CHECK_TIMERS_INTERVAL, this.check_timers ); @@ -192,16 +198,16 @@ * @returns: TRUE on success */ public bool AddTimerForEPGEvent (uint event_id, uint channel_sid, - out uint32 timer_id) throws DBus.Error { - EPGStore epgstore = Factory.get_epg_store (); + out uint32 timer_id) throws DBusError { + EPGStore epgstore = new Factory().get_epg_store (); Event? event = null; try { event = epgstore.get_event (event_id, channel_sid, this.DeviceGroup.Id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } if (event == null) { - debug ("Could not find event with id %u", event_id); + log.debug ("Could not find event with id %u", event_id); timer_id = 0; return false; } @@ -220,7 +226,7 @@ * Delete timer. If the id belongs to the currently * active timer recording is aborted. */ - public bool DeleteTimer (uint32 timer_id) throws DBus.Error { + public bool DeleteTimer (uint32 timer_id) throws DBusError { return this.delete_timer (timer_id); } @@ -235,10 +241,10 @@ } this.timers.unset (timer_id); try { - Factory.get_timers_store ().remove_timer_from_device_group ( + new Factory().get_timers_store ().remove_timer_from_device_group ( timer_id, this.DeviceGroup); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } this.changed (timer_id, ChangeType.DELETED); val = true; @@ -253,7 +259,7 @@ * dvb_recorder_GetTimers * @returns: A list of all timer ids */ - public uint32[] GetTimers () throws DBus.Error { + public uint32[] GetTimers () throws DBusError { uint32[] timer_arr; lock (this.timers) { timer_arr = new uint32[this.timers.size]; @@ -275,7 +281,7 @@ * @returns: TRUE on success */ public bool GetStartTime (uint32 timer_id, out uint32[] start_time) - throws DBus.Error + throws DBusError { bool ret; lock (this.timers) { @@ -302,7 +308,7 @@ */ public bool SetStartTime (uint32 timer_id, int start_year, int start_month, int start_day, int start_hour, - int start_minute) throws DBus.Error + int start_minute) throws DBusError { bool ret = false; lock (this.timers) { @@ -331,7 +337,7 @@ * @returns: TRUE on success */ public bool GetEndTime (uint32 timer_id, out uint[] end_time) - throws DBus.Error + throws DBusError { bool ret; lock (this.timers) { @@ -353,13 +359,15 @@ * @returns: TRUE on success */ public bool GetDuration (uint32 timer_id, out uint duration) - throws DBus.Error + throws DBusError { bool ret = false; lock (this.timers) { if (this.timers.has_key (timer_id)) { duration = this.timers.get(timer_id).Duration; ret = true; + } else { + duration = 0; } } return ret; @@ -371,7 +379,7 @@ * @returns: TRUE on success */ public bool SetDuration (uint32 timer_id, uint duration) - throws DBus.Error + throws DBusError { bool ret; lock (this.timers) { @@ -395,7 +403,7 @@ * @returns: TRUE on success */ public bool GetChannelName (uint32 timer_id, out string name) - throws DBus.Error + throws DBusError { bool ret; lock (this.timers) { @@ -419,7 +427,7 @@ * @returns: TRUE on success */ public bool GetTitle (uint32 timer_id, out string title) - throws DBus.Error + throws DBusError { bool ret = false; lock (this.timers) { @@ -428,14 +436,16 @@ Event? event = t.Channel.Schedule.get_event (t.EventID); title = (event == null) ? "" : event.name; ret = true; + } else { + title = ""; } } - if (!ret) title = ""; + return ret; } public bool GetAllInformations (uint32 timer_id, out TimerInfo info) - throws DBus.Error + throws DBusError { info = TimerInfo (); bool ret; @@ -472,7 +482,7 @@ /** * @returns: The currently active timers */ - public uint32[] GetActiveTimers () throws DBus.Error { + public uint32[] GetActiveTimers () throws DBusError { uint32[] val = new uint32[this.active_timers.size]; int i=0; @@ -488,7 +498,7 @@ * @timer_id: Timer's id * @returns: TRUE if timer is currently active */ - public bool IsTimerActive (uint32 timer_id) throws DBus.Error { + public bool IsTimerActive (uint32 timer_id) throws DBusError { return this.is_timer_active (timer_id); } @@ -502,7 +512,7 @@ */ public bool HasTimer (uint start_year, uint start_month, uint start_day, uint start_hour, uint start_minute, uint duration) - throws DBus.Error + throws DBusError { bool val = false; lock (this.timers) { @@ -523,18 +533,18 @@ } public OverlapType HasTimerForEvent (uint event_id, uint channel_sid) - throws DBus.Error + throws DBusError { - EPGStore epgstore = Factory.get_epg_store (); + EPGStore epgstore = new Factory().get_epg_store (); Event? event = null; try { event = epgstore.get_event (event_id, channel_sid, this.DeviceGroup.Id); } catch (SqlError e) { - critical ("%s", e.message); + log.error ("%s", e.message); } if (event == null) { - debug ("Could not find event with id %u", event_id); + log.debug ("Could not find event with id %u", event_id); return OverlapType.UNKNOWN; } @@ -574,7 +584,7 @@ protected Timer? create_timer (uint channel, int start_year, int start_month, int start_day, int start_hour, int start_minute, uint duration) { - debug ("Creating new timer: channel: %u, start: %04d-%02d-%02d %02d:%02d, duration: %u", + log.debug ("Creating new timer: channel: %u, start: %04d-%02d-%02d %02d:%02d, duration: %u", channel, start_year, start_month, start_day, start_hour, start_minute, duration); @@ -606,7 +616,7 @@ Gst.Element filesink = Gst.ElementFactory.make ("filesink", null); if (filesink == null) { - critical ("Could not create filesink element"); + log.error ("Could not create filesink element"); return; } filesink.set ("location", location.get_path ()); @@ -616,11 +626,11 @@ PlayerThread? player = channel_factory.watch_channel (channel, filesink, true); if (player != null) { - debug ("Setting pipeline to playing"); + log.debug ("Setting pipeline to playing"); Gst.StateChangeReturn ret = player.get_pipeline().set_state ( Gst.State.PLAYING); if (ret == Gst.StateChangeReturn.FAILURE) { - critical ("Failed setting pipeline to playing"); + log.error ("Failed setting pipeline to playing"); channel_factory.stop_channel (channel, filesink); return; } @@ -641,7 +651,7 @@ * transfer informations */ Event? event = channel.Schedule.get_event (timer.EventID); if (event != null) { - debug ("Transfering event information from timer"); + log.debug ("Transfering event information from timer"); recording.Name = event.name; recording.Description = "%s\n%s".printf ( event.description, @@ -671,7 +681,7 @@ rec.Length = Utils.difftime (Time.local (time_t ()), rec.StartTime); - debug ("Recording of channel %s stopped after %" + log.debug ("Recording of channel %s stopped after %" + int64.FORMAT +" seconds", rec.ChannelName, rec.Length); @@ -711,7 +721,7 @@ try { Utils.mkdirs (dir); } catch (Error e) { - critical ("Could not create directory %s: %s", + log.error ("Could not create directory %s: %s", dir.get_path (), e.message); return null; } @@ -721,18 +731,18 @@ try { info = dir.query_info (ATTRIBUTES, 0, null); } catch (Error e) { - critical ("Could not retrieve attributes: %s", e.message); + log.error ("Could not retrieve attributes: %s", e.message); return null; } if (info.get_attribute_uint32 (FILE_ATTRIBUTE_STANDARD_TYPE) != FileType.DIRECTORY) { - critical ("%s is not a directory", dir.get_path ()); + log.error ("%s is not a directory", dir.get_path ()); return null; } if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) { - critical ("Cannot write to %s", dir.get_path ()); + log.error ("Cannot write to %s", dir.get_path ()); return null; } @@ -745,7 +755,7 @@ } private bool check_timers () { - debug ("Checking timers"); + log.debug ("Checking timers"); bool val; SList ended_recordings = @@ -771,7 +781,7 @@ foreach (uint32 key in this.timers.keys) { Timer timer = this.timers.get (key); - debug ("Checking timer: %s", timer.to_string()); + log.debug ("Checking timer: %s", timer.to_string()); // Check if we should start new recording and if we didn't // start it before @@ -779,7 +789,7 @@ && !this.active_timers.contains (timer.Id)) { this.start_recording (timer); } else if (timer.has_expired()) { - debug ("Removing expired timer: %s", timer.to_string()); + log.debug ("Removing expired timer: %s", timer.to_string()); deleteable_items.prepend (key); } } @@ -791,13 +801,13 @@ if (this.timers.size == 0 && this.active_timers.size == 0) { // We don't have any timers and no recording is in progress - debug ("No timers left and no recording in progress"); + log.debug ("No timers left and no recording in progress"); this.have_check_timers_timeout = false; this.check_timers_event_id = 0; val = false; } else { // We still have timers - debug ("%d timers and %d active recordings left", + log.debug ("%d timers and %d active recordings left", this.timers.size, this.active_timers.size); val = true; @@ -819,7 +829,7 @@ Event? event = sched.get_running_event (); if (event != null) { - debug ("Found running event for active recording"); + log.debug ("Found running event for active recording"); rec.Name = event.name; rec.Description = "%s\n%s".printf (event.description, event.extended_description); diff -Nru gnome-dvb-daemon-0.1.23/src/Recording.c gnome-dvb-daemon-0.2.7/src/Recording.c --- gnome-dvb-daemon-0.1.23/src/Recording.c 2011-01-14 16:56:07.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Recording.c 2011-09-29 19:51:17.000000000 +0000 @@ -1,4 +1,4 @@ -/* Recording.c generated by valac 0.11.3, the Vala compiler +/* Recording.c generated by valac 0.14.0, the Vala compiler * generated from Recording.vala, do not modify */ /* @@ -38,6 +38,26 @@ typedef struct _DVBRecording DVBRecording; typedef struct _DVBRecordingClass DVBRecordingClass; typedef struct _DVBRecordingPrivate DVBRecordingPrivate; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_free0(var) (var = (g_free (var), NULL)) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) @@ -85,6 +105,8 @@ static gpointer dvb_recording_parent_class = NULL; +static DVBLoggingLogger* dvb_recording_log; +static DVBLoggingLogger* dvb_recording_log = NULL; GType dvb_recording_get_type (void) G_GNUC_CONST; #define DVB_RECORDING_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_RECORDING, DVBRecordingPrivate)) @@ -99,6 +121,10 @@ DVB_RECORDING_LENGTH, DVB_RECORDING_FILE_MONITOR }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); guint* dvb_recording_get_start (DVBRecording* self, int* result_length1); void dvb_recording_get_StartTime (DVBRecording* self, struct tm* result); void dvb_recording_monitor_recording (DVBRecording* self); @@ -112,6 +138,8 @@ DVBioRecordingWriter* dvb_io_recording_writer_construct (GType object_type, DVBRecording* rec); GType dvb_io_recording_writer_get_type (void) G_GNUC_CONST; void dvb_io_recording_writer_write (DVBioRecordingWriter* self, GError** error); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); GType dvb_recordings_store_get_type (void) G_GNUC_CONST; DVBRecordingsStore* dvb_recordings_store_get_instance (void); void dvb_recordings_store_remove (DVBRecordingsStore* self, DVBRecording* rec); @@ -138,18 +166,42 @@ guint* dvb_recording_get_start (DVBRecording* self, int* result_length1) { guint* result = NULL; - guint* _tmp0_ = NULL; - guint* _tmp1_; + struct tm _tmp0_; + gint _tmp1_; + struct tm _tmp2_; + gint _tmp3_; + struct tm _tmp4_; + gint _tmp5_; + struct tm _tmp6_; + gint _tmp7_; + struct tm _tmp8_; + gint _tmp9_; + guint* _tmp10_ = NULL; + guint* _tmp11_; + gint _tmp11__length1; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = g_new0 (guint, 5); - _tmp0_[0] = (guint) (self->priv->_StartTime.tm_year + 1900); - _tmp0_[1] = (guint) (self->priv->_StartTime.tm_mon + 1); - _tmp0_[2] = (guint) self->priv->_StartTime.tm_mday; - _tmp0_[3] = (guint) self->priv->_StartTime.tm_hour; - _tmp0_[4] = (guint) self->priv->_StartTime.tm_min; - _tmp1_ = _tmp0_; - *result_length1 = 5; - result = _tmp1_; + _tmp0_ = self->priv->_StartTime; + _tmp1_ = _tmp0_.tm_year; + _tmp2_ = self->priv->_StartTime; + _tmp3_ = _tmp2_.tm_mon; + _tmp4_ = self->priv->_StartTime; + _tmp5_ = _tmp4_.tm_mday; + _tmp6_ = self->priv->_StartTime; + _tmp7_ = _tmp6_.tm_hour; + _tmp8_ = self->priv->_StartTime; + _tmp9_ = _tmp8_.tm_min; + _tmp10_ = g_new0 (guint, 5); + _tmp10_[0] = (guint) (_tmp1_ + 1900); + _tmp10_[1] = (guint) (_tmp3_ + 1); + _tmp10_[2] = (guint) _tmp5_; + _tmp10_[3] = (guint) _tmp7_; + _tmp10_[4] = (guint) _tmp9_; + _tmp11_ = _tmp10_; + _tmp11__length1 = 5; + if (result_length1) { + *result_length1 = _tmp11__length1; + } + result = _tmp11_; return result; } @@ -160,30 +212,40 @@ void dvb_recording_monitor_recording (DVBRecording* self) { - GFileMonitor* _tmp0_ = NULL; - GFileMonitor* _tmp1_; - GFileMonitor* _tmp2_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _tmp0_ = g_file_monitor_file (self->priv->_Location, 0, NULL, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch122_g_error; + { + GFile* _tmp0_; + GFileMonitor* _tmp1_ = NULL; + GFileMonitor* _tmp2_; + GFileMonitor* _tmp3_; + GFileMonitor* _tmp4_; + _tmp0_ = self->priv->_Location; + _tmp1_ = g_file_monitor_file (_tmp0_, 0, NULL, &_inner_error_); + _tmp2_ = _tmp1_; + if (_inner_error_ != NULL) { + goto __catch133_g_error; + } + _tmp3_ = _tmp2_; + dvb_recording_set_file_monitor (self, _tmp3_); + _g_object_unref0 (_tmp3_); + _tmp4_ = self->priv->_file_monitor; + g_signal_connect_object (_tmp4_, "changed", (GCallback) _dvb_recording_on_recording_file_changed_g_file_monitor_changed, self, 0); } - _tmp2_ = _tmp1_; - dvb_recording_set_file_monitor (self, _tmp2_); - _g_object_unref0 (_tmp2_); - g_signal_connect_object (self->priv->_file_monitor, "changed", (GCallback) _dvb_recording_on_recording_file_changed_g_file_monitor_changed, self, 0); - goto __finally122; - __catch122_g_error: + goto __finally133; + __catch133_g_error: { - GError * e; + GError* e = NULL; + GError* _tmp5_; + const gchar* _tmp6_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("Recording.vala:54: Could not create FileMonitor: %s", e->message); + _tmp5_ = e; + _tmp6_ = _tmp5_->message; + g_warning ("Recording.vala:57: Could not create FileMonitor: %s", _tmp6_); _g_error_free0 (e); } - __finally122: + __finally133: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -193,26 +255,34 @@ void dvb_recording_save_to_disk (DVBRecording* self) { - DVBioRecordingWriter* _tmp0_ = NULL; + DVBioRecordingWriter* _tmp0_; DVBioRecordingWriter* writer; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = dvb_io_recording_writer_new (self); writer = _tmp0_; - dvb_io_recording_writer_write (writer, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch123_g_error; + { + dvb_io_recording_writer_write (writer, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch134_g_error; + } } - goto __finally123; - __catch123_g_error: + goto __finally134; + __catch134_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp1_; + GError* _tmp2_; + const gchar* _tmp3_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Recording.vala:63: Could not save recording: %s", e->message); + _tmp1_ = dvb_recording_log; + _tmp2_ = e; + _tmp3_ = _tmp2_->message; + dvb_logging_logger_error (_tmp1_, "Recording.vala:66: Could not save recording: %s", _tmp3_); _g_error_free0 (e); } - __finally123: + __finally134: if (_inner_error_ != NULL) { _g_object_unref0 (writer); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -224,19 +294,29 @@ static void dvb_recording_on_recording_file_changed (DVBRecording* self, GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event) { + GFileMonitorEvent _tmp0_; g_return_if_fail (self != NULL); g_return_if_fail (monitor != NULL); g_return_if_fail (file != NULL); - if (event == G_FILE_MONITOR_EVENT_DELETED) { - gchar* _tmp0_ = NULL; + _tmp0_ = event; + if (_tmp0_ == G_FILE_MONITOR_EVENT_DELETED) { + GFile* _tmp1_; + gchar* _tmp2_ = NULL; gchar* location; - DVBRecordingsStore* _tmp1_ = NULL; - _tmp0_ = g_file_get_path (file); - location = _tmp0_; - g_debug ("Recording.vala:71: %s has been deleted", location); - g_file_monitor_cancel (monitor); - _tmp1_ = dvb_recordings_store_get_instance (); - dvb_recordings_store_remove (_tmp1_, self); + DVBLoggingLogger* _tmp3_; + const gchar* _tmp4_; + GFileMonitor* _tmp5_; + DVBRecordingsStore* _tmp6_ = NULL; + _tmp1_ = file; + _tmp2_ = g_file_get_path (_tmp1_); + location = _tmp2_; + _tmp3_ = dvb_recording_log; + _tmp4_ = location; + dvb_logging_logger_debug (_tmp3_, "Recording.vala:74: %s has been deleted", _tmp4_); + _tmp5_ = monitor; + g_file_monitor_cancel (_tmp5_); + _tmp6_ = dvb_recordings_store_get_instance (); + dvb_recordings_store_remove (_tmp6_, self); _g_free0 (location); } } @@ -256,48 +336,58 @@ guint32 dvb_recording_get_Id (DVBRecording* self) { guint32 result; + guint32 _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Id; + _tmp0_ = self->priv->_Id; + result = _tmp0_; return result; } void dvb_recording_set_Id (DVBRecording* self, guint32 value) { + guint32 _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Id = value; + _tmp0_ = value; + self->priv->_Id = _tmp0_; g_object_notify ((GObject *) self, "Id"); } guint dvb_recording_get_ChannelSid (DVBRecording* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_ChannelSid; + _tmp0_ = self->priv->_ChannelSid; + result = _tmp0_; return result; } void dvb_recording_set_ChannelSid (DVBRecording* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_ChannelSid = value; + _tmp0_ = value; + self->priv->_ChannelSid = _tmp0_; g_object_notify ((GObject *) self, "ChannelSid"); } const gchar* dvb_recording_get_ChannelName (DVBRecording* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_ChannelName; + _tmp0_ = self->priv->_ChannelName; + result = _tmp0_; return result; } void dvb_recording_set_ChannelName (DVBRecording* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_ChannelName); self->priv->_ChannelName = _tmp1_; g_object_notify ((GObject *) self, "ChannelName"); @@ -306,8 +396,10 @@ GFile* dvb_recording_get_Location (DVBRecording* self) { GFile* result; + GFile* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Location; + _tmp0_ = self->priv->_Location; + result = _tmp0_; return result; } @@ -321,8 +413,8 @@ GFile* _tmp0_; GFile* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_Location); self->priv->_Location = _tmp1_; g_object_notify ((GObject *) self, "Location"); @@ -331,18 +423,20 @@ const gchar* dvb_recording_get_Name (DVBRecording* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Name; + _tmp0_ = self->priv->_Name; + result = _tmp0_; return result; } void dvb_recording_set_Name (DVBRecording* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_Name); self->priv->_Name = _tmp1_; g_object_notify ((GObject *) self, "Name"); @@ -351,18 +445,20 @@ const gchar* dvb_recording_get_Description (DVBRecording* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Description; + _tmp0_ = self->priv->_Description; + result = _tmp0_; return result; } void dvb_recording_set_Description (DVBRecording* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_Description); self->priv->_Description = _tmp1_; g_object_notify ((GObject *) self, "Description"); @@ -370,37 +466,47 @@ void dvb_recording_get_StartTime (DVBRecording* self, struct tm* result) { + struct tm _tmp0_; g_return_if_fail (self != NULL); - *result = self->priv->_StartTime; + _tmp0_ = self->priv->_StartTime; + *result = _tmp0_; return; } void dvb_recording_set_StartTime (DVBRecording* self, struct tm* value) { + struct tm _tmp0_; g_return_if_fail (self != NULL); - self->priv->_StartTime = *value; + _tmp0_ = *value; + self->priv->_StartTime = _tmp0_; } gint64 dvb_recording_get_Length (DVBRecording* self) { gint64 result; + gint64 _tmp0_; g_return_val_if_fail (self != NULL, 0LL); - result = self->priv->_Length; + _tmp0_ = self->priv->_Length; + result = _tmp0_; return result; } void dvb_recording_set_Length (DVBRecording* self, gint64 value) { + gint64 _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Length = value; + _tmp0_ = value; + self->priv->_Length = _tmp0_; g_object_notify ((GObject *) self, "Length"); } GFileMonitor* dvb_recording_get_file_monitor (DVBRecording* self) { GFileMonitor* result; + GFileMonitor* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_file_monitor; + _tmp0_ = self->priv->_file_monitor; + result = _tmp0_; return result; } @@ -409,8 +515,8 @@ GFileMonitor* _tmp0_; GFileMonitor* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_file_monitor); self->priv->_file_monitor = _tmp1_; g_object_notify ((GObject *) self, "file-monitor"); @@ -418,6 +524,8 @@ static void dvb_recording_class_init (DVBRecordingClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_recording_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBRecordingPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_recording_get_property; @@ -431,6 +539,9 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_RECORDING_DESCRIPTION, g_param_spec_string ("Description", "Description", "Description", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_RECORDING_LENGTH, g_param_spec_int64 ("Length", "Length", "Length", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_RECORDING_FILE_MONITOR, g_param_spec_object ("file-monitor", "file-monitor", "file-monitor", G_TYPE_FILE_MONITOR, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_recording_log = _tmp1_; } diff -Nru gnome-dvb-daemon-0.1.23/src/RecordingsStore.c gnome-dvb-daemon-0.2.7/src/RecordingsStore.c --- gnome-dvb-daemon-0.1.23/src/RecordingsStore.c 2011-01-14 16:56:07.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/RecordingsStore.c 2011-09-29 19:51:17.000000000 +0000 @@ -1,4 +1,4 @@ -/* RecordingsStore.c generated by valac 0.11.3, the Vala compiler +/* RecordingsStore.c generated by valac 0.14.0, the Vala compiler * generated from RecordingsStore.vala, do not modify */ /* @@ -22,13 +22,10 @@ #include #include -#include -#include +#include #include #include #include -#include -#include #include @@ -40,6 +37,8 @@ typedef struct _DVBIDBusRecordingsStore DVBIDBusRecordingsStore; typedef struct _DVBIDBusRecordingsStoreIface DVBIDBusRecordingsStoreIface; +#define DVB_TYPE_ID_BUS_RECORDINGS_STORE_PROXY (dvb_id_bus_recordings_store_proxy_get_type ()) + #define DVB_TYPE_RECORDING_INFO (dvb_recording_info_get_type ()) typedef struct _DVBRecordingInfo DVBRecordingInfo; @@ -63,7 +62,26 @@ typedef struct _DVBRecording DVBRecording; typedef struct _DVBRecordingClass DVBRecordingClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define DVB_TYPE_CHANGE_TYPE (dvb_change_type_get_type ()) @@ -119,10 +137,6 @@ guint32 last_id; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - typedef enum { DVB_CHANGE_TYPE_ADDED = 0, DVB_CHANGE_TYPE_DELETED = 1, @@ -131,13 +145,16 @@ static gpointer dvb_recordings_store_parent_class = NULL; +static DVBLoggingLogger* dvb_recordings_store_log; +static DVBLoggingLogger* dvb_recordings_store_log = NULL; static DVBRecordingsStore* dvb_recordings_store_instance; static DVBRecordingsStore* dvb_recordings_store_instance = NULL; static GStaticRecMutex dvb_recordings_store_instance_mutex; static GStaticRecMutex dvb_recordings_store_instance_mutex = {0}; static DVBIDBusRecordingsStoreIface* dvb_recordings_store_dvb_id_bus_recordings_store_parent_iface = NULL; -DVBIDBusRecordingsStore* dvb_id_bus_recordings_store_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_recordings_store_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_recordings_store_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_recording_info_get_type (void) G_GNUC_CONST; DVBRecordingInfo* dvb_recording_info_dup (const DVBRecordingInfo* self); void dvb_recording_info_free (DVBRecordingInfo* self); @@ -150,12 +167,10 @@ enum { DVB_RECORDINGS_STORE_DUMMY_PROPERTY }; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_recordings_store_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_recordings_store_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_recordings_store_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_recordings_store_introspect (DVBRecordingsStore* self, DBusConnection* connection, DBusMessage* message); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); DVBRecordingsStore* dvb_recordings_store_get_instance (void); DVBRecordingsStore* dvb_recordings_store_new (void); DVBRecordingsStore* dvb_recordings_store_construct (GType object_type); @@ -163,6 +178,7 @@ void dvb_recordings_store_update_last_id (DVBRecordingsStore* self, guint32 new_last_id); gboolean dvb_recordings_store_add (DVBRecordingsStore* self, DVBRecording* rec); guint32 dvb_recording_get_Id (DVBRecording* self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); GType dvb_change_type_get_type (void) G_GNUC_CONST; gboolean dvb_recordings_store_add_and_monitor (DVBRecordingsStore* self, DVBRecording* rec); void dvb_recording_monitor_recording (DVBRecording* self); @@ -182,6 +198,7 @@ static gboolean dvb_recordings_store_real_GetLength (DVBIDBusRecordingsStore* base, guint32 rec_id, gint64* length, GError** error); gint64 dvb_recording_get_Length (DVBRecording* self); static gboolean dvb_recordings_store_real_Delete (DVBIDBusRecordingsStore* base, guint32 rec_id, GError** error); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); void dvb_utils_delete_dir_recursively (GFile* dir, GError** error); static gboolean dvb_recordings_store_real_GetChannelName (DVBIDBusRecordingsStore* base, guint32 rec_id, gchar** name, GError** error); const gchar* dvb_recording_get_ChannelName (DVBRecording* self); @@ -194,99 +211,22 @@ static GObject * dvb_recordings_store_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); static void dvb_recordings_store_finalize (GObject* obj); -static const DBusObjectPathVTable _dvb_recordings_store_dbus_path_vtable = {_dvb_recordings_store_dbus_unregister, dvb_recordings_store_dbus_message}; -static const _DBusObjectVTable _dvb_recordings_store_dbus_vtable = {dvb_recordings_store_dbus_register_object}; - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_recordings_store_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_recordings_store_introspect (DVBRecordingsStore* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_recordings_store_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_recordings_store_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_recordings_store_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_recordings_store_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_recordings_store_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - dvb_id_bus_recordings_store_dbus_register_object (connection, path, object); -} - DVBRecordingsStore* dvb_recordings_store_get_instance (void) { DVBRecordingsStore* result = NULL; + DVBRecordingsStore* _tmp0_; + DVBRecordingsStore* _tmp2_; g_static_rec_mutex_lock (&dvb_recordings_store_instance_mutex); - if (dvb_recordings_store_instance == NULL) { - DVBRecordingsStore* _tmp0_ = NULL; + _tmp0_ = dvb_recordings_store_instance; + if (_tmp0_ == NULL) { DVBRecordingsStore* _tmp1_; - _tmp0_ = dvb_recordings_store_new (); - _tmp1_ = _tmp0_; + _tmp1_ = dvb_recordings_store_new (); _g_object_unref0 (dvb_recordings_store_instance); dvb_recordings_store_instance = _tmp1_; } g_static_rec_mutex_unlock (&dvb_recordings_store_instance_mutex); - result = dvb_recordings_store_instance; + _tmp2_ = dvb_recordings_store_instance; + result = _tmp2_; return result; } @@ -298,16 +238,22 @@ void dvb_recordings_store_shutdown (void) { DVBRecordingsStore* _tmp0_; + DVBRecordingsStore* _tmp1_; DVBRecordingsStore* rs; + DVBRecordingsStore* _tmp2_; g_static_rec_mutex_lock (&dvb_recordings_store_instance_mutex); - _tmp0_ = _g_object_ref0 (dvb_recordings_store_instance); - rs = _tmp0_; - if (rs != NULL) { - DVBRecordingsStore* _tmp1_; - gee_abstract_map_clear ((GeeAbstractMap*) rs->priv->recordings); - _tmp1_ = NULL; + _tmp0_ = dvb_recordings_store_instance; + _tmp1_ = _g_object_ref0 (_tmp0_); + rs = _tmp1_; + _tmp2_ = rs; + if (_tmp2_ != NULL) { + DVBRecordingsStore* _tmp3_; + GeeHashMap* _tmp4_; + _tmp3_ = rs; + _tmp4_ = _tmp3_->priv->recordings; + gee_abstract_map_clear ((GeeAbstractMap*) _tmp4_); _g_object_unref0 (dvb_recordings_store_instance); - dvb_recordings_store_instance = _tmp1_; + dvb_recordings_store_instance = NULL; } g_static_rec_mutex_unlock (&dvb_recordings_store_instance_mutex); _g_object_unref0 (rs); @@ -318,12 +264,26 @@ GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - if (new_last_id > self->priv->last_id) { - self->priv->last_id = new_last_id; + { + guint32 _tmp1_; + guint32 _tmp2_; + _tmp1_ = new_last_id; + _tmp2_ = self->priv->last_id; + if (_tmp1_ > _tmp2_) { + guint32 _tmp3_; + _tmp3_ = new_last_id; + self->priv->last_id = _tmp3_; + } + } + __finally135: + { + GeeHashMap* _tmp4_; + _tmp4_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally124: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -335,34 +295,76 @@ gboolean dvb_recordings_store_add (DVBRecordingsStore* self, DVBRecording* rec) { gboolean result = FALSE; - guint32 _tmp0_; + DVBRecording* _tmp0_; + guint32 _tmp1_; + guint32 _tmp2_; guint32 id; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (rec != NULL, FALSE); - _tmp0_ = dvb_recording_get_Id (rec); - id = _tmp0_; + _tmp0_ = rec; + _tmp1_ = dvb_recording_get_Id (_tmp0_); + _tmp2_ = _tmp1_; + id = _tmp2_; { - gboolean _tmp1_; - guint32 _tmp2_; + GeeHashMap* _tmp3_; + _tmp3_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp1_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (id)); - if (_tmp1_) { - g_critical ("RecordingsStore.vala:70: Recording with id %u already available", (guint) id); - result = FALSE; - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); - return result; + { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gboolean _tmp6_ = FALSE; + DVBRecording* _tmp10_; + guint32 _tmp11_; + guint32 _tmp12_; + guint32 _tmp13_; + GeeHashMap* _tmp17_; + guint32 _tmp18_; + DVBRecording* _tmp19_; + guint32 _tmp20_; + _tmp4_ = self->priv->recordings; + _tmp5_ = id; + _tmp6_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + if (_tmp6_) { + DVBLoggingLogger* _tmp7_; + guint32 _tmp8_; + _tmp7_ = dvb_recordings_store_log; + _tmp8_ = id; + dvb_logging_logger_error (_tmp7_, "RecordingsStore.vala:73: Recording with id %u already available", (guint) _tmp8_); + result = FALSE; + { + GeeHashMap* _tmp9_; + _tmp9_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + return result; + } + _tmp10_ = rec; + _tmp11_ = dvb_recording_get_Id (_tmp10_); + _tmp12_ = _tmp11_; + _tmp13_ = self->priv->last_id; + if (_tmp12_ > _tmp13_) { + DVBRecording* _tmp14_; + guint32 _tmp15_; + guint32 _tmp16_; + _tmp14_ = rec; + _tmp15_ = dvb_recording_get_Id (_tmp14_); + _tmp16_ = _tmp15_; + self->priv->last_id = _tmp16_; + } + _tmp17_ = self->priv->recordings; + _tmp18_ = id; + _tmp19_ = rec; + gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, GUINT_TO_POINTER (_tmp18_), _tmp19_); + _tmp20_ = id; + g_signal_emit_by_name ((DVBIDBusRecordingsStore*) self, "changed", _tmp20_, (guint) DVB_CHANGE_TYPE_ADDED); } - _tmp2_ = dvb_recording_get_Id (rec); - if (_tmp2_ > self->priv->last_id) { - guint32 _tmp3_; - _tmp3_ = dvb_recording_get_Id (rec); - self->priv->last_id = _tmp3_; + __finally136: + { + GeeHashMap* _tmp21_; + _tmp21_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - gee_abstract_map_set ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (id), rec); - g_signal_emit_by_name ((DVBIDBusRecordingsStore*) self, "changed", id, (guint) DVB_CHANGE_TYPE_ADDED); - __finally125: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -376,12 +378,16 @@ gboolean dvb_recordings_store_add_and_monitor (DVBRecordingsStore* self, DVBRecording* rec) { gboolean result = FALSE; - gboolean _tmp0_; + DVBRecording* _tmp0_; + gboolean _tmp1_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (rec != NULL, FALSE); - _tmp0_ = dvb_recordings_store_add (self, rec); - if (_tmp0_) { - dvb_recording_monitor_recording (rec); + _tmp0_ = rec; + _tmp1_ = dvb_recordings_store_add (self, _tmp0_); + if (_tmp1_) { + DVBRecording* _tmp2_; + _tmp2_ = rec; + dvb_recording_monitor_recording (_tmp2_); result = TRUE; return result; } @@ -391,13 +397,19 @@ void dvb_recordings_store_remove (DVBRecordingsStore* self, DVBRecording* rec) { - guint32 _tmp0_; + DVBRecording* _tmp0_; + guint32 _tmp1_; + guint32 _tmp2_; guint32 rec_id; + GeeHashMap* _tmp3_; g_return_if_fail (self != NULL); g_return_if_fail (rec != NULL); - _tmp0_ = dvb_recording_get_Id (rec); - rec_id = _tmp0_; - gee_abstract_map_unset ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id), NULL); + _tmp0_ = rec; + _tmp1_ = dvb_recording_get_Id (_tmp0_); + _tmp2_ = _tmp1_; + rec_id = _tmp2_; + _tmp3_ = self->priv->recordings; + gee_abstract_map_unset ((GeeAbstractMap*) _tmp3_, GUINT_TO_POINTER (rec_id), NULL); g_signal_emit_by_name ((DVBIDBusRecordingsStore*) self, "changed", rec_id, (guint) DVB_CHANGE_TYPE_DELETED); } @@ -408,11 +420,23 @@ GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0U); { + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - self->priv->last_id = self->priv->last_id + 1; - val = self->priv->last_id; - __finally126: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + { + guint32 _tmp1_; + guint32 _tmp2_; + _tmp1_ = self->priv->last_id; + self->priv->last_id = _tmp1_ + 1; + _tmp2_ = self->priv->last_id; + val = _tmp2_; + } + __finally137: + { + GeeHashMap* _tmp3_; + _tmp3_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -430,57 +454,88 @@ static guint32* dvb_recordings_store_real_GetRecordings (DVBIDBusRecordingsStore* base, int* result_length1, GError** error) { DVBRecordingsStore * self; guint32* result = NULL; - gint ids_length1; - gint _ids_size_; - guint32* ids; - guint32* _tmp9_; + guint32* ids = NULL; + gint ids_length1 = 0; + gint _ids_size_ = 0; + guint32* _tmp21_; + gint _tmp21__length1; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; - ids_length1 = 0; - ids = NULL; { - gint _tmp0_; - guint32* _tmp1_ = NULL; - guint32* _tmp2_; - gint i; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->recordings); - _tmp1_ = g_new0 (guint32, _tmp0_); - _tmp2_ = _tmp1_; - ids = (g_free (ids), NULL); - ids_length1 = _tmp0_; - _ids_size_ = ids_length1; - ids = _tmp2_; - i = 0; - { - GeeSet* _tmp3_ = NULL; - GeeSet* _tmp4_; - GeeIterator* _tmp5_ = NULL; - GeeIterator* _tmp6_; - GeeIterator* _key_it; - _tmp3_ = gee_map_get_keys ((GeeMap*) self->priv->recordings); - _tmp4_ = _tmp3_; - _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); - _key_it = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - guint32 key; - _tmp7_ = gee_iterator_next (_key_it); - if (!_tmp7_) { - break; + { + GeeHashMap* _tmp1_; + gint _tmp2_; + gint _tmp3_; + guint32* _tmp4_ = NULL; + gint i; + _tmp1_ = self->priv->recordings; + _tmp2_ = gee_map_get_size ((GeeMap*) _tmp1_); + _tmp3_ = _tmp2_; + _tmp4_ = g_new0 (guint32, _tmp3_); + ids = (g_free (ids), NULL); + ids = _tmp4_; + ids_length1 = _tmp3_; + _ids_size_ = ids_length1; + i = 0; + { + GeeHashMap* _tmp5_; + GeeSet* _tmp6_; + GeeSet* _tmp7_; + GeeSet* _tmp8_; + GeeIterator* _tmp9_ = NULL; + GeeIterator* _tmp10_; + GeeIterator* _key_it; + _tmp5_ = self->priv->recordings; + _tmp6_ = gee_map_get_keys ((GeeMap*) _tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = _tmp7_; + _tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_); + _tmp10_ = _tmp9_; + _g_object_unref0 (_tmp8_); + _key_it = _tmp10_; + while (TRUE) { + GeeIterator* _tmp11_; + gboolean _tmp12_ = FALSE; + GeeIterator* _tmp13_; + gpointer _tmp14_ = NULL; + guint32 key; + guint32* _tmp15_; + gint _tmp15__length1; + gint _tmp16_; + guint32 _tmp17_; + guint32 _tmp18_; + gint _tmp19_; + _tmp11_ = _key_it; + _tmp12_ = gee_iterator_next (_tmp11_); + if (!_tmp12_) { + break; + } + _tmp13_ = _key_it; + _tmp14_ = gee_iterator_get (_tmp13_); + key = GPOINTER_TO_UINT (_tmp14_); + _tmp15_ = ids; + _tmp15__length1 = ids_length1; + _tmp16_ = i; + _tmp17_ = key; + _tmp15_[_tmp16_] = _tmp17_; + _tmp18_ = _tmp15_[_tmp16_]; + _tmp19_ = i; + i = _tmp19_ + 1; } - _tmp8_ = gee_iterator_get (_key_it); - key = GPOINTER_TO_UINT (_tmp8_); - ids[i] = key; - i++; + _g_object_unref0 (_key_it); } - _g_object_unref0 (_key_it); } - __finally127: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + __finally138: + { + GeeHashMap* _tmp20_; + _tmp20_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); ids = (g_free (ids), NULL); return NULL; @@ -492,9 +547,12 @@ } } } - _tmp9_ = ids; - *result_length1 = ids_length1; - result = _tmp9_; + _tmp21_ = ids; + _tmp21__length1 = ids_length1; + if (result_length1) { + *result_length1 = _tmp21__length1; + } + result = _tmp21_; return result; } @@ -506,36 +564,57 @@ */ static gboolean dvb_recordings_store_real_GetLocation (DVBIDBusRecordingsStore* base, guint32 rec_id, gchar** location, GError** error) { DVBRecordingsStore * self; - gchar* _location = NULL; + gchar* _vala_location = NULL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBRecording* _tmp2_; - GFile* _tmp3_ = NULL; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - _tmp2_ = (DVBRecording*) _tmp1_; - _tmp3_ = dvb_recording_get_Location (_tmp2_); - _tmp4_ = g_file_get_uri (_tmp3_); - _tmp5_ = _tmp4_; - _g_free0 (_location); - _location = _tmp5_; - _g_object_unref0 (_tmp2_); - ret = TRUE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBRecording* _tmp7_; + GFile* _tmp8_; + GFile* _tmp9_; + gchar* _tmp10_ = NULL; + _tmp4_ = self->priv->recordings; + _tmp5_ = rec_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBRecording*) _tmp6_; + _tmp8_ = dvb_recording_get_Location (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = g_file_get_uri (_tmp9_); + _g_free0 (_vala_location); + _vala_location = _tmp10_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } else { + gchar* _tmp11_; + _tmp11_ = g_strdup (""); + _g_free0 (_vala_location); + _vala_location = _tmp11_; + } + } + __finally139: + { + GeeHashMap* _tmp12_; + _tmp12_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally128: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -545,19 +624,11 @@ } } } - if (!ret) { - gchar* _tmp6_; - gchar* _tmp7_; - _tmp6_ = g_strdup (""); - _tmp7_ = _tmp6_; - _g_free0 (_location); - _location = _tmp7_; - } result = ret; if (location) { - *location = _location; + *location = _vala_location; } else { - _g_free0 (_location); + _g_free0 (_vala_location); } return result; } @@ -571,48 +642,76 @@ */ static gboolean dvb_recordings_store_real_GetName (DVBIDBusRecordingsStore* base, guint32 rec_id, gchar** name, GError** error) { DVBRecordingsStore * self; - gchar* _name = NULL; + gchar* _vala_name = NULL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBRecording* _tmp2_; - const gchar* _tmp3_ = NULL; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* val; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - _tmp2_ = (DVBRecording*) _tmp1_; - _tmp3_ = dvb_recording_get_Name (_tmp2_); - _tmp4_ = g_strdup (_tmp3_); - val = (_tmp5_ = _tmp4_, _g_object_unref0 (_tmp2_), _tmp5_); - _tmp6_ = NULL; - if (val == NULL) { - _tmp6_ = ""; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBRecording* _tmp7_; + const gchar* _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_; + gchar* _tmp11_; + gchar* val; + const gchar* _tmp12_ = NULL; + const gchar* _tmp13_; + const gchar* _tmp15_; + gchar* _tmp16_; + _tmp4_ = self->priv->recordings; + _tmp5_ = rec_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBRecording*) _tmp6_; + _tmp8_ = dvb_recording_get_Name (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = g_strdup (_tmp9_); + _tmp11_ = _tmp10_; + _g_object_unref0 (_tmp7_); + val = _tmp11_; + _tmp13_ = val; + if (_tmp13_ == NULL) { + _tmp12_ = ""; + } else { + const gchar* _tmp14_; + _tmp14_ = val; + _tmp12_ = _tmp14_; + } + _tmp15_ = _tmp12_; + _tmp16_ = g_strdup (_tmp15_); + _g_free0 (_vala_name); + _vala_name = _tmp16_; + ret = TRUE; + _g_free0 (val); } else { - _tmp6_ = val; + gchar* _tmp17_; + _tmp17_ = g_strdup (""); + _g_free0 (_vala_name); + _vala_name = _tmp17_; } - _tmp7_ = g_strdup (_tmp6_); - _tmp8_ = _tmp7_; - _g_free0 (_name); - _name = _tmp8_; - ret = TRUE; - _g_free0 (val); } - __finally129: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + __finally140: + { + GeeHashMap* _tmp18_; + _tmp18_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -622,19 +721,11 @@ } } } - if (!ret) { - gchar* _tmp9_; - gchar* _tmp10_; - _tmp9_ = g_strdup (""); - _tmp10_ = _tmp9_; - _g_free0 (_name); - _name = _tmp10_; - } result = ret; if (name) { - *name = _name; + *name = _vala_name; } else { - _g_free0 (_name); + _g_free0 (_vala_name); } return result; } @@ -648,48 +739,76 @@ */ static gboolean dvb_recordings_store_real_GetDescription (DVBIDBusRecordingsStore* base, guint32 rec_id, gchar** description, GError** error) { DVBRecordingsStore * self; - gchar* _description = NULL; + gchar* _vala_description = NULL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBRecording* _tmp2_; - const gchar* _tmp3_ = NULL; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* val; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - _tmp2_ = (DVBRecording*) _tmp1_; - _tmp3_ = dvb_recording_get_Description (_tmp2_); - _tmp4_ = g_strdup (_tmp3_); - val = (_tmp5_ = _tmp4_, _g_object_unref0 (_tmp2_), _tmp5_); - _tmp6_ = NULL; - if (val == NULL) { - _tmp6_ = ""; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBRecording* _tmp7_; + const gchar* _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_; + gchar* _tmp11_; + gchar* val; + const gchar* _tmp12_ = NULL; + const gchar* _tmp13_; + const gchar* _tmp15_; + gchar* _tmp16_; + _tmp4_ = self->priv->recordings; + _tmp5_ = rec_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBRecording*) _tmp6_; + _tmp8_ = dvb_recording_get_Description (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = g_strdup (_tmp9_); + _tmp11_ = _tmp10_; + _g_object_unref0 (_tmp7_); + val = _tmp11_; + _tmp13_ = val; + if (_tmp13_ == NULL) { + _tmp12_ = ""; + } else { + const gchar* _tmp14_; + _tmp14_ = val; + _tmp12_ = _tmp14_; + } + _tmp15_ = _tmp12_; + _tmp16_ = g_strdup (_tmp15_); + _g_free0 (_vala_description); + _vala_description = _tmp16_; + ret = TRUE; + _g_free0 (val); } else { - _tmp6_ = val; + gchar* _tmp17_; + _tmp17_ = g_strdup (""); + _g_free0 (_vala_description); + _vala_description = _tmp17_; } - _tmp7_ = g_strdup (_tmp6_); - _tmp8_ = _tmp7_; - _g_free0 (_description); - _description = _tmp8_; - ret = TRUE; - _g_free0 (val); } - __finally130: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + __finally141: + { + GeeHashMap* _tmp18_; + _tmp18_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -699,19 +818,11 @@ } } } - if (!ret) { - gchar* _tmp9_; - gchar* _tmp10_; - _tmp9_ = g_strdup (""); - _tmp10_ = _tmp9_; - _g_free0 (_description); - _description = _tmp10_; - } result = ret; if (description) { - *description = _description; + *description = _vala_description; } else { - _g_free0 (_description); + _g_free0 (_vala_description); } return result; } @@ -724,45 +835,57 @@ */ static gboolean dvb_recordings_store_real_GetStartTime (DVBIDBusRecordingsStore* base, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error) { DVBRecordingsStore * self; - guint* _start_time = NULL; - int _start_time_length1 = 0; + guint* _vala_start_time = NULL; + int _vala_start_time_length1 = 0; gboolean result = FALSE; gboolean ret = FALSE; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBRecording* _tmp2_; - gint _tmp3_; - guint* _tmp4_ = NULL; - guint* _tmp5_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - _tmp2_ = (DVBRecording*) _tmp1_; - _tmp4_ = dvb_recording_get_start (_tmp2_, &_tmp3_); - _tmp5_ = _tmp4_; - _start_time = (g_free (_start_time), NULL); - _start_time_length1 = _tmp3_; - _start_time = _tmp5_; - _g_object_unref0 (_tmp2_); - ret = TRUE; - } else { - guint* _tmp6_ = NULL; - guint* _tmp7_; - _tmp6_ = g_new0 (guint, 0); - _tmp7_ = _tmp6_; - _start_time = (g_free (_start_time), NULL); - _start_time_length1 = 0; - _start_time = _tmp7_; - ret = FALSE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBRecording* _tmp7_; + gint _tmp8_ = 0; + guint* _tmp9_ = NULL; + _tmp4_ = self->priv->recordings; + _tmp5_ = rec_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBRecording*) _tmp6_; + _tmp9_ = dvb_recording_get_start (_tmp7_, &_tmp8_); + _vala_start_time = (g_free (_vala_start_time), NULL); + _vala_start_time = _tmp9_; + _vala_start_time_length1 = _tmp8_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } else { + guint* _tmp10_ = NULL; + _tmp10_ = g_new0 (guint, 0); + _vala_start_time = (g_free (_vala_start_time), NULL); + _vala_start_time = _tmp10_; + _vala_start_time_length1 = 0; + ret = FALSE; + } + } + __finally142: + { + GeeHashMap* _tmp11_; + _tmp11_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally131: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -774,12 +897,12 @@ } result = ret; if (start_time) { - *start_time = _start_time; + *start_time = _vala_start_time; } else { - _start_time = (g_free (_start_time), NULL); + _vala_start_time = (g_free (_vala_start_time), NULL); } if (start_time_length1) { - *start_time_length1 = _start_time_length1; + *start_time_length1 = _vala_start_time_length1; } return result; } @@ -792,33 +915,53 @@ */ static gboolean dvb_recordings_store_real_GetStartTimestamp (DVBIDBusRecordingsStore* base, guint32 rec_id, gint64* timestamp, GError** error) { DVBRecordingsStore * self; - gint64 _timestamp = 0LL; + gint64 _vala_timestamp = 0LL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBRecording* _tmp2_; - struct tm _tmp3_ = {0}; - time_t _tmp4_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - _tmp2_ = (DVBRecording*) _tmp1_; - dvb_recording_get_StartTime (_tmp2_, &_tmp3_); - _tmp4_ = mktime (&_tmp3_); - _timestamp = (gint64) _tmp4_; - _g_object_unref0 (_tmp2_); - ret = TRUE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBRecording* _tmp7_; + struct tm _tmp8_; + struct tm _tmp9_; + time_t _tmp10_ = 0; + _tmp4_ = self->priv->recordings; + _tmp5_ = rec_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBRecording*) _tmp6_; + dvb_recording_get_StartTime (_tmp7_, &_tmp8_); + _tmp9_ = _tmp8_; + _tmp10_ = mktime (&_tmp9_); + _vala_timestamp = (gint64) _tmp10_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } else { + _vala_timestamp = (gint64) 0; + } + } + __finally143: + { + GeeHashMap* _tmp11_; + _tmp11_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally132: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -830,7 +973,7 @@ } result = ret; if (timestamp) { - *timestamp = _timestamp; + *timestamp = _vala_timestamp; } return result; } @@ -843,31 +986,51 @@ */ static gboolean dvb_recordings_store_real_GetLength (DVBIDBusRecordingsStore* base, guint32 rec_id, gint64* length, GError** error) { DVBRecordingsStore * self; - gint64 _length = 0LL; + gint64 _vala_length = 0LL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBRecording* _tmp2_; - gint64 _tmp3_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - _tmp2_ = (DVBRecording*) _tmp1_; - _tmp3_ = dvb_recording_get_Length (_tmp2_); - _length = _tmp3_; - _g_object_unref0 (_tmp2_); - ret = TRUE; + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBRecording* _tmp7_; + gint64 _tmp8_; + gint64 _tmp9_; + _tmp4_ = self->priv->recordings; + _tmp5_ = rec_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + _tmp7_ = (DVBRecording*) _tmp6_; + _tmp8_ = dvb_recording_get_Length (_tmp7_); + _tmp9_ = _tmp8_; + _vala_length = _tmp9_; + _g_object_unref0 (_tmp7_); + ret = TRUE; + } else { + _vala_length = (gint64) 0; + } + } + __finally144: + { + GeeHashMap* _tmp10_; + _tmp10_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally133: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -879,7 +1042,7 @@ } result = ret; if (length) { - *length = _length; + *length = _vala_length; } return result; } @@ -900,55 +1063,93 @@ self = (DVBRecordingsStore*) base; val = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (!_tmp0_) { - val = FALSE; - } else { - gpointer _tmp1_ = NULL; - DVBRecording* rec; - GFile* _tmp2_ = NULL; - GFile* _tmp3_ = NULL; - GFile* _tmp4_; - g_debug ("RecordingsStore.vala:245: Deleting recording %u", (guint) rec_id); - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - rec = (DVBRecording*) _tmp1_; - _tmp2_ = dvb_recording_get_Location (rec); - _tmp3_ = g_file_get_parent (_tmp2_); - _tmp4_ = _tmp3_; - dvb_utils_delete_dir_recursively (_tmp4_, &_inner_error_); - _g_object_unref0 (_tmp4_); - if (_inner_error_ != NULL) { - goto __catch135_g_error; - } - val = TRUE; - goto __finally135; - __catch135_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("RecordingsStore.vala:251: Could not delete recording: %s", e->message); + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (!_tmp3_) { val = FALSE; - _g_error_free0 (e); - } - __finally135: - if (_inner_error_ != NULL) { - _g_object_unref0 (rec); + } else { + DVBLoggingLogger* _tmp4_; + guint32 _tmp5_; + GeeHashMap* _tmp6_; + guint32 _tmp7_; + gpointer _tmp8_ = NULL; + DVBRecording* rec; + DVBRecording* _tmp18_; + _tmp4_ = dvb_recordings_store_log; + _tmp5_ = rec_id; + dvb_logging_logger_debug (_tmp4_, "RecordingsStore.vala:258: Deleting recording %u", (guint) _tmp5_); + _tmp6_ = self->priv->recordings; + _tmp7_ = rec_id; + _tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, GUINT_TO_POINTER (_tmp7_)); + rec = (DVBRecording*) _tmp8_; + { + DVBRecording* _tmp9_; + GFile* _tmp10_; + GFile* _tmp11_; + GFile* _tmp12_ = NULL; + GFile* _tmp13_; + _tmp9_ = rec; + _tmp10_ = dvb_recording_get_Location (_tmp9_); + _tmp11_ = _tmp10_; + _tmp12_ = g_file_get_parent (_tmp11_); + _tmp13_ = _tmp12_; + dvb_utils_delete_dir_recursively (_tmp13_, &_inner_error_); + _g_object_unref0 (_tmp13_); + if (_inner_error_ != NULL) { + goto __catch146_g_error; + } + val = TRUE; + } + goto __finally146; + __catch146_g_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp14_; + GError* _tmp15_; + const gchar* _tmp16_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp14_ = dvb_recordings_store_log; + _tmp15_ = e; + _tmp16_ = _tmp15_->message; + dvb_logging_logger_error (_tmp14_, "RecordingsStore.vala:264: Could not delete recording: %s", _tmp16_); + val = FALSE; + _g_error_free0 (e); + } + __finally146: + if (_inner_error_ != NULL) { + _g_object_unref0 (rec); + _g_object_unref0 (rec); + { + GeeHashMap* _tmp17_; + _tmp17_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; + } + _tmp18_ = rec; + dvb_recordings_store_remove (self, _tmp18_); _g_object_unref0 (rec); - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } - dvb_recordings_store_remove (self, rec); - _g_object_unref0 (rec); } - __finally134: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + __finally145: + { + GeeHashMap* _tmp19_; + _tmp19_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -971,36 +1172,59 @@ */ static gboolean dvb_recordings_store_real_GetChannelName (DVBIDBusRecordingsStore* base, guint32 rec_id, gchar** name, GError** error) { DVBRecordingsStore * self; - gchar* _name = NULL; + gchar* _vala_name = NULL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; { - gboolean _tmp0_; + GeeHashMap* _tmp0_; + _tmp0_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp0_) { - gpointer _tmp1_ = NULL; - DVBRecording* rec; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_; - gchar* _tmp4_; - _tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - rec = (DVBRecording*) _tmp1_; - _tmp2_ = dvb_recording_get_ChannelName (rec); - _tmp3_ = g_strdup (_tmp2_); - _tmp4_ = _tmp3_; - _g_free0 (_name); - _name = _tmp4_; - ret = TRUE; - _g_object_unref0 (rec); + { + GeeHashMap* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->recordings; + _tmp2_ = rec_id; + _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, GUINT_TO_POINTER (_tmp2_)); + if (_tmp3_) { + GeeHashMap* _tmp4_; + guint32 _tmp5_; + gpointer _tmp6_ = NULL; + DVBRecording* rec; + DVBRecording* _tmp7_; + const gchar* _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_; + _tmp4_ = self->priv->recordings; + _tmp5_ = rec_id; + _tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, GUINT_TO_POINTER (_tmp5_)); + rec = (DVBRecording*) _tmp6_; + _tmp7_ = rec; + _tmp8_ = dvb_recording_get_ChannelName (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = g_strdup (_tmp9_); + _g_free0 (_vala_name); + _vala_name = _tmp10_; + ret = TRUE; + _g_object_unref0 (rec); + } else { + gchar* _tmp11_; + _tmp11_ = g_strdup (""); + _g_free0 (_vala_name); + _vala_name = _tmp11_; + } + } + __finally147: + { + GeeHashMap* _tmp12_; + _tmp12_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally136: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1010,19 +1234,11 @@ } } } - if (!ret) { - gchar* _tmp5_; - gchar* _tmp6_; - _tmp5_ = g_strdup (""); - _tmp6_ = _tmp5_; - _g_free0 (_name); - _name = _tmp6_; - } result = ret; if (name) { - *name = _name; + *name = _vala_name; } else { - _g_free0 (_name); + _g_free0 (_vala_name); } return result; } @@ -1030,126 +1246,158 @@ static gboolean dvb_recordings_store_real_GetAllInformations (DVBIDBusRecordingsStore* base, guint32 rec_id, DVBRecordingInfo* info, GError** error) { DVBRecordingsStore * self; - DVBRecordingInfo _info = {0}; + DVBRecordingInfo _vala_info = {0}; gboolean result = FALSE; gboolean ret = FALSE; DVBRecordingInfo _tmp0_ = {0}; - DVBRecordingInfo _tmp1_ = {0}; - DVBRecordingInfo _tmp2_; GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; memset (&_tmp0_, 0, sizeof (DVBRecordingInfo)); - _tmp1_ = _tmp0_; - _tmp2_ = _tmp1_; - dvb_recording_info_destroy (&_info); - _info = _tmp2_; + dvb_recording_info_destroy (&_vala_info); + _vala_info = _tmp0_; { - gboolean _tmp3_; + GeeHashMap* _tmp1_; + _tmp1_ = self->priv->recordings; g_static_rec_mutex_lock (&self->priv->__lock_recordings); - _tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - if (_tmp3_) { - gpointer _tmp4_ = NULL; - DVBRecording* rec; - const gchar* _tmp5_ = NULL; - gchar* _tmp6_; - gchar* name; - const gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - gint64 _tmp10_; - const gchar* _tmp11_; - const gchar* _tmp12_ = NULL; - gchar* _tmp14_; - gchar* _tmp15_; - GFile* _tmp16_ = NULL; - gchar* _tmp17_ = NULL; - gchar* _tmp18_; - struct tm _tmp19_ = {0}; - time_t _tmp20_; - const gchar* _tmp21_ = NULL; - gchar* _tmp22_; - gchar* _tmp23_; - _tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - rec = (DVBRecording*) _tmp4_; - _tmp5_ = dvb_recording_get_Name (rec); - _tmp6_ = g_strdup (_tmp5_); - name = _tmp6_; - _tmp7_ = NULL; - if (name == NULL) { - _tmp7_ = ""; + { + GeeHashMap* _tmp2_; + guint32 _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->priv->recordings; + _tmp3_ = rec_id; + _tmp4_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, GUINT_TO_POINTER (_tmp3_)); + if (_tmp4_) { + GeeHashMap* _tmp5_; + guint32 _tmp6_; + gpointer _tmp7_ = NULL; + DVBRecording* rec; + DVBRecording* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; + gchar* _tmp11_; + gchar* name; + const gchar* _tmp12_ = NULL; + const gchar* _tmp13_; + const gchar* _tmp15_; + gchar* _tmp16_; + guint32 _tmp17_; + DVBRecording* _tmp18_; + gint64 _tmp19_; + gint64 _tmp20_; + const gchar* _tmp21_ = NULL; + DVBRecording* _tmp22_; + const gchar* _tmp23_; + const gchar* _tmp24_; + const gchar* _tmp28_; + gchar* _tmp29_; + DVBRecording* _tmp30_; + GFile* _tmp31_; + GFile* _tmp32_; + gchar* _tmp33_ = NULL; + DVBRecording* _tmp34_; + struct tm _tmp35_; + struct tm _tmp36_; + time_t _tmp37_ = 0; + DVBRecording* _tmp38_; + const gchar* _tmp39_; + const gchar* _tmp40_; + gchar* _tmp41_; + _tmp5_ = self->priv->recordings; + _tmp6_ = rec_id; + _tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, GUINT_TO_POINTER (_tmp6_)); + rec = (DVBRecording*) _tmp7_; + _tmp8_ = rec; + _tmp9_ = dvb_recording_get_Name (_tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = g_strdup (_tmp10_); + name = _tmp11_; + _tmp13_ = name; + if (_tmp13_ == NULL) { + _tmp12_ = ""; + } else { + const gchar* _tmp14_; + _tmp14_ = name; + _tmp12_ = _tmp14_; + } + _tmp15_ = _tmp12_; + _tmp16_ = g_strdup (_tmp15_); + _g_free0 (_vala_info.name); + _vala_info.name = _tmp16_; + _tmp17_ = rec_id; + _vala_info.id = _tmp17_; + _tmp18_ = rec; + _tmp19_ = dvb_recording_get_Length (_tmp18_); + _tmp20_ = _tmp19_; + _vala_info.length = _tmp20_; + _tmp22_ = rec; + _tmp23_ = dvb_recording_get_Description (_tmp22_); + _tmp24_ = _tmp23_; + if (_tmp24_ == NULL) { + _tmp21_ = ""; + } else { + DVBRecording* _tmp25_; + const gchar* _tmp26_; + const gchar* _tmp27_; + _tmp25_ = rec; + _tmp26_ = dvb_recording_get_Description (_tmp25_); + _tmp27_ = _tmp26_; + _tmp21_ = _tmp27_; + } + _tmp28_ = _tmp21_; + _tmp29_ = g_strdup (_tmp28_); + _g_free0 (_vala_info.description); + _vala_info.description = _tmp29_; + _tmp30_ = rec; + _tmp31_ = dvb_recording_get_Location (_tmp30_); + _tmp32_ = _tmp31_; + _tmp33_ = g_file_get_path (_tmp32_); + _g_free0 (_vala_info.location); + _vala_info.location = _tmp33_; + _tmp34_ = rec; + dvb_recording_get_StartTime (_tmp34_, &_tmp35_); + _tmp36_ = _tmp35_; + _tmp37_ = mktime (&_tmp36_); + _vala_info.start_timestamp = (gint64) _tmp37_; + _tmp38_ = rec; + _tmp39_ = dvb_recording_get_ChannelName (_tmp38_); + _tmp40_ = _tmp39_; + _tmp41_ = g_strdup (_tmp40_); + _g_free0 (_vala_info.channel); + _vala_info.channel = _tmp41_; + ret = TRUE; + _g_free0 (name); + _g_object_unref0 (rec); } else { - _tmp7_ = name; + gchar* _tmp42_; + gchar* _tmp43_; + gchar* _tmp44_; + gchar* _tmp45_; + _tmp42_ = g_strdup (""); + _g_free0 (_vala_info.name); + _vala_info.name = _tmp42_; + _vala_info.id = (guint32) 0; + _vala_info.length = (gint64) 0; + _tmp43_ = g_strdup (""); + _g_free0 (_vala_info.description); + _vala_info.description = _tmp43_; + _tmp44_ = g_strdup (""); + _g_free0 (_vala_info.location); + _vala_info.location = _tmp44_; + _vala_info.start_timestamp = (gint64) 0; + _tmp45_ = g_strdup (""); + _g_free0 (_vala_info.channel); + _vala_info.channel = _tmp45_; + ret = FALSE; } - _tmp8_ = g_strdup (_tmp7_); - _tmp9_ = _tmp8_; - _g_free0 (_info.name); - _info.name = _tmp9_; - _info.id = rec_id; - _tmp10_ = dvb_recording_get_Length (rec); - _info.length = _tmp10_; - _tmp11_ = NULL; - _tmp12_ = dvb_recording_get_Description (rec); - if (_tmp12_ == NULL) { - _tmp11_ = ""; - } else { - const gchar* _tmp13_ = NULL; - _tmp13_ = dvb_recording_get_Description (rec); - _tmp11_ = _tmp13_; - } - _tmp14_ = g_strdup (_tmp11_); - _tmp15_ = _tmp14_; - _g_free0 (_info.description); - _info.description = _tmp15_; - _tmp16_ = dvb_recording_get_Location (rec); - _tmp17_ = g_file_get_path (_tmp16_); - _tmp18_ = _tmp17_; - _g_free0 (_info.location); - _info.location = _tmp18_; - dvb_recording_get_StartTime (rec, &_tmp19_); - _tmp20_ = mktime (&_tmp19_); - _info.start_timestamp = (gint64) _tmp20_; - _tmp21_ = dvb_recording_get_ChannelName (rec); - _tmp22_ = g_strdup (_tmp21_); - _tmp23_ = _tmp22_; - _g_free0 (_info.channel); - _info.channel = _tmp23_; - ret = TRUE; - _g_free0 (name); - _g_object_unref0 (rec); - } else { - gchar* _tmp24_; - gchar* _tmp25_; - gchar* _tmp26_; - gchar* _tmp27_; - gchar* _tmp28_; - gchar* _tmp29_; - gchar* _tmp30_; - gchar* _tmp31_; - _tmp24_ = g_strdup (""); - _tmp25_ = _tmp24_; - _g_free0 (_info.name); - _info.name = _tmp25_; - _info.id = (guint32) 0; - _info.length = (gint64) 0; - _tmp26_ = g_strdup (""); - _tmp27_ = _tmp26_; - _g_free0 (_info.description); - _info.description = _tmp27_; - _tmp28_ = g_strdup (""); - _tmp29_ = _tmp28_; - _g_free0 (_info.location); - _info.location = _tmp29_; - _info.start_timestamp = (gint64) 0; - _tmp30_ = g_strdup (""); - _tmp31_ = _tmp30_; - _g_free0 (_info.channel); - _info.channel = _tmp31_; - ret = FALSE; } - __finally137: - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + __finally148: + { + GeeHashMap* _tmp46_; + _tmp46_ = self->priv->recordings; + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1161,21 +1409,23 @@ } result = ret; if (info) { - *info = _info; + *info = _vala_info; } else { - dvb_recording_info_destroy (&_info); + dvb_recording_info_destroy (&_vala_info); } return result; } void dvb_recordings_store_restore_from_dir (DVBRecordingsStore* self, GFile* recordingsbasedir) { - DVBioRecordingReader* _tmp0_ = NULL; + GFile* _tmp0_; + DVBioRecordingReader* _tmp1_; DVBioRecordingReader* reader; g_return_if_fail (self != NULL); g_return_if_fail (recordingsbasedir != NULL); - _tmp0_ = dvb_io_recording_reader_new (recordingsbasedir, self); - reader = _tmp0_; + _tmp0_ = recordingsbasedir; + _tmp1_ = dvb_io_recording_reader_new (_tmp0_, self); + reader = _tmp1_; dvb_io_recording_reader_load_into (reader); _g_object_unref0 (reader); } @@ -1197,46 +1447,46 @@ GObject * obj; GObjectClass * parent_class; DVBRecordingsStore * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; + GeeHashMap* _tmp0_; parent_class = G_OBJECT_CLASS (dvb_recordings_store_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_RECORDINGS_STORE (obj); _tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_RECORDING, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; _g_object_unref0 (self->priv->recordings); - self->priv->recordings = _tmp1_; + self->priv->recordings = _tmp0_; self->priv->last_id = (guint32) 0; return obj; } static void dvb_recordings_store_class_init (DVBRecordingsStoreClass * klass) { - GStaticRecMutex _tmp0_ = {0}; - GStaticRecMutex _tmp1_ = {0}; + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; + GStaticRecMutex _tmp2_ = {0}; dvb_recordings_store_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBRecordingsStorePrivate)); G_OBJECT_CLASS (klass)->constructor = dvb_recordings_store_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_recordings_store_finalize; - g_type_set_qdata (DVB_TYPE_RECORDINGS_STORE, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_recordings_store_dbus_vtable)); - g_static_rec_mutex_init (&_tmp0_); - _tmp1_ = _tmp0_; - dvb_recordings_store_instance_mutex = _tmp1_; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_recordings_store_log = _tmp1_; + g_static_rec_mutex_init (&_tmp2_); + dvb_recordings_store_instance_mutex = _tmp2_; } static void dvb_recordings_store_dvb_id_bus_recordings_store_interface_init (DVBIDBusRecordingsStoreIface * iface) { dvb_recordings_store_dvb_id_bus_recordings_store_parent_iface = g_type_interface_peek_parent (iface); - iface->GetRecordings = (guint32* (*)(DVBIDBusRecordingsStore* ,int* ,GError**)) dvb_recordings_store_real_GetRecordings; - iface->GetLocation = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,gchar** ,GError**)) dvb_recordings_store_real_GetLocation; - iface->GetName = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,gchar** ,GError**)) dvb_recordings_store_real_GetName; - iface->GetDescription = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,gchar** ,GError**)) dvb_recordings_store_real_GetDescription; - iface->GetStartTime = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,guint** ,int* ,GError**)) dvb_recordings_store_real_GetStartTime; - iface->GetStartTimestamp = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,gint64* ,GError**)) dvb_recordings_store_real_GetStartTimestamp; - iface->GetLength = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,gint64* ,GError**)) dvb_recordings_store_real_GetLength; - iface->Delete = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,GError**)) dvb_recordings_store_real_Delete; - iface->GetChannelName = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,gchar** ,GError**)) dvb_recordings_store_real_GetChannelName; - iface->GetAllInformations = (gboolean (*)(DVBIDBusRecordingsStore* ,guint32 ,DVBRecordingInfo* ,GError**)) dvb_recordings_store_real_GetAllInformations; + iface->GetRecordings = (guint32* (*)(DVBIDBusRecordingsStore*, int*, GError**)) dvb_recordings_store_real_GetRecordings; + iface->GetLocation = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, gchar**, GError**)) dvb_recordings_store_real_GetLocation; + iface->GetName = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, gchar**, GError**)) dvb_recordings_store_real_GetName; + iface->GetDescription = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, gchar**, GError**)) dvb_recordings_store_real_GetDescription; + iface->GetStartTime = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, guint**, int*, GError**)) dvb_recordings_store_real_GetStartTime; + iface->GetStartTimestamp = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, gint64*, GError**)) dvb_recordings_store_real_GetStartTimestamp; + iface->GetLength = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, gint64*, GError**)) dvb_recordings_store_real_GetLength; + iface->Delete = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, GError**)) dvb_recordings_store_real_Delete; + iface->GetChannelName = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, gchar**, GError**)) dvb_recordings_store_real_GetChannelName; + iface->GetAllInformations = (gboolean (*)(DVBIDBusRecordingsStore*, guint32, DVBRecordingInfo*, GError**)) dvb_recordings_store_real_GetAllInformations; } diff -Nru gnome-dvb-daemon-0.1.23/src/RecordingsStore.vala gnome-dvb-daemon-0.2.7/src/RecordingsStore.vala --- gnome-dvb-daemon-0.1.23/src/RecordingsStore.vala 2010-08-09 13:25:25.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/RecordingsStore.vala 2011-09-29 20:27:47.000000000 +0000 @@ -19,6 +19,7 @@ using GLib; using Gee; +using DVB.Logging; namespace DVB { @@ -26,6 +27,8 @@ * This class manages the recordings off all devices */ public class RecordingsStore : GLib.Object, IDBusRecordingsStore { + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); private HashMap recordings; private uint32 last_id; @@ -67,7 +70,7 @@ uint32 id = rec.Id; lock (this.recordings) { if (this.recordings.has_key (id)) { - critical ("Recording with id %u already available", id); + log.error ("Recording with id %u already available", id); return false; } @@ -106,7 +109,7 @@ /** * @returns: A list of ids for all recordings */ - public uint32[] GetRecordings () throws DBus.Error { + public uint32[] GetRecordings () throws DBusError { uint32[] ids; lock (this.recordings) { ids = new uint32[this.recordings.size]; @@ -126,15 +129,17 @@ * @location: The location of the recording on the filesystem * @returns: TRUE on success */ - public bool GetLocation (uint32 rec_id, out string location) throws DBus.Error { + public bool GetLocation (uint32 rec_id, out string location) throws DBusError { bool ret = false; lock (this.recordings) { if (this.recordings.has_key (rec_id)) { location = this.recordings.get(rec_id).Location.get_uri (); ret = true; + } else { + location = ""; } } - if (!ret) location = ""; + return ret; } @@ -144,16 +149,18 @@ * a TV show) * @returns: TRUE on success */ - public bool GetName (uint32 rec_id, out string name) throws DBus.Error { + public bool GetName (uint32 rec_id, out string name) throws DBusError { bool ret = false; lock (this.recordings) { if (this.recordings.has_key (rec_id)) { string val = this.recordings.get(rec_id).Name; name = (val == null) ? "" : val; ret = true; + } else { + name = ""; } } - if (!ret) name = ""; + return ret; } @@ -163,16 +170,18 @@ * (e.g. the description from EPG) * @returns: TRUE on success */ - public bool GetDescription (uint32 rec_id, out string description) throws DBus.Error { + public bool GetDescription (uint32 rec_id, out string description) throws DBusError { bool ret = false; lock (this.recordings) { if (this.recordings.has_key (rec_id)) { string val = this.recordings.get(rec_id).Description; description = (val == null) ? "" : val; ret = true; + } else { + description = ""; } } - if (!ret) description = ""; + return ret; } @@ -181,7 +190,7 @@ * @start_time: The starting time of the recording * @returns: TRUE on success */ - public bool GetStartTime (uint32 rec_id, out uint[] start_time) throws DBus.Error { + public bool GetStartTime (uint32 rec_id, out uint[] start_time) throws DBusError { bool ret; lock (this.recordings) { if (this.recordings.has_key (rec_id)) { @@ -201,12 +210,14 @@ * @timestamp: Start time as UNIX timestamp * @returns: TRUE on success */ - public bool GetStartTimestamp (uint32 rec_id, out int64 timestamp) throws DBus.Error { + public bool GetStartTimestamp (uint32 rec_id, out int64 timestamp) throws DBusError { bool ret = false; lock (this.recordings) { if (this.recordings.has_key (rec_id)) { timestamp = (int64)this.recordings.get(rec_id).StartTime.mktime (); ret = true; + } else { + timestamp = 0; } } @@ -218,12 +229,14 @@ * @length: The length of the recording in seconds * @returns: TRUE on success */ - public bool GetLength (uint32 rec_id, out int64 length) throws DBus.Error { + public bool GetLength (uint32 rec_id, out int64 length) throws DBusError { bool ret = false; lock (this.recordings) { if (this.recordings.has_key (rec_id)) { length = this.recordings.get(rec_id).Length; ret = true; + } else { + length = 0; } } @@ -237,18 +250,18 @@ * Delete the recording. This deletes all files in the directory * created by the Recorder */ - public bool Delete (uint32 rec_id) throws DBus.Error { + public bool Delete (uint32 rec_id) throws DBusError { bool val = false; lock (this.recordings) { if (!this.recordings.has_key (rec_id)) val = false; else { - debug ("Deleting recording %u", rec_id); + log.debug ("Deleting recording %u", rec_id); var rec = this.recordings.get (rec_id); try { Utils.delete_dir_recursively (rec.Location.get_parent ()); val = true; } catch (Error e) { - critical ("Could not delete recording: %s", e.message); + log.error ("Could not delete recording: %s", e.message); val = false; } this.remove (rec); @@ -264,20 +277,22 @@ * rec_id doesn't exist * @returns: TRUE on success */ - public bool GetChannelName (uint32 rec_id, out string name) throws DBus.Error { + public bool GetChannelName (uint32 rec_id, out string name) throws DBusError { bool ret = false; lock (this.recordings) { if (this.recordings.has_key (rec_id)) { Recording rec = this.recordings.get (rec_id); name = rec.ChannelName; ret = true; + } else { + name = ""; } } - if (!ret) name = ""; + return ret; } - public bool GetAllInformations (uint32 rec_id, out RecordingInfo info) throws DBus.Error { + public bool GetAllInformations (uint32 rec_id, out RecordingInfo info) throws DBusError { bool ret; info = RecordingInfo (); lock (this.recordings) { diff -Nru gnome-dvb-daemon-0.1.23/src/Recording.vala gnome-dvb-daemon-0.2.7/src/Recording.vala --- gnome-dvb-daemon-0.1.23/src/Recording.vala 2010-06-08 19:17:25.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Recording.vala 2011-04-19 21:18:36.000000000 +0000 @@ -18,6 +18,7 @@ */ using GLib; +using DVB.Logging; namespace DVB { @@ -25,6 +26,8 @@ * This class represents a finished recording */ public class Recording : GLib.Object { + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); public uint32 Id {get; set;} public uint ChannelSid {get; set;} @@ -60,7 +63,7 @@ try { writer.write (); } catch (Error e) { - critical ("Could not save recording: %s", e.message); + log.error ("Could not save recording: %s", e.message); } } @@ -68,7 +71,7 @@ File file, File? other_file, FileMonitorEvent event) { if (event == FileMonitorEvent.DELETED) { string location = file.get_path (); - debug ("%s has been deleted", location); + log.debug ("%s has been deleted", location); monitor.cancel (); diff -Nru gnome-dvb-daemon-0.1.23/src/rtsp/MediaFactory.c gnome-dvb-daemon-0.2.7/src/rtsp/MediaFactory.c --- gnome-dvb-daemon-0.1.23/src/rtsp/MediaFactory.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rtsp/MediaFactory.c 2011-09-22 12:34:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* MediaFactory.c generated by valac 0.11.3, the Vala compiler +/* MediaFactory.c generated by valac 0.14.0, the Vala compiler * generated from MediaFactory.vala, do not modify */ /* @@ -40,6 +40,26 @@ typedef struct _DVBMediaFactory DVBMediaFactory; typedef struct _DVBMediaFactoryClass DVBMediaFactoryClass; typedef struct _DVBMediaFactoryPrivate DVBMediaFactoryPrivate; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_free0(var) (var = (g_free (var), NULL)) #define DVB_TYPE_MANAGER (dvb_manager_get_type ()) @@ -139,17 +159,24 @@ static gpointer dvb_media_factory_parent_class = NULL; +static DVBLoggingLogger* dvb_media_factory_log; +static DVBLoggingLogger* dvb_media_factory_log = NULL; static gpointer dvb_dvb_media_parent_class = NULL; GType dvb_media_factory_get_type (void) G_GNUC_CONST; enum { DVB_MEDIA_FACTORY_DUMMY_PROPERTY }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); static GstRTSPMedia* dvb_media_factory_real_construct (GstRTSPMediaFactory* base, GstRTSPUrl* url); GType dvb_manager_get_type (void) G_GNUC_CONST; DVBManager* dvb_manager_get_instance (void); GType dvb_device_group_get_type (void) G_GNUC_CONST; DVBDeviceGroup* dvb_manager_get_device_group_if_exists (DVBManager* self, guint group_id); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); GType dvb_channel_get_type (void) G_GNUC_CONST; @@ -160,6 +187,7 @@ DVBPlayerThread* dvb_channel_factory_watch_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink_element, gboolean force, DVBForcedStopNotify notify_func, void* notify_func_target); void dvb_rtsp_server_stop_streaming (DVBChannel* channel); static void _dvb_rtsp_server_stop_streaming_dvb_forced_stop_notify (DVBChannel* channel, gpointer self); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); GstElement* dvb_player_thread_get_sink_bin (DVBPlayerThread* self, guint sid, GstElement* sink); DVBDVBMedia* dvb_dvb_media_new (DVBDeviceGroup* group, DVBChannel* channel, GstElement* payloader); DVBDVBMedia* dvb_dvb_media_construct (GType object_type, DVBDeviceGroup* group, DVBChannel* channel, GstElement* payloader); @@ -169,6 +197,7 @@ DVBMediaFactory* dvb_media_factory_new (void); DVBMediaFactory* dvb_media_factory_construct (GType object_type); static GObject * dvb_media_factory_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +static void dvb_media_factory_finalize (GObject* obj); enum { DVB_DVB_MEDIA_DUMMY_PROPERTY }; @@ -200,77 +229,128 @@ GstRTSPMedia* result = NULL; guint sidnr; guint grpnr; - gchar** _tmp0_; - gchar** _tmp1_ = NULL; - gint path_elements_length1; - gint _path_elements_size_; + GstRTSPUrl* _tmp0_; + const gchar* _tmp1_; gchar** _tmp2_; + gchar** _tmp3_ = NULL; gchar** path_elements; + gint path_elements_length1; + gint _path_elements_size_; gint i; - gchar* elem; - DVBManager* _tmp7_ = NULL; - DVBManager* _tmp8_; + gchar* elem = NULL; + DVBManager* _tmp16_ = NULL; + DVBManager* _tmp17_; DVBManager* manager; - DVBDeviceGroup* _tmp9_ = NULL; + DVBManager* _tmp18_; + guint _tmp19_; + DVBDeviceGroup* _tmp20_ = NULL; DVBDeviceGroup* devgrp; - GstElement* _tmp10_ = NULL; + DVBDeviceGroup* _tmp21_; + GstElement* _tmp23_ = NULL; GstElement* payload; - DVBChannelList* _tmp11_ = NULL; - DVBChannel* _tmp12_ = NULL; + GstElement* _tmp24_; + GstElement* _tmp26_; + DVBDeviceGroup* _tmp27_; + DVBChannelList* _tmp28_; + DVBChannelList* _tmp29_; + guint _tmp30_; + DVBChannel* _tmp31_ = NULL; DVBChannel* channel; - DVBChannelFactory* _tmp13_ = NULL; - DVBChannelFactory* _tmp14_; + DVBChannel* _tmp32_; + DVBDeviceGroup* _tmp35_; + DVBChannelFactory* _tmp36_; + DVBChannelFactory* _tmp37_; + DVBChannelFactory* _tmp38_; DVBChannelFactory* channels_factory; - GstElement* _tmp15_; - DVBPlayerThread* _tmp16_ = NULL; + DVBChannelFactory* _tmp39_; + DVBChannel* _tmp40_; + GstElement* _tmp41_; + GstElement* _tmp42_; + DVBPlayerThread* _tmp43_ = NULL; DVBPlayerThread* player; - GstElement* _tmp17_ = NULL; + DVBPlayerThread* _tmp44_; + DVBLoggingLogger* _tmp46_; + DVBPlayerThread* _tmp47_; + guint _tmp48_; + GstElement* _tmp49_; + GstElement* _tmp50_ = NULL; GstElement* bin; - DVBDVBMedia* _tmp18_ = NULL; + DVBDeviceGroup* _tmp51_; + DVBChannel* _tmp52_; + GstElement* _tmp53_; + DVBDVBMedia* _tmp54_; GstRTSPMedia* media; - GstElement* _tmp19_ = NULL; - GstElement* _tmp20_; + GstRTSPMedia* _tmp55_; + GstElement* _tmp56_; + GstRTSPMedia* _tmp57_; + DVBPlayerThread* _tmp58_; + GstElement* _tmp59_ = NULL; + GstRTSPUrl* _tmp60_; + GstRTSPMedia* _tmp61_; self = (DVBMediaFactory*) base; g_return_val_if_fail (url != NULL, NULL); sidnr = (guint) 0; grpnr = (guint) 0; - _tmp1_ = _tmp0_ = g_strsplit (url->abspath, "/", 0); - _tmp2_ = _tmp1_; - path_elements_length1 = _vala_array_length (_tmp0_); + _tmp0_ = url; + _tmp1_ = _tmp0_->abspath; + _tmp3_ = _tmp2_ = g_strsplit (_tmp1_, "/", 0); + path_elements = _tmp3_; + path_elements_length1 = _vala_array_length (_tmp2_); _path_elements_size_ = path_elements_length1; - path_elements = _tmp2_; i = 0; - elem = NULL; while (TRUE) { - gchar* _tmp3_; - gchar* _tmp4_; - _tmp3_ = g_strdup (path_elements[i]); - _tmp4_ = _tmp3_; + gchar** _tmp4_; + gint _tmp4__length1; + gint _tmp5_; + const gchar* _tmp6_; + gchar* _tmp7_; + const gchar* _tmp8_; + gint _tmp9_; + gint _tmp15_; + _tmp4_ = path_elements; + _tmp4__length1 = path_elements_length1; + _tmp5_ = i; + _tmp6_ = _tmp4_[_tmp5_]; + _tmp7_ = g_strdup (_tmp6_); _g_free0 (elem); - elem = _tmp4_; - if (!(elem != NULL)) { + elem = _tmp7_; + _tmp8_ = elem; + if (!(_tmp8_ != NULL)) { break; } - if (i == 1) { - gint _tmp5_; - _tmp5_ = atoi (elem); - grpnr = (guint) _tmp5_; + _tmp9_ = i; + if (_tmp9_ == 1) { + const gchar* _tmp10_; + gint _tmp11_ = 0; + _tmp10_ = elem; + _tmp11_ = atoi (_tmp10_); + grpnr = (guint) _tmp11_; } else { - if (i == 2) { - gint _tmp6_; - _tmp6_ = atoi (elem); - sidnr = (guint) _tmp6_; + gint _tmp12_; + _tmp12_ = i; + if (_tmp12_ == 2) { + const gchar* _tmp13_; + gint _tmp14_ = 0; + _tmp13_ = elem; + _tmp14_ = atoi (_tmp13_); + sidnr = (guint) _tmp14_; } } - i++; + _tmp15_ = i; + i = _tmp15_ + 1; } - _tmp7_ = dvb_manager_get_instance (); - _tmp8_ = _g_object_ref0 (_tmp7_); - manager = _tmp8_; - _tmp9_ = dvb_manager_get_device_group_if_exists (manager, grpnr); - devgrp = _tmp9_; - if (devgrp == NULL) { - g_warning ("MediaFactory.vala:51: Unknown group %u", grpnr); + _tmp16_ = dvb_manager_get_instance (); + _tmp17_ = _g_object_ref0 (_tmp16_); + manager = _tmp17_; + _tmp18_ = manager; + _tmp19_ = grpnr; + _tmp20_ = dvb_manager_get_device_group_if_exists (_tmp18_, _tmp19_); + devgrp = _tmp20_; + _tmp21_ = devgrp; + if (_tmp21_ == NULL) { + guint _tmp22_; + _tmp22_ = grpnr; + g_warning ("MediaFactory.vala:54: Unknown group %u", _tmp22_); result = NULL; _g_object_unref0 (devgrp); _g_object_unref0 (manager); @@ -278,10 +358,13 @@ path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } - _tmp10_ = gst_element_factory_make ("rtpmp2tpay", "pay0"); - payload = _tmp10_; - if (payload == NULL) { - g_critical ("MediaFactory.vala:58: Could not create rtpmp2tpay element"); + _tmp23_ = gst_element_factory_make ("rtpmp2tpay", "pay0"); + payload = _tmp23_; + _tmp24_ = payload; + if (_tmp24_ == NULL) { + DVBLoggingLogger* _tmp25_; + _tmp25_ = dvb_media_factory_log; + dvb_logging_logger_error (_tmp25_, "MediaFactory.vala:61: Could not create rtpmp2tpay element"); result = NULL; _gst_object_unref0 (payload); _g_object_unref0 (devgrp); @@ -290,12 +373,21 @@ path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } - g_object_set ((GObject*) payload, "pt", 96, NULL); - _tmp11_ = dvb_device_group_get_Channels (devgrp); - _tmp12_ = dvb_channel_list_get_channel (_tmp11_, sidnr); - channel = _tmp12_; - if (channel == NULL) { - g_critical ("MediaFactory.vala:65: No channel with SID %u", sidnr); + _tmp26_ = payload; + g_object_set ((GObject*) _tmp26_, "pt", 96, NULL); + _tmp27_ = devgrp; + _tmp28_ = dvb_device_group_get_Channels (_tmp27_); + _tmp29_ = _tmp28_; + _tmp30_ = sidnr; + _tmp31_ = dvb_channel_list_get_channel (_tmp29_, _tmp30_); + channel = _tmp31_; + _tmp32_ = channel; + if (_tmp32_ == NULL) { + DVBLoggingLogger* _tmp33_; + guint _tmp34_; + _tmp33_ = dvb_media_factory_log; + _tmp34_ = sidnr; + dvb_logging_logger_error (_tmp33_, "MediaFactory.vala:68: No channel with SID %u", _tmp34_); result = NULL; _g_object_unref0 (channel); _gst_object_unref0 (payload); @@ -305,14 +397,22 @@ path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } - _tmp13_ = dvb_device_group_get_channel_factory (devgrp); - _tmp14_ = _g_object_ref0 (_tmp13_); - channels_factory = _tmp14_; - _tmp15_ = _gst_object_ref0 (payload); - _tmp16_ = dvb_channel_factory_watch_channel (channels_factory, channel, _tmp15_, FALSE, _dvb_rtsp_server_stop_streaming_dvb_forced_stop_notify, NULL); - player = _tmp16_; - if (player == NULL) { - g_debug ("MediaFactory.vala:73: Could not create player"); + _tmp35_ = devgrp; + _tmp36_ = dvb_device_group_get_channel_factory (_tmp35_); + _tmp37_ = _tmp36_; + _tmp38_ = _g_object_ref0 (_tmp37_); + channels_factory = _tmp38_; + _tmp39_ = channels_factory; + _tmp40_ = channel; + _tmp41_ = payload; + _tmp42_ = _gst_object_ref0 (_tmp41_); + _tmp43_ = dvb_channel_factory_watch_channel (_tmp39_, _tmp40_, _tmp42_, FALSE, _dvb_rtsp_server_stop_streaming_dvb_forced_stop_notify, NULL); + player = _tmp43_; + _tmp44_ = player; + if (_tmp44_ == NULL) { + DVBLoggingLogger* _tmp45_; + _tmp45_ = dvb_media_factory_log; + dvb_logging_logger_debug (_tmp45_, "MediaFactory.vala:76: Could not create player"); result = NULL; _g_object_unref0 (player); _g_object_unref0 (channels_factory); @@ -324,17 +424,29 @@ path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } - g_debug ("MediaFactory.vala:76: Retrieving sink bin with payloader"); - _tmp17_ = dvb_player_thread_get_sink_bin (player, sidnr, payload); - bin = _tmp17_; - _tmp18_ = dvb_dvb_media_new (devgrp, channel, payload); - media = (GstRTSPMedia*) _tmp18_; - media->element = bin; - _tmp19_ = dvb_player_thread_get_pipeline (player); - _tmp20_ = _tmp19_; - _gst_object_unref0 (media->pipeline); - media->pipeline = _tmp20_; - gst_rtsp_media_factory_collect_streams ((GstRTSPMediaFactory*) self, url, media); + _tmp46_ = dvb_media_factory_log; + dvb_logging_logger_debug (_tmp46_, "MediaFactory.vala:79: Retrieving sink bin with payloader"); + _tmp47_ = player; + _tmp48_ = sidnr; + _tmp49_ = payload; + _tmp50_ = dvb_player_thread_get_sink_bin (_tmp47_, _tmp48_, _tmp49_); + bin = _tmp50_; + _tmp51_ = devgrp; + _tmp52_ = channel; + _tmp53_ = payload; + _tmp54_ = dvb_dvb_media_new (_tmp51_, _tmp52_, _tmp53_); + media = (GstRTSPMedia*) _tmp54_; + _tmp55_ = media; + _tmp56_ = bin; + _tmp55_->element = _tmp56_; + _tmp57_ = media; + _tmp58_ = player; + _tmp59_ = dvb_player_thread_get_pipeline (_tmp58_); + _gst_object_unref0 (_tmp57_->pipeline); + _tmp57_->pipeline = _tmp59_; + _tmp60_ = url; + _tmp61_ = media; + gst_rtsp_media_factory_collect_streams ((GstRTSPMediaFactory*) self, _tmp60_, _tmp61_); result = media; _gst_object_unref0 (bin); _g_object_unref0 (player); @@ -352,11 +464,15 @@ static gchar* dvb_media_factory_real_gen_key (GstRTSPMediaFactory* base, GstRTSPUrl* url) { DVBMediaFactory * self; gchar* result = NULL; - gchar* _tmp0_; + GstRTSPUrl* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; self = (DVBMediaFactory*) base; g_return_val_if_fail (url != NULL, NULL); - _tmp0_ = g_strdup (url->abspath); - result = _tmp0_; + _tmp0_ = url; + _tmp1_ = _tmp0_->abspath; + _tmp2_ = g_strdup (_tmp1_); + result = _tmp2_; return result; } @@ -386,10 +502,16 @@ static void dvb_media_factory_class_init (DVBMediaFactoryClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_media_factory_parent_class = g_type_class_peek_parent (klass); GST_RTSP_MEDIA_FACTORY_CLASS (klass)->construct = dvb_media_factory_real_construct; GST_RTSP_MEDIA_FACTORY_CLASS (klass)->gen_key = dvb_media_factory_real_gen_key; G_OBJECT_CLASS (klass)->constructor = dvb_media_factory_constructor; + G_OBJECT_CLASS (klass)->finalize = dvb_media_factory_finalize; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_media_factory_log = _tmp1_; } @@ -397,6 +519,13 @@ } +static void dvb_media_factory_finalize (GObject* obj) { + DVBMediaFactory * self; + self = DVB_MEDIA_FACTORY (obj); + G_OBJECT_CLASS (dvb_media_factory_parent_class)->finalize (obj); +} + + GType dvb_media_factory_get_type (void) { static volatile gsize dvb_media_factory_type_id__volatile = 0; if (g_once_init_enter (&dvb_media_factory_type_id__volatile)) { @@ -421,16 +550,16 @@ g_return_val_if_fail (channel != NULL, NULL); g_return_val_if_fail (payloader != NULL, NULL); self = (DVBDVBMedia*) g_object_new (object_type, NULL); - _tmp0_ = _g_object_ref0 (group); - _tmp1_ = _tmp0_; + _tmp0_ = group; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->group); self->group = _tmp1_; - _tmp2_ = _g_object_ref0 (channel); - _tmp3_ = _tmp2_; + _tmp2_ = channel; + _tmp3_ = _g_object_ref0 (_tmp2_); _g_object_unref0 (self->channel); self->channel = _tmp3_; - _tmp4_ = _gst_object_ref0 (payloader); - _tmp5_ = _tmp4_; + _tmp4_ = payloader; + _tmp5_ = _gst_object_ref0 (_tmp4_); _gst_object_unref0 (self->payloader); self->payloader = _tmp5_; return self; @@ -445,15 +574,23 @@ static gboolean dvb_dvb_media_real_unprepare (GstRTSPMedia* base) { DVBDVBMedia * self; gboolean result = FALSE; - DVBChannelFactory* _tmp0_ = NULL; + DVBDeviceGroup* _tmp0_; DVBChannelFactory* _tmp1_; + DVBChannelFactory* _tmp2_; + DVBChannelFactory* _tmp3_; DVBChannelFactory* channels_factory; + DVBChannel* _tmp4_; + GstElement* _tmp5_; self = (DVBDVBMedia*) base; gst_rtsp_media_remove_elements ((GstRTSPMedia*) self); - _tmp0_ = dvb_device_group_get_channel_factory (self->group); - _tmp1_ = _g_object_ref0 (_tmp0_); - channels_factory = _tmp1_; - dvb_channel_factory_stop_channel (channels_factory, self->channel, self->payloader); + _tmp0_ = self->group; + _tmp1_ = dvb_device_group_get_channel_factory (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = _g_object_ref0 (_tmp2_); + channels_factory = _tmp3_; + _tmp4_ = self->channel; + _tmp5_ = self->payloader; + dvb_channel_factory_stop_channel (channels_factory, _tmp4_, _tmp5_); result = TRUE; _g_object_unref0 (channels_factory); return result; diff -Nru gnome-dvb-daemon-0.1.23/src/rtsp/MediaFactory.vala gnome-dvb-daemon-0.2.7/src/rtsp/MediaFactory.vala --- gnome-dvb-daemon-0.1.23/src/rtsp/MediaFactory.vala 2010-08-17 13:13:22.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rtsp/MediaFactory.vala 2011-04-19 21:18:36.000000000 +0000 @@ -18,11 +18,14 @@ */ using GLib; +using DVB.Logging; namespace DVB { public class MediaFactory : Gst.RTSPMediaFactory { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + construct { this.set_shared (true); } @@ -30,50 +33,50 @@ public override Gst.RTSPMedia? @construct (Gst.RTSPUrl url) { uint sidnr = 0; uint grpnr = 0; - + string[] path_elements = url.abspath.split ("/"); int i = 0; string elem; while ((elem = path_elements[i]) != null) { if (i == 1) - grpnr = (uint)elem.to_int (); + grpnr = (uint)int.parse (elem); else if (i == 2) - sidnr = (uint)elem.to_int (); - + sidnr = (uint)int.parse (elem); + i++; } - + Manager manager = Manager.get_instance(); - - DeviceGroup? devgrp = + + DeviceGroup? devgrp = manager.get_device_group_if_exists (grpnr); if (devgrp == null) { warning ("Unknown group %u", grpnr); return null; } - + Gst.Element payload = Gst.ElementFactory.make ("rtpmp2tpay", "pay0"); if (payload == null) { - critical ("Could not create rtpmp2tpay element"); - return null; + log.error ("Could not create rtpmp2tpay element"); + return null; } payload.set ("pt", 96); - + Channel? channel = devgrp.Channels.get_channel (sidnr); if (channel == null) { - critical ("No channel with SID %u", sidnr); + log.error ("No channel with SID %u", sidnr); return null; } ChannelFactory channels_factory = devgrp.channel_factory; - + PlayerThread? player = channels_factory.watch_channel (channel, payload, false, DVB.RTSPServer.stop_streaming); if (player == null) { - debug ("Could not create player"); + log.debug ("Could not create player"); return null; } - debug ("Retrieving sink bin with payloader"); + log.debug ("Retrieving sink bin with payloader"); Gst.Element? bin = player.get_sink_bin (sidnr, payload); // Construct media @@ -81,7 +84,7 @@ media.element = bin; // Set pipeline media.pipeline = player.get_pipeline (); - + this.collect_streams (url, media); return media; diff -Nru gnome-dvb-daemon-0.1.23/src/rtsp/MediaMapping.c gnome-dvb-daemon-0.2.7/src/rtsp/MediaMapping.c --- gnome-dvb-daemon-0.1.23/src/rtsp/MediaMapping.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rtsp/MediaMapping.c 2011-09-22 12:34:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* MediaMapping.c generated by valac 0.11.3, the Vala compiler +/* MediaMapping.c generated by valac 0.14.0, the Vala compiler * generated from MediaMapping.vala, do not modify */ /* @@ -84,10 +84,12 @@ DVBMediaMapping * self; GstRTSPMediaFactory* result = NULL; GstRTSPMediaFactory* _tmp0_; + GstRTSPMediaFactory* _tmp1_; self = (DVBMediaMapping*) base; g_return_val_if_fail (url != NULL, NULL); - _tmp0_ = _g_object_ref0 (dvb_media_mapping_factory_instance); - result = _tmp0_; + _tmp0_ = dvb_media_mapping_factory_instance; + _tmp1_ = _g_object_ref0 (_tmp0_); + result = _tmp1_; return result; } @@ -105,7 +107,7 @@ static void dvb_media_mapping_class_init (DVBMediaMappingClass * klass) { - DVBMediaFactory* _tmp0_ = NULL; + DVBMediaFactory* _tmp0_; dvb_media_mapping_parent_class = g_type_class_peek_parent (klass); GST_RTSP_MEDIA_MAPPING_CLASS (klass)->find_media = dvb_media_mapping_real_find_media; G_OBJECT_CLASS (klass)->finalize = dvb_media_mapping_finalize; diff -Nru gnome-dvb-daemon-0.1.23/src/rtsp/Server.c gnome-dvb-daemon-0.2.7/src/rtsp/Server.c --- gnome-dvb-daemon-0.1.23/src/rtsp/Server.c 2011-01-14 17:12:56.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rtsp/Server.c 2011-09-29 19:59:31.000000000 +0000 @@ -1,4 +1,4 @@ -/* Server.c generated by valac 0.11.3, the Vala compiler +/* Server.c generated by valac 0.14.0, the Vala compiler * generated from Server.vala, do not modify */ /* @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,26 @@ #include +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + #define DVB_TYPE_SETTINGS (dvb_settings_get_type ()) #define DVB_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SETTINGS, DVBSettings)) #define DVB_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SETTINGS, DVBSettingsClass)) @@ -42,9 +63,19 @@ typedef struct _DVBSettings DVBSettings; typedef struct _DVBSettingsClass DVBSettingsClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define DVB_TYPE_MEDIA_MAPPING (dvb_media_mapping_get_type ()) #define DVB_MEDIA_MAPPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_MEDIA_MAPPING, DVBMediaMapping)) @@ -55,6 +86,7 @@ typedef struct _DVBMediaMapping DVBMediaMapping; typedef struct _DVBMediaMappingClass DVBMediaMappingClass; +typedef struct _DvbRtspServerStartData DvbRtspServerStartData; #define DVB_TYPE_CHANNEL (dvb_channel_get_type ()) #define DVB_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL, DVBChannel)) @@ -81,6 +113,25 @@ #define _gst_rtsp_url_free0(var) ((var == NULL) ? NULL : (var = (gst_rtsp_url_free (var), NULL))) typedef struct _DVBRTSPServerParamSpecStopChannelHelper DVBRTSPServerParamSpecStopChannelHelper; +struct _DvbRtspServerStartData { + int _state_; + GObject* _source_object_; + GAsyncResult* _res_; + GSimpleAsyncResult* _async_result; + DVBLoggingLogManager* _tmp0_; + DVBLoggingLogger* _tmp1_; + DVBLoggingLogger* _tmp2_; + GstRTSPServer* _tmp3_; + GstRTSPServer* _tmp4_; + DVBMediaMapping* _tmp5_; + DVBMediaMapping* _tmp6_; + GstRTSPServer* _tmp7_; + gchar* _tmp8_; + gchar* _tmp9_; + GstRTSPServer* _tmp10_; + guint _tmp11_; +}; + struct _DVBRTSPServerStopChannelHelper { GTypeInstance parent_instance; volatile int ref_count; @@ -101,17 +152,30 @@ }; +extern DVBLoggingLogger* dvb_rtsp_server_log; +DVBLoggingLogger* dvb_rtsp_server_log = NULL; extern GstRTSPServer* dvb_rtsp_server_server; GstRTSPServer* dvb_rtsp_server_server = NULL; extern guint dvb_rtsp_server_timeout_id; guint dvb_rtsp_server_timeout_id = 0U; static gpointer dvb_rtsp_server_stop_channel_helper_parent_class = NULL; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; gchar* dvb_rtsp_server_get_address (void); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; GType dvb_settings_get_type (void) G_GNUC_CONST; -DVBSettings* dvb_factory_get_settings (void); +DVBSettings* dvb_factory_get_settings (DVBFactory* self); gchar* dvb_settings_get_streaming_interface (DVBSettings* self); -gboolean dvb_rtsp_server_start (void); +static void dvb_rtsp_server_start_data_free (gpointer _data); +void dvb_rtsp_server_start (GAsyncReadyCallback _callback_, gpointer _user_data_); +void dvb_rtsp_server_start_finish (GAsyncResult* _res_); +static gboolean dvb_rtsp_server_start_co (DvbRtspServerStartData* _data_); +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); +void dvb_logging_logger_info (DVBLoggingLogger* self, const gchar* format, ...); DVBMediaMapping* dvb_media_mapping_new (void); DVBMediaMapping* dvb_media_mapping_construct (GType object_type); GType dvb_media_mapping_get_type (void) G_GNUC_CONST; @@ -119,6 +183,7 @@ void dvb_rtsp_server_shutdown (void); GType dvb_channel_get_type (void) G_GNUC_CONST; void dvb_rtsp_server_stop_streaming (DVBChannel* channel); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); const gchar* dvb_channel_get_Name (DVBChannel* self); gchar* dvb_channel_get_URL (DVBChannel* self); DVBRTSPServerStopChannelHelper* dvb_rtsp_server_stop_channel_helper_new (const gchar* url_str); @@ -143,48 +208,69 @@ gchar* dvb_rtsp_server_get_address (void) { gchar* result = NULL; - DVBSettings* _tmp0_ = NULL; + DVBFactory* _tmp0_; + DVBFactory* _tmp1_; + DVBSettings* _tmp2_ = NULL; + DVBSettings* _tmp3_; DVBSettings* settings; - gchar* _tmp1_ = NULL; + DVBSettings* _tmp4_; + gchar* _tmp5_ = NULL; gchar* iface; gchar* address; - GList* _tmp2_ = NULL; + GList* _tmp6_ = NULL; GList* adapters; - _tmp0_ = dvb_factory_get_settings (); - settings = _tmp0_; - _tmp1_ = dvb_settings_get_streaming_interface (settings); - iface = _tmp1_; + GList* _tmp7_; + const gchar* _tmp14_; + _tmp0_ = dvb_factory_new (); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_factory_get_settings (_tmp1_); + _tmp3_ = _tmp2_; + _g_object_unref0 (_tmp1_); + settings = _tmp3_; + _tmp4_ = settings; + _tmp5_ = dvb_settings_get_streaming_interface (_tmp4_); + iface = _tmp5_; address = NULL; - _tmp2_ = get_adapters (); - adapters = _tmp2_; + _tmp6_ = get_adapters (); + adapters = _tmp6_; + _tmp7_ = adapters; { - GList* na_collection; - GList* na_it; - na_collection = adapters; + GList* na_collection = NULL; + GList* na_it = NULL; + na_collection = _tmp7_; for (na_it = na_collection; na_it != NULL; na_it = na_it->next) { - struct net_adapter* na; + struct net_adapter* na = NULL; na = (struct net_adapter*) na_it->data; { - if (g_strcmp0 (na->name, iface) == 0) { - gchar* _tmp3_; - gchar* _tmp4_; - _tmp3_ = g_strdup (na->address); - _tmp4_ = _tmp3_; + struct net_adapter* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; + _tmp8_ = na; + _tmp9_ = _tmp8_->name; + _tmp10_ = iface; + if (g_strcmp0 (_tmp9_, _tmp10_) == 0) { + struct net_adapter* _tmp11_; + const gchar* _tmp12_; + gchar* _tmp13_; + _tmp11_ = na; + _tmp12_ = _tmp11_->address; + _tmp13_ = g_strdup (_tmp12_); _g_free0 (address); - address = _tmp4_; + address = _tmp13_; break; } } } } - if (address == NULL) { - gchar* _tmp5_; - gchar* _tmp6_; - g_warning ("Server.vala:39: Could not find network interface '%s'", iface); - _tmp5_ = g_strdup ("127.0.0.1"); - _tmp6_ = _tmp5_; + _tmp14_ = address; + if (_tmp14_ == NULL) { + const gchar* _tmp15_; + gchar* _tmp16_; + _tmp15_ = iface; + g_warning ("Server.vala:43: Could not find network interface '%s'", _tmp15_); + _tmp16_ = g_strdup ("127.0.0.1"); _g_free0 (address); - address = _tmp6_; + address = _tmp16_; } result = address; _g_list_free0 (adapters); @@ -194,44 +280,79 @@ } -gboolean dvb_rtsp_server_start (void) { - gboolean result = FALSE; - GstRTSPServer* _tmp0_ = NULL; - GstRTSPServer* _tmp1_; - DVBMediaMapping* _tmp2_ = NULL; - DVBMediaMapping* _tmp3_; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - GSourceFunc _tmp6_; - guint _tmp7_; - g_message ("Server.vala:47: Starting RTSP server"); - _tmp0_ = gst_rtsp_server_new (); - _tmp1_ = _tmp0_; +static void dvb_rtsp_server_start_data_free (gpointer _data) { + DvbRtspServerStartData* _data_; + _data_ = _data; + g_slice_free (DvbRtspServerStartData, _data_); +} + + +void dvb_rtsp_server_start (GAsyncReadyCallback _callback_, gpointer _user_data_) { + DvbRtspServerStartData* _data_; + _data_ = g_slice_new0 (DvbRtspServerStartData); + _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, dvb_rtsp_server_start); + g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, dvb_rtsp_server_start_data_free); + dvb_rtsp_server_start_co (_data_); +} + + +void dvb_rtsp_server_start_finish (GAsyncResult* _res_) { + DvbRtspServerStartData* _data_; + _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); +} + + +static gboolean dvb_rtsp_server_start_co (DvbRtspServerStartData* _data_) { + switch (_data_->_state_) { + case 0: + goto _state_0; + default: + g_assert_not_reached (); + } + _state_0: + _data_->_tmp0_ = NULL; + _data_->_tmp0_ = dvb_logging_log_manager_getLogManager (); + _data_->_tmp1_ = NULL; + _data_->_tmp1_ = dvb_logging_log_manager_getDefaultLogger (_data_->_tmp0_); + _g_object_unref0 (dvb_rtsp_server_log); + dvb_rtsp_server_log = _data_->_tmp1_; + _data_->_tmp2_ = dvb_rtsp_server_log; + dvb_logging_logger_info (_data_->_tmp2_, "Server.vala:52: Starting RTSP server"); + _data_->_tmp3_ = gst_rtsp_server_new (); _g_object_unref0 (dvb_rtsp_server_server); - dvb_rtsp_server_server = _tmp1_; - _tmp2_ = dvb_media_mapping_new (); - _tmp3_ = _tmp2_; - gst_rtsp_server_set_media_mapping (dvb_rtsp_server_server, (GstRTSPMediaMapping*) _tmp3_); - _g_object_unref0 (_tmp3_); - _tmp4_ = dvb_rtsp_server_get_address (); - _tmp5_ = _tmp4_; - gst_rtsp_server_set_address (dvb_rtsp_server_server, _tmp5_); - _g_free0 (_tmp5_); - gst_rtsp_server_attach (dvb_rtsp_server_server, NULL); - _tmp6_ = (GSourceFunc) dvb_rtsp_server_timeout; - _tmp7_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, _tmp6_, NULL, NULL); - dvb_rtsp_server_timeout_id = _tmp7_; - result = FALSE; - return result; + dvb_rtsp_server_server = _data_->_tmp3_; + _data_->_tmp4_ = dvb_rtsp_server_server; + _data_->_tmp5_ = dvb_media_mapping_new (); + _data_->_tmp6_ = _data_->_tmp5_; + gst_rtsp_server_set_media_mapping (_data_->_tmp4_, (GstRTSPMediaMapping*) _data_->_tmp6_); + _g_object_unref0 (_data_->_tmp6_); + _data_->_tmp7_ = dvb_rtsp_server_server; + _data_->_tmp8_ = NULL; + _data_->_tmp8_ = dvb_rtsp_server_get_address (); + _data_->_tmp9_ = _data_->_tmp8_; + gst_rtsp_server_set_address (_data_->_tmp7_, _data_->_tmp9_); + _g_free0 (_data_->_tmp9_); + _data_->_tmp10_ = dvb_rtsp_server_server; + gst_rtsp_server_attach (_data_->_tmp10_, NULL); + _data_->_tmp11_ = 0U; + _data_->_tmp11_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, (GSourceFunc) dvb_rtsp_server_timeout, NULL, NULL); + dvb_rtsp_server_timeout_id = _data_->_tmp11_; + if (_data_->_state_ == 0) { + g_simple_async_result_complete_in_idle (_data_->_async_result); + } else { + g_simple_async_result_complete (_data_->_async_result); + } + g_object_unref (_data_->_async_result); + return FALSE; } void dvb_rtsp_server_shutdown (void) { - GstRTSPServer* _tmp0_; - g_source_remove (dvb_rtsp_server_timeout_id); - _tmp0_ = NULL; + guint _tmp0_; + _tmp0_ = dvb_rtsp_server_timeout_id; + g_source_remove (_tmp0_); _g_object_unref0 (dvb_rtsp_server_server); - dvb_rtsp_server_server = _tmp0_; + dvb_rtsp_server_server = NULL; } @@ -254,36 +375,54 @@ void dvb_rtsp_server_stop_streaming (DVBChannel* channel) { - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - gchar* _tmp2_; - DVBRTSPServerStopChannelHelper* _tmp3_ = NULL; - DVBRTSPServerStopChannelHelper* _tmp4_; + DVBLoggingLogger* _tmp0_; + DVBChannel* _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; + DVBChannel* _tmp4_; + gchar* _tmp5_; + gchar* _tmp6_; + gchar* _tmp7_; + DVBRTSPServerStopChannelHelper* _tmp8_; + DVBRTSPServerStopChannelHelper* _tmp9_; DVBRTSPServerStopChannelHelper* helper; - GstRTSPSessionPool* _tmp5_ = NULL; - GList* _tmp6_ = NULL; - GList* _tmp7_; + GstRTSPServer* _tmp10_; + GstRTSPSessionPool* _tmp11_; + GstRTSPSessionPool* _tmp12_; + GList* _tmp13_ = NULL; + GList* _tmp14_; g_return_if_fail (channel != NULL); - _tmp0_ = dvb_channel_get_Name (channel); - g_debug ("Server.vala:62: Stop streaming channel %s", _tmp0_); - _tmp1_ = dvb_channel_get_URL (channel); - _tmp2_ = _tmp1_; - _tmp3_ = dvb_rtsp_server_stop_channel_helper_new (_tmp2_); - helper = (_tmp4_ = _tmp3_, _g_free0 (_tmp2_), _tmp4_); - _tmp5_ = gst_rtsp_server_get_session_pool (dvb_rtsp_server_server); - _tmp6_ = gst_rtsp_session_pool_filter (_tmp5_, _dvb_rtsp_server_stop_channel_helper_session_filter_func_gst_rtsp_session_filter_func, helper); + _tmp0_ = dvb_rtsp_server_log; + _tmp1_ = channel; + _tmp2_ = dvb_channel_get_Name (_tmp1_); + _tmp3_ = _tmp2_; + dvb_logging_logger_debug (_tmp0_, "Server.vala:66: Stop streaming channel %s", _tmp3_); + _tmp4_ = channel; + _tmp5_ = dvb_channel_get_URL (_tmp4_); + _tmp6_ = _tmp5_; _tmp7_ = _tmp6_; - __g_list_free__g_object_unref0_0 (_tmp7_); + _tmp8_ = dvb_rtsp_server_stop_channel_helper_new (_tmp7_); + _tmp9_ = _tmp8_; + _g_free0 (_tmp7_); + helper = _tmp9_; + _tmp10_ = dvb_rtsp_server_server; + _tmp11_ = gst_rtsp_server_get_session_pool (_tmp10_); + _tmp12_ = _tmp11_; + _tmp13_ = gst_rtsp_session_pool_filter (_tmp12_, _dvb_rtsp_server_stop_channel_helper_session_filter_func_gst_rtsp_session_filter_func, helper); + _tmp14_ = _tmp13_; + __g_list_free__g_object_unref0_0 (_tmp14_); _dvb_rtsp_server_stop_channel_helper_unref0 (helper); } gboolean dvb_rtsp_server_timeout (void) { gboolean result = FALSE; - GstRTSPSessionPool* _tmp0_ = NULL; + GstRTSPServer* _tmp0_; + GstRTSPSessionPool* _tmp1_ = NULL; GstRTSPSessionPool* pool; - _tmp0_ = gst_rtsp_server_get_session_pool (dvb_rtsp_server_server); - pool = _tmp0_; + _tmp0_ = dvb_rtsp_server_server; + _tmp1_ = gst_rtsp_server_get_session_pool (_tmp0_); + pool = _tmp1_; gst_rtsp_session_pool_cleanup (pool); result = TRUE; _g_object_unref0 (pool); @@ -293,12 +432,14 @@ DVBRTSPServerStopChannelHelper* dvb_rtsp_server_stop_channel_helper_construct (GType object_type, const gchar* url_str) { DVBRTSPServerStopChannelHelper* self = NULL; - GstRTSPUrl* _tmp0_ = NULL; + const gchar* _tmp0_; + GstRTSPUrl* _tmp1_ = NULL; g_return_val_if_fail (url_str != NULL, NULL); self = (DVBRTSPServerStopChannelHelper*) g_type_create_instance (object_type); - gst_rtsp_url_parse (url_str, &_tmp0_); + _tmp0_ = url_str; + gst_rtsp_url_parse (_tmp0_, &_tmp1_); _gst_rtsp_url_free0 (self->priv->url); - self->priv->url = _tmp0_; + self->priv->url = _tmp1_; return self; } @@ -310,12 +451,16 @@ GstRTSPFilterResult dvb_rtsp_server_stop_channel_helper_session_filter_func (DVBRTSPServerStopChannelHelper* self, GstRTSPSessionPool* pool, GstRTSPSession* session) { GstRTSPFilterResult result = 0; - GstRTSPSessionMedia* _tmp0_ = NULL; + GstRTSPSession* _tmp0_; + GstRTSPUrl* _tmp1_; + GstRTSPSessionMedia* _tmp2_ = NULL; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (pool != NULL, 0); g_return_val_if_fail (session != NULL, 0); - _tmp0_ = gst_rtsp_session_get_media (session, self->priv->url); - if (_tmp0_ != NULL) { + _tmp0_ = session; + _tmp1_ = self->priv->url; + _tmp2_ = gst_rtsp_session_get_media (_tmp0_, _tmp1_); + if (_tmp2_ != NULL) { result = GST_RTSP_FILTER_REMOVE; return result; } else { diff -Nru gnome-dvb-daemon-0.1.23/src/rtsp/Server.vala gnome-dvb-daemon-0.2.7/src/rtsp/Server.vala --- gnome-dvb-daemon-0.1.23/src/rtsp/Server.vala 2011-01-14 17:12:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rtsp/Server.vala 2011-09-29 20:27:47.000000000 +0000 @@ -17,13 +17,17 @@ * along with GNOME DVB Daemon. If not, see . */ +using DVB.Logging; + namespace DVB.RTSPServer { + private static Logger log; + private static Gst.RTSPServer server; private static uint timeout_id; public static string get_address () { - DVB.Settings settings = DVB.Factory.get_settings (); + DVB.Settings settings = new DVB.Factory().get_settings (); string iface = settings.get_streaming_interface (); string? address = null; @@ -43,14 +47,14 @@ return address; } - public static bool start () { - message ("Starting RTSP server"); + public async static void start () { + log = LogManager.getLogManager().getDefaultLogger(); + log.info ("Starting RTSP server"); server = new Gst.RTSPServer (); server.set_media_mapping (new MediaMapping ()); server.set_address (get_address ()); server.attach (null); timeout_id = GLib.Timeout.add_seconds (2, (GLib.SourceFunc)timeout); - return false; } public static void shutdown () { @@ -59,7 +63,7 @@ } public static void stop_streaming (Channel channel) { - debug ("Stop streaming channel %s", channel.Name); + log.debug ("Stop streaming channel %s", channel.Name); var helper = new StopChannelHelper (channel.URL); server.session_pool.filter (helper.session_filter_func); diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Interfaces2.c gnome-dvb-daemon-0.2.7/src/rygel/Interfaces2.c --- gnome-dvb-daemon-0.1.23/src/rygel/Interfaces2.c 2011-01-12 17:30:53.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Interfaces2.c 2011-12-09 11:14:15.000000000 +0000 @@ -1,4 +1,4 @@ -/* Interfaces2.c generated by valac 0.11.3, the Vala compiler +/* Interfaces2.c generated by valac 0.14.0, the Vala compiler * generated from Interfaces2.vala, do not modify */ /* @@ -24,9 +24,7 @@ #include #include #include -#include -#include -#include +#include #define TYPE_MEDIA_OBJECT2 (media_object2_get_type ()) @@ -36,10 +34,11 @@ typedef struct _MediaObject2 MediaObject2; typedef struct _MediaObject2Iface MediaObject2Iface; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define TYPE_MEDIA_OBJECT2_PROXY (media_object2_proxy_get_type ()) +typedef GDBusProxy MediaObject2Proxy; +typedef GDBusProxyClass MediaObject2ProxyClass; #define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _MediaObject2DBusProxy MediaObject2DBusProxy; -typedef DBusGProxyClass MediaObject2DBusProxyClass; #define TYPE_MEDIA_CONTAINER2 (media_container2_get_type ()) #define MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_CONTAINER2, MediaContainer2)) @@ -48,8 +47,10 @@ typedef struct _MediaContainer2 MediaContainer2; typedef struct _MediaContainer2Iface MediaContainer2Iface; -typedef struct _MediaContainer2DBusProxy MediaContainer2DBusProxy; -typedef DBusGProxyClass MediaContainer2DBusProxyClass; + +#define TYPE_MEDIA_CONTAINER2_PROXY (media_container2_proxy_get_type ()) +typedef GDBusProxy MediaContainer2Proxy; +typedef GDBusProxyClass MediaContainer2ProxyClass; #define TYPE_MEDIA_ITEM2 (media_item2_get_type ()) #define MEDIA_ITEM2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_ITEM2, MediaItem2)) @@ -58,8 +59,10 @@ typedef struct _MediaItem2 MediaItem2; typedef struct _MediaItem2Iface MediaItem2Iface; -typedef struct _MediaItem2DBusProxy MediaItem2DBusProxy; -typedef DBusGProxyClass MediaItem2DBusProxyClass; + +#define TYPE_MEDIA_ITEM2_PROXY (media_item2_proxy_get_type ()) +typedef GDBusProxy MediaItem2Proxy; +typedef GDBusProxyClass MediaItem2ProxyClass; struct _MediaObject2Iface { GTypeInterface parent_iface; @@ -69,15 +72,6 @@ gchar* (*get_Path) (MediaObject2* self); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _MediaObject2DBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - struct _MediaContainer2Iface { GTypeInterface parent_iface; GHashTable** (*ListChildren) (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); @@ -89,55 +83,37 @@ gboolean (*get_Searchable) (MediaContainer2* self); }; -struct _MediaContainer2DBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - struct _MediaItem2Iface { GTypeInterface parent_iface; gchar** (*get_URLs) (MediaItem2* self, int* result_length1); gchar* (*get_MIMEType) (MediaItem2* self); }; -struct _MediaItem2DBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - GType media_object2_get_type (void) G_GNUC_CONST; -MediaObject2* media_object2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType media_object2_proxy_get_type (void) G_GNUC_CONST; +guint media_object2_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); char* media_object2_get_Parent (MediaObject2* self); gchar* media_object2_get_DisplayName (MediaObject2* self); gchar* media_object2_get_Type (MediaObject2* self); gchar* media_object2_get_Path (MediaObject2* self); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void media_object2_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _media_object2_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult media_object2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_media_object2_introspect (MediaObject2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_object2_property_get (MediaObject2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_object2_property_get_all (MediaObject2* self, DBusConnection* connection, DBusMessage* message); -GType media_object2_dbus_proxy_get_type (void) G_GNUC_CONST; -DBusHandlerResult media_object2_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - MEDIA_OBJECT2_DBUS_PROXY_DUMMY_PROPERTY, - MEDIA_OBJECT2_DBUS_PROXY_PARENT, - MEDIA_OBJECT2_DBUS_PROXY_DISPLAY_NAME, - MEDIA_OBJECT2_DBUS_PROXY_TYPE, - MEDIA_OBJECT2_DBUS_PROXY_PATH -}; +static void media_object2_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); static char* media_object2_dbus_proxy_get_Parent (MediaObject2* self); static gchar* media_object2_dbus_proxy_get_DisplayName (MediaObject2* self); static gchar* media_object2_dbus_proxy_get_Type (MediaObject2* self); static gchar* media_object2_dbus_proxy_get_Path (MediaObject2* self); -static void media_object2_dbus_proxy_media_object2__interface_init (MediaObject2Iface* iface); -static void _vala_media_object2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_media_object2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -MediaContainer2* media_container2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +static void media_object2_proxy_media_object2_interface_init (MediaObject2Iface* iface); +static void media_object2_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* media_object2_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static GVariant* _dbus_media_object2_get_Parent (MediaObject2* self); +static GVariant* _dbus_media_object2_get_DisplayName (MediaObject2* self); +static GVariant* _dbus_media_object2_get_Type (MediaObject2* self); +static GVariant* _dbus_media_object2_get_Path (MediaObject2* self); +static gboolean media_object2_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _media_object2_unregister_object (gpointer user_data); +GType media_container2_proxy_get_type (void) G_GNUC_CONST; +guint media_container2_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType media_container2_get_type (void) G_GNUC_CONST; GHashTable** media_container2_ListChildren (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); GHashTable** media_container2_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); @@ -146,335 +122,123 @@ guint media_container2_get_ItemCount (MediaContainer2* self); guint media_container2_get_ContainerCount (MediaContainer2* self); gboolean media_container2_get_Searchable (MediaContainer2* self); -void media_container2_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _media_container2_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult media_container2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_media_container2_introspect (MediaContainer2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_container2_property_get (MediaContainer2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_container2_property_get_all (MediaContainer2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_container2_ListChildren (MediaContainer2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_container2_ListContainers (MediaContainer2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_container2_ListItems (MediaContainer2* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_media_container2_updated (GObject* _sender, DBusConnection* _connection); -GType media_container2_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_media_container2_updated (MediaContainer2* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult media_container2_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - MEDIA_CONTAINER2_DBUS_PROXY_DUMMY_PROPERTY, - MEDIA_CONTAINER2_DBUS_PROXY_CHILD_COUNT, - MEDIA_CONTAINER2_DBUS_PROXY_ITEM_COUNT, - MEDIA_CONTAINER2_DBUS_PROXY_CONTAINER_COUNT, - MEDIA_CONTAINER2_DBUS_PROXY_SEARCHABLE -}; -static GHashTable** media_container2_dbus_proxy_ListChildren (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); -static GHashTable** media_container2_dbus_proxy_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); -static GHashTable** media_container2_dbus_proxy_ListItems (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); +static void media_container2_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_media_container2_updated (MediaContainer2* self, GVariant* parameters); +static GHashTable** media_container2_proxy_ListChildren (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); +static GHashTable** media_container2_proxy_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); +static GHashTable** media_container2_proxy_ListItems (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); static guint media_container2_dbus_proxy_get_ChildCount (MediaContainer2* self); static guint media_container2_dbus_proxy_get_ItemCount (MediaContainer2* self); static guint media_container2_dbus_proxy_get_ContainerCount (MediaContainer2* self); static gboolean media_container2_dbus_proxy_get_Searchable (MediaContainer2* self); -static void media_container2_dbus_proxy_media_container2__interface_init (MediaContainer2Iface* iface); -static void _vala_media_container2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_media_container2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +static void media_container2_proxy_media_container2_interface_init (MediaContainer2Iface* iface); +static void _dbus_media_container2_ListChildren (MediaContainer2* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_media_container2_ListContainers (MediaContainer2* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_media_container2_ListItems (MediaContainer2* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void media_container2_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* media_container2_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static GVariant* _dbus_media_container2_get_ChildCount (MediaContainer2* self); +static GVariant* _dbus_media_container2_get_ItemCount (MediaContainer2* self); +static GVariant* _dbus_media_container2_get_ContainerCount (MediaContainer2* self); +static GVariant* _dbus_media_container2_get_Searchable (MediaContainer2* self); +static gboolean media_container2_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_media_container2_updated (GObject* _sender, gpointer* _data); +static void _media_container2_unregister_object (gpointer user_data); GType media_item2_get_type (void) G_GNUC_CONST; -MediaItem2* media_item2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType media_item2_proxy_get_type (void) G_GNUC_CONST; +guint media_item2_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); gchar** media_item2_get_URLs (MediaItem2* self, int* result_length1); gchar* media_item2_get_MIMEType (MediaItem2* self); -void media_item2_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _media_item2_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult media_item2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_media_item2_introspect (MediaItem2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_item2_property_get (MediaItem2* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_item2_property_get_all (MediaItem2* self, DBusConnection* connection, DBusMessage* message); -GType media_item2_dbus_proxy_get_type (void) G_GNUC_CONST; -DBusHandlerResult media_item2_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - MEDIA_ITEM2_DBUS_PROXY_DUMMY_PROPERTY, - MEDIA_ITEM2_DBUS_PROXY_UR_LS, - MEDIA_ITEM2_DBUS_PROXY_MIME_TYPE -}; +static void media_item2_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); static gchar** media_item2_dbus_proxy_get_URLs (MediaItem2* self, int* result_length1); static gchar* media_item2_dbus_proxy_get_MIMEType (MediaItem2* self); -static void media_item2_dbus_proxy_media_item2__interface_init (MediaItem2Iface* iface); -static void _vala_media_item2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_media_item2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +static void media_item2_proxy_media_item2_interface_init (MediaItem2Iface* iface); +static void media_item2_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* media_item2_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static GVariant* _dbus_media_item2_get_URLs (MediaItem2* self); +static GVariant* _dbus_media_item2_get_MIMEType (MediaItem2* self); +static gboolean media_item2_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _media_item2_unregister_object (gpointer user_data); static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static const DBusObjectPathVTable _media_object2_dbus_path_vtable = {_media_object2_dbus_unregister, media_object2_dbus_message}; -static const _DBusObjectVTable _media_object2_dbus_vtable = {media_object2_dbus_register_object}; -static const DBusObjectPathVTable _media_container2_dbus_path_vtable = {_media_container2_dbus_unregister, media_container2_dbus_message}; -static const _DBusObjectVTable _media_container2_dbus_vtable = {media_container2_dbus_register_object}; -static const DBusObjectPathVTable _media_item2_dbus_path_vtable = {_media_item2_dbus_unregister, media_item2_dbus_message}; -static const _DBusObjectVTable _media_item2_dbus_vtable = {media_item2_dbus_register_object}; +static const GDBusMethodInfo * const _media_object2_dbus_method_info[] = {NULL}; +static const GDBusSignalInfo * const _media_object2_dbus_signal_info[] = {NULL}; +static const GDBusPropertyInfo _media_object2_dbus_property_info_Parent = {-1, "Parent", "o", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo _media_object2_dbus_property_info_DisplayName = {-1, "DisplayName", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo _media_object2_dbus_property_info_Type = {-1, "Type", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo _media_object2_dbus_property_info_Path = {-1, "Path", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo * const _media_object2_dbus_property_info[] = {&_media_object2_dbus_property_info_Parent, &_media_object2_dbus_property_info_DisplayName, &_media_object2_dbus_property_info_Type, &_media_object2_dbus_property_info_Path, NULL}; +static const GDBusInterfaceInfo _media_object2_dbus_interface_info = {-1, "org.gnome.UPnP.MediaObject2", (GDBusMethodInfo **) (&_media_object2_dbus_method_info), (GDBusSignalInfo **) (&_media_object2_dbus_signal_info), (GDBusPropertyInfo **) (&_media_object2_dbus_property_info)}; +static const GDBusInterfaceVTable _media_object2_dbus_interface_vtable = {media_object2_dbus_interface_method_call, media_object2_dbus_interface_get_property, media_object2_dbus_interface_set_property}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListChildren_offset = {-1, "offset", "u"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListChildren_max = {-1, "max", "u"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListChildren_filter = {-1, "filter", "as"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListChildren_result = {-1, "result", "aa{sv}"}; +static const GDBusArgInfo * const _media_container2_dbus_arg_info_ListChildren_in[] = {&_media_container2_dbus_arg_info_ListChildren_offset, &_media_container2_dbus_arg_info_ListChildren_max, &_media_container2_dbus_arg_info_ListChildren_filter, NULL}; +static const GDBusArgInfo * const _media_container2_dbus_arg_info_ListChildren_out[] = {&_media_container2_dbus_arg_info_ListChildren_result, NULL}; +static const GDBusMethodInfo _media_container2_dbus_method_info_ListChildren = {-1, "ListChildren", (GDBusArgInfo **) (&_media_container2_dbus_arg_info_ListChildren_in), (GDBusArgInfo **) (&_media_container2_dbus_arg_info_ListChildren_out)}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListContainers_offset = {-1, "offset", "u"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListContainers_max = {-1, "max", "u"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListContainers_filter = {-1, "filter", "as"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListContainers_result = {-1, "result", "aa{sv}"}; +static const GDBusArgInfo * const _media_container2_dbus_arg_info_ListContainers_in[] = {&_media_container2_dbus_arg_info_ListContainers_offset, &_media_container2_dbus_arg_info_ListContainers_max, &_media_container2_dbus_arg_info_ListContainers_filter, NULL}; +static const GDBusArgInfo * const _media_container2_dbus_arg_info_ListContainers_out[] = {&_media_container2_dbus_arg_info_ListContainers_result, NULL}; +static const GDBusMethodInfo _media_container2_dbus_method_info_ListContainers = {-1, "ListContainers", (GDBusArgInfo **) (&_media_container2_dbus_arg_info_ListContainers_in), (GDBusArgInfo **) (&_media_container2_dbus_arg_info_ListContainers_out)}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListItems_offset = {-1, "offset", "u"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListItems_max = {-1, "max", "u"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListItems_filter = {-1, "filter", "as"}; +static const GDBusArgInfo _media_container2_dbus_arg_info_ListItems_result = {-1, "result", "aa{sv}"}; +static const GDBusArgInfo * const _media_container2_dbus_arg_info_ListItems_in[] = {&_media_container2_dbus_arg_info_ListItems_offset, &_media_container2_dbus_arg_info_ListItems_max, &_media_container2_dbus_arg_info_ListItems_filter, NULL}; +static const GDBusArgInfo * const _media_container2_dbus_arg_info_ListItems_out[] = {&_media_container2_dbus_arg_info_ListItems_result, NULL}; +static const GDBusMethodInfo _media_container2_dbus_method_info_ListItems = {-1, "ListItems", (GDBusArgInfo **) (&_media_container2_dbus_arg_info_ListItems_in), (GDBusArgInfo **) (&_media_container2_dbus_arg_info_ListItems_out)}; +static const GDBusMethodInfo * const _media_container2_dbus_method_info[] = {&_media_container2_dbus_method_info_ListChildren, &_media_container2_dbus_method_info_ListContainers, &_media_container2_dbus_method_info_ListItems, NULL}; +static const GDBusArgInfo * const _media_container2_dbus_arg_info_updated[] = {NULL}; +static const GDBusSignalInfo _media_container2_dbus_signal_info_updated = {-1, "Updated", (GDBusArgInfo **) (&_media_container2_dbus_arg_info_updated)}; +static const GDBusSignalInfo * const _media_container2_dbus_signal_info[] = {&_media_container2_dbus_signal_info_updated, NULL}; +static const GDBusPropertyInfo _media_container2_dbus_property_info_ChildCount = {-1, "ChildCount", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo _media_container2_dbus_property_info_ItemCount = {-1, "ItemCount", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo _media_container2_dbus_property_info_ContainerCount = {-1, "ContainerCount", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo _media_container2_dbus_property_info_Searchable = {-1, "Searchable", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo * const _media_container2_dbus_property_info[] = {&_media_container2_dbus_property_info_ChildCount, &_media_container2_dbus_property_info_ItemCount, &_media_container2_dbus_property_info_ContainerCount, &_media_container2_dbus_property_info_Searchable, NULL}; +static const GDBusInterfaceInfo _media_container2_dbus_interface_info = {-1, "org.gnome.UPnP.MediaContainer2", (GDBusMethodInfo **) (&_media_container2_dbus_method_info), (GDBusSignalInfo **) (&_media_container2_dbus_signal_info), (GDBusPropertyInfo **) (&_media_container2_dbus_property_info)}; +static const GDBusInterfaceVTable _media_container2_dbus_interface_vtable = {media_container2_dbus_interface_method_call, media_container2_dbus_interface_get_property, media_container2_dbus_interface_set_property}; +static const GDBusMethodInfo * const _media_item2_dbus_method_info[] = {NULL}; +static const GDBusSignalInfo * const _media_item2_dbus_signal_info[] = {NULL}; +static const GDBusPropertyInfo _media_item2_dbus_property_info_URLs = {-1, "URLs", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo _media_item2_dbus_property_info_MIMEType = {-1, "MIMEType", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE}; +static const GDBusPropertyInfo * const _media_item2_dbus_property_info[] = {&_media_item2_dbus_property_info_URLs, &_media_item2_dbus_property_info_MIMEType, NULL}; +static const GDBusInterfaceInfo _media_item2_dbus_interface_info = {-1, "org.gnome.UPnP.MediaItem2", (GDBusMethodInfo **) (&_media_item2_dbus_method_info), (GDBusSignalInfo **) (&_media_item2_dbus_signal_info), (GDBusPropertyInfo **) (&_media_item2_dbus_property_info)}; +static const GDBusInterfaceVTable _media_item2_dbus_interface_vtable = {media_item2_dbus_interface_method_call, media_item2_dbus_interface_get_property, media_item2_dbus_interface_set_property}; char* media_object2_get_Parent (MediaObject2* self) { + g_return_val_if_fail (self != NULL, NULL); return MEDIA_OBJECT2_GET_INTERFACE (self)->get_Parent (self); } gchar* media_object2_get_DisplayName (MediaObject2* self) { + g_return_val_if_fail (self != NULL, NULL); return MEDIA_OBJECT2_GET_INTERFACE (self)->get_DisplayName (self); } gchar* media_object2_get_Type (MediaObject2* self) { + g_return_val_if_fail (self != NULL, NULL); return MEDIA_OBJECT2_GET_INTERFACE (self)->get_Type (self); } gchar* media_object2_get_Path (MediaObject2* self) { + g_return_val_if_fail (self != NULL, NULL); return MEDIA_OBJECT2_GET_INTERFACE (self)->get_Path (self); } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _media_object2_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_media_object2_introspect (MediaObject2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_object2_property_get (MediaObject2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - char* property_name; - const char* _tmp1_; - if (strcmp (dbus_message_get_signature (message), "ss")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp1_); - if ((strcmp (interface_name, "org.gnome.UPnP.MediaObject2") == 0) && (strcmp (property_name, "Parent") == 0)) { - char* result; - const char* _tmp2_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "o", &subiter); - result = media_object2_get_Parent (self); - _tmp2_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_OBJECT_PATH, &_tmp2_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaObject2") == 0) && (strcmp (property_name, "DisplayName") == 0)) { - gchar* result; - const char* _tmp3_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); - result = media_object2_get_DisplayName (self); - _tmp3_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp3_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaObject2") == 0) && (strcmp (property_name, "Type") == 0)) { - gchar* result; - const char* _tmp4_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); - result = media_object2_get_Type (self); - _tmp4_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp4_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaObject2") == 0) && (strcmp (property_name, "Path") == 0)) { - gchar* result; - const char* _tmp5_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); - result = media_object2_get_Path (self); - _tmp5_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp5_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - g_free (property_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_object2_property_get_all (MediaObject2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; - char* interface_name; - const char* _tmp6_; - const char* property_name; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp6_); - if (strcmp (interface_name, "org.gnome.UPnP.MediaObject2") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - { - char* result; - const char* _tmp7_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Parent"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "o", &value_iter); - result = media_object2_get_Parent (self); - _tmp7_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_OBJECT_PATH, &_tmp7_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gchar* result; - const char* _tmp8_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "DisplayName"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "s", &value_iter); - result = media_object2_get_DisplayName (self); - _tmp8_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp8_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gchar* result; - const char* _tmp9_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Type"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "s", &value_iter); - result = media_object2_get_Type (self); - _tmp9_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp9_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gchar* result; - const char* _tmp10_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Path"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "s", &value_iter); - result = media_object2_get_Path (self); - _tmp10_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp10_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult media_object2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_media_object2_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "Get")) { - result = _dbus_media_object2_property_get (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_media_object2_property_get_all (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void media_object2_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_media_object2_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } -} - - static void media_object2_base_init (MediaObject2Iface * iface) { static gboolean initialized = FALSE; if (!initialized) { initialized = TRUE; - g_object_interface_install_property (iface, g_param_spec_string ("Parent", "Parent", "Parent", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_string ("DisplayName", "DisplayName", "DisplayName", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_string ("Type", "Type", "Type", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_string ("Path", "Path", "Path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_type_set_qdata (TYPE_MEDIA_OBJECT2, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_media_object2_dbus_vtable)); } } @@ -486,267 +250,130 @@ GType media_object2_type_id; media_object2_type_id = g_type_register_static (G_TYPE_INTERFACE, "MediaObject2", &g_define_type_info, 0); g_type_interface_add_prerequisite (media_object2_type_id, G_TYPE_OBJECT); - g_type_set_qdata (media_object2_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &media_object2_dbus_proxy_get_type); + g_type_set_qdata (media_object2_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) media_object2_proxy_get_type); + g_type_set_qdata (media_object2_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.UPnP.MediaObject2"); + g_type_set_qdata (media_object2_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) media_object2_register_object); g_once_init_leave (&media_object2_type_id__volatile, media_object2_type_id); } return media_object2_type_id__volatile; } -G_DEFINE_TYPE_EXTENDED (MediaObject2DBusProxy, media_object2_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_OBJECT2, media_object2_dbus_proxy_media_object2__interface_init) ); -MediaObject2* media_object2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - MediaObject2* self; - self = g_object_new (media_object2_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.UPnP.MediaObject2", NULL); - return self; -} - - -static GObject* media_object2_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (media_object2_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), media_object2_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; +G_DEFINE_TYPE_EXTENDED (MediaObject2Proxy, media_object2_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_OBJECT2, media_object2_proxy_media_object2_interface_init) ) +static void media_object2_proxy_class_init (MediaObject2ProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = media_object2_proxy_g_signal; } -DBusHandlerResult media_object2_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void media_object2_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((MediaObject2DBusProxy*) self)->disposed) { - return; - } - ((MediaObject2DBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), media_object2_dbus_proxy_filter, self); - G_OBJECT_CLASS (media_object2_dbus_proxy_parent_class)->dispose (self); +static void media_object2_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { } -static void media_object2_dbus_proxy_class_init (MediaObject2DBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = media_object2_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = media_object2_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_media_object2_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_media_object2_dbus_proxy_set_property; - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_OBJECT2_DBUS_PROXY_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_OBJECT2_DBUS_PROXY_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_OBJECT2_DBUS_PROXY_TYPE, "Type"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_OBJECT2_DBUS_PROXY_PATH, "Path"); -} - - -static void media_object2_dbus_proxy_init (MediaObject2DBusProxy* self) { +static void media_object2_proxy_init (MediaObject2Proxy* self) { } static char* media_object2_dbus_proxy_get_Parent (MediaObject2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp481_; - const char* _tmp482_; + GVariant *_inner_reply; char* _result; - const char* _tmp483_; - if (((MediaObject2DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp481_ = "org.gnome.UPnP.MediaObject2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp481_); - _tmp482_ = "Parent"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp482_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "o")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "o", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Parent"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaObject2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Parent")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return NULL; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); } - dbus_message_iter_get_basic (&_subiter, &_tmp483_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp483_); - dbus_message_unref (_reply); + _result = g_variant_dup_string (_inner_reply, NULL); + g_variant_unref (_inner_reply); return _result; } static gchar* media_object2_dbus_proxy_get_DisplayName (MediaObject2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp484_; - const char* _tmp485_; + GVariant *_inner_reply; gchar* _result; - const char* _tmp486_; - if (((MediaObject2DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp484_ = "org.gnome.UPnP.MediaObject2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp484_); - _tmp485_ = "DisplayName"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp485_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "s")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "s", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "DisplayName"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaObject2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DisplayName")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return NULL; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); } - dbus_message_iter_get_basic (&_subiter, &_tmp486_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp486_); - dbus_message_unref (_reply); + _result = g_variant_dup_string (_inner_reply, NULL); + g_variant_unref (_inner_reply); return _result; } static gchar* media_object2_dbus_proxy_get_Type (MediaObject2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp487_; - const char* _tmp488_; + GVariant *_inner_reply; gchar* _result; - const char* _tmp489_; - if (((MediaObject2DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp487_ = "org.gnome.UPnP.MediaObject2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp487_); - _tmp488_ = "Type"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp488_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "s")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "s", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Type"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaObject2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Type")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return NULL; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); } - dbus_message_iter_get_basic (&_subiter, &_tmp489_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp489_); - dbus_message_unref (_reply); + _result = g_variant_dup_string (_inner_reply, NULL); + g_variant_unref (_inner_reply); return _result; } static gchar* media_object2_dbus_proxy_get_Path (MediaObject2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp490_; - const char* _tmp491_; + GVariant *_inner_reply; gchar* _result; - const char* _tmp492_; - if (((MediaObject2DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp490_ = "org.gnome.UPnP.MediaObject2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp490_); - _tmp491_ = "Path"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp491_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "s")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "s", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Path"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaObject2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Path")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return NULL; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); } - dbus_message_iter_get_basic (&_subiter, &_tmp492_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp492_); - dbus_message_unref (_reply); + _result = g_variant_dup_string (_inner_reply, NULL); + g_variant_unref (_inner_reply); return _result; } -static void media_object2_dbus_proxy_media_object2__interface_init (MediaObject2Iface* iface) { +static void media_object2_proxy_media_object2_interface_init (MediaObject2Iface* iface) { iface->get_Parent = media_object2_dbus_proxy_get_Parent; iface->get_DisplayName = media_object2_dbus_proxy_get_DisplayName; iface->get_Type = media_object2_dbus_proxy_get_Type; @@ -754,1065 +381,146 @@ } -static void _vala_media_object2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +static void media_object2_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + g_object_unref (invocation); } -static void _vala_media_object2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static GVariant* _dbus_media_object2_get_Parent (MediaObject2* self) { + char* result; + GVariant* _reply; + result = media_object2_get_Parent (self); + _reply = g_variant_new_object_path (result); + _g_free0 (result); + return _reply; } -GHashTable** media_container2_ListChildren (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { - return MEDIA_CONTAINER2_GET_INTERFACE (self)->ListChildren (self, offset, max, filter, filter_length1, result_length1, error); +static GVariant* _dbus_media_object2_get_DisplayName (MediaObject2* self) { + gchar* result; + GVariant* _reply; + result = media_object2_get_DisplayName (self); + _reply = g_variant_new_string (result); + _g_free0 (result); + return _reply; } -GHashTable** media_container2_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { - return MEDIA_CONTAINER2_GET_INTERFACE (self)->ListContainers (self, offset, max, filter, filter_length1, result_length1, error); +static GVariant* _dbus_media_object2_get_Type (MediaObject2* self) { + gchar* result; + GVariant* _reply; + result = media_object2_get_Type (self); + _reply = g_variant_new_string (result); + _g_free0 (result); + return _reply; } -GHashTable** media_container2_ListItems (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { - return MEDIA_CONTAINER2_GET_INTERFACE (self)->ListItems (self, offset, max, filter, filter_length1, result_length1, error); +static GVariant* _dbus_media_object2_get_Path (MediaObject2* self) { + gchar* result; + GVariant* _reply; + result = media_object2_get_Path (self); + _reply = g_variant_new_string (result); + _g_free0 (result); + return _reply; } -guint media_container2_get_ChildCount (MediaContainer2* self) { - return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_ChildCount (self); -} - - -guint media_container2_get_ItemCount (MediaContainer2* self) { - return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_ItemCount (self); -} - - -guint media_container2_get_ContainerCount (MediaContainer2* self) { - return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_ContainerCount (self); -} - - -gboolean media_container2_get_Searchable (MediaContainer2* self) { - return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_Searchable (self); +static GVariant* media_object2_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (property_name, "Parent") == 0) { + return _dbus_media_object2_get_Parent (object); + } else if (strcmp (property_name, "DisplayName") == 0) { + return _dbus_media_object2_get_DisplayName (object); + } else if (strcmp (property_name, "Type") == 0) { + return _dbus_media_object2_get_Type (object); + } else if (strcmp (property_name, "Path") == 0) { + return _dbus_media_object2_get_Path (object); + } + return NULL; } -void _media_container2_dbus_unregister (DBusConnection* connection, void* _user_data_) { +static gboolean media_object2_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; } -static DBusHandlerResult _dbus_media_container2_introspect (MediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +guint media_object2_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_media_object2_dbus_interface_info), &_media_object2_dbus_interface_vtable, data, _media_object2_unregister_object, error); + if (!result) { + return 0; } + return result; } -static DBusHandlerResult _dbus_media_container2_property_get (MediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - char* property_name; - const char* _tmp1_; - if (strcmp (dbus_message_get_signature (message), "ss")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp1_); - if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer2") == 0) && (strcmp (property_name, "ChildCount") == 0)) { - guint result; - dbus_uint32_t _tmp2_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "u", &subiter); - result = media_container2_get_ChildCount (self); - _tmp2_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_UINT32, &_tmp2_); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer2") == 0) && (strcmp (property_name, "ItemCount") == 0)) { - guint result; - dbus_uint32_t _tmp3_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "u", &subiter); - result = media_container2_get_ItemCount (self); - _tmp3_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_UINT32, &_tmp3_); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer2") == 0) && (strcmp (property_name, "ContainerCount") == 0)) { - guint result; - dbus_uint32_t _tmp4_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "u", &subiter); - result = media_container2_get_ContainerCount (self); - _tmp4_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_UINT32, &_tmp4_); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer2") == 0) && (strcmp (property_name, "Searchable") == 0)) { - gboolean result; - dbus_bool_t _tmp5_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "b", &subiter); - result = media_container2_get_Searchable (self); - _tmp5_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_BOOLEAN, &_tmp5_); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - g_free (property_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +static void _media_object2_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } -static DBusHandlerResult _dbus_media_container2_property_get_all (MediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; - char* interface_name; - const char* _tmp6_; - const char* property_name; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp6_); - if (strcmp (interface_name, "org.gnome.UPnP.MediaContainer2") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - { - guint result; - dbus_uint32_t _tmp7_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "ChildCount"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "u", &value_iter); - result = media_container2_get_ChildCount (self); - _tmp7_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_UINT32, &_tmp7_); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - guint result; - dbus_uint32_t _tmp8_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "ItemCount"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "u", &value_iter); - result = media_container2_get_ItemCount (self); - _tmp8_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_UINT32, &_tmp8_); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - guint result; - dbus_uint32_t _tmp9_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "ContainerCount"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "u", &value_iter); - result = media_container2_get_ContainerCount (self); - _tmp9_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_UINT32, &_tmp9_); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gboolean result; - dbus_bool_t _tmp10_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Searchable"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "b", &value_iter); - result = media_container2_get_Searchable (self); - _tmp10_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_BOOLEAN, &_tmp10_); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +GHashTable** media_container2_ListChildren (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); + return MEDIA_CONTAINER2_GET_INTERFACE (self)->ListChildren (self, offset, max, filter, filter_length1, result_length1, error); } -static DBusHandlerResult _dbus_media_container2_ListChildren (MediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint offset = 0U; - dbus_uint32_t _tmp11_; - guint max = 0U; - dbus_uint32_t _tmp12_; - gchar** filter = NULL; - int filter_length1; - gchar** _tmp13_; - int _tmp13__length; - int _tmp13__size; - int _tmp13__length1; - DBusMessageIter _tmp14_; - GHashTable** result; - int result_length1; - DBusMessage* reply; - GHashTable** _tmp16_; - DBusMessageIter _tmp17_; - int _tmp18_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uuas")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp11_); - dbus_message_iter_next (&iter); - offset = _tmp11_; - dbus_message_iter_get_basic (&iter, &_tmp12_); - dbus_message_iter_next (&iter); - max = _tmp12_; - filter_length1 = 0; - _tmp13_ = g_new (gchar*, 5); - _tmp13__length = 0; - _tmp13__size = 4; - _tmp13__length1 = 0; - dbus_message_iter_recurse (&iter, &_tmp14_); - for (; dbus_message_iter_get_arg_type (&_tmp14_); _tmp13__length1++) { - const char* _tmp15_; - if (_tmp13__size == _tmp13__length) { - _tmp13__size = 2 * _tmp13__size; - _tmp13_ = g_renew (gchar*, _tmp13_, _tmp13__size + 1); - } - dbus_message_iter_get_basic (&_tmp14_, &_tmp15_); - dbus_message_iter_next (&_tmp14_); - _tmp13_[_tmp13__length++] = g_strdup (_tmp15_); - } - filter_length1 = _tmp13__length1; - _tmp13_[_tmp13__length] = NULL; - dbus_message_iter_next (&iter); - filter = _tmp13_; - result_length1 = 0; - result = media_container2_ListChildren (self, offset, max, filter, filter_length1, &result_length1, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - filter = (_vala_array_free (filter, filter_length1, (GDestroyNotify) g_free), NULL); - _tmp16_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "a{sv}", &_tmp17_); - for (_tmp18_ = 0; _tmp18_ < result_length1; _tmp18_++) { - DBusMessageIter _tmp19_, _tmp20_; - GHashTableIter _tmp21_; - gpointer _tmp22_, _tmp23_; - dbus_message_iter_open_container (&_tmp17_, DBUS_TYPE_ARRAY, "{sv}", &_tmp19_); - g_hash_table_iter_init (&_tmp21_, *_tmp16_); - while (g_hash_table_iter_next (&_tmp21_, &_tmp22_, &_tmp23_)) { - gchar* _key; - GValue* _value; - const char* _tmp24_; - DBusMessageIter _tmp25_; - dbus_message_iter_open_container (&_tmp19_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp20_); - _key = (gchar*) _tmp22_; - _value = (GValue*) _tmp23_; - _tmp24_ = _key; - dbus_message_iter_append_basic (&_tmp20_, DBUS_TYPE_STRING, &_tmp24_); - if (G_VALUE_TYPE (_value) == G_TYPE_UCHAR) { - guint8 _tmp26_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "y", &_tmp25_); - _tmp26_ = g_value_get_uchar (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_BYTE, &_tmp26_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_BOOLEAN) { - dbus_bool_t _tmp27_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "b", &_tmp25_); - _tmp27_ = g_value_get_boolean (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_BOOLEAN, &_tmp27_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_INT) { - dbus_int32_t _tmp28_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "i", &_tmp25_); - _tmp28_ = g_value_get_int (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_INT32, &_tmp28_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_UINT) { - dbus_uint32_t _tmp29_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "u", &_tmp25_); - _tmp29_ = g_value_get_uint (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_UINT32, &_tmp29_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_INT64) { - dbus_int64_t _tmp30_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "x", &_tmp25_); - _tmp30_ = g_value_get_int64 (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_INT64, &_tmp30_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_UINT64) { - dbus_uint64_t _tmp31_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "t", &_tmp25_); - _tmp31_ = g_value_get_uint64 (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_UINT64, &_tmp31_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_DOUBLE) { - double _tmp32_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "d", &_tmp25_); - _tmp32_ = g_value_get_double (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_DOUBLE, &_tmp32_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_STRING) { - const char* _tmp33_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "s", &_tmp25_); - _tmp33_ = g_value_get_string (_value); - dbus_message_iter_append_basic (&_tmp25_, DBUS_TYPE_STRING, &_tmp33_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_STRV) { - const gchar** _tmp34_; - DBusMessageIter _tmp35_; - int _tmp36_; - dbus_message_iter_open_container (&_tmp20_, DBUS_TYPE_VARIANT, "as", &_tmp25_); - _tmp34_ = g_value_get_boxed (_value); - dbus_message_iter_open_container (&_tmp25_, DBUS_TYPE_ARRAY, "s", &_tmp35_); - for (_tmp36_ = 0; _tmp36_ < g_strv_length (g_value_get_boxed (_value)); _tmp36_++) { - const char* _tmp37_; - _tmp37_ = *_tmp34_; - dbus_message_iter_append_basic (&_tmp35_, DBUS_TYPE_STRING, &_tmp37_); - _tmp34_++; - } - dbus_message_iter_close_container (&_tmp25_, &_tmp35_); - dbus_message_iter_close_container (&_tmp20_, &_tmp25_); - } - dbus_message_iter_close_container (&_tmp19_, &_tmp20_); - } - dbus_message_iter_close_container (&_tmp17_, &_tmp19_); - _tmp16_++; - } - dbus_message_iter_close_container (&iter, &_tmp17_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +GHashTable** media_container2_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); + return MEDIA_CONTAINER2_GET_INTERFACE (self)->ListContainers (self, offset, max, filter, filter_length1, result_length1, error); } -static DBusHandlerResult _dbus_media_container2_ListContainers (MediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint offset = 0U; - dbus_uint32_t _tmp38_; - guint max = 0U; - dbus_uint32_t _tmp39_; - gchar** filter = NULL; - int filter_length1; - gchar** _tmp40_; - int _tmp40__length; - int _tmp40__size; - int _tmp40__length1; - DBusMessageIter _tmp41_; - GHashTable** result; - int result_length1; - DBusMessage* reply; - GHashTable** _tmp43_; - DBusMessageIter _tmp44_; - int _tmp45_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uuas")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp38_); - dbus_message_iter_next (&iter); - offset = _tmp38_; - dbus_message_iter_get_basic (&iter, &_tmp39_); - dbus_message_iter_next (&iter); - max = _tmp39_; - filter_length1 = 0; - _tmp40_ = g_new (gchar*, 5); - _tmp40__length = 0; - _tmp40__size = 4; - _tmp40__length1 = 0; - dbus_message_iter_recurse (&iter, &_tmp41_); - for (; dbus_message_iter_get_arg_type (&_tmp41_); _tmp40__length1++) { - const char* _tmp42_; - if (_tmp40__size == _tmp40__length) { - _tmp40__size = 2 * _tmp40__size; - _tmp40_ = g_renew (gchar*, _tmp40_, _tmp40__size + 1); - } - dbus_message_iter_get_basic (&_tmp41_, &_tmp42_); - dbus_message_iter_next (&_tmp41_); - _tmp40_[_tmp40__length++] = g_strdup (_tmp42_); - } - filter_length1 = _tmp40__length1; - _tmp40_[_tmp40__length] = NULL; - dbus_message_iter_next (&iter); - filter = _tmp40_; - result_length1 = 0; - result = media_container2_ListContainers (self, offset, max, filter, filter_length1, &result_length1, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - filter = (_vala_array_free (filter, filter_length1, (GDestroyNotify) g_free), NULL); - _tmp43_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "a{sv}", &_tmp44_); - for (_tmp45_ = 0; _tmp45_ < result_length1; _tmp45_++) { - DBusMessageIter _tmp46_, _tmp47_; - GHashTableIter _tmp48_; - gpointer _tmp49_, _tmp50_; - dbus_message_iter_open_container (&_tmp44_, DBUS_TYPE_ARRAY, "{sv}", &_tmp46_); - g_hash_table_iter_init (&_tmp48_, *_tmp43_); - while (g_hash_table_iter_next (&_tmp48_, &_tmp49_, &_tmp50_)) { - gchar* _key; - GValue* _value; - const char* _tmp51_; - DBusMessageIter _tmp52_; - dbus_message_iter_open_container (&_tmp46_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp47_); - _key = (gchar*) _tmp49_; - _value = (GValue*) _tmp50_; - _tmp51_ = _key; - dbus_message_iter_append_basic (&_tmp47_, DBUS_TYPE_STRING, &_tmp51_); - if (G_VALUE_TYPE (_value) == G_TYPE_UCHAR) { - guint8 _tmp53_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "y", &_tmp52_); - _tmp53_ = g_value_get_uchar (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_BYTE, &_tmp53_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_BOOLEAN) { - dbus_bool_t _tmp54_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "b", &_tmp52_); - _tmp54_ = g_value_get_boolean (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_BOOLEAN, &_tmp54_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_INT) { - dbus_int32_t _tmp55_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "i", &_tmp52_); - _tmp55_ = g_value_get_int (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_INT32, &_tmp55_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_UINT) { - dbus_uint32_t _tmp56_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "u", &_tmp52_); - _tmp56_ = g_value_get_uint (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_UINT32, &_tmp56_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_INT64) { - dbus_int64_t _tmp57_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "x", &_tmp52_); - _tmp57_ = g_value_get_int64 (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_INT64, &_tmp57_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_UINT64) { - dbus_uint64_t _tmp58_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "t", &_tmp52_); - _tmp58_ = g_value_get_uint64 (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_UINT64, &_tmp58_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_DOUBLE) { - double _tmp59_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "d", &_tmp52_); - _tmp59_ = g_value_get_double (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_DOUBLE, &_tmp59_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_STRING) { - const char* _tmp60_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "s", &_tmp52_); - _tmp60_ = g_value_get_string (_value); - dbus_message_iter_append_basic (&_tmp52_, DBUS_TYPE_STRING, &_tmp60_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_STRV) { - const gchar** _tmp61_; - DBusMessageIter _tmp62_; - int _tmp63_; - dbus_message_iter_open_container (&_tmp47_, DBUS_TYPE_VARIANT, "as", &_tmp52_); - _tmp61_ = g_value_get_boxed (_value); - dbus_message_iter_open_container (&_tmp52_, DBUS_TYPE_ARRAY, "s", &_tmp62_); - for (_tmp63_ = 0; _tmp63_ < g_strv_length (g_value_get_boxed (_value)); _tmp63_++) { - const char* _tmp64_; - _tmp64_ = *_tmp61_; - dbus_message_iter_append_basic (&_tmp62_, DBUS_TYPE_STRING, &_tmp64_); - _tmp61_++; - } - dbus_message_iter_close_container (&_tmp52_, &_tmp62_); - dbus_message_iter_close_container (&_tmp47_, &_tmp52_); - } - dbus_message_iter_close_container (&_tmp46_, &_tmp47_); - } - dbus_message_iter_close_container (&_tmp44_, &_tmp46_); - _tmp43_++; - } - dbus_message_iter_close_container (&iter, &_tmp44_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +GHashTable** media_container2_ListItems (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { + g_return_val_if_fail (self != NULL, NULL); + return MEDIA_CONTAINER2_GET_INTERFACE (self)->ListItems (self, offset, max, filter, filter_length1, result_length1, error); } -static DBusHandlerResult _dbus_media_container2_ListItems (MediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint offset = 0U; - dbus_uint32_t _tmp65_; - guint max = 0U; - dbus_uint32_t _tmp66_; - gchar** filter = NULL; - int filter_length1; - gchar** _tmp67_; - int _tmp67__length; - int _tmp67__size; - int _tmp67__length1; - DBusMessageIter _tmp68_; - GHashTable** result; - int result_length1; - DBusMessage* reply; - GHashTable** _tmp70_; - DBusMessageIter _tmp71_; - int _tmp72_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uuas")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp65_); - dbus_message_iter_next (&iter); - offset = _tmp65_; - dbus_message_iter_get_basic (&iter, &_tmp66_); - dbus_message_iter_next (&iter); - max = _tmp66_; - filter_length1 = 0; - _tmp67_ = g_new (gchar*, 5); - _tmp67__length = 0; - _tmp67__size = 4; - _tmp67__length1 = 0; - dbus_message_iter_recurse (&iter, &_tmp68_); - for (; dbus_message_iter_get_arg_type (&_tmp68_); _tmp67__length1++) { - const char* _tmp69_; - if (_tmp67__size == _tmp67__length) { - _tmp67__size = 2 * _tmp67__size; - _tmp67_ = g_renew (gchar*, _tmp67_, _tmp67__size + 1); - } - dbus_message_iter_get_basic (&_tmp68_, &_tmp69_); - dbus_message_iter_next (&_tmp68_); - _tmp67_[_tmp67__length++] = g_strdup (_tmp69_); - } - filter_length1 = _tmp67__length1; - _tmp67_[_tmp67__length] = NULL; - dbus_message_iter_next (&iter); - filter = _tmp67_; - result_length1 = 0; - result = media_container2_ListItems (self, offset, max, filter, filter_length1, &result_length1, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - filter = (_vala_array_free (filter, filter_length1, (GDestroyNotify) g_free), NULL); - _tmp70_ = result; - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "a{sv}", &_tmp71_); - for (_tmp72_ = 0; _tmp72_ < result_length1; _tmp72_++) { - DBusMessageIter _tmp73_, _tmp74_; - GHashTableIter _tmp75_; - gpointer _tmp76_, _tmp77_; - dbus_message_iter_open_container (&_tmp71_, DBUS_TYPE_ARRAY, "{sv}", &_tmp73_); - g_hash_table_iter_init (&_tmp75_, *_tmp70_); - while (g_hash_table_iter_next (&_tmp75_, &_tmp76_, &_tmp77_)) { - gchar* _key; - GValue* _value; - const char* _tmp78_; - DBusMessageIter _tmp79_; - dbus_message_iter_open_container (&_tmp73_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp74_); - _key = (gchar*) _tmp76_; - _value = (GValue*) _tmp77_; - _tmp78_ = _key; - dbus_message_iter_append_basic (&_tmp74_, DBUS_TYPE_STRING, &_tmp78_); - if (G_VALUE_TYPE (_value) == G_TYPE_UCHAR) { - guint8 _tmp80_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "y", &_tmp79_); - _tmp80_ = g_value_get_uchar (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_BYTE, &_tmp80_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_BOOLEAN) { - dbus_bool_t _tmp81_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "b", &_tmp79_); - _tmp81_ = g_value_get_boolean (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_BOOLEAN, &_tmp81_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_INT) { - dbus_int32_t _tmp82_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "i", &_tmp79_); - _tmp82_ = g_value_get_int (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_INT32, &_tmp82_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_UINT) { - dbus_uint32_t _tmp83_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "u", &_tmp79_); - _tmp83_ = g_value_get_uint (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_UINT32, &_tmp83_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_INT64) { - dbus_int64_t _tmp84_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "x", &_tmp79_); - _tmp84_ = g_value_get_int64 (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_INT64, &_tmp84_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_UINT64) { - dbus_uint64_t _tmp85_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "t", &_tmp79_); - _tmp85_ = g_value_get_uint64 (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_UINT64, &_tmp85_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_DOUBLE) { - double _tmp86_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "d", &_tmp79_); - _tmp86_ = g_value_get_double (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_DOUBLE, &_tmp86_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_STRING) { - const char* _tmp87_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "s", &_tmp79_); - _tmp87_ = g_value_get_string (_value); - dbus_message_iter_append_basic (&_tmp79_, DBUS_TYPE_STRING, &_tmp87_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } else if (G_VALUE_TYPE (_value) == G_TYPE_STRV) { - const gchar** _tmp88_; - DBusMessageIter _tmp89_; - int _tmp90_; - dbus_message_iter_open_container (&_tmp74_, DBUS_TYPE_VARIANT, "as", &_tmp79_); - _tmp88_ = g_value_get_boxed (_value); - dbus_message_iter_open_container (&_tmp79_, DBUS_TYPE_ARRAY, "s", &_tmp89_); - for (_tmp90_ = 0; _tmp90_ < g_strv_length (g_value_get_boxed (_value)); _tmp90_++) { - const char* _tmp91_; - _tmp91_ = *_tmp88_; - dbus_message_iter_append_basic (&_tmp89_, DBUS_TYPE_STRING, &_tmp91_); - _tmp88_++; - } - dbus_message_iter_close_container (&_tmp79_, &_tmp89_); - dbus_message_iter_close_container (&_tmp74_, &_tmp79_); - } - dbus_message_iter_close_container (&_tmp73_, &_tmp74_); - } - dbus_message_iter_close_container (&_tmp71_, &_tmp73_); - _tmp70_++; - } - dbus_message_iter_close_container (&iter, &_tmp71_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +guint media_container2_get_ChildCount (MediaContainer2* self) { + g_return_val_if_fail (self != NULL, 0U); + return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_ChildCount (self); } -DBusHandlerResult media_container2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_media_container2_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "Get")) { - result = _dbus_media_container2_property_get (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_media_container2_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.UPnP.MediaContainer2", "ListChildren")) { - result = _dbus_media_container2_ListChildren (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.UPnP.MediaContainer2", "ListContainers")) { - result = _dbus_media_container2_ListContainers (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.UPnP.MediaContainer2", "ListItems")) { - result = _dbus_media_container2_ListItems (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +guint media_container2_get_ItemCount (MediaContainer2* self) { + g_return_val_if_fail (self != NULL, 0U); + return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_ItemCount (self); } -static void _dbus_media_container2_updated (GObject* _sender, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.UPnP.MediaContainer2", "Updated"); - dbus_message_iter_init_append (_message, &_iter); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); +guint media_container2_get_ContainerCount (MediaContainer2* self) { + g_return_val_if_fail (self != NULL, 0U); + return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_ContainerCount (self); } -void media_container2_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_media_container2_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "updated", (GCallback) _dbus_media_container2_updated, connection); +gboolean media_container2_get_Searchable (MediaContainer2* self) { + g_return_val_if_fail (self != NULL, FALSE); + return MEDIA_CONTAINER2_GET_INTERFACE (self)->get_Searchable (self); } @@ -1820,12 +528,7 @@ static gboolean initialized = FALSE; if (!initialized) { initialized = TRUE; - g_object_interface_install_property (iface, g_param_spec_uint ("ChildCount", "ChildCount", "ChildCount", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_uint ("ItemCount", "ItemCount", "ItemCount", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_uint ("ContainerCount", "ContainerCount", "ContainerCount", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_boolean ("Searchable", "Searchable", "Searchable", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); g_signal_new ("updated", TYPE_MEDIA_CONTAINER2, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - g_type_set_qdata (TYPE_MEDIA_CONTAINER2, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_media_container2_dbus_vtable)); } } @@ -1837,1052 +540,377 @@ GType media_container2_type_id; media_container2_type_id = g_type_register_static (G_TYPE_INTERFACE, "MediaContainer2", &g_define_type_info, 0); g_type_interface_add_prerequisite (media_container2_type_id, G_TYPE_OBJECT); - g_type_set_qdata (media_container2_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &media_container2_dbus_proxy_get_type); + g_type_set_qdata (media_container2_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) media_container2_proxy_get_type); + g_type_set_qdata (media_container2_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.UPnP.MediaContainer2"); + g_type_set_qdata (media_container2_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) media_container2_register_object); g_once_init_leave (&media_container2_type_id__volatile, media_container2_type_id); } return media_container2_type_id__volatile; } -G_DEFINE_TYPE_EXTENDED (MediaContainer2DBusProxy, media_container2_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_CONTAINER2, media_container2_dbus_proxy_media_container2__interface_init) ); -MediaContainer2* media_container2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - MediaContainer2* self; - self = g_object_new (media_container2_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.UPnP.MediaContainer2", NULL); - return self; +G_DEFINE_TYPE_EXTENDED (MediaContainer2Proxy, media_container2_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_CONTAINER2, media_container2_proxy_media_container2_interface_init) ) +static void media_container2_proxy_class_init (MediaContainer2ProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = media_container2_proxy_g_signal; } -static GObject* media_container2_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (media_container2_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), media_container2_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_media_container2_updated (MediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "")) { - return; - } - dbus_message_iter_init (message, &iter); +static void _dbus_handle_media_container2_updated (MediaContainer2* self, GVariant* parameters) { + GVariantIter _arguments_iter; + g_variant_iter_init (&_arguments_iter, parameters); g_signal_emit_by_name (self, "updated"); } -DBusHandlerResult media_container2_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.UPnP.MediaContainer2", "Updated")) { - _dbus_handle_media_container2_updated (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void media_container2_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((MediaContainer2DBusProxy*) self)->disposed) { - return; +static void media_container2_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "Updated") == 0) { + _dbus_handle_media_container2_updated ((MediaContainer2*) proxy, parameters); } - ((MediaContainer2DBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), media_container2_dbus_proxy_filter, self); - G_OBJECT_CLASS (media_container2_dbus_proxy_parent_class)->dispose (self); } -static void media_container2_dbus_proxy_class_init (MediaContainer2DBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = media_container2_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = media_container2_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_media_container2_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_media_container2_dbus_proxy_set_property; - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_CONTAINER2_DBUS_PROXY_CHILD_COUNT, "ChildCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_CONTAINER2_DBUS_PROXY_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_CONTAINER2_DBUS_PROXY_CONTAINER_COUNT, "ContainerCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_CONTAINER2_DBUS_PROXY_SEARCHABLE, "Searchable"); +static void media_container2_proxy_init (MediaContainer2Proxy* self) { } -static void media_container2_dbus_proxy_init (MediaContainer2DBusProxy* self) { -} - - -static GHashTable** media_container2_dbus_proxy_ListChildren (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp493_; - dbus_uint32_t _tmp494_; - gchar** _tmp495_; - DBusMessageIter _tmp496_; - int _tmp497_; +static GHashTable** media_container2_proxy_ListChildren (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + gchar** _tmp439_; + GVariantBuilder _tmp440_; + int _tmp441_; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; GHashTable** _result; int _result_length1; - GHashTable** _tmp499_; - int _tmp499__length; - int _tmp499__size; - int _tmp499__length1; - DBusMessageIter _tmp500_; - if (((MediaContainer2DBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp442_; + GHashTable** _tmp443_; + int _tmp443__length; + int _tmp443__size; + int _tmp443__length1; + GVariantIter _tmp444_; + GVariant* _tmp445_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.UPnP.MediaContainer2", "ListChildren"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (offset)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (max)); + _tmp439_ = filter; + g_variant_builder_init (&_tmp440_, G_VARIANT_TYPE ("as")); + for (_tmp441_ = 0; _tmp441_ < filter_length1; _tmp441_++) { + g_variant_builder_add_value (&_tmp440_, g_variant_new_string (*_tmp439_)); + _tmp439_++; + } + g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp440_)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.UPnP.MediaContainer2", "ListChildren"); - dbus_message_iter_init_append (_message, &_iter); - _tmp493_ = offset; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp493_); - _tmp494_ = max; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp494_); - _tmp495_ = filter; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "s", &_tmp496_); - for (_tmp497_ = 0; _tmp497_ < filter_length1; _tmp497_++) { - const char* _tmp498_; - _tmp498_ = *_tmp495_; - dbus_message_iter_append_basic (&_tmp496_, DBUS_TYPE_STRING, &_tmp498_); - _tmp495_++; - } - dbus_message_iter_close_container (&_iter, &_tmp496_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp522_; - _edomain = DBUS_GERROR; - _tmp522_ = _dbus_error.name + 27; - if (strcmp (_tmp522_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp522_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp522_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp522_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp522_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp522_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp522_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp522_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp522_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp522_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp522_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp522_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp522_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp522_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp522_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp522_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp522_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp522_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp522_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp522_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp522_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp522_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp522_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp522_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp522_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp522_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp522_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp522_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp522_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp522_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp522_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp522_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp522_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "aa{sv}")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aa{sv}", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); _result_length1 = 0; - _tmp499_ = g_new (GHashTable*, 5); - _tmp499__length = 0; - _tmp499__size = 4; - _tmp499__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp500_); - for (; dbus_message_iter_get_arg_type (&_tmp500_); _tmp499__length1++) { - GHashTable* _tmp501_; - DBusMessageIter _tmp502_; - DBusMessageIter _tmp503_; - if (_tmp499__size == _tmp499__length) { - _tmp499__size = 2 * _tmp499__size; - _tmp499_ = g_renew (GHashTable*, _tmp499_, _tmp499__size + 1); - } - _tmp501_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); - dbus_message_iter_recurse (&_tmp500_, &_tmp502_); - while (dbus_message_iter_get_arg_type (&_tmp502_)) { - gchar* _key; - GValue* _value; - const char* _tmp504_; - GValue _tmp505_ = {0}; - DBusMessageIter _tmp506_; - dbus_message_iter_recurse (&_tmp502_, &_tmp503_); - dbus_message_iter_get_basic (&_tmp503_, &_tmp504_); - dbus_message_iter_next (&_tmp503_); - _key = g_strdup (_tmp504_); - dbus_message_iter_recurse (&_tmp503_, &_tmp506_); - if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_BYTE) { - guint8 _tmp507_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp507_); - g_value_init (&_tmp505_, G_TYPE_UCHAR); - g_value_set_uchar (&_tmp505_, _tmp507_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_BOOLEAN) { - dbus_bool_t _tmp508_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp508_); - g_value_init (&_tmp505_, G_TYPE_BOOLEAN); - g_value_set_boolean (&_tmp505_, _tmp508_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_INT16) { - dbus_int16_t _tmp509_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp509_); - g_value_init (&_tmp505_, G_TYPE_INT); - g_value_set_int (&_tmp505_, _tmp509_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_UINT16) { - dbus_uint16_t _tmp510_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp510_); - g_value_init (&_tmp505_, G_TYPE_UINT); - g_value_set_uint (&_tmp505_, _tmp510_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_INT32) { - dbus_int32_t _tmp511_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp511_); - g_value_init (&_tmp505_, G_TYPE_INT); - g_value_set_int (&_tmp505_, _tmp511_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_UINT32) { - dbus_uint32_t _tmp512_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp512_); - g_value_init (&_tmp505_, G_TYPE_UINT); - g_value_set_uint (&_tmp505_, _tmp512_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_INT64) { - dbus_int64_t _tmp513_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp513_); - g_value_init (&_tmp505_, G_TYPE_INT64); - g_value_set_int64 (&_tmp505_, _tmp513_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_UINT64) { - dbus_uint64_t _tmp514_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp514_); - g_value_init (&_tmp505_, G_TYPE_UINT64); - g_value_set_uint64 (&_tmp505_, _tmp514_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_DOUBLE) { - double _tmp515_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp515_); - g_value_init (&_tmp505_, G_TYPE_DOUBLE); - g_value_set_double (&_tmp505_, _tmp515_); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_STRING) { - const char* _tmp516_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp516_); - g_value_init (&_tmp505_, G_TYPE_STRING); - g_value_take_string (&_tmp505_, g_strdup (_tmp516_)); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_OBJECT_PATH) { - const char* _tmp517_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp517_); - g_value_init (&_tmp505_, G_TYPE_STRING); - g_value_take_string (&_tmp505_, g_strdup (_tmp517_)); - } else if (dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_SIGNATURE) { - const char* _tmp518_; - dbus_message_iter_get_basic (&_tmp506_, &_tmp518_); - g_value_init (&_tmp505_, G_TYPE_STRING); - g_value_take_string (&_tmp505_, g_strdup (_tmp518_)); - } else if ((dbus_message_iter_get_arg_type (&_tmp506_) == DBUS_TYPE_ARRAY) && (dbus_message_iter_get_element_type (&_tmp506_) == DBUS_TYPE_STRING)) { - const gchar** _tmp519_; - int _tmp519__length; - int _tmp519__size; - int _tmp519__length1; - DBusMessageIter _tmp520_; - _tmp519_ = g_new (const gchar*, 5); - _tmp519__length = 0; - _tmp519__size = 4; - _tmp519__length1 = 0; - dbus_message_iter_recurse (&_tmp506_, &_tmp520_); - for (; dbus_message_iter_get_arg_type (&_tmp520_); _tmp519__length1++) { - const char* _tmp521_; - if (_tmp519__size == _tmp519__length) { - _tmp519__size = 2 * _tmp519__size; - _tmp519_ = g_renew (const gchar*, _tmp519_, _tmp519__size + 1); - } - dbus_message_iter_get_basic (&_tmp520_, &_tmp521_); - dbus_message_iter_next (&_tmp520_); - _tmp519_[_tmp519__length++] = g_strdup (_tmp521_); - } - _tmp519_[_tmp519__length] = NULL; - g_value_init (&_tmp505_, G_TYPE_STRV); - g_value_take_boxed (&_tmp505_, _tmp519_); - } - dbus_message_iter_next (&_tmp503_); - _value = g_memdup (&_tmp505_, sizeof (GValue)); - g_hash_table_insert (_tmp501_, _key, _value); - dbus_message_iter_next (&_tmp502_); - } - dbus_message_iter_next (&_tmp500_); - _tmp499_[_tmp499__length++] = _tmp501_; - } - _result_length1 = _tmp499__length1; - _tmp499_[_tmp499__length] = NULL; - dbus_message_iter_next (&_iter); - _result = _tmp499_; + _tmp442_ = g_variant_iter_next_value (&_reply_iter); + _tmp443_ = g_new (GHashTable*, 5); + _tmp443__length = 0; + _tmp443__size = 4; + _tmp443__length1 = 0; + g_variant_iter_init (&_tmp444_, _tmp442_); + for (; (_tmp445_ = g_variant_iter_next_value (&_tmp444_)) != NULL; _tmp443__length1++) { + GHashTable* _tmp446_; + GVariantIter _tmp447_; + GVariant* _tmp448_; + GVariant* _tmp449_; + if (_tmp443__size == _tmp443__length) { + _tmp443__size = 2 * _tmp443__size; + _tmp443_ = g_renew (GHashTable*, _tmp443_, _tmp443__size + 1); + } + _tmp446_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + g_variant_iter_init (&_tmp447_, _tmp445_); + while (g_variant_iter_loop (&_tmp447_, "{?*}", &_tmp448_, &_tmp449_)) { + g_hash_table_insert (_tmp446_, g_variant_dup_string (_tmp448_, NULL), g_variant_get_variant (_tmp449_)); + } + _tmp443_[_tmp443__length++] = _tmp446_; + g_variant_unref (_tmp445_); + } + _result_length1 = _tmp443__length1; + _tmp443_[_tmp443__length] = NULL; + _result = _tmp443_; + g_variant_unref (_tmp442_); *result_length1 = _result_length1; - dbus_message_unref (_reply); + g_object_unref (_reply_message); return _result; } -static GHashTable** media_container2_dbus_proxy_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp523_; - dbus_uint32_t _tmp524_; - gchar** _tmp525_; - DBusMessageIter _tmp526_; - int _tmp527_; +static GHashTable** media_container2_proxy_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + gchar** _tmp450_; + GVariantBuilder _tmp451_; + int _tmp452_; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; GHashTable** _result; int _result_length1; - GHashTable** _tmp529_; - int _tmp529__length; - int _tmp529__size; - int _tmp529__length1; - DBusMessageIter _tmp530_; - if (((MediaContainer2DBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp453_; + GHashTable** _tmp454_; + int _tmp454__length; + int _tmp454__size; + int _tmp454__length1; + GVariantIter _tmp455_; + GVariant* _tmp456_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.UPnP.MediaContainer2", "ListContainers"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (offset)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (max)); + _tmp450_ = filter; + g_variant_builder_init (&_tmp451_, G_VARIANT_TYPE ("as")); + for (_tmp452_ = 0; _tmp452_ < filter_length1; _tmp452_++) { + g_variant_builder_add_value (&_tmp451_, g_variant_new_string (*_tmp450_)); + _tmp450_++; + } + g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp451_)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.UPnP.MediaContainer2", "ListContainers"); - dbus_message_iter_init_append (_message, &_iter); - _tmp523_ = offset; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp523_); - _tmp524_ = max; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp524_); - _tmp525_ = filter; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "s", &_tmp526_); - for (_tmp527_ = 0; _tmp527_ < filter_length1; _tmp527_++) { - const char* _tmp528_; - _tmp528_ = *_tmp525_; - dbus_message_iter_append_basic (&_tmp526_, DBUS_TYPE_STRING, &_tmp528_); - _tmp525_++; - } - dbus_message_iter_close_container (&_iter, &_tmp526_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp552_; - _edomain = DBUS_GERROR; - _tmp552_ = _dbus_error.name + 27; - if (strcmp (_tmp552_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp552_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp552_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp552_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp552_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp552_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp552_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp552_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp552_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp552_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp552_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp552_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp552_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp552_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp552_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp552_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp552_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp552_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp552_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp552_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp552_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp552_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp552_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp552_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp552_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp552_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp552_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp552_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp552_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp552_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp552_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp552_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp552_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "aa{sv}")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aa{sv}", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); _result_length1 = 0; - _tmp529_ = g_new (GHashTable*, 5); - _tmp529__length = 0; - _tmp529__size = 4; - _tmp529__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp530_); - for (; dbus_message_iter_get_arg_type (&_tmp530_); _tmp529__length1++) { - GHashTable* _tmp531_; - DBusMessageIter _tmp532_; - DBusMessageIter _tmp533_; - if (_tmp529__size == _tmp529__length) { - _tmp529__size = 2 * _tmp529__size; - _tmp529_ = g_renew (GHashTable*, _tmp529_, _tmp529__size + 1); - } - _tmp531_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); - dbus_message_iter_recurse (&_tmp530_, &_tmp532_); - while (dbus_message_iter_get_arg_type (&_tmp532_)) { - gchar* _key; - GValue* _value; - const char* _tmp534_; - GValue _tmp535_ = {0}; - DBusMessageIter _tmp536_; - dbus_message_iter_recurse (&_tmp532_, &_tmp533_); - dbus_message_iter_get_basic (&_tmp533_, &_tmp534_); - dbus_message_iter_next (&_tmp533_); - _key = g_strdup (_tmp534_); - dbus_message_iter_recurse (&_tmp533_, &_tmp536_); - if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_BYTE) { - guint8 _tmp537_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp537_); - g_value_init (&_tmp535_, G_TYPE_UCHAR); - g_value_set_uchar (&_tmp535_, _tmp537_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_BOOLEAN) { - dbus_bool_t _tmp538_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp538_); - g_value_init (&_tmp535_, G_TYPE_BOOLEAN); - g_value_set_boolean (&_tmp535_, _tmp538_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_INT16) { - dbus_int16_t _tmp539_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp539_); - g_value_init (&_tmp535_, G_TYPE_INT); - g_value_set_int (&_tmp535_, _tmp539_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_UINT16) { - dbus_uint16_t _tmp540_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp540_); - g_value_init (&_tmp535_, G_TYPE_UINT); - g_value_set_uint (&_tmp535_, _tmp540_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_INT32) { - dbus_int32_t _tmp541_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp541_); - g_value_init (&_tmp535_, G_TYPE_INT); - g_value_set_int (&_tmp535_, _tmp541_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_UINT32) { - dbus_uint32_t _tmp542_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp542_); - g_value_init (&_tmp535_, G_TYPE_UINT); - g_value_set_uint (&_tmp535_, _tmp542_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_INT64) { - dbus_int64_t _tmp543_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp543_); - g_value_init (&_tmp535_, G_TYPE_INT64); - g_value_set_int64 (&_tmp535_, _tmp543_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_UINT64) { - dbus_uint64_t _tmp544_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp544_); - g_value_init (&_tmp535_, G_TYPE_UINT64); - g_value_set_uint64 (&_tmp535_, _tmp544_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_DOUBLE) { - double _tmp545_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp545_); - g_value_init (&_tmp535_, G_TYPE_DOUBLE); - g_value_set_double (&_tmp535_, _tmp545_); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_STRING) { - const char* _tmp546_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp546_); - g_value_init (&_tmp535_, G_TYPE_STRING); - g_value_take_string (&_tmp535_, g_strdup (_tmp546_)); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_OBJECT_PATH) { - const char* _tmp547_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp547_); - g_value_init (&_tmp535_, G_TYPE_STRING); - g_value_take_string (&_tmp535_, g_strdup (_tmp547_)); - } else if (dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_SIGNATURE) { - const char* _tmp548_; - dbus_message_iter_get_basic (&_tmp536_, &_tmp548_); - g_value_init (&_tmp535_, G_TYPE_STRING); - g_value_take_string (&_tmp535_, g_strdup (_tmp548_)); - } else if ((dbus_message_iter_get_arg_type (&_tmp536_) == DBUS_TYPE_ARRAY) && (dbus_message_iter_get_element_type (&_tmp536_) == DBUS_TYPE_STRING)) { - const gchar** _tmp549_; - int _tmp549__length; - int _tmp549__size; - int _tmp549__length1; - DBusMessageIter _tmp550_; - _tmp549_ = g_new (const gchar*, 5); - _tmp549__length = 0; - _tmp549__size = 4; - _tmp549__length1 = 0; - dbus_message_iter_recurse (&_tmp536_, &_tmp550_); - for (; dbus_message_iter_get_arg_type (&_tmp550_); _tmp549__length1++) { - const char* _tmp551_; - if (_tmp549__size == _tmp549__length) { - _tmp549__size = 2 * _tmp549__size; - _tmp549_ = g_renew (const gchar*, _tmp549_, _tmp549__size + 1); - } - dbus_message_iter_get_basic (&_tmp550_, &_tmp551_); - dbus_message_iter_next (&_tmp550_); - _tmp549_[_tmp549__length++] = g_strdup (_tmp551_); - } - _tmp549_[_tmp549__length] = NULL; - g_value_init (&_tmp535_, G_TYPE_STRV); - g_value_take_boxed (&_tmp535_, _tmp549_); - } - dbus_message_iter_next (&_tmp533_); - _value = g_memdup (&_tmp535_, sizeof (GValue)); - g_hash_table_insert (_tmp531_, _key, _value); - dbus_message_iter_next (&_tmp532_); - } - dbus_message_iter_next (&_tmp530_); - _tmp529_[_tmp529__length++] = _tmp531_; - } - _result_length1 = _tmp529__length1; - _tmp529_[_tmp529__length] = NULL; - dbus_message_iter_next (&_iter); - _result = _tmp529_; + _tmp453_ = g_variant_iter_next_value (&_reply_iter); + _tmp454_ = g_new (GHashTable*, 5); + _tmp454__length = 0; + _tmp454__size = 4; + _tmp454__length1 = 0; + g_variant_iter_init (&_tmp455_, _tmp453_); + for (; (_tmp456_ = g_variant_iter_next_value (&_tmp455_)) != NULL; _tmp454__length1++) { + GHashTable* _tmp457_; + GVariantIter _tmp458_; + GVariant* _tmp459_; + GVariant* _tmp460_; + if (_tmp454__size == _tmp454__length) { + _tmp454__size = 2 * _tmp454__size; + _tmp454_ = g_renew (GHashTable*, _tmp454_, _tmp454__size + 1); + } + _tmp457_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + g_variant_iter_init (&_tmp458_, _tmp456_); + while (g_variant_iter_loop (&_tmp458_, "{?*}", &_tmp459_, &_tmp460_)) { + g_hash_table_insert (_tmp457_, g_variant_dup_string (_tmp459_, NULL), g_variant_get_variant (_tmp460_)); + } + _tmp454_[_tmp454__length++] = _tmp457_; + g_variant_unref (_tmp456_); + } + _result_length1 = _tmp454__length1; + _tmp454_[_tmp454__length] = NULL; + _result = _tmp454_; + g_variant_unref (_tmp453_); *result_length1 = _result_length1; - dbus_message_unref (_reply); + g_object_unref (_reply_message); return _result; } -static GHashTable** media_container2_dbus_proxy_ListItems (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp553_; - dbus_uint32_t _tmp554_; - gchar** _tmp555_; - DBusMessageIter _tmp556_; - int _tmp557_; +static GHashTable** media_container2_proxy_ListItems (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + gchar** _tmp461_; + GVariantBuilder _tmp462_; + int _tmp463_; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; GHashTable** _result; int _result_length1; - GHashTable** _tmp559_; - int _tmp559__length; - int _tmp559__size; - int _tmp559__length1; - DBusMessageIter _tmp560_; - if (((MediaContainer2DBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.UPnP.MediaContainer2", "ListItems"); - dbus_message_iter_init_append (_message, &_iter); - _tmp553_ = offset; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp553_); - _tmp554_ = max; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp554_); - _tmp555_ = filter; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "s", &_tmp556_); - for (_tmp557_ = 0; _tmp557_ < filter_length1; _tmp557_++) { - const char* _tmp558_; - _tmp558_ = *_tmp555_; - dbus_message_iter_append_basic (&_tmp556_, DBUS_TYPE_STRING, &_tmp558_); - _tmp555_++; - } - dbus_message_iter_close_container (&_iter, &_tmp556_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp582_; - _edomain = DBUS_GERROR; - _tmp582_ = _dbus_error.name + 27; - if (strcmp (_tmp582_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp582_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp582_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp582_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp582_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp582_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp582_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp582_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp582_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp582_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp582_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp582_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp582_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp582_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp582_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp582_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp582_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp582_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp582_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp582_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp582_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp582_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp582_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp582_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp582_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp582_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp582_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp582_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp582_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp582_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp582_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp582_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp582_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp464_; + GHashTable** _tmp465_; + int _tmp465__length; + int _tmp465__size; + int _tmp465__length1; + GVariantIter _tmp466_; + GVariant* _tmp467_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.UPnP.MediaContainer2", "ListItems"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (offset)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (max)); + _tmp461_ = filter; + g_variant_builder_init (&_tmp462_, G_VARIANT_TYPE ("as")); + for (_tmp463_ = 0; _tmp463_ < filter_length1; _tmp463_++) { + g_variant_builder_add_value (&_tmp462_, g_variant_new_string (*_tmp461_)); + _tmp461_++; + } + g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp462_)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return NULL; } - if (strcmp (dbus_message_get_signature (_reply), "aa{sv}")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "aa{sv}", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return NULL; } - dbus_message_iter_init (_reply, &_iter); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); _result_length1 = 0; - _tmp559_ = g_new (GHashTable*, 5); - _tmp559__length = 0; - _tmp559__size = 4; - _tmp559__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp560_); - for (; dbus_message_iter_get_arg_type (&_tmp560_); _tmp559__length1++) { - GHashTable* _tmp561_; - DBusMessageIter _tmp562_; - DBusMessageIter _tmp563_; - if (_tmp559__size == _tmp559__length) { - _tmp559__size = 2 * _tmp559__size; - _tmp559_ = g_renew (GHashTable*, _tmp559_, _tmp559__size + 1); - } - _tmp561_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); - dbus_message_iter_recurse (&_tmp560_, &_tmp562_); - while (dbus_message_iter_get_arg_type (&_tmp562_)) { - gchar* _key; - GValue* _value; - const char* _tmp564_; - GValue _tmp565_ = {0}; - DBusMessageIter _tmp566_; - dbus_message_iter_recurse (&_tmp562_, &_tmp563_); - dbus_message_iter_get_basic (&_tmp563_, &_tmp564_); - dbus_message_iter_next (&_tmp563_); - _key = g_strdup (_tmp564_); - dbus_message_iter_recurse (&_tmp563_, &_tmp566_); - if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_BYTE) { - guint8 _tmp567_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp567_); - g_value_init (&_tmp565_, G_TYPE_UCHAR); - g_value_set_uchar (&_tmp565_, _tmp567_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_BOOLEAN) { - dbus_bool_t _tmp568_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp568_); - g_value_init (&_tmp565_, G_TYPE_BOOLEAN); - g_value_set_boolean (&_tmp565_, _tmp568_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_INT16) { - dbus_int16_t _tmp569_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp569_); - g_value_init (&_tmp565_, G_TYPE_INT); - g_value_set_int (&_tmp565_, _tmp569_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_UINT16) { - dbus_uint16_t _tmp570_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp570_); - g_value_init (&_tmp565_, G_TYPE_UINT); - g_value_set_uint (&_tmp565_, _tmp570_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_INT32) { - dbus_int32_t _tmp571_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp571_); - g_value_init (&_tmp565_, G_TYPE_INT); - g_value_set_int (&_tmp565_, _tmp571_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_UINT32) { - dbus_uint32_t _tmp572_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp572_); - g_value_init (&_tmp565_, G_TYPE_UINT); - g_value_set_uint (&_tmp565_, _tmp572_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_INT64) { - dbus_int64_t _tmp573_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp573_); - g_value_init (&_tmp565_, G_TYPE_INT64); - g_value_set_int64 (&_tmp565_, _tmp573_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_UINT64) { - dbus_uint64_t _tmp574_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp574_); - g_value_init (&_tmp565_, G_TYPE_UINT64); - g_value_set_uint64 (&_tmp565_, _tmp574_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_DOUBLE) { - double _tmp575_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp575_); - g_value_init (&_tmp565_, G_TYPE_DOUBLE); - g_value_set_double (&_tmp565_, _tmp575_); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_STRING) { - const char* _tmp576_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp576_); - g_value_init (&_tmp565_, G_TYPE_STRING); - g_value_take_string (&_tmp565_, g_strdup (_tmp576_)); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_OBJECT_PATH) { - const char* _tmp577_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp577_); - g_value_init (&_tmp565_, G_TYPE_STRING); - g_value_take_string (&_tmp565_, g_strdup (_tmp577_)); - } else if (dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_SIGNATURE) { - const char* _tmp578_; - dbus_message_iter_get_basic (&_tmp566_, &_tmp578_); - g_value_init (&_tmp565_, G_TYPE_STRING); - g_value_take_string (&_tmp565_, g_strdup (_tmp578_)); - } else if ((dbus_message_iter_get_arg_type (&_tmp566_) == DBUS_TYPE_ARRAY) && (dbus_message_iter_get_element_type (&_tmp566_) == DBUS_TYPE_STRING)) { - const gchar** _tmp579_; - int _tmp579__length; - int _tmp579__size; - int _tmp579__length1; - DBusMessageIter _tmp580_; - _tmp579_ = g_new (const gchar*, 5); - _tmp579__length = 0; - _tmp579__size = 4; - _tmp579__length1 = 0; - dbus_message_iter_recurse (&_tmp566_, &_tmp580_); - for (; dbus_message_iter_get_arg_type (&_tmp580_); _tmp579__length1++) { - const char* _tmp581_; - if (_tmp579__size == _tmp579__length) { - _tmp579__size = 2 * _tmp579__size; - _tmp579_ = g_renew (const gchar*, _tmp579_, _tmp579__size + 1); - } - dbus_message_iter_get_basic (&_tmp580_, &_tmp581_); - dbus_message_iter_next (&_tmp580_); - _tmp579_[_tmp579__length++] = g_strdup (_tmp581_); - } - _tmp579_[_tmp579__length] = NULL; - g_value_init (&_tmp565_, G_TYPE_STRV); - g_value_take_boxed (&_tmp565_, _tmp579_); - } - dbus_message_iter_next (&_tmp563_); - _value = g_memdup (&_tmp565_, sizeof (GValue)); - g_hash_table_insert (_tmp561_, _key, _value); - dbus_message_iter_next (&_tmp562_); - } - dbus_message_iter_next (&_tmp560_); - _tmp559_[_tmp559__length++] = _tmp561_; - } - _result_length1 = _tmp559__length1; - _tmp559_[_tmp559__length] = NULL; - dbus_message_iter_next (&_iter); - _result = _tmp559_; + _tmp464_ = g_variant_iter_next_value (&_reply_iter); + _tmp465_ = g_new (GHashTable*, 5); + _tmp465__length = 0; + _tmp465__size = 4; + _tmp465__length1 = 0; + g_variant_iter_init (&_tmp466_, _tmp464_); + for (; (_tmp467_ = g_variant_iter_next_value (&_tmp466_)) != NULL; _tmp465__length1++) { + GHashTable* _tmp468_; + GVariantIter _tmp469_; + GVariant* _tmp470_; + GVariant* _tmp471_; + if (_tmp465__size == _tmp465__length) { + _tmp465__size = 2 * _tmp465__size; + _tmp465_ = g_renew (GHashTable*, _tmp465_, _tmp465__size + 1); + } + _tmp468_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + g_variant_iter_init (&_tmp469_, _tmp467_); + while (g_variant_iter_loop (&_tmp469_, "{?*}", &_tmp470_, &_tmp471_)) { + g_hash_table_insert (_tmp468_, g_variant_dup_string (_tmp470_, NULL), g_variant_get_variant (_tmp471_)); + } + _tmp465_[_tmp465__length++] = _tmp468_; + g_variant_unref (_tmp467_); + } + _result_length1 = _tmp465__length1; + _tmp465_[_tmp465__length] = NULL; + _result = _tmp465_; + g_variant_unref (_tmp464_); *result_length1 = _result_length1; - dbus_message_unref (_reply); + g_object_unref (_reply_message); return _result; } static guint media_container2_dbus_proxy_get_ChildCount (MediaContainer2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp583_; - const char* _tmp584_; + GVariant *_inner_reply; guint _result; - dbus_uint32_t _tmp585_; - if (((MediaContainer2DBusProxy*) self)->disposed) { - return 0U; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp583_ = "org.gnome.UPnP.MediaContainer2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp583_); - _tmp584_ = "ChildCount"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp584_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return 0U; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "u")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "u", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_get_basic (&_subiter, &_tmp585_); - dbus_message_iter_next (&_subiter); - _result = _tmp585_; - dbus_message_unref (_reply); + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "ChildCount"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaContainer2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ChildCount")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return 0U; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); + } + _result = g_variant_get_uint32 (_inner_reply); + g_variant_unref (_inner_reply); return _result; } static guint media_container2_dbus_proxy_get_ItemCount (MediaContainer2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp586_; - const char* _tmp587_; + GVariant *_inner_reply; guint _result; - dbus_uint32_t _tmp588_; - if (((MediaContainer2DBusProxy*) self)->disposed) { - return 0U; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp586_ = "org.gnome.UPnP.MediaContainer2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp586_); - _tmp587_ = "ItemCount"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp587_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return 0U; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "u")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "u", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_get_basic (&_subiter, &_tmp588_); - dbus_message_iter_next (&_subiter); - _result = _tmp588_; - dbus_message_unref (_reply); + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "ItemCount"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaContainer2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ItemCount")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return 0U; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); + } + _result = g_variant_get_uint32 (_inner_reply); + g_variant_unref (_inner_reply); return _result; } static guint media_container2_dbus_proxy_get_ContainerCount (MediaContainer2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp589_; - const char* _tmp590_; + GVariant *_inner_reply; guint _result; - dbus_uint32_t _tmp591_; - if (((MediaContainer2DBusProxy*) self)->disposed) { - return 0U; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp589_ = "org.gnome.UPnP.MediaContainer2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp589_); - _tmp590_ = "ContainerCount"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp590_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return 0U; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "u")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "u", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_get_basic (&_subiter, &_tmp591_); - dbus_message_iter_next (&_subiter); - _result = _tmp591_; - dbus_message_unref (_reply); + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "ContainerCount"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaContainer2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ContainerCount")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return 0U; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); + } + _result = g_variant_get_uint32 (_inner_reply); + g_variant_unref (_inner_reply); return _result; } static gboolean media_container2_dbus_proxy_get_Searchable (MediaContainer2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp592_; - const char* _tmp593_; + GVariant *_inner_reply; gboolean _result; - dbus_bool_t _tmp594_; - if (((MediaContainer2DBusProxy*) self)->disposed) { - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp592_ = "org.gnome.UPnP.MediaContainer2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp592_); - _tmp593_ = "Searchable"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp593_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "b")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "b", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_get_basic (&_subiter, &_tmp594_); - dbus_message_iter_next (&_subiter); - _result = _tmp594_; - dbus_message_unref (_reply); + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Searchable"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaContainer2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Searchable")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return FALSE; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); + } + _result = g_variant_get_boolean (_inner_reply); + g_variant_unref (_inner_reply); return _result; } -static void media_container2_dbus_proxy_media_container2__interface_init (MediaContainer2Iface* iface) { - iface->ListChildren = media_container2_dbus_proxy_ListChildren; - iface->ListContainers = media_container2_dbus_proxy_ListContainers; - iface->ListItems = media_container2_dbus_proxy_ListItems; +static void media_container2_proxy_media_container2_interface_init (MediaContainer2Iface* iface) { + iface->ListChildren = media_container2_proxy_ListChildren; + iface->ListContainers = media_container2_proxy_ListContainers; + iface->ListItems = media_container2_proxy_ListItems; iface->get_ChildCount = media_container2_dbus_proxy_get_ChildCount; iface->get_ItemCount = media_container2_dbus_proxy_get_ItemCount; iface->get_ContainerCount = media_container2_dbus_proxy_get_ContainerCount; @@ -2890,214 +918,393 @@ } -static void _vala_media_container2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +static void _dbus_media_container2_ListChildren (MediaContainer2* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint offset = 0U; + GVariant* _tmp472_; + guint max = 0U; + GVariant* _tmp473_; + gchar** filter = NULL; + int filter_length1 = 0; + GVariant* _tmp474_; + gchar** _tmp475_; + int _tmp475__length; + int _tmp475__size; + int _tmp475__length1; + GVariantIter _tmp476_; + GVariant* _tmp477_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + GHashTable** result; + int result_length1 = 0; + GHashTable** _tmp478_; + GVariantBuilder _tmp479_; + int _tmp480_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp472_ = g_variant_iter_next_value (&_arguments_iter); + offset = g_variant_get_uint32 (_tmp472_); + g_variant_unref (_tmp472_); + _tmp473_ = g_variant_iter_next_value (&_arguments_iter); + max = g_variant_get_uint32 (_tmp473_); + g_variant_unref (_tmp473_); + _tmp474_ = g_variant_iter_next_value (&_arguments_iter); + _tmp475_ = g_new (gchar*, 5); + _tmp475__length = 0; + _tmp475__size = 4; + _tmp475__length1 = 0; + g_variant_iter_init (&_tmp476_, _tmp474_); + for (; (_tmp477_ = g_variant_iter_next_value (&_tmp476_)) != NULL; _tmp475__length1++) { + if (_tmp475__size == _tmp475__length) { + _tmp475__size = 2 * _tmp475__size; + _tmp475_ = g_renew (gchar*, _tmp475_, _tmp475__size + 1); + } + _tmp475_[_tmp475__length++] = g_variant_dup_string (_tmp477_, NULL); + g_variant_unref (_tmp477_); + } + filter_length1 = _tmp475__length1; + _tmp475_[_tmp475__length] = NULL; + filter = _tmp475_; + g_variant_unref (_tmp474_); + result = media_container2_ListChildren (self, offset, max, filter, filter_length1, &result_length1, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp478_ = result; + g_variant_builder_init (&_tmp479_, G_VARIANT_TYPE ("aa{sv}")); + for (_tmp480_ = 0; _tmp480_ < result_length1; _tmp480_++) { + GVariantBuilder _tmp481_; + GHashTableIter _tmp482_; + gpointer _tmp483_; + gpointer _tmp484_; + g_hash_table_iter_init (&_tmp482_, *_tmp478_); + g_variant_builder_init (&_tmp481_, G_VARIANT_TYPE ("a{sv}")); + while (g_hash_table_iter_next (&_tmp482_, &_tmp483_, &_tmp484_)) { + gchar* _key; + GVariant* _value; + _key = (gchar*) _tmp483_; + _value = (GVariant*) _tmp484_; + g_variant_builder_add (&_tmp481_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value)); + } + g_variant_builder_add_value (&_tmp479_, g_variant_builder_end (&_tmp481_)); + _tmp478_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp479_)); + result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + filter = (_vala_array_free (filter, filter_length1, (GDestroyNotify) g_free), NULL); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_media_container2_ListContainers (MediaContainer2* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint offset = 0U; + GVariant* _tmp485_; + guint max = 0U; + GVariant* _tmp486_; + gchar** filter = NULL; + int filter_length1 = 0; + GVariant* _tmp487_; + gchar** _tmp488_; + int _tmp488__length; + int _tmp488__size; + int _tmp488__length1; + GVariantIter _tmp489_; + GVariant* _tmp490_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + GHashTable** result; + int result_length1 = 0; + GHashTable** _tmp491_; + GVariantBuilder _tmp492_; + int _tmp493_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp485_ = g_variant_iter_next_value (&_arguments_iter); + offset = g_variant_get_uint32 (_tmp485_); + g_variant_unref (_tmp485_); + _tmp486_ = g_variant_iter_next_value (&_arguments_iter); + max = g_variant_get_uint32 (_tmp486_); + g_variant_unref (_tmp486_); + _tmp487_ = g_variant_iter_next_value (&_arguments_iter); + _tmp488_ = g_new (gchar*, 5); + _tmp488__length = 0; + _tmp488__size = 4; + _tmp488__length1 = 0; + g_variant_iter_init (&_tmp489_, _tmp487_); + for (; (_tmp490_ = g_variant_iter_next_value (&_tmp489_)) != NULL; _tmp488__length1++) { + if (_tmp488__size == _tmp488__length) { + _tmp488__size = 2 * _tmp488__size; + _tmp488_ = g_renew (gchar*, _tmp488_, _tmp488__size + 1); + } + _tmp488_[_tmp488__length++] = g_variant_dup_string (_tmp490_, NULL); + g_variant_unref (_tmp490_); + } + filter_length1 = _tmp488__length1; + _tmp488_[_tmp488__length] = NULL; + filter = _tmp488_; + g_variant_unref (_tmp487_); + result = media_container2_ListContainers (self, offset, max, filter, filter_length1, &result_length1, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp491_ = result; + g_variant_builder_init (&_tmp492_, G_VARIANT_TYPE ("aa{sv}")); + for (_tmp493_ = 0; _tmp493_ < result_length1; _tmp493_++) { + GVariantBuilder _tmp494_; + GHashTableIter _tmp495_; + gpointer _tmp496_; + gpointer _tmp497_; + g_hash_table_iter_init (&_tmp495_, *_tmp491_); + g_variant_builder_init (&_tmp494_, G_VARIANT_TYPE ("a{sv}")); + while (g_hash_table_iter_next (&_tmp495_, &_tmp496_, &_tmp497_)) { + gchar* _key; + GVariant* _value; + _key = (gchar*) _tmp496_; + _value = (GVariant*) _tmp497_; + g_variant_builder_add (&_tmp494_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value)); + } + g_variant_builder_add_value (&_tmp492_, g_variant_builder_end (&_tmp494_)); + _tmp491_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp492_)); + result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + filter = (_vala_array_free (filter, filter_length1, (GDestroyNotify) g_free), NULL); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static void _vala_media_container2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dbus_media_container2_ListItems (MediaContainer2* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint offset = 0U; + GVariant* _tmp498_; + guint max = 0U; + GVariant* _tmp499_; + gchar** filter = NULL; + int filter_length1 = 0; + GVariant* _tmp500_; + gchar** _tmp501_; + int _tmp501__length; + int _tmp501__size; + int _tmp501__length1; + GVariantIter _tmp502_; + GVariant* _tmp503_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + GHashTable** result; + int result_length1 = 0; + GHashTable** _tmp504_; + GVariantBuilder _tmp505_; + int _tmp506_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp498_ = g_variant_iter_next_value (&_arguments_iter); + offset = g_variant_get_uint32 (_tmp498_); + g_variant_unref (_tmp498_); + _tmp499_ = g_variant_iter_next_value (&_arguments_iter); + max = g_variant_get_uint32 (_tmp499_); + g_variant_unref (_tmp499_); + _tmp500_ = g_variant_iter_next_value (&_arguments_iter); + _tmp501_ = g_new (gchar*, 5); + _tmp501__length = 0; + _tmp501__size = 4; + _tmp501__length1 = 0; + g_variant_iter_init (&_tmp502_, _tmp500_); + for (; (_tmp503_ = g_variant_iter_next_value (&_tmp502_)) != NULL; _tmp501__length1++) { + if (_tmp501__size == _tmp501__length) { + _tmp501__size = 2 * _tmp501__size; + _tmp501_ = g_renew (gchar*, _tmp501_, _tmp501__size + 1); + } + _tmp501_[_tmp501__length++] = g_variant_dup_string (_tmp503_, NULL); + g_variant_unref (_tmp503_); + } + filter_length1 = _tmp501__length1; + _tmp501_[_tmp501__length] = NULL; + filter = _tmp501_; + g_variant_unref (_tmp500_); + result = media_container2_ListItems (self, offset, max, filter, filter_length1, &result_length1, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _tmp504_ = result; + g_variant_builder_init (&_tmp505_, G_VARIANT_TYPE ("aa{sv}")); + for (_tmp506_ = 0; _tmp506_ < result_length1; _tmp506_++) { + GVariantBuilder _tmp507_; + GHashTableIter _tmp508_; + gpointer _tmp509_; + gpointer _tmp510_; + g_hash_table_iter_init (&_tmp508_, *_tmp504_); + g_variant_builder_init (&_tmp507_, G_VARIANT_TYPE ("a{sv}")); + while (g_hash_table_iter_next (&_tmp508_, &_tmp509_, &_tmp510_)) { + gchar* _key; + GVariant* _value; + _key = (gchar*) _tmp509_; + _value = (GVariant*) _tmp510_; + g_variant_builder_add (&_tmp507_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value)); + } + g_variant_builder_add_value (&_tmp505_, g_variant_builder_end (&_tmp507_)); + _tmp504_++; + } + g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp505_)); + result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_hash_table_unref), NULL); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + filter = (_vala_array_free (filter, filter_length1, (GDestroyNotify) g_free), NULL); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -gchar** media_item2_get_URLs (MediaItem2* self, int* result_length1) { - return MEDIA_ITEM2_GET_INTERFACE (self)->get_URLs (self, result_length1); +static void media_container2_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "ListChildren") == 0) { + _dbus_media_container2_ListChildren (object, parameters, invocation); + } else if (strcmp (method_name, "ListContainers") == 0) { + _dbus_media_container2_ListContainers (object, parameters, invocation); + } else if (strcmp (method_name, "ListItems") == 0) { + _dbus_media_container2_ListItems (object, parameters, invocation); + } else { + g_object_unref (invocation); + } } -gchar* media_item2_get_MIMEType (MediaItem2* self) { - return MEDIA_ITEM2_GET_INTERFACE (self)->get_MIMEType (self); +static GVariant* _dbus_media_container2_get_ChildCount (MediaContainer2* self) { + guint result; + GVariant* _reply; + result = media_container2_get_ChildCount (self); + _reply = g_variant_new_uint32 (result); + return _reply; } -void _media_item2_dbus_unregister (DBusConnection* connection, void* _user_data_) { +static GVariant* _dbus_media_container2_get_ItemCount (MediaContainer2* self) { + guint result; + GVariant* _reply; + result = media_container2_get_ItemCount (self); + _reply = g_variant_new_uint32 (result); + return _reply; } -static DBusHandlerResult _dbus_media_item2_introspect (MediaItem2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +static GVariant* _dbus_media_container2_get_ContainerCount (MediaContainer2* self) { + guint result; + GVariant* _reply; + result = media_container2_get_ContainerCount (self); + _reply = g_variant_new_uint32 (result); + return _reply; } -static DBusHandlerResult _dbus_media_item2_property_get (MediaItem2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - char* property_name; - const char* _tmp1_; - if (strcmp (dbus_message_get_signature (message), "ss")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp1_); - if ((strcmp (interface_name, "org.gnome.UPnP.MediaItem2") == 0) && (strcmp (property_name, "URLs") == 0)) { - gchar** result; - int result_length1; - gchar** _tmp2_; - DBusMessageIter _tmp3_; - int _tmp4_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "as", &subiter); - result = media_item2_get_URLs (self, &result_length1); - _tmp2_ = result; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "s", &_tmp3_); - for (_tmp4_ = 0; _tmp4_ < result_length1; _tmp4_++) { - const char* _tmp5_; - _tmp5_ = *_tmp2_; - dbus_message_iter_append_basic (&_tmp3_, DBUS_TYPE_STRING, &_tmp5_); - _tmp2_++; - } - dbus_message_iter_close_container (&subiter, &_tmp3_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaItem2") == 0) && (strcmp (property_name, "MIMEType") == 0)) { - gchar* result; - const char* _tmp6_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); - result = media_item2_get_MIMEType (self); - _tmp6_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp6_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - g_free (property_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +static GVariant* _dbus_media_container2_get_Searchable (MediaContainer2* self) { + gboolean result; + GVariant* _reply; + result = media_container2_get_Searchable (self); + _reply = g_variant_new_boolean (result); + return _reply; } -static DBusHandlerResult _dbus_media_item2_property_get_all (MediaItem2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; - char* interface_name; - const char* _tmp7_; - const char* property_name; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp7_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp7_); - if (strcmp (interface_name, "org.gnome.UPnP.MediaItem2") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - { - gchar** result; - int result_length1; - gchar** _tmp8_; - DBusMessageIter _tmp9_; - int _tmp10_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "URLs"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "as", &value_iter); - result = media_item2_get_URLs (self, &result_length1); - _tmp8_ = result; - dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "s", &_tmp9_); - for (_tmp10_ = 0; _tmp10_ < result_length1; _tmp10_++) { - const char* _tmp11_; - _tmp11_ = *_tmp8_; - dbus_message_iter_append_basic (&_tmp9_, DBUS_TYPE_STRING, &_tmp11_); - _tmp8_++; - } - dbus_message_iter_close_container (&value_iter, &_tmp9_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gchar* result; - const char* _tmp12_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "MIMEType"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "s", &value_iter); - result = media_item2_get_MIMEType (self); - _tmp12_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp12_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +static GVariant* media_container2_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (property_name, "ChildCount") == 0) { + return _dbus_media_container2_get_ChildCount (object); + } else if (strcmp (property_name, "ItemCount") == 0) { + return _dbus_media_container2_get_ItemCount (object); + } else if (strcmp (property_name, "ContainerCount") == 0) { + return _dbus_media_container2_get_ContainerCount (object); + } else if (strcmp (property_name, "Searchable") == 0) { + return _dbus_media_container2_get_Searchable (object); } + return NULL; } -DBusHandlerResult media_item2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_media_item2_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "Get")) { - result = _dbus_media_item2_property_get (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_media_item2_property_get_all (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +static gboolean media_container2_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; +} + + +static void _dbus_media_container2_updated (GObject* _sender, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.UPnP.MediaContainer2", "Updated", _arguments, NULL); } -void media_item2_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_media_item2_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); +guint media_container2_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_media_container2_dbus_interface_info), &_media_container2_dbus_interface_vtable, data, _media_container2_unregister_object, error); + if (!result) { + return 0; } + g_signal_connect (object, "updated", (GCallback) _dbus_media_container2_updated, data); + return result; +} + + +static void _media_container2_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_media_container2_updated, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); +} + + +gchar** media_item2_get_URLs (MediaItem2* self, int* result_length1) { + g_return_val_if_fail (self != NULL, NULL); + return MEDIA_ITEM2_GET_INTERFACE (self)->get_URLs (self, result_length1); +} + + +gchar* media_item2_get_MIMEType (MediaItem2* self) { + g_return_val_if_fail (self != NULL, NULL); + return MEDIA_ITEM2_GET_INTERFACE (self)->get_MIMEType (self); } @@ -3105,9 +1312,6 @@ static gboolean initialized = FALSE; if (!initialized) { initialized = TRUE; - g_object_interface_install_property (iface, g_param_spec_boxed ("URLs", "URLs", "URLs", G_TYPE_STRV, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_string ("MIMEType", "MIMEType", "MIMEType", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_type_set_qdata (TYPE_MEDIA_ITEM2, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_media_item2_dbus_vtable)); } } @@ -3119,202 +1323,193 @@ GType media_item2_type_id; media_item2_type_id = g_type_register_static (G_TYPE_INTERFACE, "MediaItem2", &g_define_type_info, 0); g_type_interface_add_prerequisite (media_item2_type_id, G_TYPE_OBJECT); - g_type_set_qdata (media_item2_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &media_item2_dbus_proxy_get_type); + g_type_set_qdata (media_item2_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) media_item2_proxy_get_type); + g_type_set_qdata (media_item2_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.UPnP.MediaItem2"); + g_type_set_qdata (media_item2_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) media_item2_register_object); g_once_init_leave (&media_item2_type_id__volatile, media_item2_type_id); } return media_item2_type_id__volatile; } -G_DEFINE_TYPE_EXTENDED (MediaItem2DBusProxy, media_item2_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_ITEM2, media_item2_dbus_proxy_media_item2__interface_init) ); -MediaItem2* media_item2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - MediaItem2* self; - self = g_object_new (media_item2_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.UPnP.MediaItem2", NULL); - return self; -} - - -static GObject* media_item2_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (media_item2_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), media_item2_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -DBusHandlerResult media_item2_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void media_item2_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((MediaItem2DBusProxy*) self)->disposed) { - return; - } - ((MediaItem2DBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), media_item2_dbus_proxy_filter, self); - G_OBJECT_CLASS (media_item2_dbus_proxy_parent_class)->dispose (self); +G_DEFINE_TYPE_EXTENDED (MediaItem2Proxy, media_item2_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_ITEM2, media_item2_proxy_media_item2_interface_init) ) +static void media_item2_proxy_class_init (MediaItem2ProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = media_item2_proxy_g_signal; } -static void media_item2_dbus_proxy_class_init (MediaItem2DBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = media_item2_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = media_item2_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_media_item2_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_media_item2_dbus_proxy_set_property; - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_ITEM2_DBUS_PROXY_UR_LS, "URLs"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_ITEM2_DBUS_PROXY_MIME_TYPE, "MIMEType"); +static void media_item2_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { } -static void media_item2_dbus_proxy_init (MediaItem2DBusProxy* self) { +static void media_item2_proxy_init (MediaItem2Proxy* self) { } static gchar** media_item2_dbus_proxy_get_URLs (MediaItem2* self, int* result_length1) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp595_; - const char* _tmp596_; + GVariant *_inner_reply; gchar** _result; int _result_length1; - gchar** _tmp597_; - int _tmp597__length; - int _tmp597__size; - int _tmp597__length1; - DBusMessageIter _tmp598_; - if (((MediaItem2DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp595_ = "org.gnome.UPnP.MediaItem2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp595_); - _tmp596_ = "URLs"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp596_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "as")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "as", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; + gchar** _tmp511_; + int _tmp511__length; + int _tmp511__size; + int _tmp511__length1; + GVariantIter _tmp512_; + GVariant* _tmp513_; + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "URLs"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaItem2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("URLs")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return NULL; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); } _result_length1 = 0; - _tmp597_ = g_new (gchar*, 5); - _tmp597__length = 0; - _tmp597__size = 4; - _tmp597__length1 = 0; - dbus_message_iter_recurse (&_subiter, &_tmp598_); - for (; dbus_message_iter_get_arg_type (&_tmp598_); _tmp597__length1++) { - const char* _tmp599_; - if (_tmp597__size == _tmp597__length) { - _tmp597__size = 2 * _tmp597__size; - _tmp597_ = g_renew (gchar*, _tmp597_, _tmp597__size + 1); - } - dbus_message_iter_get_basic (&_tmp598_, &_tmp599_); - dbus_message_iter_next (&_tmp598_); - _tmp597_[_tmp597__length++] = g_strdup (_tmp599_); - } - _result_length1 = _tmp597__length1; - _tmp597_[_tmp597__length] = NULL; - dbus_message_iter_next (&_subiter); - _result = _tmp597_; + _tmp511_ = g_new (gchar*, 5); + _tmp511__length = 0; + _tmp511__size = 4; + _tmp511__length1 = 0; + g_variant_iter_init (&_tmp512_, _inner_reply); + for (; (_tmp513_ = g_variant_iter_next_value (&_tmp512_)) != NULL; _tmp511__length1++) { + if (_tmp511__size == _tmp511__length) { + _tmp511__size = 2 * _tmp511__size; + _tmp511_ = g_renew (gchar*, _tmp511_, _tmp511__size + 1); + } + _tmp511_[_tmp511__length++] = g_variant_dup_string (_tmp513_, NULL); + g_variant_unref (_tmp513_); + } + _result_length1 = _tmp511__length1; + _tmp511_[_tmp511__length] = NULL; + _result = _tmp511_; *result_length1 = _result_length1; - dbus_message_unref (_reply); + g_variant_unref (_inner_reply); return _result; } static gchar* media_item2_dbus_proxy_get_MIMEType (MediaItem2* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp600_; - const char* _tmp601_; + GVariant *_inner_reply; gchar* _result; - const char* _tmp602_; - if (((MediaItem2DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp600_ = "org.gnome.UPnP.MediaItem2"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp600_); - _tmp601_ = "MIMEType"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp601_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "s")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "s", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; + _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "MIMEType"); + if (!_inner_reply) { + GVariant *_arguments; + GVariant *_reply; + GVariantBuilder _arguments_builder; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.UPnP.MediaItem2")); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("MIMEType")); + _arguments = g_variant_builder_end (&_arguments_builder); + _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); + if (!_reply) { + return NULL; + } + g_variant_get (_reply, "(v)", &_inner_reply); + g_variant_unref (_reply); } - dbus_message_iter_get_basic (&_subiter, &_tmp602_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp602_); - dbus_message_unref (_reply); + _result = g_variant_dup_string (_inner_reply, NULL); + g_variant_unref (_inner_reply); return _result; } -static void media_item2_dbus_proxy_media_item2__interface_init (MediaItem2Iface* iface) { +static void media_item2_proxy_media_item2_interface_init (MediaItem2Iface* iface) { iface->get_URLs = media_item2_dbus_proxy_get_URLs; iface->get_MIMEType = media_item2_dbus_proxy_get_MIMEType; } -static void _vala_media_item2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +static void media_item2_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + g_object_unref (invocation); } -static void _vala_media_item2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static GVariant* _dbus_media_item2_get_URLs (MediaItem2* self) { + gchar** result; + int result_length1; + gchar** _tmp514_; + GVariantBuilder _tmp515_; + int _tmp516_; + GVariant* _reply; + result = media_item2_get_URLs (self, &result_length1); + _tmp514_ = result; + g_variant_builder_init (&_tmp515_, G_VARIANT_TYPE ("as")); + for (_tmp516_ = 0; _tmp516_ < result_length1; _tmp516_++) { + g_variant_builder_add_value (&_tmp515_, g_variant_new_string (*_tmp514_)); + _tmp514_++; + } + _reply = g_variant_builder_end (&_tmp515_); + result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); + return _reply; +} + + +static GVariant* _dbus_media_item2_get_MIMEType (MediaItem2* self) { + gchar* result; + GVariant* _reply; + result = media_item2_get_MIMEType (self); + _reply = g_variant_new_string (result); + _g_free0 (result); + return _reply; +} + + +static GVariant* media_item2_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (property_name, "URLs") == 0) { + return _dbus_media_item2_get_URLs (object); + } else if (strcmp (property_name, "MIMEType") == 0) { + return _dbus_media_item2_get_MIMEType (object); + } + return NULL; +} + + +static gboolean media_item2_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; +} + + +guint media_item2_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_media_item2_dbus_interface_info), &_media_item2_dbus_interface_vtable, data, _media_item2_unregister_object, error); + if (!result) { + return 0; + } + return result; +} + + +static void _media_item2_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Interfaces2.vala gnome-dvb-daemon-0.2.7/src/rygel/Interfaces2.vala --- gnome-dvb-daemon-0.1.23/src/rygel/Interfaces2.vala 2010-07-21 19:59:20.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Interfaces2.vala 2011-04-19 20:46:24.000000000 +0000 @@ -19,7 +19,7 @@ [DBus (name = "org.gnome.UPnP.MediaObject2")] public interface MediaObject2 : GLib.Object { - public abstract DBus.ObjectPath Parent { + public abstract ObjectPath Parent { owned get; } @@ -57,14 +57,14 @@ get; } - public abstract GLib.HashTable[] ListChildren ( - uint offset, uint max, string[] filter) throws DBus.Error; + public abstract GLib.HashTable[] ListChildren ( + uint offset, uint max, string[] filter) throws DBusError; - public abstract GLib.HashTable[] ListContainers ( - uint offset, uint max, string[] filter) throws DBus.Error; + public abstract GLib.HashTable[] ListContainers ( + uint offset, uint max, string[] filter) throws DBusError; - public abstract GLib.HashTable[] ListItems ( - uint offset, uint max, string[] filter) throws DBus.Error; + public abstract GLib.HashTable[] ListItems ( + uint offset, uint max, string[] filter) throws DBusError; } diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Interfaces.c gnome-dvb-daemon-0.2.7/src/rygel/Interfaces.c --- gnome-dvb-daemon-0.1.23/src/rygel/Interfaces.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Interfaces.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1747 +0,0 @@ -/* Interfaces.c generated by valac 0.11.3, the Vala compiler - * generated from Interfaces.vala, do not modify */ - -/* - * Copyright (C) 2009 Sebastian Pölsterl - * - * This file is part of GNOME DVB Daemon. - * - * GNOME DVB Daemon is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNOME DVB Daemon is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNOME DVB Daemon. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include - - -#define TYPE_MEDIA_OBJECT1 (media_object1_get_type ()) -#define MEDIA_OBJECT1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_OBJECT1, MediaObject1)) -#define IS_MEDIA_OBJECT1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_OBJECT1)) -#define MEDIA_OBJECT1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_OBJECT1, MediaObject1Iface)) - -typedef struct _MediaObject1 MediaObject1; -typedef struct _MediaObject1Iface MediaObject1Iface; -typedef struct _DBusObjectVTable _DBusObjectVTable; -#define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _MediaObject1DBusProxy MediaObject1DBusProxy; -typedef DBusGProxyClass MediaObject1DBusProxyClass; - -#define TYPE_MEDIA_CONTAINER1 (media_container1_get_type ()) -#define MEDIA_CONTAINER1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_CONTAINER1, MediaContainer1)) -#define IS_MEDIA_CONTAINER1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_CONTAINER1)) -#define MEDIA_CONTAINER1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_CONTAINER1, MediaContainer1Iface)) - -typedef struct _MediaContainer1 MediaContainer1; -typedef struct _MediaContainer1Iface MediaContainer1Iface; -typedef struct _MediaContainer1DBusProxy MediaContainer1DBusProxy; -typedef DBusGProxyClass MediaContainer1DBusProxyClass; - -#define TYPE_MEDIA_ITEM1 (media_item1_get_type ()) -#define MEDIA_ITEM1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_ITEM1, MediaItem1)) -#define IS_MEDIA_ITEM1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_ITEM1)) -#define MEDIA_ITEM1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_ITEM1, MediaItem1Iface)) - -typedef struct _MediaItem1 MediaItem1; -typedef struct _MediaItem1Iface MediaItem1Iface; -typedef struct _MediaItem1DBusProxy MediaItem1DBusProxy; -typedef DBusGProxyClass MediaItem1DBusProxyClass; - -struct _MediaObject1Iface { - GTypeInterface parent_iface; - char* (*get_Parent) (MediaObject1* self); - gchar* (*get_DisplayName) (MediaObject1* self); -}; - -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _MediaObject1DBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - -struct _MediaContainer1Iface { - GTypeInterface parent_iface; - char** (*get_Items) (MediaContainer1* self, int* result_length1); - guint (*get_ItemCount) (MediaContainer1* self); - char** (*get_Containers) (MediaContainer1* self, int* result_length1); - guint (*get_ContainerCount) (MediaContainer1* self); -}; - -struct _MediaContainer1DBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - -struct _MediaItem1Iface { - GTypeInterface parent_iface; - gchar** (*get_URLs) (MediaItem1* self, int* result_length1); - gchar* (*get_MIMEType) (MediaItem1* self); - gchar* (*get_Type) (MediaItem1* self); -}; - -struct _MediaItem1DBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - - - -GType media_object1_get_type (void) G_GNUC_CONST; -MediaObject1* media_object1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -char* media_object1_get_Parent (MediaObject1* self); -gchar* media_object1_get_DisplayName (MediaObject1* self); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void media_object1_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _media_object1_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult media_object1_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_media_object1_introspect (MediaObject1* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_object1_property_get (MediaObject1* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_object1_property_get_all (MediaObject1* self, DBusConnection* connection, DBusMessage* message); -GType media_object1_dbus_proxy_get_type (void) G_GNUC_CONST; -DBusHandlerResult media_object1_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - MEDIA_OBJECT1_DBUS_PROXY_DUMMY_PROPERTY, - MEDIA_OBJECT1_DBUS_PROXY_PARENT, - MEDIA_OBJECT1_DBUS_PROXY_DISPLAY_NAME -}; -static char* media_object1_dbus_proxy_get_Parent (MediaObject1* self); -static gchar* media_object1_dbus_proxy_get_DisplayName (MediaObject1* self); -static void media_object1_dbus_proxy_media_object1__interface_init (MediaObject1Iface* iface); -static void _vala_media_object1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_media_object1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -GType media_container1_get_type (void) G_GNUC_CONST; -MediaContainer1* media_container1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -char** media_container1_get_Items (MediaContainer1* self, int* result_length1); -guint media_container1_get_ItemCount (MediaContainer1* self); -char** media_container1_get_Containers (MediaContainer1* self, int* result_length1); -guint media_container1_get_ContainerCount (MediaContainer1* self); -void media_container1_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _media_container1_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult media_container1_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_media_container1_introspect (MediaContainer1* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_container1_property_get (MediaContainer1* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_container1_property_get_all (MediaContainer1* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_media_container1_updated (GObject* _sender, DBusConnection* _connection); -GType media_container1_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_media_container1_updated (MediaContainer1* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult media_container1_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - MEDIA_CONTAINER1_DBUS_PROXY_DUMMY_PROPERTY, - MEDIA_CONTAINER1_DBUS_PROXY_ITEM_COUNT, - MEDIA_CONTAINER1_DBUS_PROXY_CONTAINER_COUNT -}; -static char** media_container1_dbus_proxy_get_Items (MediaContainer1* self, int* result_length1); -static guint media_container1_dbus_proxy_get_ItemCount (MediaContainer1* self); -static char** media_container1_dbus_proxy_get_Containers (MediaContainer1* self, int* result_length1); -static guint media_container1_dbus_proxy_get_ContainerCount (MediaContainer1* self); -static void media_container1_dbus_proxy_media_container1__interface_init (MediaContainer1Iface* iface); -static void _vala_media_container1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_media_container1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -GType media_item1_get_type (void) G_GNUC_CONST; -MediaItem1* media_item1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -gchar** media_item1_get_URLs (MediaItem1* self, int* result_length1); -gchar* media_item1_get_MIMEType (MediaItem1* self); -gchar* media_item1_get_Type (MediaItem1* self); -void media_item1_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _media_item1_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult media_item1_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_media_item1_introspect (MediaItem1* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_item1_property_get (MediaItem1* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_media_item1_property_get_all (MediaItem1* self, DBusConnection* connection, DBusMessage* message); -GType media_item1_dbus_proxy_get_type (void) G_GNUC_CONST; -DBusHandlerResult media_item1_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - MEDIA_ITEM1_DBUS_PROXY_DUMMY_PROPERTY, - MEDIA_ITEM1_DBUS_PROXY_UR_LS, - MEDIA_ITEM1_DBUS_PROXY_MIME_TYPE, - MEDIA_ITEM1_DBUS_PROXY_TYPE -}; -static gchar** media_item1_dbus_proxy_get_URLs (MediaItem1* self, int* result_length1); -static gchar* media_item1_dbus_proxy_get_MIMEType (MediaItem1* self); -static gchar* media_item1_dbus_proxy_get_Type (MediaItem1* self); -static void media_item1_dbus_proxy_media_item1__interface_init (MediaItem1Iface* iface); -static void _vala_media_item1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_media_item1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); - -static const DBusObjectPathVTable _media_object1_dbus_path_vtable = {_media_object1_dbus_unregister, media_object1_dbus_message}; -static const _DBusObjectVTable _media_object1_dbus_vtable = {media_object1_dbus_register_object}; -static const DBusObjectPathVTable _media_container1_dbus_path_vtable = {_media_container1_dbus_unregister, media_container1_dbus_message}; -static const _DBusObjectVTable _media_container1_dbus_vtable = {media_container1_dbus_register_object}; -static const DBusObjectPathVTable _media_item1_dbus_path_vtable = {_media_item1_dbus_unregister, media_item1_dbus_message}; -static const _DBusObjectVTable _media_item1_dbus_vtable = {media_item1_dbus_register_object}; - -char* media_object1_get_Parent (MediaObject1* self) { - return MEDIA_OBJECT1_GET_INTERFACE (self)->get_Parent (self); -} - - -gchar* media_object1_get_DisplayName (MediaObject1* self) { - return MEDIA_OBJECT1_GET_INTERFACE (self)->get_DisplayName (self); -} - - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _media_object1_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_media_object1_introspect (MediaObject1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_object1_property_get (MediaObject1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - char* property_name; - const char* _tmp1_; - if (strcmp (dbus_message_get_signature (message), "ss")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp1_); - if ((strcmp (interface_name, "org.gnome.UPnP.MediaObject1") == 0) && (strcmp (property_name, "Parent") == 0)) { - char* result; - const char* _tmp2_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "o", &subiter); - result = media_object1_get_Parent (self); - _tmp2_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_OBJECT_PATH, &_tmp2_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaObject1") == 0) && (strcmp (property_name, "DisplayName") == 0)) { - gchar* result; - const char* _tmp3_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); - result = media_object1_get_DisplayName (self); - _tmp3_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp3_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - g_free (property_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_object1_property_get_all (MediaObject1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; - char* interface_name; - const char* _tmp4_; - const char* property_name; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp4_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp4_); - if (strcmp (interface_name, "org.gnome.UPnP.MediaObject1") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - { - char* result; - const char* _tmp5_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Parent"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "o", &value_iter); - result = media_object1_get_Parent (self); - _tmp5_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_OBJECT_PATH, &_tmp5_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gchar* result; - const char* _tmp6_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "DisplayName"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "s", &value_iter); - result = media_object1_get_DisplayName (self); - _tmp6_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp6_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult media_object1_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_media_object1_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "Get")) { - result = _dbus_media_object1_property_get (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_media_object1_property_get_all (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void media_object1_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_media_object1_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } -} - - -static void media_object1_base_init (MediaObject1Iface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - g_object_interface_install_property (iface, g_param_spec_string ("Parent", "Parent", "Parent", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_string ("DisplayName", "DisplayName", "DisplayName", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_type_set_qdata (TYPE_MEDIA_OBJECT1, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_media_object1_dbus_vtable)); - } -} - - -GType media_object1_get_type (void) { - static volatile gsize media_object1_type_id__volatile = 0; - if (g_once_init_enter (&media_object1_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (MediaObject1Iface), (GBaseInitFunc) media_object1_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType media_object1_type_id; - media_object1_type_id = g_type_register_static (G_TYPE_INTERFACE, "MediaObject1", &g_define_type_info, 0); - g_type_interface_add_prerequisite (media_object1_type_id, G_TYPE_OBJECT); - g_type_set_qdata (media_object1_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &media_object1_dbus_proxy_get_type); - g_once_init_leave (&media_object1_type_id__volatile, media_object1_type_id); - } - return media_object1_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (MediaObject1DBusProxy, media_object1_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_OBJECT1, media_object1_dbus_proxy_media_object1__interface_init) ); -MediaObject1* media_object1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - MediaObject1* self; - self = g_object_new (media_object1_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.UPnP.MediaObject1", NULL); - return self; -} - - -static GObject* media_object1_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (media_object1_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), media_object1_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -DBusHandlerResult media_object1_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void media_object1_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((MediaObject1DBusProxy*) self)->disposed) { - return; - } - ((MediaObject1DBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), media_object1_dbus_proxy_filter, self); - G_OBJECT_CLASS (media_object1_dbus_proxy_parent_class)->dispose (self); -} - - -static void media_object1_dbus_proxy_class_init (MediaObject1DBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = media_object1_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = media_object1_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_media_object1_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_media_object1_dbus_proxy_set_property; - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_OBJECT1_DBUS_PROXY_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_OBJECT1_DBUS_PROXY_DISPLAY_NAME, "DisplayName"); -} - - -static void media_object1_dbus_proxy_init (MediaObject1DBusProxy* self) { -} - - -static char* media_object1_dbus_proxy_get_Parent (MediaObject1* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp448_; - const char* _tmp449_; - char* _result; - const char* _tmp450_; - if (((MediaObject1DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp448_ = "org.gnome.UPnP.MediaObject1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp448_); - _tmp449_ = "Parent"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp449_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "o")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "o", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_get_basic (&_subiter, &_tmp450_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp450_); - dbus_message_unref (_reply); - return _result; -} - - -static gchar* media_object1_dbus_proxy_get_DisplayName (MediaObject1* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp451_; - const char* _tmp452_; - gchar* _result; - const char* _tmp453_; - if (((MediaObject1DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp451_ = "org.gnome.UPnP.MediaObject1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp451_); - _tmp452_ = "DisplayName"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp452_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "s")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "s", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_get_basic (&_subiter, &_tmp453_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp453_); - dbus_message_unref (_reply); - return _result; -} - - -static void media_object1_dbus_proxy_media_object1__interface_init (MediaObject1Iface* iface) { - iface->get_Parent = media_object1_dbus_proxy_get_Parent; - iface->get_DisplayName = media_object1_dbus_proxy_get_DisplayName; -} - - -static void _vala_media_object1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { -} - - -static void _vala_media_object1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { -} - - -char** media_container1_get_Items (MediaContainer1* self, int* result_length1) { - return MEDIA_CONTAINER1_GET_INTERFACE (self)->get_Items (self, result_length1); -} - - -guint media_container1_get_ItemCount (MediaContainer1* self) { - return MEDIA_CONTAINER1_GET_INTERFACE (self)->get_ItemCount (self); -} - - -char** media_container1_get_Containers (MediaContainer1* self, int* result_length1) { - return MEDIA_CONTAINER1_GET_INTERFACE (self)->get_Containers (self, result_length1); -} - - -guint media_container1_get_ContainerCount (MediaContainer1* self) { - return MEDIA_CONTAINER1_GET_INTERFACE (self)->get_ContainerCount (self); -} - - -void _media_container1_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_media_container1_introspect (MediaContainer1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_container1_property_get (MediaContainer1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - char* property_name; - const char* _tmp1_; - if (strcmp (dbus_message_get_signature (message), "ss")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp1_); - if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer1") == 0) && (strcmp (property_name, "Items") == 0)) { - char** result; - int result_length1; - char** _tmp2_; - DBusMessageIter _tmp3_; - int _tmp4_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "ao", &subiter); - result = media_container1_get_Items (self, &result_length1); - _tmp2_ = result; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "o", &_tmp3_); - for (_tmp4_ = 0; _tmp4_ < result_length1; _tmp4_++) { - const char* _tmp5_; - _tmp5_ = *_tmp2_; - dbus_message_iter_append_basic (&_tmp3_, DBUS_TYPE_OBJECT_PATH, &_tmp5_); - _tmp2_++; - } - dbus_message_iter_close_container (&subiter, &_tmp3_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer1") == 0) && (strcmp (property_name, "ItemCount") == 0)) { - guint result; - dbus_uint32_t _tmp6_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "u", &subiter); - result = media_container1_get_ItemCount (self); - _tmp6_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_UINT32, &_tmp6_); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer1") == 0) && (strcmp (property_name, "Containers") == 0)) { - char** result; - int result_length1; - char** _tmp7_; - DBusMessageIter _tmp8_; - int _tmp9_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "ao", &subiter); - result = media_container1_get_Containers (self, &result_length1); - _tmp7_ = result; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "o", &_tmp8_); - for (_tmp9_ = 0; _tmp9_ < result_length1; _tmp9_++) { - const char* _tmp10_; - _tmp10_ = *_tmp7_; - dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_OBJECT_PATH, &_tmp10_); - _tmp7_++; - } - dbus_message_iter_close_container (&subiter, &_tmp8_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaContainer1") == 0) && (strcmp (property_name, "ContainerCount") == 0)) { - guint result; - dbus_uint32_t _tmp11_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "u", &subiter); - result = media_container1_get_ContainerCount (self); - _tmp11_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_UINT32, &_tmp11_); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - g_free (property_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_container1_property_get_all (MediaContainer1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; - char* interface_name; - const char* _tmp12_; - const char* property_name; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp12_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp12_); - if (strcmp (interface_name, "org.gnome.UPnP.MediaContainer1") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - { - char** result; - int result_length1; - char** _tmp13_; - DBusMessageIter _tmp14_; - int _tmp15_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Items"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "ao", &value_iter); - result = media_container1_get_Items (self, &result_length1); - _tmp13_ = result; - dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "o", &_tmp14_); - for (_tmp15_ = 0; _tmp15_ < result_length1; _tmp15_++) { - const char* _tmp16_; - _tmp16_ = *_tmp13_; - dbus_message_iter_append_basic (&_tmp14_, DBUS_TYPE_OBJECT_PATH, &_tmp16_); - _tmp13_++; - } - dbus_message_iter_close_container (&value_iter, &_tmp14_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - guint result; - dbus_uint32_t _tmp17_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "ItemCount"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "u", &value_iter); - result = media_container1_get_ItemCount (self); - _tmp17_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_UINT32, &_tmp17_); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - char** result; - int result_length1; - char** _tmp18_; - DBusMessageIter _tmp19_; - int _tmp20_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Containers"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "ao", &value_iter); - result = media_container1_get_Containers (self, &result_length1); - _tmp18_ = result; - dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "o", &_tmp19_); - for (_tmp20_ = 0; _tmp20_ < result_length1; _tmp20_++) { - const char* _tmp21_; - _tmp21_ = *_tmp18_; - dbus_message_iter_append_basic (&_tmp19_, DBUS_TYPE_OBJECT_PATH, &_tmp21_); - _tmp18_++; - } - dbus_message_iter_close_container (&value_iter, &_tmp19_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - guint result; - dbus_uint32_t _tmp22_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "ContainerCount"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "u", &value_iter); - result = media_container1_get_ContainerCount (self); - _tmp22_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_UINT32, &_tmp22_); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult media_container1_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_media_container1_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "Get")) { - result = _dbus_media_container1_property_get (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_media_container1_property_get_all (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _dbus_media_container1_updated (GObject* _sender, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.UPnP.MediaContainer1", "Updated"); - dbus_message_iter_init_append (_message, &_iter); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void media_container1_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_media_container1_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "updated", (GCallback) _dbus_media_container1_updated, connection); -} - - -static void media_container1_base_init (MediaContainer1Iface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - g_object_interface_install_property (iface, g_param_spec_uint ("ItemCount", "ItemCount", "ItemCount", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_uint ("ContainerCount", "ContainerCount", "ContainerCount", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_signal_new ("updated", TYPE_MEDIA_CONTAINER1, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - g_type_set_qdata (TYPE_MEDIA_CONTAINER1, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_media_container1_dbus_vtable)); - } -} - - -GType media_container1_get_type (void) { - static volatile gsize media_container1_type_id__volatile = 0; - if (g_once_init_enter (&media_container1_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (MediaContainer1Iface), (GBaseInitFunc) media_container1_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType media_container1_type_id; - media_container1_type_id = g_type_register_static (G_TYPE_INTERFACE, "MediaContainer1", &g_define_type_info, 0); - g_type_interface_add_prerequisite (media_container1_type_id, G_TYPE_OBJECT); - g_type_set_qdata (media_container1_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &media_container1_dbus_proxy_get_type); - g_once_init_leave (&media_container1_type_id__volatile, media_container1_type_id); - } - return media_container1_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (MediaContainer1DBusProxy, media_container1_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_CONTAINER1, media_container1_dbus_proxy_media_container1__interface_init) ); -MediaContainer1* media_container1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - MediaContainer1* self; - self = g_object_new (media_container1_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.UPnP.MediaContainer1", NULL); - return self; -} - - -static GObject* media_container1_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (media_container1_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), media_container1_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_media_container1_updated (MediaContainer1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "")) { - return; - } - dbus_message_iter_init (message, &iter); - g_signal_emit_by_name (self, "updated"); -} - - -DBusHandlerResult media_container1_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.UPnP.MediaContainer1", "Updated")) { - _dbus_handle_media_container1_updated (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void media_container1_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((MediaContainer1DBusProxy*) self)->disposed) { - return; - } - ((MediaContainer1DBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), media_container1_dbus_proxy_filter, self); - G_OBJECT_CLASS (media_container1_dbus_proxy_parent_class)->dispose (self); -} - - -static void media_container1_dbus_proxy_class_init (MediaContainer1DBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = media_container1_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = media_container1_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_media_container1_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_media_container1_dbus_proxy_set_property; - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_CONTAINER1_DBUS_PROXY_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_CONTAINER1_DBUS_PROXY_CONTAINER_COUNT, "ContainerCount"); -} - - -static void media_container1_dbus_proxy_init (MediaContainer1DBusProxy* self) { -} - - -static char** media_container1_dbus_proxy_get_Items (MediaContainer1* self, int* result_length1) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp454_; - const char* _tmp455_; - char** _result; - int _result_length1; - char** _tmp456_; - int _tmp456__length; - int _tmp456__size; - int _tmp456__length1; - DBusMessageIter _tmp457_; - if (((MediaContainer1DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp454_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp454_); - _tmp455_ = "Items"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp455_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "ao")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "ao", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; - } - _result_length1 = 0; - _tmp456_ = g_new (char*, 5); - _tmp456__length = 0; - _tmp456__size = 4; - _tmp456__length1 = 0; - dbus_message_iter_recurse (&_subiter, &_tmp457_); - for (; dbus_message_iter_get_arg_type (&_tmp457_); _tmp456__length1++) { - const char* _tmp458_; - if (_tmp456__size == _tmp456__length) { - _tmp456__size = 2 * _tmp456__size; - _tmp456_ = g_renew (char*, _tmp456_, _tmp456__size + 1); - } - dbus_message_iter_get_basic (&_tmp457_, &_tmp458_); - dbus_message_iter_next (&_tmp457_); - _tmp456_[_tmp456__length++] = g_strdup (_tmp458_); - } - _result_length1 = _tmp456__length1; - _tmp456_[_tmp456__length] = NULL; - dbus_message_iter_next (&_subiter); - _result = _tmp456_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static guint media_container1_dbus_proxy_get_ItemCount (MediaContainer1* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp459_; - const char* _tmp460_; - guint _result; - dbus_uint32_t _tmp461_; - if (((MediaContainer1DBusProxy*) self)->disposed) { - return 0U; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp459_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp459_); - _tmp460_ = "ItemCount"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp460_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return 0U; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "u")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "u", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_get_basic (&_subiter, &_tmp461_); - dbus_message_iter_next (&_subiter); - _result = _tmp461_; - dbus_message_unref (_reply); - return _result; -} - - -static char** media_container1_dbus_proxy_get_Containers (MediaContainer1* self, int* result_length1) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp462_; - const char* _tmp463_; - char** _result; - int _result_length1; - char** _tmp464_; - int _tmp464__length; - int _tmp464__size; - int _tmp464__length1; - DBusMessageIter _tmp465_; - if (((MediaContainer1DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp462_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp462_); - _tmp463_ = "Containers"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp463_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "ao")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "ao", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; - } - _result_length1 = 0; - _tmp464_ = g_new (char*, 5); - _tmp464__length = 0; - _tmp464__size = 4; - _tmp464__length1 = 0; - dbus_message_iter_recurse (&_subiter, &_tmp465_); - for (; dbus_message_iter_get_arg_type (&_tmp465_); _tmp464__length1++) { - const char* _tmp466_; - if (_tmp464__size == _tmp464__length) { - _tmp464__size = 2 * _tmp464__size; - _tmp464_ = g_renew (char*, _tmp464_, _tmp464__size + 1); - } - dbus_message_iter_get_basic (&_tmp465_, &_tmp466_); - dbus_message_iter_next (&_tmp465_); - _tmp464_[_tmp464__length++] = g_strdup (_tmp466_); - } - _result_length1 = _tmp464__length1; - _tmp464_[_tmp464__length] = NULL; - dbus_message_iter_next (&_subiter); - _result = _tmp464_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static guint media_container1_dbus_proxy_get_ContainerCount (MediaContainer1* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp467_; - const char* _tmp468_; - guint _result; - dbus_uint32_t _tmp469_; - if (((MediaContainer1DBusProxy*) self)->disposed) { - return 0U; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp467_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp467_); - _tmp468_ = "ContainerCount"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp468_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return 0U; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "u")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "u", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return 0U; - } - dbus_message_iter_get_basic (&_subiter, &_tmp469_); - dbus_message_iter_next (&_subiter); - _result = _tmp469_; - dbus_message_unref (_reply); - return _result; -} - - -static void media_container1_dbus_proxy_media_container1__interface_init (MediaContainer1Iface* iface) { - iface->get_Items = media_container1_dbus_proxy_get_Items; - iface->get_ItemCount = media_container1_dbus_proxy_get_ItemCount; - iface->get_Containers = media_container1_dbus_proxy_get_Containers; - iface->get_ContainerCount = media_container1_dbus_proxy_get_ContainerCount; -} - - -static void _vala_media_container1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { -} - - -static void _vala_media_container1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { -} - - -gchar** media_item1_get_URLs (MediaItem1* self, int* result_length1) { - return MEDIA_ITEM1_GET_INTERFACE (self)->get_URLs (self, result_length1); -} - - -gchar* media_item1_get_MIMEType (MediaItem1* self) { - return MEDIA_ITEM1_GET_INTERFACE (self)->get_MIMEType (self); -} - - -gchar* media_item1_get_Type (MediaItem1* self) { - return MEDIA_ITEM1_GET_INTERFACE (self)->get_Type (self); -} - - -void _media_item1_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_media_item1_introspect (MediaItem1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_item1_property_get (MediaItem1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - char* property_name; - const char* _tmp1_; - if (strcmp (dbus_message_get_signature (message), "ss")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp1_); - if ((strcmp (interface_name, "org.gnome.UPnP.MediaItem1") == 0) && (strcmp (property_name, "URLs") == 0)) { - gchar** result; - int result_length1; - gchar** _tmp2_; - DBusMessageIter _tmp3_; - int _tmp4_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "as", &subiter); - result = media_item1_get_URLs (self, &result_length1); - _tmp2_ = result; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "s", &_tmp3_); - for (_tmp4_ = 0; _tmp4_ < result_length1; _tmp4_++) { - const char* _tmp5_; - _tmp5_ = *_tmp2_; - dbus_message_iter_append_basic (&_tmp3_, DBUS_TYPE_STRING, &_tmp5_); - _tmp2_++; - } - dbus_message_iter_close_container (&subiter, &_tmp3_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaItem1") == 0) && (strcmp (property_name, "MIMEType") == 0)) { - gchar* result; - const char* _tmp6_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); - result = media_item1_get_MIMEType (self); - _tmp6_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp6_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else if ((strcmp (interface_name, "org.gnome.UPnP.MediaItem1") == 0) && (strcmp (property_name, "Type") == 0)) { - gchar* result; - const char* _tmp7_; - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); - result = media_item1_get_Type (self); - _tmp7_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp7_); - _g_free0 (result); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - g_free (property_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_media_item1_property_get_all (MediaItem1* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; - char* interface_name; - const char* _tmp8_; - const char* property_name; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp8_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp8_); - if (strcmp (interface_name, "org.gnome.UPnP.MediaItem1") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - { - gchar** result; - int result_length1; - gchar** _tmp9_; - DBusMessageIter _tmp10_; - int _tmp11_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "URLs"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "as", &value_iter); - result = media_item1_get_URLs (self, &result_length1); - _tmp9_ = result; - dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "s", &_tmp10_); - for (_tmp11_ = 0; _tmp11_ < result_length1; _tmp11_++) { - const char* _tmp12_; - _tmp12_ = *_tmp9_; - dbus_message_iter_append_basic (&_tmp10_, DBUS_TYPE_STRING, &_tmp12_); - _tmp9_++; - } - dbus_message_iter_close_container (&value_iter, &_tmp10_); - result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gchar* result; - const char* _tmp13_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "MIMEType"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "s", &value_iter); - result = media_item1_get_MIMEType (self); - _tmp13_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp13_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - { - gchar* result; - const char* _tmp14_; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter); - property_name = "Type"; - dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &property_name); - dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_VARIANT, "s", &value_iter); - result = media_item1_get_Type (self); - _tmp14_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp14_); - _g_free0 (result); - dbus_message_iter_close_container (&entry_iter, &value_iter); - dbus_message_iter_close_container (&subiter, &entry_iter); - } - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult media_item1_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_media_item1_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "Get")) { - result = _dbus_media_item1_property_get (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_media_item1_property_get_all (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void media_item1_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_media_item1_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } -} - - -static void media_item1_base_init (MediaItem1Iface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - g_object_interface_install_property (iface, g_param_spec_boxed ("URLs", "URLs", "URLs", G_TYPE_STRV, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_string ("MIMEType", "MIMEType", "MIMEType", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_interface_install_property (iface, g_param_spec_string ("Type", "Type", "Type", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_type_set_qdata (TYPE_MEDIA_ITEM1, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_media_item1_dbus_vtable)); - } -} - - -GType media_item1_get_type (void) { - static volatile gsize media_item1_type_id__volatile = 0; - if (g_once_init_enter (&media_item1_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (MediaItem1Iface), (GBaseInitFunc) media_item1_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType media_item1_type_id; - media_item1_type_id = g_type_register_static (G_TYPE_INTERFACE, "MediaItem1", &g_define_type_info, 0); - g_type_interface_add_prerequisite (media_item1_type_id, G_TYPE_OBJECT); - g_type_set_qdata (media_item1_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &media_item1_dbus_proxy_get_type); - g_once_init_leave (&media_item1_type_id__volatile, media_item1_type_id); - } - return media_item1_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (MediaItem1DBusProxy, media_item1_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MEDIA_ITEM1, media_item1_dbus_proxy_media_item1__interface_init) ); -MediaItem1* media_item1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - MediaItem1* self; - self = g_object_new (media_item1_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.UPnP.MediaItem1", NULL); - return self; -} - - -static GObject* media_item1_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (media_item1_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), media_item1_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -DBusHandlerResult media_item1_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void media_item1_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((MediaItem1DBusProxy*) self)->disposed) { - return; - } - ((MediaItem1DBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), media_item1_dbus_proxy_filter, self); - G_OBJECT_CLASS (media_item1_dbus_proxy_parent_class)->dispose (self); -} - - -static void media_item1_dbus_proxy_class_init (MediaItem1DBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = media_item1_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = media_item1_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_media_item1_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_media_item1_dbus_proxy_set_property; - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_ITEM1_DBUS_PROXY_UR_LS, "URLs"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_ITEM1_DBUS_PROXY_MIME_TYPE, "MIMEType"); - g_object_class_override_property (G_OBJECT_CLASS (klass), MEDIA_ITEM1_DBUS_PROXY_TYPE, "Type"); -} - - -static void media_item1_dbus_proxy_init (MediaItem1DBusProxy* self) { -} - - -static gchar** media_item1_dbus_proxy_get_URLs (MediaItem1* self, int* result_length1) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp470_; - const char* _tmp471_; - gchar** _result; - int _result_length1; - gchar** _tmp472_; - int _tmp472__length; - int _tmp472__size; - int _tmp472__length1; - DBusMessageIter _tmp473_; - if (((MediaItem1DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp470_ = "org.gnome.UPnP.MediaItem1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp470_); - _tmp471_ = "URLs"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp471_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "as")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "as", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; - } - _result_length1 = 0; - _tmp472_ = g_new (gchar*, 5); - _tmp472__length = 0; - _tmp472__size = 4; - _tmp472__length1 = 0; - dbus_message_iter_recurse (&_subiter, &_tmp473_); - for (; dbus_message_iter_get_arg_type (&_tmp473_); _tmp472__length1++) { - const char* _tmp474_; - if (_tmp472__size == _tmp472__length) { - _tmp472__size = 2 * _tmp472__size; - _tmp472_ = g_renew (gchar*, _tmp472_, _tmp472__size + 1); - } - dbus_message_iter_get_basic (&_tmp473_, &_tmp474_); - dbus_message_iter_next (&_tmp473_); - _tmp472_[_tmp472__length++] = g_strdup (_tmp474_); - } - _result_length1 = _tmp472__length1; - _tmp472_[_tmp472__length] = NULL; - dbus_message_iter_next (&_subiter); - _result = _tmp472_; - *result_length1 = _result_length1; - dbus_message_unref (_reply); - return _result; -} - - -static gchar* media_item1_dbus_proxy_get_MIMEType (MediaItem1* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp475_; - const char* _tmp476_; - gchar* _result; - const char* _tmp477_; - if (((MediaItem1DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp475_ = "org.gnome.UPnP.MediaItem1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp475_); - _tmp476_ = "MIMEType"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp476_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "s")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "s", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_get_basic (&_subiter, &_tmp477_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp477_); - dbus_message_unref (_reply); - return _result; -} - - -static gchar* media_item1_dbus_proxy_get_Type (MediaItem1* self) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter, _subiter; - const char* _tmp478_; - const char* _tmp479_; - gchar* _result; - const char* _tmp480_; - if (((MediaItem1DBusProxy*) self)->disposed) { - return NULL; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.freedesktop.DBus.Properties", "Get"); - dbus_message_iter_init_append (_message, &_iter); - _tmp478_ = "org.gnome.UPnP.MediaItem1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp478_); - _tmp479_ = "Type"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp479_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - g_critical ("file %s: line %d: uncaught error: %s (%s)", __FILE__, __LINE__, _dbus_error.message, _dbus_error.name); - dbus_error_free (&_dbus_error); - return NULL; - } - if (strcmp (dbus_message_get_signature (_reply), "v")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "v", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_subiter); - if (strcmp (dbus_message_iter_get_signature (&_subiter), "s")) { - g_critical ("file %s: line %d: Invalid signature, expected \"%s\", got \"%s\"", __FILE__, __LINE__, "s", dbus_message_iter_get_signature (&_subiter)); - dbus_message_unref (_reply); - return NULL; - } - dbus_message_iter_get_basic (&_subiter, &_tmp480_); - dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp480_); - dbus_message_unref (_reply); - return _result; -} - - -static void media_item1_dbus_proxy_media_item1__interface_init (MediaItem1Iface* iface) { - iface->get_URLs = media_item1_dbus_proxy_get_URLs; - iface->get_MIMEType = media_item1_dbus_proxy_get_MIMEType; - iface->get_Type = media_item1_dbus_proxy_get_Type; -} - - -static void _vala_media_item1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { -} - - -static void _vala_media_item1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - - diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Interfaces.vala gnome-dvb-daemon-0.2.7/src/rygel/Interfaces.vala --- gnome-dvb-daemon-0.1.23/src/rygel/Interfaces.vala 2010-04-01 09:50:32.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Interfaces.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 Sebastian Pölsterl - * - * This file is part of GNOME DVB Daemon. - * - * GNOME DVB Daemon is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNOME DVB Daemon is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNOME DVB Daemon. If not, see . - */ -[DBus (name = "org.gnome.UPnP.MediaObject1")] -public interface MediaObject1 : GLib.Object { - - public abstract DBus.ObjectPath Parent { - owned get; - } - - public abstract string DisplayName { - owned get; - } -} - -[DBus (name = "org.gnome.UPnP.MediaContainer1")] -public interface MediaContainer1 : GLib.Object { - - public abstract signal void Updated (); - - public abstract DBus.ObjectPath[] Items { - owned get; - } - - public abstract uint ItemCount { - get; - } - - public abstract DBus.ObjectPath[] Containers { - owned get; - } - - public abstract uint ContainerCount { - get; - } - -} - -[DBus (name = "org.gnome.UPnP.MediaItem1")] -public interface MediaItem1 : GLib.Object { - - public abstract string[] URLs { - owned get; - } - - public abstract string MIMEType { - owned get; - } - - public abstract string Type { - owned get; - } -} - diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Services2.c gnome-dvb-daemon-0.2.7/src/rygel/Services2.c --- gnome-dvb-daemon-0.1.23/src/rygel/Services2.c 2011-01-14 17:00:40.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Services2.c 2011-12-09 11:14:15.000000000 +0000 @@ -1,4 +1,4 @@ -/* Services2.c generated by valac 0.11.3, the Vala compiler +/* Services2.c generated by valac 0.14.0, the Vala compiler * generated from Services2.vala, do not modify */ /* @@ -24,12 +24,20 @@ #include #include #include -#include -#include +#include #include -#include +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + #define TYPE_MEDIA_CONTAINER2 (media_container2_get_type ()) #define MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_CONTAINER2, MediaContainer2)) #define IS_MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_CONTAINER2)) @@ -38,6 +46,8 @@ typedef struct _MediaContainer2 MediaContainer2; typedef struct _MediaContainer2Iface MediaContainer2Iface; +#define TYPE_MEDIA_CONTAINER2_PROXY (media_container2_proxy_get_type ()) + #define TYPE_MEDIA_OBJECT2 (media_object2_get_type ()) #define MEDIA_OBJECT2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_OBJECT2, MediaObject2)) #define IS_MEDIA_OBJECT2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_OBJECT2)) @@ -46,6 +56,8 @@ typedef struct _MediaObject2 MediaObject2; typedef struct _MediaObject2Iface MediaObject2Iface; +#define TYPE_MEDIA_OBJECT2_PROXY (media_object2_proxy_get_type ()) + #define DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2 (dvb_media_server2_device_groups_media_container2_get_type ()) #define DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2, DVBMediaServer2DeviceGroupsMediaContainer2)) #define DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2, DVBMediaServer2DeviceGroupsMediaContainer2Class)) @@ -66,7 +78,6 @@ typedef struct _DVBMediaServer2ChannelsMediaContainer2 DVBMediaServer2ChannelsMediaContainer2; typedef struct _DVBMediaServer2ChannelsMediaContainer2Class DVBMediaServer2ChannelsMediaContainer2Class; -typedef struct _DBusObjectVTable _DBusObjectVTable; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -89,7 +100,6 @@ typedef struct _DVBDeviceGroup DVBDeviceGroup; typedef struct _DVBDeviceGroupClass DVBDeviceGroupClass; -#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) #define DVB_TYPE_ID_BUS_MANAGER (dvb_id_bus_manager_get_type ()) @@ -100,8 +110,13 @@ typedef struct _DVBIDBusManager DVBIDBusManager; typedef struct _DVBIDBusManagerIface DVBIDBusManagerIface; +#define DVB_TYPE_ID_BUS_MANAGER_PROXY (dvb_id_bus_manager_proxy_get_type ()) + #define DVB_TYPE_CHANNEL_GROUP_INFO (dvb_channel_group_info_get_type ()) typedef struct _DVBChannelGroupInfo DVBChannelGroupInfo; + +#define DVB_TYPE_ADAPTER_INFO (dvb_adapter_info_get_type ()) +typedef struct _DVBAdapterInfo DVBAdapterInfo; typedef struct _DVBMediaServer2ChannelsMediaContainer2Private DVBMediaServer2ChannelsMediaContainer2Private; #define DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2 (dvb_media_server2_channel_media_item2_get_type ()) @@ -141,8 +156,20 @@ typedef struct _MediaItem2 MediaItem2; typedef struct _MediaItem2Iface MediaItem2Iface; + +#define TYPE_MEDIA_ITEM2_PROXY (media_item2_proxy_get_type ()) typedef struct _DVBMediaServer2ChannelMediaItem2Private DVBMediaServer2ChannelMediaItem2Private; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; +typedef struct _DvbMediaServer2StartRygelServicesData DvbMediaServer2StartRygelServicesData; struct _MediaContainer2Iface { GTypeInterface parent_iface; @@ -177,15 +204,16 @@ char* path; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - struct _DVBChannelGroupInfo { gint id; gchar* name; }; +struct _DVBAdapterInfo { + gchar* name; + gchar* type; +}; + struct _DVBIDBusManagerIface { GTypeInterface parent_iface; gboolean (*GetScannerForDevice) (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); @@ -198,6 +226,7 @@ gboolean (*AddChannelGroup) (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); gboolean (*RemoveChannelGroup) (DVBIDBusManager* self, gint channel_group_id, GError** error); GHashTable** (*GetDevices) (DVBIDBusManager* self, int* result_length1, GError** error); + gboolean (*GetAdapterInfo) (DVBIDBusManager* self, guint adapter, guint frontend, DVBAdapterInfo* info, GError** error); }; struct _DVBMediaServer2ChannelsMediaContainer2 { @@ -235,8 +264,20 @@ char* parent; }; +struct _DvbMediaServer2StartRygelServicesData { + int _state_; + GObject* _source_object_; + GAsyncResult* _res_; + GSimpleAsyncResult* _async_result; + DVBLoggingLogManager* _tmp0_; + DVBLoggingLogger* _tmp1_; +}; + +extern DVBLoggingLogger* dvb_media_server2_log; +DVBLoggingLogger* dvb_media_server2_log = NULL; static gpointer dvb_media_server2_device_groups_media_container2_parent_class = NULL; +extern GDBusConnection* dvb_media_server2_conn; static MediaContainer2Iface* dvb_media_server2_device_groups_media_container2_media_container2_parent_iface = NULL; static MediaObject2Iface* dvb_media_server2_device_groups_media_container2_media_object2_parent_iface = NULL; static gpointer dvb_media_server2_channels_media_container2_parent_class = NULL; @@ -247,56 +288,52 @@ static MediaObject2Iface* dvb_media_server2_channel_media_item2_media_object2_parent_iface = NULL; extern DVBMediaServer2DeviceGroupsMediaContainer2* dvb_media_server2_root_container; DVBMediaServer2DeviceGroupsMediaContainer2* dvb_media_server2_root_container = NULL; +GDBusConnection* dvb_media_server2_conn = NULL; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; #define DVB_MEDIA_SERVER2_SERVICE_NAME "org.gnome.UPnP.MediaServer2.DVBDaemon" #define DVB_MEDIA_SERVER2_ROOT_PATH "/org/gnome/UPnP/MediaServer2/DVBDaemon" #define DVB_MEDIA_SERVER2_GROUP_PATH "/org/gnome/UPnP/MediaServer2/DVBDaemon/Group%u" #define DVB_MEDIA_SERVER2_CHANNEL_PATH DVB_MEDIA_SERVER2_GROUP_PATH "/Channel%u" -MediaContainer2* media_container2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType media_container2_proxy_get_type (void) G_GNUC_CONST; +guint media_container2_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType media_container2_get_type (void) G_GNUC_CONST; GType media_object2_get_type (void) G_GNUC_CONST; -MediaObject2* media_object2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType media_object2_proxy_get_type (void) G_GNUC_CONST; +guint media_object2_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_media_server2_device_groups_media_container2_get_type (void) G_GNUC_CONST; GType dvb_media_server2_channels_media_container2_get_type (void) G_GNUC_CONST; #define DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2, DVBMediaServer2DeviceGroupsMediaContainer2Private)) enum { - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_DUMMY_PROPERTY, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_PARENT, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_PATH, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_DISPLAY_NAME, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_TYPE, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_ITEM_COUNT, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_CHILD_COUNT, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_CONTAINER_COUNT, - DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_SEARCHABLE + DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_DUMMY_PROPERTY }; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_media_server2_device_groups_media_container2_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_media_server2_device_groups_media_container2_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_media_server2_device_groups_media_container2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_media_server2_device_groups_media_container2_introspect (DVBMediaServer2DeviceGroupsMediaContainer2* self, DBusConnection* connection, DBusMessage* message); void dvb_media_server2_device_groups_media_container2_create_container_services (DVBMediaServer2DeviceGroupsMediaContainer2* self); GType dvb_manager_get_type (void) G_GNUC_CONST; DVBManager* dvb_manager_get_instance (void); GType dvb_device_group_get_type (void) G_GNUC_CONST; GeeCollection* dvb_manager_get_device_groups (DVBManager* self); static void dvb_media_server2_device_groups_media_container2_create_service (DVBMediaServer2DeviceGroupsMediaContainer2* self, DVBDeviceGroup* devgroup); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); guint dvb_device_group_get_Id (DVBDeviceGroup* self); -DBusGConnection* dvb_utils_get_dbus_connection (void); DVBMediaServer2ChannelsMediaContainer2* dvb_media_server2_channels_media_container2_new (DVBDeviceGroup* devgroup, const char* parent); DVBMediaServer2ChannelsMediaContainer2* dvb_media_server2_channels_media_container2_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent); +void dvb_utils_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* conn, const gchar* object_path, gconstpointer obj); gchar* media_object2_get_Path (MediaObject2* self); -void dvb_media_server2_channels_media_container2_create_item_services (DVBMediaServer2ChannelsMediaContainer2* self); +void dvb_media_server2_channels_media_container2_create_item_services (DVBMediaServer2ChannelsMediaContainer2* self, GDBusConnection* conn); static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListContainers (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); guint dvb_media_server2_get_num_elements (gint items, guint offset, guint max); static void _g_free0_ (gpointer var); -static void _vala_GValue_free (GValue* self); -static void __vala_GValue_free0_ (gpointer var); +static void _g_variant_unref0_ (gpointer var); +static GVariant* _variant_new1 (gchar* value); gchar* media_object2_get_DisplayName (MediaObject2* self); +static GVariant* _variant_new2 (gchar* value); guint media_container2_get_ChildCount (MediaContainer2* self); +static GVariant* _variant_new3 (guint value); gboolean media_container2_get_Searchable (MediaContainer2* self); +static GVariant* _variant_new4 (gboolean value); gchar* media_object2_get_Type (MediaObject2* self); +static GVariant* _variant_new5 (gchar* value); +static GVariant* _variant_new6 (gchar* value); static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListChildren (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); GHashTable** media_container2_ListContainers (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListItems (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); @@ -307,36 +344,28 @@ DVBMediaServer2DeviceGroupsMediaContainer2* dvb_media_server2_device_groups_media_container2_construct (GType object_type); guint media_container2_get_ContainerCount (MediaContainer2* self); static GObject * dvb_media_server2_device_groups_media_container2_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); -DVBIDBusManager* dvb_id_bus_manager_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_manager_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_channel_group_info_get_type (void) G_GNUC_CONST; DVBChannelGroupInfo* dvb_channel_group_info_dup (const DVBChannelGroupInfo* self); void dvb_channel_group_info_free (DVBChannelGroupInfo* self); void dvb_channel_group_info_copy (const DVBChannelGroupInfo* self, DVBChannelGroupInfo* dest); void dvb_channel_group_info_destroy (DVBChannelGroupInfo* self); +GType dvb_adapter_info_get_type (void) G_GNUC_CONST; +DVBAdapterInfo* dvb_adapter_info_dup (const DVBAdapterInfo* self); +void dvb_adapter_info_free (DVBAdapterInfo* self); +void dvb_adapter_info_copy (const DVBAdapterInfo* self, DVBAdapterInfo* dest); +void dvb_adapter_info_destroy (DVBAdapterInfo* self); GType dvb_id_bus_manager_get_type (void) G_GNUC_CONST; static void _dvb_media_server2_device_groups_media_container2_on_device_added_dvb_id_bus_manager_group_added (DVBIDBusManager* _sender, guint group_id, gpointer self); static void _dvb_media_server2_device_groups_media_container2_on_device_removed_dvb_id_bus_manager_group_removed (DVBIDBusManager* _sender, guint group_id, gpointer self); static void dvb_media_server2_device_groups_media_container2_finalize (GObject* obj); -char* media_object2_get_Parent (MediaObject2* self); -guint media_container2_get_ItemCount (MediaContainer2* self); static void _vala_dvb_media_server2_device_groups_media_container2_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); GType dvb_media_server2_channel_media_item2_get_type (void) G_GNUC_CONST; #define DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2, DVBMediaServer2ChannelsMediaContainer2Private)) enum { - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_DUMMY_PROPERTY, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_PARENT, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_PATH, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_DISPLAY_NAME, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_TYPE, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_CHILD_COUNT, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_ITEM_COUNT, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_CONTAINER_COUNT, - DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_SEARCHABLE + DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_DUMMY_PROPERTY }; -void dvb_media_server2_channels_media_container2_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_media_server2_channels_media_container2_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_media_server2_channels_media_container2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_media_server2_channels_media_container2_introspect (DVBMediaServer2ChannelsMediaContainer2* self, DBusConnection* connection, DBusMessage* message); GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); GType dvb_channel_get_type (void) G_GNUC_CONST; @@ -344,128 +373,49 @@ guint dvb_channel_get_Sid (DVBChannel* self); DVBMediaServer2ChannelMediaItem2* dvb_media_server2_channel_media_item2_new (DVBChannel* channel, const char* parent); DVBMediaServer2ChannelMediaItem2* dvb_media_server2_channel_media_item2_construct (GType object_type, DVBChannel* channel, const char* parent); -static GHashTable** dvb_media_server2_channels_media_container2_real_ListItems (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); GType media_item2_get_type (void) G_GNUC_CONST; -MediaItem2* media_item2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType media_item2_proxy_get_type (void) G_GNUC_CONST; +guint media_item2_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +static GHashTable** dvb_media_server2_channels_media_container2_real_ListItems (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); +static GVariant* _variant_new7 (gchar* value); +static GVariant* _variant_new8 (gchar* value); +static GVariant* _variant_new9 (gchar* value); gchar* media_item2_get_MIMEType (MediaItem2* self); +static GVariant* _variant_new10 (gchar* value); gchar** media_item2_get_URLs (MediaItem2* self, int* result_length1); +static GVariant* _variant_new11 (gchar** value, gint value_length1); +static GVariant* _variant_new12 (gchar* value); static GHashTable** dvb_media_server2_channels_media_container2_real_ListContainers (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); static GHashTable** dvb_media_server2_channels_media_container2_real_ListChildren (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); GHashTable** media_container2_ListItems (MediaContainer2* self, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error); const gchar* dvb_device_group_get_Name (DVBDeviceGroup* self); +guint media_container2_get_ItemCount (MediaContainer2* self); static GObject * dvb_media_server2_channels_media_container2_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); static void dvb_media_server2_channels_media_container2_finalize (GObject* obj); static void _vala_dvb_media_server2_channels_media_container2_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); #define DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2, DVBMediaServer2ChannelMediaItem2Private)) enum { - DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_DUMMY_PROPERTY, - DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_PARENT, - DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_PATH, - DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_DISPLAY_NAME, - DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_UR_LS, - DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_MIME_TYPE, - DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_TYPE + DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_DUMMY_PROPERTY }; -void dvb_media_server2_channel_media_item2_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_media_server2_channel_media_item2_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_media_server2_channel_media_item2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_media_server2_channel_media_item2_introspect (DVBMediaServer2ChannelMediaItem2* self, DBusConnection* connection, DBusMessage* message); guint dvb_channel_get_GroupId (DVBChannel* self); const gchar* dvb_channel_get_Name (DVBChannel* self); gchar* dvb_channel_get_URL (DVBChannel* self); static void dvb_media_server2_channel_media_item2_finalize (GObject* obj); static void _vala_dvb_media_server2_channel_media_item2_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -gboolean dvb_media_server2_start_rygel_services (void); -static guint _dynamic_RequestName2 (DBusGProxy* self, const gchar* param1, guint param2, GError** error); +void dvb_media_server2_on_bus_acquired (GDBusConnection* _conn); +char* media_object2_get_Parent (MediaObject2* self); +static void dvb_media_server2_start_rygel_services_data_free (gpointer _data); +void dvb_media_server2_start_rygel_services (GAsyncReadyCallback _callback_, gpointer _user_data_); +void dvb_media_server2_start_rygel_services_finish (GAsyncResult* _res_); +static gboolean dvb_media_server2_start_rygel_services_co (DvbMediaServer2StartRygelServicesData* _data_); +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); +void dvb_utils_dbus_own_name (const gchar* service_name, GBusAcquiredCallback cb, void* cb_target); +static void _dvb_media_server2_on_bus_acquired_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self); static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static const DBusObjectPathVTable _dvb_media_server2_device_groups_media_container2_dbus_path_vtable = {_dvb_media_server2_device_groups_media_container2_dbus_unregister, dvb_media_server2_device_groups_media_container2_dbus_message}; -static const _DBusObjectVTable _dvb_media_server2_device_groups_media_container2_dbus_vtable = {dvb_media_server2_device_groups_media_container2_dbus_register_object}; -static const DBusObjectPathVTable _dvb_media_server2_channels_media_container2_dbus_path_vtable = {_dvb_media_server2_channels_media_container2_dbus_unregister, dvb_media_server2_channels_media_container2_dbus_message}; -static const _DBusObjectVTable _dvb_media_server2_channels_media_container2_dbus_vtable = {dvb_media_server2_channels_media_container2_dbus_register_object}; -static const DBusObjectPathVTable _dvb_media_server2_channel_media_item2_dbus_path_vtable = {_dvb_media_server2_channel_media_item2_dbus_unregister, dvb_media_server2_channel_media_item2_dbus_message}; -static const _DBusObjectVTable _dvb_media_server2_channel_media_item2_dbus_vtable = {dvb_media_server2_channel_media_item2_dbus_register_object}; - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_media_server2_device_groups_media_container2_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_media_server2_device_groups_media_container2_introspect (DVBMediaServer2DeviceGroupsMediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_media_server2_device_groups_media_container2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_media_server2_device_groups_media_container2_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (media_container2_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else if (media_object2_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_media_server2_device_groups_media_container2_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_media_server2_device_groups_media_container2_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - media_container2_dbus_register_object (connection, path, object); - media_object2_dbus_register_object (connection, path, object); -} - static gpointer _g_object_ref0 (gpointer self) { return self ? g_object_ref (self) : NULL; @@ -481,26 +431,38 @@ _tmp1_ = _g_object_ref0 (_tmp0_); manager = _tmp1_; { - GeeCollection* _tmp2_ = NULL; + DVBManager* _tmp2_; GeeCollection* _tmp3_; - GeeIterator* _tmp4_ = NULL; - GeeIterator* _tmp5_; + GeeCollection* _tmp4_; + GeeCollection* _tmp5_; + GeeIterator* _tmp6_ = NULL; + GeeIterator* _tmp7_; GeeIterator* _devgroup_it; - _tmp2_ = dvb_manager_get_device_groups (manager); - _tmp3_ = _tmp2_; - _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_); - _devgroup_it = (_tmp5_ = _tmp4_, _g_object_unref0 (_tmp3_), _tmp5_); + _tmp2_ = manager; + _tmp3_ = dvb_manager_get_device_groups (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = _tmp4_; + _tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_); + _tmp7_ = _tmp6_; + _g_object_unref0 (_tmp5_); + _devgroup_it = _tmp7_; while (TRUE) { - gboolean _tmp6_; - gpointer _tmp7_ = NULL; + GeeIterator* _tmp8_; + gboolean _tmp9_ = FALSE; + GeeIterator* _tmp10_; + gpointer _tmp11_ = NULL; DVBDeviceGroup* devgroup; - _tmp6_ = gee_iterator_next (_devgroup_it); - if (!_tmp6_) { + DVBDeviceGroup* _tmp12_; + _tmp8_ = _devgroup_it; + _tmp9_ = gee_iterator_next (_tmp8_); + if (!_tmp9_) { break; } - _tmp7_ = gee_iterator_get (_devgroup_it); - devgroup = (DVBDeviceGroup*) _tmp7_; - dvb_media_server2_device_groups_media_container2_create_service (self, devgroup); + _tmp10_ = _devgroup_it; + _tmp11_ = gee_iterator_get (_tmp10_); + devgroup = (DVBDeviceGroup*) _tmp11_; + _tmp12_ = devgroup; + dvb_media_server2_device_groups_media_container2_create_service (self, _tmp12_); _g_object_unref0 (devgroup); } _g_object_unref0 (_devgroup_it); @@ -510,36 +472,58 @@ static void dvb_media_server2_device_groups_media_container2_create_service (DVBMediaServer2DeviceGroupsMediaContainer2* self, DVBDeviceGroup* devgroup) { - guint _tmp0_; - DBusGConnection* _tmp1_ = NULL; - DBusGConnection* conn; - DVBMediaServer2ChannelsMediaContainer2* _tmp2_ = NULL; + DVBLoggingLogger* _tmp0_; + DVBDeviceGroup* _tmp1_; + guint _tmp2_; + guint _tmp3_; + DVBDeviceGroup* _tmp4_; + const char* _tmp5_; + DVBMediaServer2ChannelsMediaContainer2* _tmp6_; DVBMediaServer2ChannelsMediaContainer2* devgroup_container; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - guint _tmp5_; + GDBusConnection* _tmp7_; + gchar* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; + GDBusConnection* _tmp11_; + gchar* _tmp12_; + gchar* _tmp13_; + gchar* _tmp14_; + GDBusConnection* _tmp15_; + GeeHashMap* _tmp16_; + DVBDeviceGroup* _tmp17_; + guint _tmp18_; + guint _tmp19_; g_return_if_fail (self != NULL); g_return_if_fail (devgroup != NULL); - _tmp0_ = dvb_device_group_get_Id (devgroup); - g_debug ("Services2.vala:59: Creating container for device group %u", _tmp0_); - _tmp1_ = dvb_utils_get_dbus_connection (); - conn = _tmp1_; - if (conn == NULL) { - g_critical ("Services2.vala:63: Could not get DBus connection"); - _dbus_g_connection_unref0 (conn); - return; - } - _tmp2_ = dvb_media_server2_channels_media_container2_new (devgroup, self->priv->path); - devgroup_container = _tmp2_; - _tmp3_ = media_object2_get_Path ((MediaObject2*) devgroup_container); - _tmp4_ = _tmp3_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp4_, (GObject*) devgroup_container); - _g_free0 (_tmp4_); - dvb_media_server2_channels_media_container2_create_item_services (devgroup_container); - _tmp5_ = dvb_device_group_get_Id (devgroup); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->containers, GUINT_TO_POINTER (_tmp5_), devgroup_container); + _tmp0_ = dvb_media_server2_log; + _tmp1_ = devgroup; + _tmp2_ = dvb_device_group_get_Id (_tmp1_); + _tmp3_ = _tmp2_; + dvb_logging_logger_debug (_tmp0_, "Services2.vala:62: Creating container for device group %u", _tmp3_); + _tmp4_ = devgroup; + _tmp5_ = self->priv->path; + _tmp6_ = dvb_media_server2_channels_media_container2_new (_tmp4_, _tmp5_); + devgroup_container = _tmp6_; + _tmp7_ = dvb_media_server2_conn; + _tmp8_ = media_object2_get_Path ((MediaObject2*) devgroup_container); + _tmp9_ = _tmp8_; + _tmp10_ = _tmp9_; + dvb_utils_dbus_register_object (TYPE_MEDIA_CONTAINER2, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp7_, _tmp10_, (MediaContainer2*) devgroup_container); + _g_free0 (_tmp10_); + _tmp11_ = dvb_media_server2_conn; + _tmp12_ = media_object2_get_Path ((MediaObject2*) devgroup_container); + _tmp13_ = _tmp12_; + _tmp14_ = _tmp13_; + dvb_utils_dbus_register_object (TYPE_MEDIA_OBJECT2, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp11_, _tmp14_, (MediaObject2*) devgroup_container); + _g_free0 (_tmp14_); + _tmp15_ = dvb_media_server2_conn; + dvb_media_server2_channels_media_container2_create_item_services (devgroup_container, _tmp15_); + _tmp16_ = self->priv->containers; + _tmp17_ = devgroup; + _tmp18_ = dvb_device_group_get_Id (_tmp17_); + _tmp19_ = _tmp18_; + gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, GUINT_TO_POINTER (_tmp19_), devgroup_container); _g_object_unref0 (devgroup_container); - _dbus_g_connection_unref0 (conn); } @@ -548,126 +532,253 @@ } -static void _vala_GValue_free (GValue* self) { - g_value_unset (self); - g_free (self); +static void _g_variant_unref0_ (gpointer var) { + (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)); +} + + +static GVariant* _variant_new1 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); } -static void __vala_GValue_free0_ (gpointer var) { - (var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)); +static GVariant* _variant_new2 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); +} + + +static GVariant* _variant_new3 (guint value) { + return g_variant_ref_sink (g_variant_new_uint32 (value)); +} + + +static GVariant* _variant_new4 (gboolean value) { + return g_variant_ref_sink (g_variant_new_boolean (value)); +} + + +static GVariant* _variant_new5 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); +} + + +static GVariant* _variant_new6 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); } static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListContainers (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { DVBMediaServer2DeviceGroupsMediaContainer2 * self; GHashTable** result = NULL; - gint _tmp0_; - guint _tmp1_; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_ = 0U; guint num_elements; - GHashTable** _tmp2_ = NULL; + guint _tmp6_; + GHashTable** _tmp7_ = NULL; + GHashTable** hash; gint hash_length1; gint _hash_size_; - GHashTable** _tmp3_; - GHashTable** hash; gint i; - GHashTable** _tmp30_; + GHashTable** _tmp79_; + gint _tmp79__length1; self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->containers); - _tmp1_ = dvb_media_server2_get_num_elements (_tmp0_, offset, max); - num_elements = _tmp1_; - _tmp2_ = g_new0 (GHashTable*, num_elements + 1); - _tmp3_ = _tmp2_; - hash_length1 = num_elements; + _tmp0_ = self->priv->containers; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = offset; + _tmp4_ = max; + _tmp5_ = dvb_media_server2_get_num_elements (_tmp2_, _tmp3_, _tmp4_); + num_elements = _tmp5_; + _tmp6_ = num_elements; + _tmp7_ = g_new0 (GHashTable*, _tmp6_ + 1); + hash = _tmp7_; + hash_length1 = _tmp6_; _hash_size_ = hash_length1; - hash = _tmp3_; i = 0; { - GeeCollection* _tmp4_ = NULL; - GeeCollection* _tmp5_; - GeeIterator* _tmp6_ = NULL; - GeeIterator* _tmp7_; + GeeHashMap* _tmp8_; + GeeCollection* _tmp9_; + GeeCollection* _tmp10_; + GeeCollection* _tmp11_; + GeeIterator* _tmp12_ = NULL; + GeeIterator* _tmp13_; GeeIterator* _container_it; - _tmp4_ = gee_map_get_values ((GeeMap*) self->priv->containers); - _tmp5_ = _tmp4_; - _tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_); - _container_it = (_tmp7_ = _tmp6_, _g_object_unref0 (_tmp5_), _tmp7_); + _tmp8_ = self->priv->containers; + _tmp9_ = gee_map_get_values ((GeeMap*) _tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = _tmp10_; + _tmp12_ = gee_iterable_iterator ((GeeIterable*) _tmp11_); + _tmp13_ = _tmp12_; + _g_object_unref0 (_tmp11_); + _container_it = _tmp13_; while (TRUE) { - gboolean _tmp8_; - gpointer _tmp9_ = NULL; + GeeIterator* _tmp14_; + gboolean _tmp15_ = FALSE; + GeeIterator* _tmp16_; + gpointer _tmp17_ = NULL; DVBMediaServer2ChannelsMediaContainer2* container; - _tmp8_ = gee_iterator_next (_container_it); - if (!_tmp8_) { + gint _tmp18_; + guint _tmp19_; + gint _tmp75_; + gint _tmp76_; + guint _tmp77_; + guint _tmp78_; + _tmp14_ = _container_it; + _tmp15_ = gee_iterator_next (_tmp14_); + if (!_tmp15_) { break; } - _tmp9_ = gee_iterator_get (_container_it); - container = (DVBMediaServer2ChannelsMediaContainer2*) _tmp9_; - if (i >= offset) { + _tmp16_ = _container_it; + _tmp17_ = gee_iterator_get (_tmp16_); + container = (DVBMediaServer2ChannelsMediaContainer2*) _tmp17_; + _tmp18_ = i; + _tmp19_ = offset; + if (((guint) _tmp18_) >= _tmp19_) { + gint _tmp20_; + guint _tmp21_; guint index; - GHashTable* _tmp10_ = NULL; - GHashTable* _tmp11_; - gchar* _tmp12_; - gchar* _tmp13_ = NULL; - GValue* _tmp14_ = NULL; - gchar* _tmp15_; - gchar* _tmp16_ = NULL; - GValue* _tmp17_ = NULL; - gchar* _tmp18_; - guint _tmp19_; - GValue* _tmp20_ = NULL; - gchar* _tmp21_; - gboolean _tmp22_; - GValue* _tmp23_ = NULL; - gchar* _tmp24_; - gchar* _tmp25_ = NULL; - GValue* _tmp26_ = NULL; - gchar* _tmp27_; - gchar* _tmp28_ = NULL; - GValue* _tmp29_ = NULL; - index = i - offset; - _tmp10_ = g_hash_table_new_full (g_str_hash, g_str_equal, _g_free0_, __vala_GValue_free0_); - _tmp11_ = _tmp10_; - _g_hash_table_unref0 (hash[index]); - hash[index] = _tmp11_; - _tmp12_ = g_strdup ("Path"); - _tmp13_ = media_object2_get_Path ((MediaObject2*) container); - _tmp14_ = g_new0 (GValue, 1); - g_value_init (_tmp14_, G_TYPE_STRING); - g_value_take_string (_tmp14_, _tmp13_); - g_hash_table_insert (hash[index], _tmp12_, _tmp14_); - _tmp15_ = g_strdup ("DisplayName"); - _tmp16_ = media_object2_get_DisplayName ((MediaObject2*) container); - _tmp17_ = g_new0 (GValue, 1); - g_value_init (_tmp17_, G_TYPE_STRING); - g_value_take_string (_tmp17_, _tmp16_); - g_hash_table_insert (hash[index], _tmp15_, _tmp17_); - _tmp18_ = g_strdup ("ChildCount"); - _tmp19_ = media_container2_get_ChildCount ((MediaContainer2*) container); - _tmp20_ = g_new0 (GValue, 1); - g_value_init (_tmp20_, G_TYPE_UINT); - g_value_set_uint (_tmp20_, _tmp19_); - g_hash_table_insert (hash[index], _tmp18_, _tmp20_); - _tmp21_ = g_strdup ("Searchable"); - _tmp22_ = media_container2_get_Searchable ((MediaContainer2*) container); - _tmp23_ = g_new0 (GValue, 1); - g_value_init (_tmp23_, G_TYPE_BOOLEAN); - g_value_set_boolean (_tmp23_, _tmp22_); - g_hash_table_insert (hash[index], _tmp21_, _tmp23_); - _tmp24_ = g_strdup ("Type"); - _tmp25_ = media_object2_get_Type ((MediaObject2*) container); - _tmp26_ = g_new0 (GValue, 1); - g_value_init (_tmp26_, G_TYPE_STRING); - g_value_take_string (_tmp26_, _tmp25_); - g_hash_table_insert (hash[index], _tmp24_, _tmp26_); - _tmp27_ = g_strdup ("Parent"); - _tmp28_ = media_object2_get_Path ((MediaObject2*) self); - _tmp29_ = g_new0 (GValue, 1); - g_value_init (_tmp29_, G_TYPE_STRING); - g_value_take_string (_tmp29_, _tmp28_); - g_hash_table_insert (hash[index], _tmp27_, _tmp29_); + GHashTable** _tmp22_; + gint _tmp22__length1; + guint _tmp23_; + GHashFunc _tmp24_; + GEqualFunc _tmp25_; + GHashTable* _tmp26_; + GHashTable* _tmp27_; + GHashTable** _tmp28_; + gint _tmp28__length1; + guint _tmp29_; + GHashTable* _tmp30_; + gchar* _tmp31_; + DVBMediaServer2ChannelsMediaContainer2* _tmp32_; + gchar* _tmp33_; + gchar* _tmp34_; + GVariant* _tmp35_; + GHashTable** _tmp36_; + gint _tmp36__length1; + guint _tmp37_; + GHashTable* _tmp38_; + gchar* _tmp39_; + DVBMediaServer2ChannelsMediaContainer2* _tmp40_; + gchar* _tmp41_; + gchar* _tmp42_; + GVariant* _tmp43_; + GHashTable** _tmp44_; + gint _tmp44__length1; + guint _tmp45_; + GHashTable* _tmp46_; + gchar* _tmp47_; + DVBMediaServer2ChannelsMediaContainer2* _tmp48_; + guint _tmp49_; + guint _tmp50_; + GVariant* _tmp51_; + GHashTable** _tmp52_; + gint _tmp52__length1; + guint _tmp53_; + GHashTable* _tmp54_; + gchar* _tmp55_; + DVBMediaServer2ChannelsMediaContainer2* _tmp56_; + gboolean _tmp57_; + gboolean _tmp58_; + GVariant* _tmp59_; + GHashTable** _tmp60_; + gint _tmp60__length1; + guint _tmp61_; + GHashTable* _tmp62_; + gchar* _tmp63_; + DVBMediaServer2ChannelsMediaContainer2* _tmp64_; + gchar* _tmp65_; + gchar* _tmp66_; + GVariant* _tmp67_; + GHashTable** _tmp68_; + gint _tmp68__length1; + guint _tmp69_; + GHashTable* _tmp70_; + gchar* _tmp71_; + gchar* _tmp72_; + gchar* _tmp73_; + GVariant* _tmp74_; + _tmp20_ = i; + _tmp21_ = offset; + index = _tmp20_ - _tmp21_; + _tmp22_ = hash; + _tmp22__length1 = hash_length1; + _tmp23_ = index; + _tmp24_ = g_str_hash; + _tmp25_ = g_str_equal; + _tmp26_ = g_hash_table_new_full (_tmp24_, _tmp25_, _g_free0_, _g_variant_unref0_); + _g_hash_table_unref0 (_tmp22_[_tmp23_]); + _tmp22_[_tmp23_] = _tmp26_; + _tmp27_ = _tmp22_[_tmp23_]; + _tmp28_ = hash; + _tmp28__length1 = hash_length1; + _tmp29_ = index; + _tmp30_ = _tmp28_[_tmp29_]; + _tmp31_ = g_strdup ("Path"); + _tmp32_ = container; + _tmp33_ = media_object2_get_Path ((MediaObject2*) _tmp32_); + _tmp34_ = _tmp33_; + _tmp35_ = _variant_new1 (_tmp34_); + g_hash_table_insert (_tmp30_, _tmp31_, _tmp35_); + _tmp36_ = hash; + _tmp36__length1 = hash_length1; + _tmp37_ = index; + _tmp38_ = _tmp36_[_tmp37_]; + _tmp39_ = g_strdup ("DisplayName"); + _tmp40_ = container; + _tmp41_ = media_object2_get_DisplayName ((MediaObject2*) _tmp40_); + _tmp42_ = _tmp41_; + _tmp43_ = _variant_new2 (_tmp42_); + g_hash_table_insert (_tmp38_, _tmp39_, _tmp43_); + _tmp44_ = hash; + _tmp44__length1 = hash_length1; + _tmp45_ = index; + _tmp46_ = _tmp44_[_tmp45_]; + _tmp47_ = g_strdup ("ChildCount"); + _tmp48_ = container; + _tmp49_ = media_container2_get_ChildCount ((MediaContainer2*) _tmp48_); + _tmp50_ = _tmp49_; + _tmp51_ = _variant_new3 (_tmp50_); + g_hash_table_insert (_tmp46_, _tmp47_, _tmp51_); + _tmp52_ = hash; + _tmp52__length1 = hash_length1; + _tmp53_ = index; + _tmp54_ = _tmp52_[_tmp53_]; + _tmp55_ = g_strdup ("Searchable"); + _tmp56_ = container; + _tmp57_ = media_container2_get_Searchable ((MediaContainer2*) _tmp56_); + _tmp58_ = _tmp57_; + _tmp59_ = _variant_new4 (_tmp58_); + g_hash_table_insert (_tmp54_, _tmp55_, _tmp59_); + _tmp60_ = hash; + _tmp60__length1 = hash_length1; + _tmp61_ = index; + _tmp62_ = _tmp60_[_tmp61_]; + _tmp63_ = g_strdup ("Type"); + _tmp64_ = container; + _tmp65_ = media_object2_get_Type ((MediaObject2*) _tmp64_); + _tmp66_ = _tmp65_; + _tmp67_ = _variant_new5 (_tmp66_); + g_hash_table_insert (_tmp62_, _tmp63_, _tmp67_); + _tmp68_ = hash; + _tmp68__length1 = hash_length1; + _tmp69_ = index; + _tmp70_ = _tmp68_[_tmp69_]; + _tmp71_ = g_strdup ("Parent"); + _tmp72_ = media_object2_get_Path ((MediaObject2*) self); + _tmp73_ = _tmp72_; + _tmp74_ = _variant_new6 (_tmp73_); + g_hash_table_insert (_tmp70_, _tmp71_, _tmp74_); } - i++; - if (i >= (offset + num_elements)) { + _tmp75_ = i; + i = _tmp75_ + 1; + _tmp76_ = i; + _tmp77_ = offset; + _tmp78_ = num_elements; + if (((guint) _tmp76_) >= (_tmp77_ + _tmp78_)) { _g_object_unref0 (container); break; } @@ -675,9 +786,12 @@ } _g_object_unref0 (_container_it); } - _tmp30_ = hash; - *result_length1 = hash_length1; - result = _tmp30_; + _tmp79_ = hash; + _tmp79__length1 = hash_length1; + if (result_length1) { + *result_length1 = _tmp79__length1; + } + result = _tmp79_; return result; } @@ -685,22 +799,29 @@ static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListChildren (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { DVBMediaServer2DeviceGroupsMediaContainer2 * self; GHashTable** result = NULL; - gint _tmp0_; - GHashTable** _tmp1_ = NULL; + guint _tmp0_; + guint _tmp1_; + gchar** _tmp2_; gint _tmp2__length1; - gint __tmp2__size_; - GHashTable** _tmp3_; - GHashTable** _tmp2_; - GHashTable** _tmp4_; + gint _tmp3_ = 0; + GHashTable** _tmp4_ = NULL; + GHashTable** _tmp5_; + gint _tmp5__length1; + gint __tmp5__size_; + GHashTable** _tmp6_; + gint _tmp6__length1; GError * _inner_error_ = NULL; self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; - _tmp1_ = media_container2_ListContainers ((MediaContainer2*) self, offset, max, filter, filter_length1, &_tmp0_, &_inner_error_); - _tmp3_ = _tmp1_; - _tmp2__length1 = _tmp0_; - __tmp2__size_ = _tmp2__length1; - _tmp2_ = _tmp3_; + _tmp0_ = offset; + _tmp1_ = max; + _tmp2_ = filter; + _tmp2__length1 = filter_length1; + _tmp4_ = media_container2_ListContainers ((MediaContainer2*) self, _tmp0_, _tmp1_, _tmp2_, _tmp2__length1, &_tmp3_, &_inner_error_); + _tmp5_ = _tmp4_; + _tmp5__length1 = _tmp3_; + __tmp5__size_ = _tmp5__length1; if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return NULL; } else { @@ -709,9 +830,12 @@ return NULL; } } - _tmp4_ = _tmp2_; - *result_length1 = _tmp2__length1; - result = _tmp4_; + _tmp6_ = _tmp5_; + _tmp6__length1 = _tmp5__length1; + if (result_length1) { + *result_length1 = _tmp6__length1; + } + result = _tmp6_; return result; } @@ -721,10 +845,14 @@ GHashTable** result = NULL; GHashTable** _tmp0_ = NULL; GHashTable** _tmp1_; + gint _tmp1__length1; self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; _tmp0_ = g_new0 (GHashTable*, 0 + 1); _tmp1_ = _tmp0_; - *result_length1 = 0; + _tmp1__length1 = 0; + if (result_length1) { + *result_length1 = _tmp1__length1; + } result = _tmp1_; return result; } @@ -734,14 +862,16 @@ DVBManager* _tmp0_ = NULL; DVBManager* _tmp1_; DVBManager* manager; - DVBDeviceGroup* _tmp2_ = NULL; + guint _tmp2_; + DVBDeviceGroup* _tmp3_ = NULL; DVBDeviceGroup* devgroup; g_return_if_fail (self != NULL); _tmp0_ = dvb_manager_get_instance (); _tmp1_ = _g_object_ref0 (_tmp0_); manager = _tmp1_; - _tmp2_ = dvb_manager_get_device_group_if_exists (manager, group_id); - devgroup = _tmp2_; + _tmp2_ = group_id; + _tmp3_ = dvb_manager_get_device_group_if_exists (manager, _tmp2_); + devgroup = _tmp3_; dvb_media_server2_device_groups_media_container2_create_service (self, devgroup); g_signal_emit_by_name ((MediaContainer2*) self, "updated"); _g_object_unref0 (devgroup); @@ -750,8 +880,12 @@ static void dvb_media_server2_device_groups_media_container2_on_device_removed (DVBMediaServer2DeviceGroupsMediaContainer2* self, guint group_id) { + GeeHashMap* _tmp0_; + guint _tmp1_; g_return_if_fail (self != NULL); - gee_abstract_map_unset ((GeeAbstractMap*) self->priv->containers, GUINT_TO_POINTER (group_id), NULL); + _tmp0_ = self->priv->containers; + _tmp1_ = group_id; + gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, GUINT_TO_POINTER (_tmp1_), NULL); g_signal_emit_by_name ((MediaContainer2*) self, "updated"); } @@ -771,10 +905,12 @@ static char* dvb_media_server2_device_groups_media_container2_real_get_Parent (MediaObject2* base) { char* result; DVBMediaServer2DeviceGroupsMediaContainer2* self; - char* _tmp0_; + const char* _tmp0_; + char* _tmp1_; self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; - _tmp0_ = g_strdup (self->priv->path); - result = _tmp0_; + _tmp0_ = self->priv->path; + _tmp1_ = g_strdup (_tmp0_); + result = _tmp1_; return result; } @@ -825,9 +961,11 @@ guint result; DVBMediaServer2DeviceGroupsMediaContainer2* self; guint _tmp0_; + guint _tmp1_; self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; _tmp0_ = media_container2_get_ContainerCount ((MediaContainer2*) self); - result = _tmp0_; + _tmp1_ = _tmp0_; + result = _tmp1_; return result; } @@ -835,10 +973,14 @@ static guint dvb_media_server2_device_groups_media_container2_real_get_ContainerCount (MediaContainer2* base) { guint result; DVBMediaServer2DeviceGroupsMediaContainer2* self; - gint _tmp0_; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->containers); - result = (guint) _tmp0_; + _tmp0_ = self->priv->containers; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + result = (guint) _tmp2_; return result; } @@ -866,27 +1008,27 @@ GObject * obj; GObjectClass * parent_class; DVBMediaServer2DeviceGroupsMediaContainer2 * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; - DVBManager* _tmp2_ = NULL; - DVBManager* _tmp3_; + GeeHashMap* _tmp0_; + DVBManager* _tmp1_ = NULL; + DVBManager* _tmp2_; DVBManager* manager; - char* _tmp4_ = NULL; + DVBManager* _tmp3_; + DVBManager* _tmp4_; char* _tmp5_; parent_class = G_OBJECT_CLASS (dvb_media_server2_device_groups_media_container2_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2 (obj); _tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; _g_object_unref0 (self->priv->containers); - self->priv->containers = _tmp1_; - _tmp2_ = dvb_manager_get_instance (); - _tmp3_ = _g_object_ref0 (_tmp2_); - manager = _tmp3_; - g_signal_connect_object ((DVBIDBusManager*) manager, "group-added", (GCallback) _dvb_media_server2_device_groups_media_container2_on_device_added_dvb_id_bus_manager_group_added, self, 0); - g_signal_connect_object ((DVBIDBusManager*) manager, "group-removed", (GCallback) _dvb_media_server2_device_groups_media_container2_on_device_removed_dvb_id_bus_manager_group_removed, self, 0); - _tmp4_ = g_strdup (DVB_MEDIA_SERVER2_ROOT_PATH); - _tmp5_ = _tmp4_; + self->priv->containers = _tmp0_; + _tmp1_ = dvb_manager_get_instance (); + _tmp2_ = _g_object_ref0 (_tmp1_); + manager = _tmp2_; + _tmp3_ = manager; + g_signal_connect_object ((DVBIDBusManager*) _tmp3_, "group-added", (GCallback) _dvb_media_server2_device_groups_media_container2_on_device_added_dvb_id_bus_manager_group_added, self, 0); + _tmp4_ = manager; + g_signal_connect_object ((DVBIDBusManager*) _tmp4_, "group-removed", (GCallback) _dvb_media_server2_device_groups_media_container2_on_device_removed_dvb_id_bus_manager_group_removed, self, 0); + _tmp5_ = g_strdup (DVB_MEDIA_SERVER2_ROOT_PATH); _g_free0 (self->priv->path); self->priv->path = _tmp5_; _g_object_unref0 (manager); @@ -900,23 +1042,14 @@ G_OBJECT_CLASS (klass)->get_property = _vala_dvb_media_server2_device_groups_media_container2_get_property; G_OBJECT_CLASS (klass)->constructor = dvb_media_server2_device_groups_media_container2_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_media_server2_device_groups_media_container2_finalize; - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_PATH, "Path"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_TYPE, "Type"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_CHILD_COUNT, "ChildCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_CONTAINER_COUNT, "ContainerCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_SEARCHABLE, "Searchable"); - g_type_set_qdata (DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_media_server2_device_groups_media_container2_dbus_vtable)); } static void dvb_media_server2_device_groups_media_container2_media_container2_interface_init (MediaContainer2Iface * iface) { dvb_media_server2_device_groups_media_container2_media_container2_parent_iface = g_type_interface_peek_parent (iface); - iface->ListContainers = (GHashTable** (*)(MediaContainer2* ,guint ,guint ,gchar** ,int ,int* ,GError**)) dvb_media_server2_device_groups_media_container2_real_ListContainers; - iface->ListChildren = (GHashTable** (*)(MediaContainer2* ,guint ,guint ,gchar** ,int ,int* ,GError**)) dvb_media_server2_device_groups_media_container2_real_ListChildren; - iface->ListItems = (GHashTable** (*)(MediaContainer2* ,guint ,guint ,gchar** ,int ,int* ,GError**)) dvb_media_server2_device_groups_media_container2_real_ListItems; + iface->ListContainers = (GHashTable** (*)(MediaContainer2*, guint, guint, gchar**, int, int*, GError**)) dvb_media_server2_device_groups_media_container2_real_ListContainers; + iface->ListChildren = (GHashTable** (*)(MediaContainer2*, guint, guint, gchar**, int, int*, GError**)) dvb_media_server2_device_groups_media_container2_real_ListChildren; + iface->ListItems = (GHashTable** (*)(MediaContainer2*, guint, guint, gchar**, int, int*, GError**)) dvb_media_server2_device_groups_media_container2_real_ListItems; iface->get_ItemCount = dvb_media_server2_device_groups_media_container2_real_get_ItemCount; iface->get_ChildCount = dvb_media_server2_device_groups_media_container2_real_get_ChildCount; iface->get_ContainerCount = dvb_media_server2_device_groups_media_container2_real_get_ContainerCount; @@ -972,30 +1105,6 @@ DVBMediaServer2DeviceGroupsMediaContainer2 * self; self = DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2 (object); switch (property_id) { - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_PARENT: - g_value_take_string (value, media_object2_get_Parent ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_PATH: - g_value_take_string (value, media_object2_get_Path ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_DISPLAY_NAME: - g_value_take_string (value, media_object2_get_DisplayName ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_TYPE: - g_value_take_string (value, media_object2_get_Type ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_ITEM_COUNT: - g_value_set_uint (value, media_container2_get_ItemCount ((MediaContainer2*) self)); - break; - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_CHILD_COUNT: - g_value_set_uint (value, media_container2_get_ChildCount ((MediaContainer2*) self)); - break; - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_CONTAINER_COUNT: - g_value_set_uint (value, media_container2_get_ContainerCount ((MediaContainer2*) self)); - break; - case DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_SEARCHABLE: - g_value_set_boolean (value, media_container2_get_Searchable ((MediaContainer2*) self)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -1003,82 +1112,21 @@ } -void _dvb_media_server2_channels_media_container2_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_media_server2_channels_media_container2_introspect (DVBMediaServer2ChannelsMediaContainer2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_media_server2_channels_media_container2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_media_server2_channels_media_container2_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (media_container2_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else if (media_object2_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_media_server2_channels_media_container2_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_media_server2_channels_media_container2_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - media_container2_dbus_register_object (connection, path, object); - media_object2_dbus_register_object (connection, path, object); -} - - DVBMediaServer2ChannelsMediaContainer2* dvb_media_server2_channels_media_container2_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent) { DVBMediaServer2ChannelsMediaContainer2 * self = NULL; DVBDeviceGroup* _tmp0_; DVBDeviceGroup* _tmp1_; - char* _tmp2_; + const char* _tmp2_; char* _tmp3_; g_return_val_if_fail (devgroup != NULL, NULL); g_return_val_if_fail (parent != NULL, NULL); self = (DVBMediaServer2ChannelsMediaContainer2*) g_object_new (object_type, NULL); - _tmp0_ = _g_object_ref0 (devgroup); - _tmp1_ = _tmp0_; + _tmp0_ = devgroup; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->device_group); self->priv->device_group = _tmp1_; - _tmp2_ = g_strdup (parent); - _tmp3_ = _tmp2_; + _tmp2_ = parent; + _tmp3_ = g_strdup (_tmp2_); _g_free0 (self->parent); self->parent = _tmp3_; return self; @@ -1090,26 +1138,37 @@ } -void dvb_media_server2_channels_media_container2_create_item_services (DVBMediaServer2ChannelsMediaContainer2* self) { +void dvb_media_server2_channels_media_container2_create_item_services (DVBMediaServer2ChannelsMediaContainer2* self, GDBusConnection* conn) { g_return_if_fail (self != NULL); + g_return_if_fail (conn != NULL); { - DVBChannelList* _tmp0_ = NULL; - GeeIterator* _tmp1_ = NULL; + DVBDeviceGroup* _tmp0_; + DVBChannelList* _tmp1_; + DVBChannelList* _tmp2_; + GeeIterator* _tmp3_ = NULL; GeeIterator* _channel_it; - _tmp0_ = dvb_device_group_get_Channels (self->priv->device_group); - _tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_); - _channel_it = _tmp1_; + _tmp0_ = self->priv->device_group; + _tmp1_ = dvb_device_group_get_Channels (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_); + _channel_it = _tmp3_; while (TRUE) { - gboolean _tmp2_; - gpointer _tmp3_ = NULL; + GeeIterator* _tmp4_; + gboolean _tmp5_ = FALSE; + GeeIterator* _tmp6_; + gpointer _tmp7_ = NULL; DVBChannel* channel; - _tmp2_ = gee_iterator_next (_channel_it); - if (!_tmp2_) { + DVBChannel* _tmp8_; + _tmp4_ = _channel_it; + _tmp5_ = gee_iterator_next (_tmp4_); + if (!_tmp5_) { break; } - _tmp3_ = gee_iterator_get (_channel_it); - channel = (DVBChannel*) _tmp3_; - dvb_media_server2_channels_media_container2_create_service (self, channel); + _tmp6_ = _channel_it; + _tmp7_ = gee_iterator_get (_tmp6_); + channel = (DVBChannel*) _tmp7_; + _tmp8_ = channel; + dvb_media_server2_channels_media_container2_create_service (self, _tmp8_); _g_object_unref0 (channel); } _g_object_unref0 (_channel_it); @@ -1118,157 +1177,324 @@ void dvb_media_server2_channels_media_container2_create_service (DVBMediaServer2ChannelsMediaContainer2* self, DVBChannel* channel) { - guint _tmp0_; - DBusGConnection* _tmp1_ = NULL; - DBusGConnection* conn; - gchar* _tmp2_ = NULL; - gchar* _tmp3_; - char* _tmp4_ = NULL; - char* _tmp5_; - DVBMediaServer2ChannelMediaItem2* _tmp6_ = NULL; - DVBMediaServer2ChannelMediaItem2* _tmp7_; + DVBLoggingLogger* _tmp0_; + DVBChannel* _tmp1_; + guint _tmp2_; + guint _tmp3_; + DVBChannel* _tmp4_; + gchar* _tmp5_; + gchar* _tmp6_; + gchar* _tmp7_; + char* _tmp8_; + char* _tmp9_; + DVBMediaServer2ChannelMediaItem2* _tmp10_; + DVBMediaServer2ChannelMediaItem2* _tmp11_; DVBMediaServer2ChannelMediaItem2* channel_item; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - guint _tmp10_; + GDBusConnection* _tmp12_; + gchar* _tmp13_; + gchar* _tmp14_; + gchar* _tmp15_; + GDBusConnection* _tmp16_; + gchar* _tmp17_; + gchar* _tmp18_; + gchar* _tmp19_; + GeeHashMap* _tmp20_; + DVBChannel* _tmp21_; + guint _tmp22_; + guint _tmp23_; g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); - _tmp0_ = dvb_channel_get_Sid (channel); - g_debug ("Services2.vala:204: Creating container for channel %u", _tmp0_); - _tmp1_ = dvb_utils_get_dbus_connection (); - conn = _tmp1_; - if (conn == NULL) { - g_critical ("Services2.vala:208: Could not get DBus connection"); - _dbus_g_connection_unref0 (conn); - return; - } - _tmp2_ = media_object2_get_Path ((MediaObject2*) self); + _tmp0_ = dvb_media_server2_log; + _tmp1_ = channel; + _tmp2_ = dvb_channel_get_Sid (_tmp1_); _tmp3_ = _tmp2_; - _tmp4_ = g_strdup (_tmp3_); - _tmp5_ = _tmp4_; - _tmp6_ = dvb_media_server2_channel_media_item2_new (channel, _tmp5_); - channel_item = (_tmp7_ = _tmp6_, _g_free0 (_tmp5_), _g_free0 (_tmp3_), _tmp7_); - _tmp8_ = media_object2_get_Path ((MediaObject2*) channel_item); + dvb_logging_logger_debug (_tmp0_, "Services2.vala:205: Creating container for channel %u", _tmp3_); + _tmp4_ = channel; + _tmp5_ = media_object2_get_Path ((MediaObject2*) self); + _tmp6_ = _tmp5_; + _tmp7_ = _tmp6_; + _tmp8_ = g_strdup (_tmp7_); _tmp9_ = _tmp8_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp9_, (GObject*) channel_item); + _tmp10_ = dvb_media_server2_channel_media_item2_new (_tmp4_, _tmp9_); + _tmp11_ = _tmp10_; _g_free0 (_tmp9_); - _tmp10_ = dvb_channel_get_Sid (channel); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->items, GUINT_TO_POINTER (_tmp10_), channel_item); + _g_free0 (_tmp7_); + channel_item = _tmp11_; + _tmp12_ = dvb_media_server2_conn; + _tmp13_ = media_object2_get_Path ((MediaObject2*) channel_item); + _tmp14_ = _tmp13_; + _tmp15_ = _tmp14_; + dvb_utils_dbus_register_object (TYPE_MEDIA_ITEM2, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp12_, _tmp15_, (MediaItem2*) channel_item); + _g_free0 (_tmp15_); + _tmp16_ = dvb_media_server2_conn; + _tmp17_ = media_object2_get_Path ((MediaObject2*) channel_item); + _tmp18_ = _tmp17_; + _tmp19_ = _tmp18_; + dvb_utils_dbus_register_object (TYPE_MEDIA_OBJECT2, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp16_, _tmp19_, (MediaObject2*) channel_item); + _g_free0 (_tmp19_); + _tmp20_ = self->priv->items; + _tmp21_ = channel; + _tmp22_ = dvb_channel_get_Sid (_tmp21_); + _tmp23_ = _tmp22_; + gee_abstract_map_set ((GeeAbstractMap*) _tmp20_, GUINT_TO_POINTER (_tmp23_), channel_item); _g_object_unref0 (channel_item); - _dbus_g_connection_unref0 (conn); +} + + +static GVariant* _variant_new7 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); +} + + +static GVariant* _variant_new8 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); +} + + +static GVariant* _variant_new9 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); +} + + +static GVariant* _variant_new10 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); +} + + +static GVariant* _variant_new11 (gchar** value, gint value_length1) { + gchar** _tmp67_; + GVariantBuilder _tmp68_; + int _tmp69_; + _tmp67_ = value; + g_variant_builder_init (&_tmp68_, G_VARIANT_TYPE ("as")); + for (_tmp69_ = 0; _tmp69_ < value_length1; _tmp69_++) { + g_variant_builder_add_value (&_tmp68_, g_variant_new_string (*_tmp67_)); + _tmp67_++; + } + return g_variant_ref_sink (g_variant_builder_end (&_tmp68_)); +} + + +static GVariant* _variant_new12 (gchar* value) { + return g_variant_ref_sink (g_variant_new_string (value)); } static GHashTable** dvb_media_server2_channels_media_container2_real_ListItems (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { DVBMediaServer2ChannelsMediaContainer2 * self; GHashTable** result = NULL; - gint _tmp0_; - guint _tmp1_; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_ = 0U; guint num_elements; - GHashTable** _tmp2_ = NULL; + guint _tmp6_; + GHashTable** _tmp7_ = NULL; + GHashTable** hash; gint hash_length1; gint _hash_size_; - GHashTable** _tmp3_; - GHashTable** hash; guint i; - GHashTable** _tmp31_; + GHashTable** _tmp82_; + gint _tmp82__length1; self = (DVBMediaServer2ChannelsMediaContainer2*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->items); - _tmp1_ = dvb_media_server2_get_num_elements (_tmp0_, offset, max); - num_elements = _tmp1_; - _tmp2_ = g_new0 (GHashTable*, num_elements + 1); - _tmp3_ = _tmp2_; - hash_length1 = num_elements; + _tmp0_ = self->priv->items; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = offset; + _tmp4_ = max; + _tmp5_ = dvb_media_server2_get_num_elements (_tmp2_, _tmp3_, _tmp4_); + num_elements = _tmp5_; + _tmp6_ = num_elements; + _tmp7_ = g_new0 (GHashTable*, _tmp6_ + 1); + hash = _tmp7_; + hash_length1 = _tmp6_; _hash_size_ = hash_length1; - hash = _tmp3_; i = (guint) 0; { - GeeCollection* _tmp4_ = NULL; - GeeCollection* _tmp5_; - GeeIterator* _tmp6_ = NULL; - GeeIterator* _tmp7_; + GeeHashMap* _tmp8_; + GeeCollection* _tmp9_; + GeeCollection* _tmp10_; + GeeCollection* _tmp11_; + GeeIterator* _tmp12_ = NULL; + GeeIterator* _tmp13_; GeeIterator* _item_it; - _tmp4_ = gee_map_get_values ((GeeMap*) self->priv->items); - _tmp5_ = _tmp4_; - _tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_); - _item_it = (_tmp7_ = _tmp6_, _g_object_unref0 (_tmp5_), _tmp7_); + _tmp8_ = self->priv->items; + _tmp9_ = gee_map_get_values ((GeeMap*) _tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = _tmp10_; + _tmp12_ = gee_iterable_iterator ((GeeIterable*) _tmp11_); + _tmp13_ = _tmp12_; + _g_object_unref0 (_tmp11_); + _item_it = _tmp13_; while (TRUE) { - gboolean _tmp8_; - gpointer _tmp9_ = NULL; + GeeIterator* _tmp14_; + gboolean _tmp15_ = FALSE; + GeeIterator* _tmp16_; + gpointer _tmp17_ = NULL; DVBMediaServer2ChannelMediaItem2* item; - _tmp8_ = gee_iterator_next (_item_it); - if (!_tmp8_) { + guint _tmp18_; + guint _tmp19_; + guint _tmp78_; + guint _tmp79_; + guint _tmp80_; + guint _tmp81_; + _tmp14_ = _item_it; + _tmp15_ = gee_iterator_next (_tmp14_); + if (!_tmp15_) { break; } - _tmp9_ = gee_iterator_get (_item_it); - item = (DVBMediaServer2ChannelMediaItem2*) _tmp9_; - if (i >= offset) { + _tmp16_ = _item_it; + _tmp17_ = gee_iterator_get (_tmp16_); + item = (DVBMediaServer2ChannelMediaItem2*) _tmp17_; + _tmp18_ = i; + _tmp19_ = offset; + if (_tmp18_ >= _tmp19_) { + guint _tmp20_; + guint _tmp21_; guint index; - GHashTable* _tmp10_ = NULL; - GHashTable* _tmp11_; - gchar* _tmp12_; - gchar* _tmp13_ = NULL; - GValue* _tmp14_ = NULL; - gchar* _tmp15_; - gchar* _tmp16_ = NULL; - GValue* _tmp17_ = NULL; - gchar* _tmp18_; - gchar* _tmp19_ = NULL; - GValue* _tmp20_ = NULL; - gchar* _tmp21_; - gchar* _tmp22_ = NULL; - GValue* _tmp23_ = NULL; - gchar* _tmp24_; - gchar** _tmp25_ = NULL; - gint _tmp26_; - GValue* _tmp27_ = NULL; - gchar* _tmp28_; - gchar* _tmp29_ = NULL; - GValue* _tmp30_ = NULL; - index = i - offset; - _tmp10_ = g_hash_table_new_full (g_str_hash, g_str_equal, _g_free0_, __vala_GValue_free0_); - _tmp11_ = _tmp10_; - _g_hash_table_unref0 (hash[index]); - hash[index] = _tmp11_; - _tmp12_ = g_strdup ("Path"); - _tmp13_ = media_object2_get_Path ((MediaObject2*) item); - _tmp14_ = g_new0 (GValue, 1); - g_value_init (_tmp14_, G_TYPE_STRING); - g_value_take_string (_tmp14_, _tmp13_); - g_hash_table_insert (hash[index], _tmp12_, _tmp14_); - _tmp15_ = g_strdup ("DisplayName"); - _tmp16_ = media_object2_get_DisplayName ((MediaObject2*) item); - _tmp17_ = g_new0 (GValue, 1); - g_value_init (_tmp17_, G_TYPE_STRING); - g_value_take_string (_tmp17_, _tmp16_); - g_hash_table_insert (hash[index], _tmp15_, _tmp17_); - _tmp18_ = g_strdup ("Type"); - _tmp19_ = media_object2_get_Type ((MediaObject2*) item); - _tmp20_ = g_new0 (GValue, 1); - g_value_init (_tmp20_, G_TYPE_STRING); - g_value_take_string (_tmp20_, _tmp19_); - g_hash_table_insert (hash[index], _tmp18_, _tmp20_); - _tmp21_ = g_strdup ("MIMEType"); - _tmp22_ = media_item2_get_MIMEType ((MediaItem2*) item); - _tmp23_ = g_new0 (GValue, 1); - g_value_init (_tmp23_, G_TYPE_STRING); - g_value_take_string (_tmp23_, _tmp22_); - g_hash_table_insert (hash[index], _tmp21_, _tmp23_); - _tmp24_ = g_strdup ("URLs"); - _tmp25_ = media_item2_get_URLs ((MediaItem2*) item, &_tmp26_); - _tmp27_ = g_new0 (GValue, 1); - g_value_init (_tmp27_, G_TYPE_STRV); - g_value_take_boxed (_tmp27_, _tmp25_); - g_hash_table_insert (hash[index], _tmp24_, _tmp27_); - _tmp28_ = g_strdup ("Parent"); - _tmp29_ = media_object2_get_Path ((MediaObject2*) self); - _tmp30_ = g_new0 (GValue, 1); - g_value_init (_tmp30_, G_TYPE_STRING); - g_value_take_string (_tmp30_, _tmp29_); - g_hash_table_insert (hash[index], _tmp28_, _tmp30_); + GHashTable** _tmp22_; + gint _tmp22__length1; + guint _tmp23_; + GHashFunc _tmp24_; + GEqualFunc _tmp25_; + GHashTable* _tmp26_; + GHashTable* _tmp27_; + GHashTable** _tmp28_; + gint _tmp28__length1; + guint _tmp29_; + GHashTable* _tmp30_; + gchar* _tmp31_; + DVBMediaServer2ChannelMediaItem2* _tmp32_; + gchar* _tmp33_; + gchar* _tmp34_; + GVariant* _tmp35_; + GHashTable** _tmp36_; + gint _tmp36__length1; + guint _tmp37_; + GHashTable* _tmp38_; + gchar* _tmp39_; + DVBMediaServer2ChannelMediaItem2* _tmp40_; + gchar* _tmp41_; + gchar* _tmp42_; + GVariant* _tmp43_; + GHashTable** _tmp44_; + gint _tmp44__length1; + guint _tmp45_; + GHashTable* _tmp46_; + gchar* _tmp47_; + DVBMediaServer2ChannelMediaItem2* _tmp48_; + gchar* _tmp49_; + gchar* _tmp50_; + GVariant* _tmp51_; + GHashTable** _tmp52_; + gint _tmp52__length1; + guint _tmp53_; + GHashTable* _tmp54_; + gchar* _tmp55_; + DVBMediaServer2ChannelMediaItem2* _tmp56_; + gchar* _tmp57_; + gchar* _tmp58_; + GVariant* _tmp59_; + GHashTable** _tmp60_; + gint _tmp60__length1; + guint _tmp61_; + GHashTable* _tmp62_; + gchar* _tmp63_; + DVBMediaServer2ChannelMediaItem2* _tmp64_; + gchar** _tmp65_; + gint _tmp65__length1; + gchar** _tmp66_; + gint _tmp66__length1; + GVariant* _tmp70_; + GHashTable** _tmp71_; + gint _tmp71__length1; + guint _tmp72_; + GHashTable* _tmp73_; + gchar* _tmp74_; + gchar* _tmp75_; + gchar* _tmp76_; + GVariant* _tmp77_; + _tmp20_ = i; + _tmp21_ = offset; + index = _tmp20_ - _tmp21_; + _tmp22_ = hash; + _tmp22__length1 = hash_length1; + _tmp23_ = index; + _tmp24_ = g_str_hash; + _tmp25_ = g_str_equal; + _tmp26_ = g_hash_table_new_full (_tmp24_, _tmp25_, _g_free0_, _g_variant_unref0_); + _g_hash_table_unref0 (_tmp22_[_tmp23_]); + _tmp22_[_tmp23_] = _tmp26_; + _tmp27_ = _tmp22_[_tmp23_]; + _tmp28_ = hash; + _tmp28__length1 = hash_length1; + _tmp29_ = index; + _tmp30_ = _tmp28_[_tmp29_]; + _tmp31_ = g_strdup ("Path"); + _tmp32_ = item; + _tmp33_ = media_object2_get_Path ((MediaObject2*) _tmp32_); + _tmp34_ = _tmp33_; + _tmp35_ = _variant_new7 (_tmp34_); + g_hash_table_insert (_tmp30_, _tmp31_, _tmp35_); + _tmp36_ = hash; + _tmp36__length1 = hash_length1; + _tmp37_ = index; + _tmp38_ = _tmp36_[_tmp37_]; + _tmp39_ = g_strdup ("DisplayName"); + _tmp40_ = item; + _tmp41_ = media_object2_get_DisplayName ((MediaObject2*) _tmp40_); + _tmp42_ = _tmp41_; + _tmp43_ = _variant_new8 (_tmp42_); + g_hash_table_insert (_tmp38_, _tmp39_, _tmp43_); + _tmp44_ = hash; + _tmp44__length1 = hash_length1; + _tmp45_ = index; + _tmp46_ = _tmp44_[_tmp45_]; + _tmp47_ = g_strdup ("Type"); + _tmp48_ = item; + _tmp49_ = media_object2_get_Type ((MediaObject2*) _tmp48_); + _tmp50_ = _tmp49_; + _tmp51_ = _variant_new9 (_tmp50_); + g_hash_table_insert (_tmp46_, _tmp47_, _tmp51_); + _tmp52_ = hash; + _tmp52__length1 = hash_length1; + _tmp53_ = index; + _tmp54_ = _tmp52_[_tmp53_]; + _tmp55_ = g_strdup ("MIMEType"); + _tmp56_ = item; + _tmp57_ = media_item2_get_MIMEType ((MediaItem2*) _tmp56_); + _tmp58_ = _tmp57_; + _tmp59_ = _variant_new10 (_tmp58_); + g_hash_table_insert (_tmp54_, _tmp55_, _tmp59_); + _tmp60_ = hash; + _tmp60__length1 = hash_length1; + _tmp61_ = index; + _tmp62_ = _tmp60_[_tmp61_]; + _tmp63_ = g_strdup ("URLs"); + _tmp64_ = item; + _tmp65_ = media_item2_get_URLs ((MediaItem2*) _tmp64_, &_tmp65__length1); + _tmp66_ = _tmp65_; + _tmp66__length1 = _tmp65__length1; + _tmp70_ = _variant_new11 (_tmp66_, _tmp66__length1); + g_hash_table_insert (_tmp62_, _tmp63_, _tmp70_); + _tmp71_ = hash; + _tmp71__length1 = hash_length1; + _tmp72_ = index; + _tmp73_ = _tmp71_[_tmp72_]; + _tmp74_ = g_strdup ("Parent"); + _tmp75_ = media_object2_get_Path ((MediaObject2*) self); + _tmp76_ = _tmp75_; + _tmp77_ = _variant_new12 (_tmp76_); + g_hash_table_insert (_tmp73_, _tmp74_, _tmp77_); } - i++; - if (i >= (offset + num_elements)) { + _tmp78_ = i; + i = _tmp78_ + 1; + _tmp79_ = i; + _tmp80_ = offset; + _tmp81_ = num_elements; + if (_tmp79_ >= (_tmp80_ + _tmp81_)) { _g_object_unref0 (item); break; } @@ -1276,9 +1502,12 @@ } _g_object_unref0 (_item_it); } - _tmp31_ = hash; - *result_length1 = hash_length1; - result = _tmp31_; + _tmp82_ = hash; + _tmp82__length1 = hash_length1; + if (result_length1) { + *result_length1 = _tmp82__length1; + } + result = _tmp82_; return result; } @@ -1288,10 +1517,14 @@ GHashTable** result = NULL; GHashTable** _tmp0_ = NULL; GHashTable** _tmp1_; + gint _tmp1__length1; self = (DVBMediaServer2ChannelsMediaContainer2*) base; _tmp0_ = g_new0 (GHashTable*, 0 + 1); _tmp1_ = _tmp0_; - *result_length1 = 0; + _tmp1__length1 = 0; + if (result_length1) { + *result_length1 = _tmp1__length1; + } result = _tmp1_; return result; } @@ -1300,22 +1533,29 @@ static GHashTable** dvb_media_server2_channels_media_container2_real_ListChildren (MediaContainer2* base, guint offset, guint max, gchar** filter, int filter_length1, int* result_length1, GError** error) { DVBMediaServer2ChannelsMediaContainer2 * self; GHashTable** result = NULL; - gint _tmp0_; - GHashTable** _tmp1_ = NULL; + guint _tmp0_; + guint _tmp1_; + gchar** _tmp2_; gint _tmp2__length1; - gint __tmp2__size_; - GHashTable** _tmp3_; - GHashTable** _tmp2_; - GHashTable** _tmp4_; + gint _tmp3_ = 0; + GHashTable** _tmp4_ = NULL; + GHashTable** _tmp5_; + gint _tmp5__length1; + gint __tmp5__size_; + GHashTable** _tmp6_; + gint _tmp6__length1; GError * _inner_error_ = NULL; self = (DVBMediaServer2ChannelsMediaContainer2*) base; - _tmp1_ = media_container2_ListItems ((MediaContainer2*) self, offset, max, filter, filter_length1, &_tmp0_, &_inner_error_); - _tmp3_ = _tmp1_; - _tmp2__length1 = _tmp0_; - __tmp2__size_ = _tmp2__length1; - _tmp2_ = _tmp3_; + _tmp0_ = offset; + _tmp1_ = max; + _tmp2_ = filter; + _tmp2__length1 = filter_length1; + _tmp4_ = media_container2_ListItems ((MediaContainer2*) self, _tmp0_, _tmp1_, _tmp2_, _tmp2__length1, &_tmp3_, &_inner_error_); + _tmp5_ = _tmp4_; + _tmp5__length1 = _tmp3_; + __tmp5__size_ = _tmp5__length1; if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return NULL; } else { @@ -1324,9 +1564,12 @@ return NULL; } } - _tmp4_ = _tmp2_; - *result_length1 = _tmp2__length1; - result = _tmp4_; + _tmp6_ = _tmp5_; + _tmp6__length1 = _tmp5__length1; + if (result_length1) { + *result_length1 = _tmp6__length1; + } + result = _tmp6_; return result; } @@ -1334,10 +1577,12 @@ static char* dvb_media_server2_channels_media_container2_real_get_Parent (MediaObject2* base) { char* result; DVBMediaServer2ChannelsMediaContainer2* self; - char* _tmp0_; + const char* _tmp0_; + char* _tmp1_; self = (DVBMediaServer2ChannelsMediaContainer2*) base; - _tmp0_ = g_strdup (self->parent); - result = _tmp0_; + _tmp0_ = self->parent; + _tmp1_ = g_strdup (_tmp0_); + result = _tmp1_; return result; } @@ -1345,12 +1590,16 @@ static gchar* dvb_media_server2_channels_media_container2_real_get_Path (MediaObject2* base) { gchar* result; DVBMediaServer2ChannelsMediaContainer2* self; - guint _tmp0_; - gchar* _tmp1_ = NULL; + DVBDeviceGroup* _tmp0_; + guint _tmp1_; + guint _tmp2_; + gchar* _tmp3_ = NULL; self = (DVBMediaServer2ChannelsMediaContainer2*) base; - _tmp0_ = dvb_device_group_get_Id (self->priv->device_group); - _tmp1_ = g_strdup_printf (DVB_MEDIA_SERVER2_GROUP_PATH, _tmp0_); - result = _tmp1_; + _tmp0_ = self->priv->device_group; + _tmp1_ = dvb_device_group_get_Id (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = g_strdup_printf (DVB_MEDIA_SERVER2_GROUP_PATH, _tmp2_); + result = _tmp3_; return result; } @@ -1358,12 +1607,16 @@ static gchar* dvb_media_server2_channels_media_container2_real_get_DisplayName (MediaObject2* base) { gchar* result; DVBMediaServer2ChannelsMediaContainer2* self; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_; + DVBDeviceGroup* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_; self = (DVBMediaServer2ChannelsMediaContainer2*) base; - _tmp0_ = dvb_device_group_get_Name (self->priv->device_group); - _tmp1_ = g_strdup (_tmp0_); - result = _tmp1_; + _tmp0_ = self->priv->device_group; + _tmp1_ = dvb_device_group_get_Name (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = g_strdup (_tmp2_); + result = _tmp3_; return result; } @@ -1383,9 +1636,11 @@ guint result; DVBMediaServer2ChannelsMediaContainer2* self; guint _tmp0_; + guint _tmp1_; self = (DVBMediaServer2ChannelsMediaContainer2*) base; _tmp0_ = media_container2_get_ItemCount ((MediaContainer2*) self); - result = _tmp0_; + _tmp1_ = _tmp0_; + result = _tmp1_; return result; } @@ -1393,10 +1648,14 @@ static guint dvb_media_server2_channels_media_container2_real_get_ItemCount (MediaContainer2* base) { guint result; DVBMediaServer2ChannelsMediaContainer2* self; - gint _tmp0_; + GeeHashMap* _tmp0_; + gint _tmp1_; + gint _tmp2_; self = (DVBMediaServer2ChannelsMediaContainer2*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->items); - result = (guint) _tmp0_; + _tmp0_ = self->priv->items; + _tmp1_ = gee_map_get_size ((GeeMap*) _tmp0_); + _tmp2_ = _tmp1_; + result = (guint) _tmp2_; return result; } @@ -1423,15 +1682,13 @@ GObject * obj; GObjectClass * parent_class; DVBMediaServer2ChannelsMediaContainer2 * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; + GeeHashMap* _tmp0_; parent_class = G_OBJECT_CLASS (dvb_media_server2_channels_media_container2_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2 (obj); _tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; _g_object_unref0 (self->priv->items); - self->priv->items = _tmp1_; + self->priv->items = _tmp0_; return obj; } @@ -1442,23 +1699,14 @@ G_OBJECT_CLASS (klass)->get_property = _vala_dvb_media_server2_channels_media_container2_get_property; G_OBJECT_CLASS (klass)->constructor = dvb_media_server2_channels_media_container2_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_media_server2_channels_media_container2_finalize; - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_PATH, "Path"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_TYPE, "Type"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_CHILD_COUNT, "ChildCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_CONTAINER_COUNT, "ContainerCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_SEARCHABLE, "Searchable"); - g_type_set_qdata (DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_media_server2_channels_media_container2_dbus_vtable)); } static void dvb_media_server2_channels_media_container2_media_container2_interface_init (MediaContainer2Iface * iface) { dvb_media_server2_channels_media_container2_media_container2_parent_iface = g_type_interface_peek_parent (iface); - iface->ListItems = (GHashTable** (*)(MediaContainer2* ,guint ,guint ,gchar** ,int ,int* ,GError**)) dvb_media_server2_channels_media_container2_real_ListItems; - iface->ListContainers = (GHashTable** (*)(MediaContainer2* ,guint ,guint ,gchar** ,int ,int* ,GError**)) dvb_media_server2_channels_media_container2_real_ListContainers; - iface->ListChildren = (GHashTable** (*)(MediaContainer2* ,guint ,guint ,gchar** ,int ,int* ,GError**)) dvb_media_server2_channels_media_container2_real_ListChildren; + iface->ListItems = (GHashTable** (*)(MediaContainer2*, guint, guint, gchar**, int, int*, GError**)) dvb_media_server2_channels_media_container2_real_ListItems; + iface->ListContainers = (GHashTable** (*)(MediaContainer2*, guint, guint, gchar**, int, int*, GError**)) dvb_media_server2_channels_media_container2_real_ListContainers; + iface->ListChildren = (GHashTable** (*)(MediaContainer2*, guint, guint, gchar**, int, int*, GError**)) dvb_media_server2_channels_media_container2_real_ListChildren; iface->get_ChildCount = dvb_media_server2_channels_media_container2_real_get_ChildCount; iface->get_ItemCount = dvb_media_server2_channels_media_container2_real_get_ItemCount; iface->get_ContainerCount = dvb_media_server2_channels_media_container2_real_get_ContainerCount; @@ -1515,30 +1763,6 @@ DVBMediaServer2ChannelsMediaContainer2 * self; self = DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2 (object); switch (property_id) { - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_PARENT: - g_value_take_string (value, media_object2_get_Parent ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_PATH: - g_value_take_string (value, media_object2_get_Path ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_DISPLAY_NAME: - g_value_take_string (value, media_object2_get_DisplayName ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_TYPE: - g_value_take_string (value, media_object2_get_Type ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_CHILD_COUNT: - g_value_set_uint (value, media_container2_get_ChildCount ((MediaContainer2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_ITEM_COUNT: - g_value_set_uint (value, media_container2_get_ItemCount ((MediaContainer2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_CONTAINER_COUNT: - g_value_set_uint (value, media_container2_get_ContainerCount ((MediaContainer2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_SEARCHABLE: - g_value_set_boolean (value, media_container2_get_Searchable ((MediaContainer2*) self)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -1546,82 +1770,21 @@ } -void _dvb_media_server2_channel_media_item2_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_media_server2_channel_media_item2_introspect (DVBMediaServer2ChannelMediaItem2* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n\n\n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_media_server2_channel_media_item2_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_media_server2_channel_media_item2_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (media_item2_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else if (media_object2_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_media_server2_channel_media_item2_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_media_server2_channel_media_item2_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - media_item2_dbus_register_object (connection, path, object); - media_object2_dbus_register_object (connection, path, object); -} - - DVBMediaServer2ChannelMediaItem2* dvb_media_server2_channel_media_item2_construct (GType object_type, DVBChannel* channel, const char* parent) { DVBMediaServer2ChannelMediaItem2 * self = NULL; DVBChannel* _tmp0_; DVBChannel* _tmp1_; - char* _tmp2_; + const char* _tmp2_; char* _tmp3_; g_return_val_if_fail (channel != NULL, NULL); g_return_val_if_fail (parent != NULL, NULL); self = (DVBMediaServer2ChannelMediaItem2*) g_object_new (object_type, NULL); - _tmp0_ = _g_object_ref0 (channel); - _tmp1_ = _tmp0_; + _tmp0_ = channel; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->channel); self->priv->channel = _tmp1_; - _tmp2_ = g_strdup (parent); - _tmp3_ = _tmp2_; + _tmp2_ = parent; + _tmp3_ = g_strdup (_tmp2_); _g_free0 (self->priv->parent); self->priv->parent = _tmp3_; return self; @@ -1636,10 +1799,12 @@ static char* dvb_media_server2_channel_media_item2_real_get_Parent (MediaObject2* base) { char* result; DVBMediaServer2ChannelMediaItem2* self; - char* _tmp0_; + const char* _tmp0_; + char* _tmp1_; self = (DVBMediaServer2ChannelMediaItem2*) base; - _tmp0_ = g_strdup (self->priv->parent); - result = _tmp0_; + _tmp0_ = self->priv->parent; + _tmp1_ = g_strdup (_tmp0_); + result = _tmp1_; return result; } @@ -1647,14 +1812,22 @@ static gchar* dvb_media_server2_channel_media_item2_real_get_Path (MediaObject2* base) { gchar* result; DVBMediaServer2ChannelMediaItem2* self; - guint _tmp0_; + DVBChannel* _tmp0_; guint _tmp1_; - gchar* _tmp2_ = NULL; + guint _tmp2_; + DVBChannel* _tmp3_; + guint _tmp4_; + guint _tmp5_; + gchar* _tmp6_ = NULL; self = (DVBMediaServer2ChannelMediaItem2*) base; - _tmp0_ = dvb_channel_get_GroupId (self->priv->channel); - _tmp1_ = dvb_channel_get_Sid (self->priv->channel); - _tmp2_ = g_strdup_printf (DVB_MEDIA_SERVER2_CHANNEL_PATH, _tmp0_, _tmp1_); - result = _tmp2_; + _tmp0_ = self->priv->channel; + _tmp1_ = dvb_channel_get_GroupId (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = self->priv->channel; + _tmp4_ = dvb_channel_get_Sid (_tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = g_strdup_printf (DVB_MEDIA_SERVER2_CHANNEL_PATH, _tmp2_, _tmp5_); + result = _tmp6_; return result; } @@ -1662,12 +1835,16 @@ static gchar* dvb_media_server2_channel_media_item2_real_get_DisplayName (MediaObject2* base) { gchar* result; DVBMediaServer2ChannelMediaItem2* self; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_; + DVBChannel* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_; self = (DVBMediaServer2ChannelMediaItem2*) base; - _tmp0_ = dvb_channel_get_Name (self->priv->channel); - _tmp1_ = g_strdup (_tmp0_); - result = _tmp1_; + _tmp0_ = self->priv->channel; + _tmp1_ = dvb_channel_get_Name (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = g_strdup (_tmp2_); + result = _tmp3_; return result; } @@ -1675,16 +1852,24 @@ static gchar** dvb_media_server2_channel_media_item2_real_get_URLs (MediaItem2* base, int* result_length1) { gchar** result; DVBMediaServer2ChannelMediaItem2* self; - gchar* _tmp0_ = NULL; - gchar** _tmp1_ = NULL; - gchar** _tmp2_; + DVBChannel* _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; + gchar** _tmp3_ = NULL; + gchar** _tmp4_; + gint _tmp4__length1; self = (DVBMediaServer2ChannelMediaItem2*) base; - _tmp0_ = dvb_channel_get_URL (self->priv->channel); - _tmp1_ = g_new0 (gchar*, 1 + 1); - _tmp1_[0] = _tmp0_; + _tmp0_ = self->priv->channel; + _tmp1_ = dvb_channel_get_URL (_tmp0_); _tmp2_ = _tmp1_; - *result_length1 = 1; - result = _tmp2_; + _tmp3_ = g_new0 (gchar*, 1 + 1); + _tmp3_[0] = _tmp2_; + _tmp4_ = _tmp3_; + _tmp4__length1 = 1; + if (result_length1) { + *result_length1 = _tmp4__length1; + } + result = _tmp4_; return result; } @@ -1716,13 +1901,6 @@ g_type_class_add_private (klass, sizeof (DVBMediaServer2ChannelMediaItem2Private)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_media_server2_channel_media_item2_get_property; G_OBJECT_CLASS (klass)->finalize = dvb_media_server2_channel_media_item2_finalize; - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_PATH, "Path"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_UR_LS, "URLs"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_MIME_TYPE, "MIMEType"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_TYPE, "Type"); - g_type_set_qdata (DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_media_server2_channel_media_item2_dbus_vtable)); } @@ -1777,27 +1955,8 @@ static void _vala_dvb_media_server2_channel_media_item2_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { DVBMediaServer2ChannelMediaItem2 * self; - int length; self = DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2 (object); switch (property_id) { - case DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_PARENT: - g_value_take_string (value, media_object2_get_Parent ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_PATH: - g_value_take_string (value, media_object2_get_Path ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_DISPLAY_NAME: - g_value_take_string (value, media_object2_get_DisplayName ((MediaObject2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_UR_LS: - g_value_take_boxed (value, media_item2_get_URLs ((MediaItem2*) self, &length)); - break; - case DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_MIME_TYPE: - g_value_take_string (value, media_item2_get_MIMEType ((MediaItem2*) self)); - break; - case DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_TYPE: - g_value_take_string (value, media_object2_get_Type ((MediaObject2*) self)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -1808,96 +1967,133 @@ guint dvb_media_server2_get_num_elements (gint items, guint offset, guint max) { guint result = 0U; guint num_elements = 0U; - if (max > 0) { - if (max > (items - offset)) { - num_elements = items - offset; + guint _tmp0_; + _tmp0_ = max; + if (_tmp0_ > ((guint) 0)) { + guint _tmp1_; + gint _tmp2_; + guint _tmp3_; + _tmp1_ = max; + _tmp2_ = items; + _tmp3_ = offset; + if (_tmp1_ > (_tmp2_ - _tmp3_)) { + gint _tmp4_; + guint _tmp5_; + _tmp4_ = items; + _tmp5_ = offset; + num_elements = _tmp4_ - _tmp5_; } else { - num_elements = max; + guint _tmp6_; + _tmp6_ = max; + num_elements = _tmp6_; } } else { - num_elements = items - offset; + gint _tmp7_; + guint _tmp8_; + _tmp7_ = items; + _tmp8_ = offset; + num_elements = _tmp7_ - _tmp8_; } result = num_elements; return result; } -static guint _dynamic_RequestName2 (DBusGProxy* self, const gchar* param1, guint param2, GError** error) { - guint result; - dbus_g_proxy_call (self, "RequestName", error, G_TYPE_STRING, param1, G_TYPE_UINT, param2, G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID); - if (*error) { - return 0U; - } - return result; +void dvb_media_server2_on_bus_acquired (GDBusConnection* _conn) { + DVBMediaServer2DeviceGroupsMediaContainer2* _tmp0_; + GDBusConnection* _tmp1_; + DVBMediaServer2DeviceGroupsMediaContainer2* _tmp2_; + char* _tmp3_; + char* _tmp4_; + char* _tmp5_; + DVBMediaServer2DeviceGroupsMediaContainer2* _tmp6_; + GDBusConnection* _tmp7_; + DVBMediaServer2DeviceGroupsMediaContainer2* _tmp8_; + char* _tmp9_; + char* _tmp10_; + char* _tmp11_; + DVBMediaServer2DeviceGroupsMediaContainer2* _tmp12_; + GDBusConnection* _tmp13_; + GDBusConnection* _tmp14_; + DVBMediaServer2DeviceGroupsMediaContainer2* _tmp15_; + g_return_if_fail (_conn != NULL); + _tmp0_ = dvb_media_server2_device_groups_media_container2_new (); + _g_object_unref0 (dvb_media_server2_root_container); + dvb_media_server2_root_container = _tmp0_; + _tmp1_ = _conn; + _tmp2_ = dvb_media_server2_root_container; + _tmp3_ = media_object2_get_Parent ((MediaObject2*) _tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = _tmp4_; + _tmp6_ = dvb_media_server2_root_container; + dvb_utils_dbus_register_object (TYPE_MEDIA_CONTAINER2, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp1_, (const gchar*) _tmp5_, (MediaContainer2*) _tmp6_); + _g_free0 (_tmp5_); + _tmp7_ = _conn; + _tmp8_ = dvb_media_server2_root_container; + _tmp9_ = media_object2_get_Parent ((MediaObject2*) _tmp8_); + _tmp10_ = _tmp9_; + _tmp11_ = _tmp10_; + _tmp12_ = dvb_media_server2_root_container; + dvb_utils_dbus_register_object (TYPE_MEDIA_OBJECT2, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp7_, (const gchar*) _tmp11_, (MediaObject2*) _tmp12_); + _g_free0 (_tmp11_); + _tmp13_ = _conn; + _tmp14_ = _g_object_ref0 (_tmp13_); + _g_object_unref0 (dvb_media_server2_conn); + dvb_media_server2_conn = _tmp14_; + _tmp15_ = dvb_media_server2_root_container; + dvb_media_server2_device_groups_media_container2_create_container_services (_tmp15_); } -gboolean dvb_media_server2_start_rygel_services (void) { - gboolean result = FALSE; - DBusGConnection* _tmp0_ = NULL; - DBusGConnection* conn; - DBusGProxy* _tmp1_ = NULL; - DBusGProxy* bus; - guint _tmp2_; - guint request_name_result; - GError * _inner_error_ = NULL; - _tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); - conn = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch191_g_error; +static void dvb_media_server2_start_rygel_services_data_free (gpointer _data) { + DvbMediaServer2StartRygelServicesData* _data_; + _data_ = _data; + g_slice_free (DvbMediaServer2StartRygelServicesData, _data_); +} + + +void dvb_media_server2_start_rygel_services (GAsyncReadyCallback _callback_, gpointer _user_data_) { + DvbMediaServer2StartRygelServicesData* _data_; + _data_ = g_slice_new0 (DvbMediaServer2StartRygelServicesData); + _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, dvb_media_server2_start_rygel_services); + g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, dvb_media_server2_start_rygel_services_data_free); + dvb_media_server2_start_rygel_services_co (_data_); +} + + +void dvb_media_server2_start_rygel_services_finish (GAsyncResult* _res_) { + DvbMediaServer2StartRygelServicesData* _data_; + _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); +} + + +static void _dvb_media_server2_on_bus_acquired_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) { + dvb_media_server2_on_bus_acquired (connection); +} + + +static gboolean dvb_media_server2_start_rygel_services_co (DvbMediaServer2StartRygelServicesData* _data_) { + switch (_data_->_state_) { + case 0: + goto _state_0; + default: + g_assert_not_reached (); } - _tmp1_ = dbus_g_proxy_new_for_name (conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); - bus = _tmp1_; - _tmp2_ = _dynamic_RequestName2 (bus, DVB_MEDIA_SERVER2_SERVICE_NAME, (guint) 0, &_inner_error_); - request_name_result = _tmp2_; - if (_inner_error_ != NULL) { - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - goto __catch191_g_error; - } - if (request_name_result == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - DVBMediaServer2DeviceGroupsMediaContainer2* _tmp3_ = NULL; - DVBMediaServer2DeviceGroupsMediaContainer2* _tmp4_; - char* _tmp5_ = NULL; - char* _tmp6_; - g_message ("Services2.vala:388: Creating new Rygel MediaServer D-Bus service"); - _tmp3_ = dvb_media_server2_device_groups_media_container2_new (); - _tmp4_ = _tmp3_; - _g_object_unref0 (dvb_media_server2_root_container); - dvb_media_server2_root_container = _tmp4_; - dvb_media_server2_device_groups_media_container2_create_container_services (dvb_media_server2_root_container); - _tmp5_ = media_object2_get_Parent ((MediaObject2*) dvb_media_server2_root_container); - _tmp6_ = _tmp5_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), (const gchar*) _tmp6_, (GObject*) dvb_media_server2_root_container); - _g_free0 (_tmp6_); + _state_0: + _data_->_tmp0_ = NULL; + _data_->_tmp0_ = dvb_logging_log_manager_getLogManager (); + _data_->_tmp1_ = NULL; + _data_->_tmp1_ = dvb_logging_log_manager_getDefaultLogger (_data_->_tmp0_); + _g_object_unref0 (dvb_media_server2_log); + dvb_media_server2_log = _data_->_tmp1_; + dvb_utils_dbus_own_name (DVB_MEDIA_SERVER2_SERVICE_NAME, _dvb_media_server2_on_bus_acquired_gbus_acquired_callback, NULL); + if (_data_->_state_ == 0) { + g_simple_async_result_complete_in_idle (_data_->_async_result); } else { - g_warning ("Services2.vala:397: Rygel MediaServer D-Bus service is already running"); - result = FALSE; - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - return result; - } - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - goto __finally191; - __catch191_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Services2.vala:402: Oops %s", e->message); - result = FALSE; - _g_error_free0 (e); - return result; + g_simple_async_result_complete (_data_->_async_result); } - __finally191: - if (_inner_error_ != NULL) { - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - result = FALSE; - return result; + g_object_unref (_data_->_async_result); + return FALSE; } diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Services2.vala gnome-dvb-daemon-0.2.7/src/rygel/Services2.vala --- gnome-dvb-daemon-0.1.23/src/rygel/Services2.vala 2010-08-11 09:37:06.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Services2.vala 2011-05-10 00:31:00.000000000 +0000 @@ -18,9 +18,12 @@ */ using GLib; using Gee; +using DVB.Logging; namespace DVB.MediaServer2 { - + + private static Logger log; + private static const string SERVICE_NAME = "org.gnome.UPnP.MediaServer2.DVBDaemon"; private static const string ROOT_PATH = "/org/gnome/UPnP/MediaServer2/DVBDaemon"; @@ -35,7 +38,7 @@ public class DeviceGroupsMediaContainer2 : GLib.Object, MediaContainer2, MediaObject2 { private HashMap containers; - private DBus.ObjectPath path; + private ObjectPath path; construct { containers = new HashMap (); @@ -44,7 +47,7 @@ manager.group_added.connect (this.on_device_added); manager.group_removed.connect (this.on_device_removed); - this.path = new DBus.ObjectPath (ROOT_PATH); + this.path = new ObjectPath (ROOT_PATH); } public void create_container_services () { @@ -56,24 +59,22 @@ } private void create_service (DeviceGroup devgroup) { - debug ("Creating container for device group %u", devgroup.Id); - - var conn = Utils.get_dbus_connection (); - if (conn == null) { - critical ("Could not get DBus connection"); - return; - } + log.debug ("Creating container for device group %u", devgroup.Id); + var devgroup_container = new ChannelsMediaContainer2 ( devgroup, this.path); - conn.register_object ( + Utils.dbus_register_object (conn, devgroup_container.Path, devgroup_container); - devgroup_container.create_item_services (); - + Utils.dbus_register_object (conn, + devgroup_container.Path, + devgroup_container); + devgroup_container.create_item_services (conn); + this.containers.set (devgroup.Id, devgroup_container); } - public DBus.ObjectPath Parent { + public ObjectPath Parent { owned get { // root container => ref to itsself return this.path; @@ -122,18 +123,18 @@ } } - public GLib.HashTable[] ListContainers ( - uint offset, uint max, string[] filter) throws DBus.Error { + public GLib.HashTable[] ListContainers ( + uint offset, uint max, string[] filter) throws DBusError { uint num_elements = get_num_elements (this.containers.size, offset, max); - GLib.HashTable[] hash = - new GLib.HashTable[num_elements]; + GLib.HashTable[] hash = + new GLib.HashTable[num_elements]; int i = 0; foreach (ChannelsMediaContainer2 container in this.containers.values) { if (i >= offset) { uint index = i - offset; - hash[index] = new GLib.HashTable (GLib.str_hash, GLib.str_equal); + hash[index] = new GLib.HashTable (GLib.str_hash, GLib.str_equal); hash[index].insert("Path", container.Path); hash[index].insert("DisplayName", container.DisplayName); hash[index].insert("ChildCount", container.ChildCount); @@ -149,14 +150,14 @@ return hash; } - public GLib.HashTable[] ListChildren ( - uint offset, uint max, string[] filter) throws DBus.Error { + public GLib.HashTable[] ListChildren ( + uint offset, uint max, string[] filter) throws DBusError { return ListContainers(offset, max, filter); } - public GLib.HashTable[] ListItems ( - uint offset, uint max, string[] filter) throws DBus.Error { - return new GLib.HashTable[0]; + public GLib.HashTable[] ListItems ( + uint offset, uint max, string[] filter) throws DBusError { + return new GLib.HashTable[0]; } private void on_device_added (uint group_id) { @@ -180,7 +181,7 @@ */ public class ChannelsMediaContainer2 : GLib.Object, MediaContainer2, MediaObject2 { - public DBus.ObjectPath parent; + public ObjectPath parent; private DeviceGroup device_group; private HashMap items; @@ -189,35 +190,31 @@ this.items = new HashMap (); } - public ChannelsMediaContainer2(DeviceGroup devgroup, DBus.ObjectPath parent) { + public ChannelsMediaContainer2(DeviceGroup devgroup, ObjectPath parent) { this.device_group = devgroup; this.parent = parent; } - public void create_item_services () { + public void create_item_services (DBusConnection conn) { foreach (Channel channel in this.device_group.Channels) { this.create_service (channel); } } public void create_service (Channel channel) { - debug ("Creating container for channel %u", channel.Sid); - - var conn = Utils.get_dbus_connection (); - if (conn == null) { - critical ("Could not get DBus connection"); - return; - } + log.debug ("Creating container for channel %u", channel.Sid); + var channel_item = new ChannelMediaItem2 ( - channel, new DBus.ObjectPath (this.Path)); - conn.register_object ( - channel_item.Path, - channel_item); + channel, new ObjectPath (this.Path)); + Utils.dbus_register_object (conn, + channel_item.Path, channel_item); + Utils.dbus_register_object (conn, + channel_item.Path, channel_item); this.items.set (channel.Sid, channel_item); } - public DBus.ObjectPath Parent { + public ObjectPath Parent { owned get { return this.parent; } @@ -265,19 +262,19 @@ } } - public GLib.HashTable[] ListItems ( - uint offset, uint max, string[] filter) throws DBus.Error { + public GLib.HashTable[] ListItems ( + uint offset, uint max, string[] filter) throws DBusError { uint num_elements = get_num_elements (this.items.size, offset, max); - GLib.HashTable[] hash = - new GLib.HashTable[num_elements]; + GLib.HashTable[] hash = + new GLib.HashTable[num_elements]; uint i = 0; foreach (ChannelMediaItem2 item in this.items.values) { if (i >= offset) { uint index = i - offset; - hash[index] = new GLib.HashTable (GLib.str_hash, GLib.str_equal); + hash[index] = new GLib.HashTable (GLib.str_hash, GLib.str_equal); hash[index].insert("Path", item.Path); hash[index].insert("DisplayName", item.DisplayName); hash[index].insert("Type", item.Type); @@ -293,13 +290,13 @@ return hash; } - public GLib.HashTable[] ListContainers ( - uint offset, uint max, string[] filter) throws DBus.Error { - return new GLib.HashTable[0]; + public GLib.HashTable[] ListContainers ( + uint offset, uint max, string[] filter) throws DBusError { + return new GLib.HashTable[0]; } - public GLib.HashTable[] ListChildren ( - uint offset, uint max, string[] filter) throws DBus.Error { + public GLib.HashTable[] ListChildren ( + uint offset, uint max, string[] filter) throws DBusError { return ListItems(offset, max, filter); } @@ -312,14 +309,14 @@ public class ChannelMediaItem2 : GLib.Object, MediaItem2, MediaObject2 { private Channel channel; - private DBus.ObjectPath parent; + private ObjectPath parent; - public ChannelMediaItem2(Channel channel, DBus.ObjectPath parent) { + public ChannelMediaItem2(Channel channel, ObjectPath parent) { this.channel = channel; this.parent = parent; } - public DBus.ObjectPath Parent { + public ObjectPath Parent { owned get { return this.parent; } @@ -373,36 +370,21 @@ } private static DeviceGroupsMediaContainer2 root_container; + private static DBusConnection conn; - public static bool start_rygel_services () { - try { - var conn = DBus.Bus.get (DBus.BusType.SESSION); - - dynamic DBus.Object bus = conn.get_object ( - "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); - - // try to register service in session bus - uint request_name_result = bus.RequestName (SERVICE_NAME, (uint) 0); - - if (request_name_result == DBus.RequestNameReply.PRIMARY_OWNER) { - message ("Creating new Rygel MediaServer D-Bus service"); - - root_container = new DeviceGroupsMediaContainer2 (); - root_container.create_container_services (); - - conn.register_object ( - root_container.Parent, - root_container); - } else { - warning ("Rygel MediaServer D-Bus service is already running"); - return false; - } + public static void on_bus_acquired (DBusConnection _conn) { + root_container = new DeviceGroupsMediaContainer2 (); + Utils.dbus_register_object (_conn, root_container.Parent, + root_container); + Utils.dbus_register_object (_conn, root_container.Parent, + root_container); + conn = _conn; + root_container.create_container_services (); + } - } catch (Error e) { - critical ("Oops %s", e.message); - return false; - } - return false; + public static async void start_rygel_services () { + log = LogManager.getLogManager().getDefaultLogger(); + Utils.dbus_own_name (SERVICE_NAME, on_bus_acquired); } } diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Services.c gnome-dvb-daemon-0.2.7/src/rygel/Services.c --- gnome-dvb-daemon-0.1.23/src/rygel/Services.c 2011-01-14 17:00:40.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Services.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1559 +0,0 @@ -/* Services.c generated by valac 0.11.3, the Vala compiler - * generated from Services.vala, do not modify */ - -/* - * Copyright (C) 2009-2010 Sebastian Pölsterl - * - * This file is part of GNOME DVB Daemon. - * - * GNOME DVB Daemon is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNOME DVB Daemon is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNOME DVB Daemon. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include - - -#define TYPE_MEDIA_CONTAINER1 (media_container1_get_type ()) -#define MEDIA_CONTAINER1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_CONTAINER1, MediaContainer1)) -#define IS_MEDIA_CONTAINER1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_CONTAINER1)) -#define MEDIA_CONTAINER1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_CONTAINER1, MediaContainer1Iface)) - -typedef struct _MediaContainer1 MediaContainer1; -typedef struct _MediaContainer1Iface MediaContainer1Iface; - -#define TYPE_MEDIA_OBJECT1 (media_object1_get_type ()) -#define MEDIA_OBJECT1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_OBJECT1, MediaObject1)) -#define IS_MEDIA_OBJECT1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_OBJECT1)) -#define MEDIA_OBJECT1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_OBJECT1, MediaObject1Iface)) - -typedef struct _MediaObject1 MediaObject1; -typedef struct _MediaObject1Iface MediaObject1Iface; - -#define DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER (dvb_media_server_device_groups_media_container_get_type ()) -#define DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBMediaServerDeviceGroupsMediaContainer)) -#define DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBMediaServerDeviceGroupsMediaContainerClass)) -#define DVB_MEDIA_SERVER_IS_DEVICE_GROUPS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER)) -#define DVB_MEDIA_SERVER_IS_DEVICE_GROUPS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER)) -#define DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBMediaServerDeviceGroupsMediaContainerClass)) - -typedef struct _DVBMediaServerDeviceGroupsMediaContainer DVBMediaServerDeviceGroupsMediaContainer; -typedef struct _DVBMediaServerDeviceGroupsMediaContainerClass DVBMediaServerDeviceGroupsMediaContainerClass; -typedef struct _DVBMediaServerDeviceGroupsMediaContainerPrivate DVBMediaServerDeviceGroupsMediaContainerPrivate; - -#define DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER (dvb_media_server_channels_media_container_get_type ()) -#define DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER, DVBMediaServerChannelsMediaContainer)) -#define DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER, DVBMediaServerChannelsMediaContainerClass)) -#define DVB_MEDIA_SERVER_IS_CHANNELS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER)) -#define DVB_MEDIA_SERVER_IS_CHANNELS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER)) -#define DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER, DVBMediaServerChannelsMediaContainerClass)) - -typedef struct _DVBMediaServerChannelsMediaContainer DVBMediaServerChannelsMediaContainer; -typedef struct _DVBMediaServerChannelsMediaContainerClass DVBMediaServerChannelsMediaContainerClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define DVB_TYPE_MANAGER (dvb_manager_get_type ()) -#define DVB_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_MANAGER, DVBManager)) -#define DVB_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_MANAGER, DVBManagerClass)) -#define DVB_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_MANAGER)) -#define DVB_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_MANAGER)) -#define DVB_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_MANAGER, DVBManagerClass)) - -typedef struct _DVBManager DVBManager; -typedef struct _DVBManagerClass DVBManagerClass; - -#define DVB_TYPE_DEVICE_GROUP (dvb_device_group_get_type ()) -#define DVB_DEVICE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_DEVICE_GROUP, DVBDeviceGroup)) -#define DVB_DEVICE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_DEVICE_GROUP, DVBDeviceGroupClass)) -#define DVB_IS_DEVICE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_DEVICE_GROUP)) -#define DVB_IS_DEVICE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_DEVICE_GROUP)) -#define DVB_DEVICE_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_DEVICE_GROUP, DVBDeviceGroupClass)) - -typedef struct _DVBDeviceGroup DVBDeviceGroup; -typedef struct _DVBDeviceGroupClass DVBDeviceGroupClass; -#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) - -#define DVB_TYPE_ID_BUS_MANAGER (dvb_id_bus_manager_get_type ()) -#define DVB_ID_BUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_MANAGER, DVBIDBusManager)) -#define DVB_IS_ID_BUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_MANAGER)) -#define DVB_ID_BUS_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_MANAGER, DVBIDBusManagerIface)) - -typedef struct _DVBIDBusManager DVBIDBusManager; -typedef struct _DVBIDBusManagerIface DVBIDBusManagerIface; - -#define DVB_TYPE_CHANNEL_GROUP_INFO (dvb_channel_group_info_get_type ()) -typedef struct _DVBChannelGroupInfo DVBChannelGroupInfo; -typedef struct _DVBMediaServerChannelsMediaContainerPrivate DVBMediaServerChannelsMediaContainerPrivate; - -#define DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM (dvb_media_server_channel_media_item_get_type ()) -#define DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM, DVBMediaServerChannelMediaItem)) -#define DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM, DVBMediaServerChannelMediaItemClass)) -#define DVB_MEDIA_SERVER_IS_CHANNEL_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM)) -#define DVB_MEDIA_SERVER_IS_CHANNEL_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM)) -#define DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM, DVBMediaServerChannelMediaItemClass)) - -typedef struct _DVBMediaServerChannelMediaItem DVBMediaServerChannelMediaItem; -typedef struct _DVBMediaServerChannelMediaItemClass DVBMediaServerChannelMediaItemClass; - -#define DVB_TYPE_CHANNEL_LIST (dvb_channel_list_get_type ()) -#define DVB_CHANNEL_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL_LIST, DVBChannelList)) -#define DVB_CHANNEL_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL_LIST, DVBChannelListClass)) -#define DVB_IS_CHANNEL_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNEL_LIST)) -#define DVB_IS_CHANNEL_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNEL_LIST)) -#define DVB_CHANNEL_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNEL_LIST, DVBChannelListClass)) - -typedef struct _DVBChannelList DVBChannelList; -typedef struct _DVBChannelListClass DVBChannelListClass; - -#define DVB_TYPE_CHANNEL (dvb_channel_get_type ()) -#define DVB_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL, DVBChannel)) -#define DVB_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL, DVBChannelClass)) -#define DVB_IS_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNEL)) -#define DVB_IS_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNEL)) -#define DVB_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNEL, DVBChannelClass)) - -typedef struct _DVBChannel DVBChannel; -typedef struct _DVBChannelClass DVBChannelClass; - -#define TYPE_MEDIA_ITEM1 (media_item1_get_type ()) -#define MEDIA_ITEM1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_ITEM1, MediaItem1)) -#define IS_MEDIA_ITEM1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_ITEM1)) -#define MEDIA_ITEM1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_ITEM1, MediaItem1Iface)) - -typedef struct _MediaItem1 MediaItem1; -typedef struct _MediaItem1Iface MediaItem1Iface; -typedef struct _DVBMediaServerChannelMediaItemPrivate DVBMediaServerChannelMediaItemPrivate; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) - -struct _MediaContainer1Iface { - GTypeInterface parent_iface; - char** (*get_Items) (MediaContainer1* self, int* result_length1); - guint (*get_ItemCount) (MediaContainer1* self); - char** (*get_Containers) (MediaContainer1* self, int* result_length1); - guint (*get_ContainerCount) (MediaContainer1* self); -}; - -struct _MediaObject1Iface { - GTypeInterface parent_iface; - char* (*get_Parent) (MediaObject1* self); - gchar* (*get_DisplayName) (MediaObject1* self); -}; - -struct _DVBMediaServerDeviceGroupsMediaContainer { - GObject parent_instance; - DVBMediaServerDeviceGroupsMediaContainerPrivate * priv; -}; - -struct _DVBMediaServerDeviceGroupsMediaContainerClass { - GObjectClass parent_class; -}; - -struct _DVBMediaServerDeviceGroupsMediaContainerPrivate { - GeeHashMap* containers; - char* path; -}; - -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBChannelGroupInfo { - gint id; - gchar* name; -}; - -struct _DVBIDBusManagerIface { - GTypeInterface parent_iface; - gboolean (*GetScannerForDevice) (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, gchar** dbusiface, GError** error); - char** (*GetRegisteredDeviceGroups) (DVBIDBusManager* self, int* result_length1, GError** error); - gboolean (*GetDeviceGroup) (DVBIDBusManager* self, guint group_id, char** opath, GError** error); - gboolean (*AddDeviceToNewGroup) (DVBIDBusManager* self, guint adapter, guint frontend, const gchar* channels_conf, const gchar* recordings_dir, const gchar* name, GError** error); - gboolean (*GetNameOfRegisteredDevice) (DVBIDBusManager* self, guint adapter, guint frontend, gchar** name, GError** error); - gint (*GetDeviceGroupSize) (DVBIDBusManager* self, GError** error); - DVBChannelGroupInfo* (*GetChannelGroups) (DVBIDBusManager* self, int* result_length1, GError** error); - gboolean (*AddChannelGroup) (DVBIDBusManager* self, const gchar* name, gint* channel_group_id, GError** error); - gboolean (*RemoveChannelGroup) (DVBIDBusManager* self, gint channel_group_id, GError** error); - GHashTable** (*GetDevices) (DVBIDBusManager* self, int* result_length1, GError** error); -}; - -struct _DVBMediaServerChannelsMediaContainer { - GObject parent_instance; - DVBMediaServerChannelsMediaContainerPrivate * priv; - char* parent; -}; - -struct _DVBMediaServerChannelsMediaContainerClass { - GObjectClass parent_class; -}; - -struct _DVBMediaServerChannelsMediaContainerPrivate { - DVBDeviceGroup* device_group; - GeeHashMap* items; -}; - -struct _MediaItem1Iface { - GTypeInterface parent_iface; - gchar** (*get_URLs) (MediaItem1* self, int* result_length1); - gchar* (*get_MIMEType) (MediaItem1* self); - gchar* (*get_Type) (MediaItem1* self); -}; - -struct _DVBMediaServerChannelMediaItem { - GObject parent_instance; - DVBMediaServerChannelMediaItemPrivate * priv; -}; - -struct _DVBMediaServerChannelMediaItemClass { - GObjectClass parent_class; -}; - -struct _DVBMediaServerChannelMediaItemPrivate { - DVBChannel* channel; - char* parent; -}; - - -static gpointer dvb_media_server_device_groups_media_container_parent_class = NULL; -static MediaContainer1Iface* dvb_media_server_device_groups_media_container_media_container1_parent_iface = NULL; -static MediaObject1Iface* dvb_media_server_device_groups_media_container_media_object1_parent_iface = NULL; -static gpointer dvb_media_server_channels_media_container_parent_class = NULL; -static MediaContainer1Iface* dvb_media_server_channels_media_container_media_container1_parent_iface = NULL; -static MediaObject1Iface* dvb_media_server_channels_media_container_media_object1_parent_iface = NULL; -static gpointer dvb_media_server_channel_media_item_parent_class = NULL; -static MediaItem1Iface* dvb_media_server_channel_media_item_media_item1_parent_iface = NULL; -static MediaObject1Iface* dvb_media_server_channel_media_item_media_object1_parent_iface = NULL; -extern DVBMediaServerDeviceGroupsMediaContainer* dvb_media_server_root_container; -DVBMediaServerDeviceGroupsMediaContainer* dvb_media_server_root_container = NULL; - -#define DVB_MEDIA_SERVER_SERVICE_NAME "org.gnome.UPnP.MediaServer1.DVBDaemon" -#define DVB_MEDIA_SERVER_ROOT_PATH "/org/gnome/UPnP/MediaServer1/DVBDaemon" -#define DVB_MEDIA_SERVER_GROUP_PATH "/org/gnome/UPnP/MediaServer1/DVBDaemon/Group%u" -#define DVB_MEDIA_SERVER_CHANNEL_PATH DVB_MEDIA_SERVER_GROUP_PATH "/Channel%u" -GType media_container1_get_type (void) G_GNUC_CONST; -MediaContainer1* media_container1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -GType media_object1_get_type (void) G_GNUC_CONST; -MediaObject1* media_object1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -GType dvb_media_server_device_groups_media_container_get_type (void) G_GNUC_CONST; -GType dvb_media_server_channels_media_container_get_type (void) G_GNUC_CONST; -#define DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBMediaServerDeviceGroupsMediaContainerPrivate)) -enum { - DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_DUMMY_PROPERTY, - DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_PARENT, - DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_DISPLAY_NAME, - DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_ITEM_COUNT, - DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_CONTAINER_COUNT -}; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_media_server_device_groups_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_media_server_device_groups_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_media_server_device_groups_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_media_server_device_groups_media_container_introspect (DVBMediaServerDeviceGroupsMediaContainer* self, DBusConnection* connection, DBusMessage* message); -void dvb_media_server_device_groups_media_container_create_container_services (DVBMediaServerDeviceGroupsMediaContainer* self); -GType dvb_manager_get_type (void) G_GNUC_CONST; -DVBManager* dvb_manager_get_instance (void); -GType dvb_device_group_get_type (void) G_GNUC_CONST; -GeeCollection* dvb_manager_get_device_groups (DVBManager* self); -static void dvb_media_server_device_groups_media_container_create_service (DVBMediaServerDeviceGroupsMediaContainer* self, DVBDeviceGroup* devgroup); -guint dvb_device_group_get_Id (DVBDeviceGroup* self); -DBusGConnection* dvb_utils_get_dbus_connection (void); -DVBMediaServerChannelsMediaContainer* dvb_media_server_channels_media_container_new (DVBDeviceGroup* devgroup, const char* parent); -DVBMediaServerChannelsMediaContainer* dvb_media_server_channels_media_container_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent); -gchar* dvb_media_server_channels_media_container_get_Path (DVBMediaServerChannelsMediaContainer* self); -void dvb_media_server_channels_media_container_create_item_services (DVBMediaServerChannelsMediaContainer* self); -static void dvb_media_server_device_groups_media_container_on_device_added (DVBMediaServerDeviceGroupsMediaContainer* self, guint group_id); -DVBDeviceGroup* dvb_manager_get_device_group_if_exists (DVBManager* self, guint group_id); -static void dvb_media_server_device_groups_media_container_on_device_removed (DVBMediaServerDeviceGroupsMediaContainer* self, guint group_id); -DVBMediaServerDeviceGroupsMediaContainer* dvb_media_server_device_groups_media_container_new (void); -DVBMediaServerDeviceGroupsMediaContainer* dvb_media_server_device_groups_media_container_construct (GType object_type); -static GObject * dvb_media_server_device_groups_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); -DVBIDBusManager* dvb_id_bus_manager_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -GType dvb_channel_group_info_get_type (void) G_GNUC_CONST; -DVBChannelGroupInfo* dvb_channel_group_info_dup (const DVBChannelGroupInfo* self); -void dvb_channel_group_info_free (DVBChannelGroupInfo* self); -void dvb_channel_group_info_copy (const DVBChannelGroupInfo* self, DVBChannelGroupInfo* dest); -void dvb_channel_group_info_destroy (DVBChannelGroupInfo* self); -GType dvb_id_bus_manager_get_type (void) G_GNUC_CONST; -static void _dvb_media_server_device_groups_media_container_on_device_added_dvb_id_bus_manager_group_added (DVBIDBusManager* _sender, guint group_id, gpointer self); -static void _dvb_media_server_device_groups_media_container_on_device_removed_dvb_id_bus_manager_group_removed (DVBIDBusManager* _sender, guint group_id, gpointer self); -static void dvb_media_server_device_groups_media_container_finalize (GObject* obj); -char* media_object1_get_Parent (MediaObject1* self); -gchar* media_object1_get_DisplayName (MediaObject1* self); -guint media_container1_get_ItemCount (MediaContainer1* self); -guint media_container1_get_ContainerCount (MediaContainer1* self); -static void _vala_dvb_media_server_device_groups_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -GType dvb_media_server_channel_media_item_get_type (void) G_GNUC_CONST; -#define DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER, DVBMediaServerChannelsMediaContainerPrivate)) -enum { - DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_DUMMY_PROPERTY, - DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_PATH, - DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_PARENT, - DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_DISPLAY_NAME, - DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_ITEM_COUNT, - DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_CONTAINER_COUNT -}; -void dvb_media_server_channels_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_media_server_channels_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_media_server_channels_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_media_server_channels_media_container_introspect (DVBMediaServerChannelsMediaContainer* self, DBusConnection* connection, DBusMessage* message); -GType dvb_channel_list_get_type (void) G_GNUC_CONST; -DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); -GType dvb_channel_get_type (void) G_GNUC_CONST; -void dvb_media_server_channels_media_container_create_service (DVBMediaServerChannelsMediaContainer* self, DVBChannel* channel); -guint dvb_channel_get_Sid (DVBChannel* self); -DVBMediaServerChannelMediaItem* dvb_media_server_channel_media_item_new (DVBChannel* channel, const char* parent); -DVBMediaServerChannelMediaItem* dvb_media_server_channel_media_item_construct (GType object_type, DVBChannel* channel, const char* parent); -gchar* dvb_media_server_channel_media_item_get_Path (DVBMediaServerChannelMediaItem* self); -const gchar* dvb_device_group_get_Name (DVBDeviceGroup* self); -static GObject * dvb_media_server_channels_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); -static void dvb_media_server_channels_media_container_finalize (GObject* obj); -static void _vala_dvb_media_server_channels_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -GType media_item1_get_type (void) G_GNUC_CONST; -MediaItem1* media_item1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -#define DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM, DVBMediaServerChannelMediaItemPrivate)) -enum { - DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_DUMMY_PROPERTY, - DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_PATH, - DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_PARENT, - DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_DISPLAY_NAME, - DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_UR_LS, - DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_MIME_TYPE, - DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_TYPE -}; -void dvb_media_server_channel_media_item_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_media_server_channel_media_item_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_media_server_channel_media_item_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_media_server_channel_media_item_introspect (DVBMediaServerChannelMediaItem* self, DBusConnection* connection, DBusMessage* message); -guint dvb_channel_get_GroupId (DVBChannel* self); -const gchar* dvb_channel_get_Name (DVBChannel* self); -gchar* dvb_channel_get_URL (DVBChannel* self); -static void dvb_media_server_channel_media_item_finalize (GObject* obj); -gchar** media_item1_get_URLs (MediaItem1* self, int* result_length1); -gchar* media_item1_get_MIMEType (MediaItem1* self); -gchar* media_item1_get_Type (MediaItem1* self); -static void _vala_dvb_media_server_channel_media_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -gboolean dvb_media_server_start_rygel_services (void); -static guint _dynamic_RequestName1 (DBusGProxy* self, const gchar* param1, guint param2, GError** error); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); - -static const DBusObjectPathVTable _dvb_media_server_device_groups_media_container_dbus_path_vtable = {_dvb_media_server_device_groups_media_container_dbus_unregister, dvb_media_server_device_groups_media_container_dbus_message}; -static const _DBusObjectVTable _dvb_media_server_device_groups_media_container_dbus_vtable = {dvb_media_server_device_groups_media_container_dbus_register_object}; -static const DBusObjectPathVTable _dvb_media_server_channels_media_container_dbus_path_vtable = {_dvb_media_server_channels_media_container_dbus_unregister, dvb_media_server_channels_media_container_dbus_message}; -static const _DBusObjectVTable _dvb_media_server_channels_media_container_dbus_vtable = {dvb_media_server_channels_media_container_dbus_register_object}; -static const DBusObjectPathVTable _dvb_media_server_channel_media_item_dbus_path_vtable = {_dvb_media_server_channel_media_item_dbus_unregister, dvb_media_server_channel_media_item_dbus_message}; -static const _DBusObjectVTable _dvb_media_server_channel_media_item_dbus_vtable = {dvb_media_server_channel_media_item_dbus_register_object}; - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_media_server_device_groups_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_media_server_device_groups_media_container_introspect (DVBMediaServerDeviceGroupsMediaContainer* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n\n\n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_media_server_device_groups_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_media_server_device_groups_media_container_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (media_container1_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else if (media_object1_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_media_server_device_groups_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_media_server_device_groups_media_container_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - media_container1_dbus_register_object (connection, path, object); - media_object1_dbus_register_object (connection, path, object); -} - - -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - -void dvb_media_server_device_groups_media_container_create_container_services (DVBMediaServerDeviceGroupsMediaContainer* self) { - DVBManager* _tmp0_ = NULL; - DVBManager* _tmp1_; - DVBManager* manager; - g_return_if_fail (self != NULL); - _tmp0_ = dvb_manager_get_instance (); - _tmp1_ = _g_object_ref0 (_tmp0_); - manager = _tmp1_; - { - GeeCollection* _tmp2_ = NULL; - GeeCollection* _tmp3_; - GeeIterator* _tmp4_ = NULL; - GeeIterator* _tmp5_; - GeeIterator* _devgroup_it; - _tmp2_ = dvb_manager_get_device_groups (manager); - _tmp3_ = _tmp2_; - _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_); - _devgroup_it = (_tmp5_ = _tmp4_, _g_object_unref0 (_tmp3_), _tmp5_); - while (TRUE) { - gboolean _tmp6_; - gpointer _tmp7_ = NULL; - DVBDeviceGroup* devgroup; - _tmp6_ = gee_iterator_next (_devgroup_it); - if (!_tmp6_) { - break; - } - _tmp7_ = gee_iterator_get (_devgroup_it); - devgroup = (DVBDeviceGroup*) _tmp7_; - dvb_media_server_device_groups_media_container_create_service (self, devgroup); - _g_object_unref0 (devgroup); - } - _g_object_unref0 (_devgroup_it); - } - _g_object_unref0 (manager); -} - - -static void dvb_media_server_device_groups_media_container_create_service (DVBMediaServerDeviceGroupsMediaContainer* self, DVBDeviceGroup* devgroup) { - guint _tmp0_; - DBusGConnection* _tmp1_ = NULL; - DBusGConnection* conn; - DVBMediaServerChannelsMediaContainer* _tmp2_ = NULL; - DVBMediaServerChannelsMediaContainer* devgroup_container; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - guint _tmp5_; - g_return_if_fail (self != NULL); - g_return_if_fail (devgroup != NULL); - _tmp0_ = dvb_device_group_get_Id (devgroup); - g_debug ("Services.vala:59: Creating container for device group %u", _tmp0_); - _tmp1_ = dvb_utils_get_dbus_connection (); - conn = _tmp1_; - if (conn == NULL) { - g_critical ("Services.vala:63: Could not get DBus connection"); - _dbus_g_connection_unref0 (conn); - return; - } - _tmp2_ = dvb_media_server_channels_media_container_new (devgroup, self->priv->path); - devgroup_container = _tmp2_; - _tmp3_ = dvb_media_server_channels_media_container_get_Path (devgroup_container); - _tmp4_ = _tmp3_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp4_, (GObject*) devgroup_container); - _g_free0 (_tmp4_); - dvb_media_server_channels_media_container_create_item_services (devgroup_container); - _tmp5_ = dvb_device_group_get_Id (devgroup); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->containers, GUINT_TO_POINTER (_tmp5_), devgroup_container); - _g_object_unref0 (devgroup_container); - _dbus_g_connection_unref0 (conn); -} - - -static void dvb_media_server_device_groups_media_container_on_device_added (DVBMediaServerDeviceGroupsMediaContainer* self, guint group_id) { - DVBManager* _tmp0_ = NULL; - DVBManager* _tmp1_; - DVBManager* manager; - DVBDeviceGroup* _tmp2_ = NULL; - DVBDeviceGroup* devgroup; - g_return_if_fail (self != NULL); - _tmp0_ = dvb_manager_get_instance (); - _tmp1_ = _g_object_ref0 (_tmp0_); - manager = _tmp1_; - _tmp2_ = dvb_manager_get_device_group_if_exists (manager, group_id); - devgroup = _tmp2_; - dvb_media_server_device_groups_media_container_create_service (self, devgroup); - g_signal_emit_by_name ((MediaContainer1*) self, "updated"); - _g_object_unref0 (devgroup); - _g_object_unref0 (manager); -} - - -static void dvb_media_server_device_groups_media_container_on_device_removed (DVBMediaServerDeviceGroupsMediaContainer* self, guint group_id) { - g_return_if_fail (self != NULL); - gee_abstract_map_unset ((GeeAbstractMap*) self->priv->containers, GUINT_TO_POINTER (group_id), NULL); - g_signal_emit_by_name ((MediaContainer1*) self, "updated"); -} - - -DVBMediaServerDeviceGroupsMediaContainer* dvb_media_server_device_groups_media_container_construct (GType object_type) { - DVBMediaServerDeviceGroupsMediaContainer * self = NULL; - self = (DVBMediaServerDeviceGroupsMediaContainer*) g_object_new (object_type, NULL); - return self; -} - - -DVBMediaServerDeviceGroupsMediaContainer* dvb_media_server_device_groups_media_container_new (void) { - return dvb_media_server_device_groups_media_container_construct (DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER); -} - - -static char* dvb_media_server_device_groups_media_container_real_get_Parent (MediaObject1* base) { - char* result; - DVBMediaServerDeviceGroupsMediaContainer* self; - char* _tmp0_; - self = (DVBMediaServerDeviceGroupsMediaContainer*) base; - _tmp0_ = g_strdup (self->priv->path); - result = _tmp0_; - return result; -} - - -static gchar* dvb_media_server_device_groups_media_container_real_get_DisplayName (MediaObject1* base) { - gchar* result; - DVBMediaServerDeviceGroupsMediaContainer* self; - gchar* _tmp0_; - self = (DVBMediaServerDeviceGroupsMediaContainer*) base; - _tmp0_ = g_strdup ("@REALNAME@'s TV on @HOSTNAME@"); - result = _tmp0_; - return result; -} - - -static char** dvb_media_server_device_groups_media_container_real_get_Items (MediaContainer1* base, int* result_length1) { - char** result; - DVBMediaServerDeviceGroupsMediaContainer* self; - char** _tmp0_ = NULL; - char** _tmp1_; - self = (DVBMediaServerDeviceGroupsMediaContainer*) base; - _tmp0_ = g_new0 (char*, 0 + 1); - _tmp1_ = _tmp0_; - *result_length1 = 0; - result = _tmp1_; - return result; -} - - -static guint dvb_media_server_device_groups_media_container_real_get_ItemCount (MediaContainer1* base) { - guint result; - DVBMediaServerDeviceGroupsMediaContainer* self; - self = (DVBMediaServerDeviceGroupsMediaContainer*) base; - result = (guint) 0; - return result; -} - - -static char** dvb_media_server_device_groups_media_container_real_get_Containers (MediaContainer1* base, int* result_length1) { - char** result; - DVBMediaServerDeviceGroupsMediaContainer* self; - gint _tmp0_; - char** _tmp1_ = NULL; - gint paths_length1; - gint _paths_size_; - char** _tmp2_; - char** paths; - gint i; - char** _tmp13_; - self = (DVBMediaServerDeviceGroupsMediaContainer*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->containers); - _tmp1_ = g_new0 (char*, _tmp0_ + 1); - _tmp2_ = _tmp1_; - paths_length1 = _tmp0_; - _paths_size_ = paths_length1; - paths = _tmp2_; - i = 0; - { - GeeCollection* _tmp3_ = NULL; - GeeCollection* _tmp4_; - GeeIterator* _tmp5_ = NULL; - GeeIterator* _tmp6_; - GeeIterator* _container_it; - _tmp3_ = gee_map_get_values ((GeeMap*) self->priv->containers); - _tmp4_ = _tmp3_; - _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); - _container_it = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - DVBMediaServerChannelsMediaContainer* container; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - char* _tmp11_ = NULL; - char* _tmp12_; - _tmp7_ = gee_iterator_next (_container_it); - if (!_tmp7_) { - break; - } - _tmp8_ = gee_iterator_get (_container_it); - container = (DVBMediaServerChannelsMediaContainer*) _tmp8_; - _tmp9_ = dvb_media_server_channels_media_container_get_Path (container); - _tmp10_ = _tmp9_; - _tmp11_ = g_strdup (_tmp10_); - _tmp12_ = _tmp11_; - _g_free0 (paths[i]); - paths[i] = _tmp12_; - _g_free0 (_tmp10_); - i++; - _g_object_unref0 (container); - } - _g_object_unref0 (_container_it); - } - _tmp13_ = paths; - *result_length1 = paths_length1; - result = _tmp13_; - return result; -} - - -static guint dvb_media_server_device_groups_media_container_real_get_ContainerCount (MediaContainer1* base) { - guint result; - DVBMediaServerDeviceGroupsMediaContainer* self; - gint _tmp0_; - self = (DVBMediaServerDeviceGroupsMediaContainer*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->containers); - result = (guint) _tmp0_; - return result; -} - - -static void _dvb_media_server_device_groups_media_container_on_device_added_dvb_id_bus_manager_group_added (DVBIDBusManager* _sender, guint group_id, gpointer self) { - dvb_media_server_device_groups_media_container_on_device_added (self, group_id); -} - - -static void _dvb_media_server_device_groups_media_container_on_device_removed_dvb_id_bus_manager_group_removed (DVBIDBusManager* _sender, guint group_id, gpointer self) { - dvb_media_server_device_groups_media_container_on_device_removed (self, group_id); -} - - -static GObject * dvb_media_server_device_groups_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { - GObject * obj; - GObjectClass * parent_class; - DVBMediaServerDeviceGroupsMediaContainer * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; - DVBManager* _tmp2_ = NULL; - DVBManager* _tmp3_; - DVBManager* manager; - char* _tmp4_ = NULL; - char* _tmp5_; - parent_class = G_OBJECT_CLASS (dvb_media_server_device_groups_media_container_parent_class); - obj = parent_class->constructor (type, n_construct_properties, construct_properties); - self = DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER (obj); - _tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; - _g_object_unref0 (self->priv->containers); - self->priv->containers = _tmp1_; - _tmp2_ = dvb_manager_get_instance (); - _tmp3_ = _g_object_ref0 (_tmp2_); - manager = _tmp3_; - g_signal_connect_object ((DVBIDBusManager*) manager, "group-added", (GCallback) _dvb_media_server_device_groups_media_container_on_device_added_dvb_id_bus_manager_group_added, self, 0); - g_signal_connect_object ((DVBIDBusManager*) manager, "group-removed", (GCallback) _dvb_media_server_device_groups_media_container_on_device_removed_dvb_id_bus_manager_group_removed, self, 0); - _tmp4_ = g_strdup (DVB_MEDIA_SERVER_ROOT_PATH); - _tmp5_ = _tmp4_; - _g_free0 (self->priv->path); - self->priv->path = _tmp5_; - _g_object_unref0 (manager); - return obj; -} - - -static void dvb_media_server_device_groups_media_container_class_init (DVBMediaServerDeviceGroupsMediaContainerClass * klass) { - dvb_media_server_device_groups_media_container_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBMediaServerDeviceGroupsMediaContainerPrivate)); - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_media_server_device_groups_media_container_get_property; - G_OBJECT_CLASS (klass)->constructor = dvb_media_server_device_groups_media_container_constructor; - G_OBJECT_CLASS (klass)->finalize = dvb_media_server_device_groups_media_container_finalize; - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_CONTAINER_COUNT, "ContainerCount"); - g_type_set_qdata (DVB_MEDIA_SERVER_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_media_server_device_groups_media_container_dbus_vtable)); -} - - -static void dvb_media_server_device_groups_media_container_media_container1_interface_init (MediaContainer1Iface * iface) { - dvb_media_server_device_groups_media_container_media_container1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Items = dvb_media_server_device_groups_media_container_real_get_Items; - iface->get_ItemCount = dvb_media_server_device_groups_media_container_real_get_ItemCount; - iface->get_Containers = dvb_media_server_device_groups_media_container_real_get_Containers; - iface->get_ContainerCount = dvb_media_server_device_groups_media_container_real_get_ContainerCount; -} - - -static void dvb_media_server_device_groups_media_container_media_object1_interface_init (MediaObject1Iface * iface) { - dvb_media_server_device_groups_media_container_media_object1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Parent = dvb_media_server_device_groups_media_container_real_get_Parent; - iface->get_DisplayName = dvb_media_server_device_groups_media_container_real_get_DisplayName; -} - - -static void dvb_media_server_device_groups_media_container_instance_init (DVBMediaServerDeviceGroupsMediaContainer * self) { - self->priv = DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_GET_PRIVATE (self); -} - - -static void dvb_media_server_device_groups_media_container_finalize (GObject* obj) { - DVBMediaServerDeviceGroupsMediaContainer * self; - self = DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER (obj); - _g_object_unref0 (self->priv->containers); - _g_free0 (self->priv->path); - G_OBJECT_CLASS (dvb_media_server_device_groups_media_container_parent_class)->finalize (obj); -} - - -/** - * Holds all device groups - * - * It only contains containers only and no items - */ -GType dvb_media_server_device_groups_media_container_get_type (void) { - static volatile gsize dvb_media_server_device_groups_media_container_type_id__volatile = 0; - if (g_once_init_enter (&dvb_media_server_device_groups_media_container_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBMediaServerDeviceGroupsMediaContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_server_device_groups_media_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaServerDeviceGroupsMediaContainer), 0, (GInstanceInitFunc) dvb_media_server_device_groups_media_container_instance_init, NULL }; - static const GInterfaceInfo media_container1_info = { (GInterfaceInitFunc) dvb_media_server_device_groups_media_container_media_container1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo media_object1_info = { (GInterfaceInitFunc) dvb_media_server_device_groups_media_container_media_object1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType dvb_media_server_device_groups_media_container_type_id; - dvb_media_server_device_groups_media_container_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBMediaServerDeviceGroupsMediaContainer", &g_define_type_info, 0); - g_type_add_interface_static (dvb_media_server_device_groups_media_container_type_id, TYPE_MEDIA_CONTAINER1, &media_container1_info); - g_type_add_interface_static (dvb_media_server_device_groups_media_container_type_id, TYPE_MEDIA_OBJECT1, &media_object1_info); - g_once_init_leave (&dvb_media_server_device_groups_media_container_type_id__volatile, dvb_media_server_device_groups_media_container_type_id); - } - return dvb_media_server_device_groups_media_container_type_id__volatile; -} - - -static void _vala_dvb_media_server_device_groups_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBMediaServerDeviceGroupsMediaContainer * self; - self = DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER (object); - switch (property_id) { - case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_PARENT: - g_value_take_string (value, media_object1_get_Parent ((MediaObject1*) self)); - break; - case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_DISPLAY_NAME: - g_value_take_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); - break; - case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_ITEM_COUNT: - g_value_set_uint (value, media_container1_get_ItemCount ((MediaContainer1*) self)); - break; - case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_CONTAINER_COUNT: - g_value_set_uint (value, media_container1_get_ContainerCount ((MediaContainer1*) self)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -void _dvb_media_server_channels_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_media_server_channels_media_container_introspect (DVBMediaServerChannelsMediaContainer* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n\n\n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_media_server_channels_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_media_server_channels_media_container_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (media_container1_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else if (media_object1_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_media_server_channels_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_media_server_channels_media_container_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - media_container1_dbus_register_object (connection, path, object); - media_object1_dbus_register_object (connection, path, object); -} - - -DVBMediaServerChannelsMediaContainer* dvb_media_server_channels_media_container_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent) { - DVBMediaServerChannelsMediaContainer * self = NULL; - DVBDeviceGroup* _tmp0_; - DVBDeviceGroup* _tmp1_; - char* _tmp2_; - char* _tmp3_; - g_return_val_if_fail (devgroup != NULL, NULL); - g_return_val_if_fail (parent != NULL, NULL); - self = (DVBMediaServerChannelsMediaContainer*) g_object_new (object_type, NULL); - _tmp0_ = _g_object_ref0 (devgroup); - _tmp1_ = _tmp0_; - _g_object_unref0 (self->priv->device_group); - self->priv->device_group = _tmp1_; - _tmp2_ = g_strdup (parent); - _tmp3_ = _tmp2_; - _g_free0 (self->parent); - self->parent = _tmp3_; - return self; -} - - -DVBMediaServerChannelsMediaContainer* dvb_media_server_channels_media_container_new (DVBDeviceGroup* devgroup, const char* parent) { - return dvb_media_server_channels_media_container_construct (DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER, devgroup, parent); -} - - -void dvb_media_server_channels_media_container_create_item_services (DVBMediaServerChannelsMediaContainer* self) { - g_return_if_fail (self != NULL); - { - DVBChannelList* _tmp0_ = NULL; - GeeIterator* _tmp1_ = NULL; - GeeIterator* _channel_it; - _tmp0_ = dvb_device_group_get_Channels (self->priv->device_group); - _tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_); - _channel_it = _tmp1_; - while (TRUE) { - gboolean _tmp2_; - gpointer _tmp3_ = NULL; - DVBChannel* channel; - _tmp2_ = gee_iterator_next (_channel_it); - if (!_tmp2_) { - break; - } - _tmp3_ = gee_iterator_get (_channel_it); - channel = (DVBChannel*) _tmp3_; - dvb_media_server_channels_media_container_create_service (self, channel); - _g_object_unref0 (channel); - } - _g_object_unref0 (_channel_it); - } -} - - -void dvb_media_server_channels_media_container_create_service (DVBMediaServerChannelsMediaContainer* self, DVBChannel* channel) { - guint _tmp0_; - DBusGConnection* _tmp1_ = NULL; - DBusGConnection* conn; - gchar* _tmp2_ = NULL; - gchar* _tmp3_; - char* _tmp4_ = NULL; - char* _tmp5_; - DVBMediaServerChannelMediaItem* _tmp6_ = NULL; - DVBMediaServerChannelMediaItem* _tmp7_; - DVBMediaServerChannelMediaItem* channel_item; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - guint _tmp10_; - g_return_if_fail (self != NULL); - g_return_if_fail (channel != NULL); - _tmp0_ = dvb_channel_get_Sid (channel); - g_debug ("Services.vala:166: Creating container for channel %u", _tmp0_); - _tmp1_ = dvb_utils_get_dbus_connection (); - conn = _tmp1_; - if (conn == NULL) { - g_critical ("Services.vala:170: Could not get DBus connection"); - _dbus_g_connection_unref0 (conn); - return; - } - _tmp2_ = dvb_media_server_channels_media_container_get_Path (self); - _tmp3_ = _tmp2_; - _tmp4_ = g_strdup (_tmp3_); - _tmp5_ = _tmp4_; - _tmp6_ = dvb_media_server_channel_media_item_new (channel, _tmp5_); - channel_item = (_tmp7_ = _tmp6_, _g_free0 (_tmp5_), _g_free0 (_tmp3_), _tmp7_); - _tmp8_ = dvb_media_server_channel_media_item_get_Path (channel_item); - _tmp9_ = _tmp8_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp9_, (GObject*) channel_item); - _g_free0 (_tmp9_); - _tmp10_ = dvb_channel_get_Sid (channel); - gee_abstract_map_set ((GeeAbstractMap*) self->priv->items, GUINT_TO_POINTER (_tmp10_), channel_item); - _g_object_unref0 (channel_item); - _dbus_g_connection_unref0 (conn); -} - - -gchar* dvb_media_server_channels_media_container_get_Path (DVBMediaServerChannelsMediaContainer* self) { - gchar* result; - guint _tmp0_; - gchar* _tmp1_ = NULL; - g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = dvb_device_group_get_Id (self->priv->device_group); - _tmp1_ = g_strdup_printf (DVB_MEDIA_SERVER_GROUP_PATH, _tmp0_); - result = _tmp1_; - return result; -} - - -static char* dvb_media_server_channels_media_container_real_get_Parent (MediaObject1* base) { - char* result; - DVBMediaServerChannelsMediaContainer* self; - char* _tmp0_; - self = (DVBMediaServerChannelsMediaContainer*) base; - _tmp0_ = g_strdup (self->parent); - result = _tmp0_; - return result; -} - - -static gchar* dvb_media_server_channels_media_container_real_get_DisplayName (MediaObject1* base) { - gchar* result; - DVBMediaServerChannelsMediaContainer* self; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_; - self = (DVBMediaServerChannelsMediaContainer*) base; - _tmp0_ = dvb_device_group_get_Name (self->priv->device_group); - _tmp1_ = g_strdup (_tmp0_); - result = _tmp1_; - return result; -} - - -static char** dvb_media_server_channels_media_container_real_get_Items (MediaContainer1* base, int* result_length1) { - char** result; - DVBMediaServerChannelsMediaContainer* self; - gint _tmp0_; - char** _tmp1_ = NULL; - gint paths_length1; - gint _paths_size_; - char** _tmp2_; - char** paths; - gint i; - char** _tmp13_; - self = (DVBMediaServerChannelsMediaContainer*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->items); - _tmp1_ = g_new0 (char*, _tmp0_ + 1); - _tmp2_ = _tmp1_; - paths_length1 = _tmp0_; - _paths_size_ = paths_length1; - paths = _tmp2_; - i = 0; - { - GeeCollection* _tmp3_ = NULL; - GeeCollection* _tmp4_; - GeeIterator* _tmp5_ = NULL; - GeeIterator* _tmp6_; - GeeIterator* _item_it; - _tmp3_ = gee_map_get_values ((GeeMap*) self->priv->items); - _tmp4_ = _tmp3_; - _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_); - _item_it = (_tmp6_ = _tmp5_, _g_object_unref0 (_tmp4_), _tmp6_); - while (TRUE) { - gboolean _tmp7_; - gpointer _tmp8_ = NULL; - DVBMediaServerChannelMediaItem* item; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - char* _tmp11_ = NULL; - char* _tmp12_; - _tmp7_ = gee_iterator_next (_item_it); - if (!_tmp7_) { - break; - } - _tmp8_ = gee_iterator_get (_item_it); - item = (DVBMediaServerChannelMediaItem*) _tmp8_; - _tmp9_ = dvb_media_server_channel_media_item_get_Path (item); - _tmp10_ = _tmp9_; - _tmp11_ = g_strdup (_tmp10_); - _tmp12_ = _tmp11_; - _g_free0 (paths[i]); - paths[i] = _tmp12_; - _g_free0 (_tmp10_); - i++; - _g_object_unref0 (item); - } - _g_object_unref0 (_item_it); - } - _tmp13_ = paths; - *result_length1 = paths_length1; - result = _tmp13_; - return result; -} - - -static guint dvb_media_server_channels_media_container_real_get_ItemCount (MediaContainer1* base) { - guint result; - DVBMediaServerChannelsMediaContainer* self; - gint _tmp0_; - self = (DVBMediaServerChannelsMediaContainer*) base; - _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->items); - result = (guint) _tmp0_; - return result; -} - - -static char** dvb_media_server_channels_media_container_real_get_Containers (MediaContainer1* base, int* result_length1) { - char** result; - DVBMediaServerChannelsMediaContainer* self; - char** _tmp0_ = NULL; - char** _tmp1_; - self = (DVBMediaServerChannelsMediaContainer*) base; - _tmp0_ = g_new0 (char*, 0 + 1); - _tmp1_ = _tmp0_; - *result_length1 = 0; - result = _tmp1_; - return result; -} - - -static guint dvb_media_server_channels_media_container_real_get_ContainerCount (MediaContainer1* base) { - guint result; - DVBMediaServerChannelsMediaContainer* self; - self = (DVBMediaServerChannelsMediaContainer*) base; - result = (guint) 0; - return result; -} - - -static GObject * dvb_media_server_channels_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { - GObject * obj; - GObjectClass * parent_class; - DVBMediaServerChannelsMediaContainer * self; - GeeHashMap* _tmp0_ = NULL; - GeeHashMap* _tmp1_; - parent_class = G_OBJECT_CLASS (dvb_media_server_channels_media_container_parent_class); - obj = parent_class->constructor (type, n_construct_properties, construct_properties); - self = DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER (obj); - _tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); - _tmp1_ = _tmp0_; - _g_object_unref0 (self->priv->items); - self->priv->items = _tmp1_; - return obj; -} - - -static void dvb_media_server_channels_media_container_class_init (DVBMediaServerChannelsMediaContainerClass * klass) { - dvb_media_server_channels_media_container_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBMediaServerChannelsMediaContainerPrivate)); - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_media_server_channels_media_container_get_property; - G_OBJECT_CLASS (klass)->constructor = dvb_media_server_channels_media_container_constructor; - G_OBJECT_CLASS (klass)->finalize = dvb_media_server_channels_media_container_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_PATH, g_param_spec_string ("Path", "Path", "Path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_CONTAINER_COUNT, "ContainerCount"); - g_type_set_qdata (DVB_MEDIA_SERVER_TYPE_CHANNELS_MEDIA_CONTAINER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_media_server_channels_media_container_dbus_vtable)); -} - - -static void dvb_media_server_channels_media_container_media_container1_interface_init (MediaContainer1Iface * iface) { - dvb_media_server_channels_media_container_media_container1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Items = dvb_media_server_channels_media_container_real_get_Items; - iface->get_ItemCount = dvb_media_server_channels_media_container_real_get_ItemCount; - iface->get_Containers = dvb_media_server_channels_media_container_real_get_Containers; - iface->get_ContainerCount = dvb_media_server_channels_media_container_real_get_ContainerCount; -} - - -static void dvb_media_server_channels_media_container_media_object1_interface_init (MediaObject1Iface * iface) { - dvb_media_server_channels_media_container_media_object1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Parent = dvb_media_server_channels_media_container_real_get_Parent; - iface->get_DisplayName = dvb_media_server_channels_media_container_real_get_DisplayName; -} - - -static void dvb_media_server_channels_media_container_instance_init (DVBMediaServerChannelsMediaContainer * self) { - self->priv = DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_GET_PRIVATE (self); -} - - -static void dvb_media_server_channels_media_container_finalize (GObject* obj) { - DVBMediaServerChannelsMediaContainer * self; - self = DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER (obj); - _g_free0 (self->parent); - _g_object_unref0 (self->priv->device_group); - _g_object_unref0 (self->priv->items); - G_OBJECT_CLASS (dvb_media_server_channels_media_container_parent_class)->finalize (obj); -} - - -/** - * Holds a list of channels for a single device group - * - * It only contains items only and no containers - */ -GType dvb_media_server_channels_media_container_get_type (void) { - static volatile gsize dvb_media_server_channels_media_container_type_id__volatile = 0; - if (g_once_init_enter (&dvb_media_server_channels_media_container_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBMediaServerChannelsMediaContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_server_channels_media_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaServerChannelsMediaContainer), 0, (GInstanceInitFunc) dvb_media_server_channels_media_container_instance_init, NULL }; - static const GInterfaceInfo media_container1_info = { (GInterfaceInitFunc) dvb_media_server_channels_media_container_media_container1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo media_object1_info = { (GInterfaceInitFunc) dvb_media_server_channels_media_container_media_object1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType dvb_media_server_channels_media_container_type_id; - dvb_media_server_channels_media_container_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBMediaServerChannelsMediaContainer", &g_define_type_info, 0); - g_type_add_interface_static (dvb_media_server_channels_media_container_type_id, TYPE_MEDIA_CONTAINER1, &media_container1_info); - g_type_add_interface_static (dvb_media_server_channels_media_container_type_id, TYPE_MEDIA_OBJECT1, &media_object1_info); - g_once_init_leave (&dvb_media_server_channels_media_container_type_id__volatile, dvb_media_server_channels_media_container_type_id); - } - return dvb_media_server_channels_media_container_type_id__volatile; -} - - -static void _vala_dvb_media_server_channels_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBMediaServerChannelsMediaContainer * self; - self = DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER (object); - switch (property_id) { - case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_PATH: - g_value_take_string (value, dvb_media_server_channels_media_container_get_Path (self)); - break; - case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_PARENT: - g_value_take_string (value, media_object1_get_Parent ((MediaObject1*) self)); - break; - case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_DISPLAY_NAME: - g_value_take_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); - break; - case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_ITEM_COUNT: - g_value_set_uint (value, media_container1_get_ItemCount ((MediaContainer1*) self)); - break; - case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_CONTAINER_COUNT: - g_value_set_uint (value, media_container1_get_ContainerCount ((MediaContainer1*) self)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -void _dvb_media_server_channel_media_item_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_media_server_channel_media_item_introspect (DVBMediaServerChannelMediaItem* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n\n\n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_media_server_channel_media_item_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_media_server_channel_media_item_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (media_item1_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else if (media_object1_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -void dvb_media_server_channel_media_item_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_media_server_channel_media_item_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - media_item1_dbus_register_object (connection, path, object); - media_object1_dbus_register_object (connection, path, object); -} - - -DVBMediaServerChannelMediaItem* dvb_media_server_channel_media_item_construct (GType object_type, DVBChannel* channel, const char* parent) { - DVBMediaServerChannelMediaItem * self = NULL; - DVBChannel* _tmp0_; - DVBChannel* _tmp1_; - char* _tmp2_; - char* _tmp3_; - g_return_val_if_fail (channel != NULL, NULL); - g_return_val_if_fail (parent != NULL, NULL); - self = (DVBMediaServerChannelMediaItem*) g_object_new (object_type, NULL); - _tmp0_ = _g_object_ref0 (channel); - _tmp1_ = _tmp0_; - _g_object_unref0 (self->priv->channel); - self->priv->channel = _tmp1_; - _tmp2_ = g_strdup (parent); - _tmp3_ = _tmp2_; - _g_free0 (self->priv->parent); - self->priv->parent = _tmp3_; - return self; -} - - -DVBMediaServerChannelMediaItem* dvb_media_server_channel_media_item_new (DVBChannel* channel, const char* parent) { - return dvb_media_server_channel_media_item_construct (DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM, channel, parent); -} - - -gchar* dvb_media_server_channel_media_item_get_Path (DVBMediaServerChannelMediaItem* self) { - gchar* result; - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_ = NULL; - g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = dvb_channel_get_GroupId (self->priv->channel); - _tmp1_ = dvb_channel_get_Sid (self->priv->channel); - _tmp2_ = g_strdup_printf (DVB_MEDIA_SERVER_CHANNEL_PATH, _tmp0_, _tmp1_); - result = _tmp2_; - return result; -} - - -static char* dvb_media_server_channel_media_item_real_get_Parent (MediaObject1* base) { - char* result; - DVBMediaServerChannelMediaItem* self; - char* _tmp0_; - self = (DVBMediaServerChannelMediaItem*) base; - _tmp0_ = g_strdup (self->priv->parent); - result = _tmp0_; - return result; -} - - -static gchar* dvb_media_server_channel_media_item_real_get_DisplayName (MediaObject1* base) { - gchar* result; - DVBMediaServerChannelMediaItem* self; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_; - self = (DVBMediaServerChannelMediaItem*) base; - _tmp0_ = dvb_channel_get_Name (self->priv->channel); - _tmp1_ = g_strdup (_tmp0_); - result = _tmp1_; - return result; -} - - -static gchar** dvb_media_server_channel_media_item_real_get_URLs (MediaItem1* base, int* result_length1) { - gchar** result; - DVBMediaServerChannelMediaItem* self; - gchar* _tmp0_ = NULL; - gchar** _tmp1_ = NULL; - gchar** _tmp2_; - self = (DVBMediaServerChannelMediaItem*) base; - _tmp0_ = dvb_channel_get_URL (self->priv->channel); - _tmp1_ = g_new0 (gchar*, 1 + 1); - _tmp1_[0] = _tmp0_; - _tmp2_ = _tmp1_; - *result_length1 = 1; - result = _tmp2_; - return result; -} - - -static gchar* dvb_media_server_channel_media_item_real_get_MIMEType (MediaItem1* base) { - gchar* result; - DVBMediaServerChannelMediaItem* self; - gchar* _tmp0_; - self = (DVBMediaServerChannelMediaItem*) base; - _tmp0_ = g_strdup ("video/mpeg"); - result = _tmp0_; - return result; -} - - -static gchar* dvb_media_server_channel_media_item_real_get_Type (MediaItem1* base) { - gchar* result; - DVBMediaServerChannelMediaItem* self; - gchar* _tmp0_; - self = (DVBMediaServerChannelMediaItem*) base; - _tmp0_ = g_strdup ("video"); - result = _tmp0_; - return result; -} - - -static void dvb_media_server_channel_media_item_class_init (DVBMediaServerChannelMediaItemClass * klass) { - dvb_media_server_channel_media_item_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBMediaServerChannelMediaItemPrivate)); - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_media_server_channel_media_item_get_property; - G_OBJECT_CLASS (klass)->finalize = dvb_media_server_channel_media_item_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_PATH, g_param_spec_string ("Path", "Path", "Path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_UR_LS, "URLs"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_MIME_TYPE, "MIMEType"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_TYPE, "Type"); - g_type_set_qdata (DVB_MEDIA_SERVER_TYPE_CHANNEL_MEDIA_ITEM, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_media_server_channel_media_item_dbus_vtable)); -} - - -static void dvb_media_server_channel_media_item_media_item1_interface_init (MediaItem1Iface * iface) { - dvb_media_server_channel_media_item_media_item1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_URLs = dvb_media_server_channel_media_item_real_get_URLs; - iface->get_MIMEType = dvb_media_server_channel_media_item_real_get_MIMEType; - iface->get_Type = dvb_media_server_channel_media_item_real_get_Type; -} - - -static void dvb_media_server_channel_media_item_media_object1_interface_init (MediaObject1Iface * iface) { - dvb_media_server_channel_media_item_media_object1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Parent = dvb_media_server_channel_media_item_real_get_Parent; - iface->get_DisplayName = dvb_media_server_channel_media_item_real_get_DisplayName; -} - - -static void dvb_media_server_channel_media_item_instance_init (DVBMediaServerChannelMediaItem * self) { - self->priv = DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_GET_PRIVATE (self); -} - - -static void dvb_media_server_channel_media_item_finalize (GObject* obj) { - DVBMediaServerChannelMediaItem * self; - self = DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM (obj); - _g_object_unref0 (self->priv->channel); - _g_free0 (self->priv->parent); - G_OBJECT_CLASS (dvb_media_server_channel_media_item_parent_class)->finalize (obj); -} - - -/** - * Holds a single channel - */ -GType dvb_media_server_channel_media_item_get_type (void) { - static volatile gsize dvb_media_server_channel_media_item_type_id__volatile = 0; - if (g_once_init_enter (&dvb_media_server_channel_media_item_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBMediaServerChannelMediaItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_server_channel_media_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaServerChannelMediaItem), 0, (GInstanceInitFunc) dvb_media_server_channel_media_item_instance_init, NULL }; - static const GInterfaceInfo media_item1_info = { (GInterfaceInitFunc) dvb_media_server_channel_media_item_media_item1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo media_object1_info = { (GInterfaceInitFunc) dvb_media_server_channel_media_item_media_object1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType dvb_media_server_channel_media_item_type_id; - dvb_media_server_channel_media_item_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBMediaServerChannelMediaItem", &g_define_type_info, 0); - g_type_add_interface_static (dvb_media_server_channel_media_item_type_id, TYPE_MEDIA_ITEM1, &media_item1_info); - g_type_add_interface_static (dvb_media_server_channel_media_item_type_id, TYPE_MEDIA_OBJECT1, &media_object1_info); - g_once_init_leave (&dvb_media_server_channel_media_item_type_id__volatile, dvb_media_server_channel_media_item_type_id); - } - return dvb_media_server_channel_media_item_type_id__volatile; -} - - -static void _vala_dvb_media_server_channel_media_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBMediaServerChannelMediaItem * self; - int length; - self = DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM (object); - switch (property_id) { - case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_PATH: - g_value_take_string (value, dvb_media_server_channel_media_item_get_Path (self)); - break; - case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_PARENT: - g_value_take_string (value, media_object1_get_Parent ((MediaObject1*) self)); - break; - case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_DISPLAY_NAME: - g_value_take_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); - break; - case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_UR_LS: - g_value_take_boxed (value, media_item1_get_URLs ((MediaItem1*) self, &length)); - break; - case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_MIME_TYPE: - g_value_take_string (value, media_item1_get_MIMEType ((MediaItem1*) self)); - break; - case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_TYPE: - g_value_take_string (value, media_item1_get_Type ((MediaItem1*) self)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -static guint _dynamic_RequestName1 (DBusGProxy* self, const gchar* param1, guint param2, GError** error) { - guint result; - dbus_g_proxy_call (self, "RequestName", error, G_TYPE_STRING, param1, G_TYPE_UINT, param2, G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID); - if (*error) { - return 0U; - } - return result; -} - - -gboolean dvb_media_server_start_rygel_services (void) { - gboolean result = FALSE; - DBusGConnection* _tmp0_ = NULL; - DBusGConnection* conn; - DBusGProxy* _tmp1_ = NULL; - DBusGProxy* bus; - guint _tmp2_; - guint request_name_result; - GError * _inner_error_ = NULL; - _tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); - conn = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch190_g_error; - } - _tmp1_ = dbus_g_proxy_new_for_name (conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); - bus = _tmp1_; - _tmp2_ = _dynamic_RequestName1 (bus, DVB_MEDIA_SERVER_SERVICE_NAME, (guint) 0, &_inner_error_); - request_name_result = _tmp2_; - if (_inner_error_ != NULL) { - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - goto __catch190_g_error; - } - if (request_name_result == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - DVBMediaServerDeviceGroupsMediaContainer* _tmp3_ = NULL; - DVBMediaServerDeviceGroupsMediaContainer* _tmp4_; - char* _tmp5_ = NULL; - char* _tmp6_; - g_message ("Services.vala:291: Creating new Rygel MediaServer D-Bus service"); - _tmp3_ = dvb_media_server_device_groups_media_container_new (); - _tmp4_ = _tmp3_; - _g_object_unref0 (dvb_media_server_root_container); - dvb_media_server_root_container = _tmp4_; - dvb_media_server_device_groups_media_container_create_container_services (dvb_media_server_root_container); - _tmp5_ = media_object1_get_Parent ((MediaObject1*) dvb_media_server_root_container); - _tmp6_ = _tmp5_; - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), (const gchar*) _tmp6_, (GObject*) dvb_media_server_root_container); - _g_free0 (_tmp6_); - } else { - g_warning ("Services.vala:300: Rygel MediaServer D-Bus service is already running"); - result = FALSE; - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - return result; - } - _g_object_unref0 (bus); - _dbus_g_connection_unref0 (conn); - goto __finally190; - __catch190_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Services.vala:305: Oops %s", e->message); - result = FALSE; - _g_error_free0 (e); - return result; - } - __finally190: - if (_inner_error_ != NULL) { - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; - } - result = FALSE; - return result; -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - - diff -Nru gnome-dvb-daemon-0.1.23/src/rygel/Services.vala gnome-dvb-daemon-0.2.7/src/rygel/Services.vala --- gnome-dvb-daemon-0.1.23/src/rygel/Services.vala 2010-08-09 13:19:57.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/rygel/Services.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,311 +0,0 @@ -/* - * Copyright (C) 2009-2010 Sebastian Pölsterl - * - * This file is part of GNOME DVB Daemon. - * - * GNOME DVB Daemon is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNOME DVB Daemon is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNOME DVB Daemon. If not, see . - */ -using GLib; -using Gee; - -namespace DVB.MediaServer { - - private static const string SERVICE_NAME = "org.gnome.UPnP.MediaServer1.DVBDaemon"; - private static const string ROOT_PATH = "/org/gnome/UPnP/MediaServer1/DVBDaemon"; - - private static const string GROUP_PATH = "/org/gnome/UPnP/MediaServer1/DVBDaemon/Group%u"; - private static const string CHANNEL_PATH = GROUP_PATH + "/Channel%u"; - - /** - * Holds all device groups - * - * It only contains containers only and no items - */ - public class DeviceGroupsMediaContainer : GLib.Object, MediaContainer1, MediaObject1 { - - private HashMap containers; - private DBus.ObjectPath path; - - construct { - containers = new HashMap (); - - Manager manager = Manager.get_instance (); - manager.group_added.connect (this.on_device_added); - manager.group_removed.connect (this.on_device_removed); - - this.path = new DBus.ObjectPath (ROOT_PATH); - } - - public void create_container_services () { - Manager manager = Manager.get_instance (); - - foreach (DeviceGroup devgroup in manager.device_groups) { - this.create_service (devgroup); - } - } - - private void create_service (DeviceGroup devgroup) { - debug ("Creating container for device group %u", devgroup.Id); - - var conn = Utils.get_dbus_connection (); - if (conn == null) { - critical ("Could not get DBus connection"); - return; - } - var devgroup_container = new ChannelsMediaContainer ( - devgroup, this.path); - conn.register_object ( - devgroup_container.Path, - devgroup_container); - devgroup_container.create_item_services (); - - this.containers.set (devgroup.Id, devgroup_container); - } - - public DBus.ObjectPath Parent { - owned get { - // root container => ref to itsself - return this.path; - } - } - - public string DisplayName { - owned get { - return "@REALNAME@'s TV on @HOSTNAME@"; - } - } - - public DBus.ObjectPath[] Items { - owned get { - return new DBus.ObjectPath[0]; - } - } - - public uint ItemCount { - get { - return 0; - } - } - - public DBus.ObjectPath[] Containers { - owned get { - DBus.ObjectPath[] paths = new DBus.ObjectPath[this.containers.size]; - int i = 0; - foreach (ChannelsMediaContainer container in this.containers.values) { - paths[i] = new DBus.ObjectPath (container.Path); - i++; - } - return paths; - } - } - - public uint ContainerCount { - get { - return this.containers.size; - } - } - - private void on_device_added (uint group_id) { - Manager manager = Manager.get_instance (); - DeviceGroup devgroup = manager.get_device_group_if_exists (group_id); - this.create_service (devgroup); - this.Updated (); - } - - private void on_device_removed (uint group_id) { - this.containers.unset (group_id); - this.Updated (); - } - } - - - /** - * Holds a list of channels for a single device group - * - * It only contains items only and no containers - */ - public class ChannelsMediaContainer : GLib.Object, MediaContainer1, MediaObject1 { - - public string Path { - owned get { - return GROUP_PATH.printf (this.device_group.Id); - } - } - public DBus.ObjectPath parent; - - private DeviceGroup device_group; - private HashMap items; - - construct { - this.items = new HashMap (); - } - - public ChannelsMediaContainer(DeviceGroup devgroup, DBus.ObjectPath parent) { - this.device_group = devgroup; - this.parent = parent; - } - - public void create_item_services () { - foreach (Channel channel in this.device_group.Channels) { - this.create_service (channel); - } - } - - public void create_service (Channel channel) { - debug ("Creating container for channel %u", channel.Sid); - - var conn = Utils.get_dbus_connection (); - if (conn == null) { - critical ("Could not get DBus connection"); - return; - } - var channel_item = new ChannelMediaItem ( - channel, new DBus.ObjectPath (this.Path)); - conn.register_object ( - channel_item.Path, - channel_item); - - this.items.set (channel.Sid, channel_item); - } - - public DBus.ObjectPath Parent { - owned get { - return this.parent; - } - } - - public string DisplayName { - owned get { - return this.device_group.Name; - } - } - - public DBus.ObjectPath[] Items { - owned get { - DBus.ObjectPath[] paths = new DBus.ObjectPath[this.items.size]; - int i = 0; - foreach (ChannelMediaItem item in this.items.values) { - paths[i] = new DBus.ObjectPath (item.Path); - i++; - } - return paths; - } - } - - public uint ItemCount { - get { - return this.items.size; - } - } - - public DBus.ObjectPath[] Containers { - owned get { - return new DBus.ObjectPath[0]; - } - } - - public uint ContainerCount { - get { - return 0; - } - } - } - - - /** - * Holds a single channel - */ - public class ChannelMediaItem : GLib.Object, MediaItem1, MediaObject1 { - - private Channel channel; - private DBus.ObjectPath parent; - - public string Path { - owned get { - return CHANNEL_PATH.printf (channel.GroupId, channel.Sid); - } - } - - public ChannelMediaItem(Channel channel, DBus.ObjectPath parent) { - this.channel = channel; - this.parent = parent; - } - - public DBus.ObjectPath Parent { - owned get { - return this.parent; - } - } - - public string DisplayName { - owned get { - return this.channel.Name; - } - } - - public string[] URLs { - owned get { - return new string[] { - this.channel.URL - }; - } - } - - public string MIMEType { - owned get { - return "video/mpeg"; - } - } - - public string Type { - owned get { - return "video"; - } - } - } - - private static DeviceGroupsMediaContainer root_container; - - public static bool start_rygel_services () { - try { - var conn = DBus.Bus.get (DBus.BusType.SESSION); - - dynamic DBus.Object bus = conn.get_object ( - "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); - - // try to register service in session bus - uint request_name_result = bus.RequestName (SERVICE_NAME, (uint) 0); - - if (request_name_result == DBus.RequestNameReply.PRIMARY_OWNER) { - message ("Creating new Rygel MediaServer D-Bus service"); - - root_container = new DeviceGroupsMediaContainer (); - root_container.create_container_services (); - - conn.register_object ( - root_container.Parent, - root_container); - } else { - warning ("Rygel MediaServer D-Bus service is already running"); - return false; - } - - } catch (Error e) { - critical ("Oops %s", e.message); - return false; - } - return false; - } - -} diff -Nru gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteChannel.c gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteChannel.c --- gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteChannel.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteChannel.c 2011-09-29 18:32:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* SatelliteChannel.c generated by valac 0.11.3, the Vala compiler +/* SatelliteChannel.c generated by valac 0.14.0, the Vala compiler * generated from SatelliteChannel.vala, do not modify */ /* @@ -91,6 +91,9 @@ DVB_SATELLITE_CHANNEL_SYMBOL_RATE, DVB_SATELLITE_CHANNEL_DISEQC_SOURCE }; +DVBSatelliteChannel* dvb_satellite_channel_new (guint group_id); +DVBSatelliteChannel* dvb_satellite_channel_construct (GType object_type, guint group_id); +DVBChannel* dvb_channel_construct (GType object_type, guint group_id); DVBSatelliteChannel* dvb_satellite_channel_new_without_schedule (void); DVBSatelliteChannel* dvb_satellite_channel_construct_without_schedule (GType object_type); DVBChannel* dvb_channel_construct_without_schedule (GType object_type); @@ -106,9 +109,6 @@ guint dvb_channel_get_VideoPID (DVBChannel* self); gchar* dvb_channel_get_audio_pids_string (DVBChannel* self); guint dvb_channel_get_Sid (DVBChannel* self); -DVBSatelliteChannel* dvb_satellite_channel_new (void); -DVBSatelliteChannel* dvb_satellite_channel_construct (GType object_type); -DVBChannel* dvb_channel_construct (GType object_type); void dvb_satellite_channel_set_Polarization (DVBSatelliteChannel* self, const gchar* value); void dvb_satellite_channel_set_SymbolRate (DVBSatelliteChannel* self, guint value); void dvb_satellite_channel_set_DiseqcSource (DVBSatelliteChannel* self, gint value); @@ -117,6 +117,20 @@ static void _vala_dvb_satellite_channel_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +DVBSatelliteChannel* dvb_satellite_channel_construct (GType object_type, guint group_id) { + DVBSatelliteChannel * self = NULL; + guint _tmp0_; + _tmp0_ = group_id; + self = (DVBSatelliteChannel*) dvb_channel_construct (object_type, _tmp0_); + return self; +} + + +DVBSatelliteChannel* dvb_satellite_channel_new (guint group_id) { + return dvb_satellite_channel_construct (DVB_TYPE_SATELLITE_CHANNEL, group_id); +} + + DVBSatelliteChannel* dvb_satellite_channel_construct_without_schedule (GType object_type) { DVBSatelliteChannel * self = NULL; self = (DVBSatelliteChannel*) dvb_channel_construct_without_schedule (object_type); @@ -134,93 +148,127 @@ gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; - gboolean _tmp2_; + gboolean _tmp2_ = FALSE; + gboolean _tmp4_; + gboolean _tmp9_; self = (DVBSatelliteChannel*) base; _tmp2_ = DVB_CHANNEL_CLASS (dvb_satellite_channel_parent_class)->is_valid (DVB_CHANNEL (self)); if (_tmp2_) { - _tmp1_ = self->priv->_SymbolRate != 0; + guint _tmp3_; + _tmp3_ = self->priv->_SymbolRate; + _tmp1_ = _tmp3_ != ((guint) 0); } else { _tmp1_ = FALSE; } - if (_tmp1_) { - gboolean _tmp3_ = FALSE; - if (g_strcmp0 (self->priv->_Polarization, "v") == 0) { - _tmp3_ = TRUE; + _tmp4_ = _tmp1_; + if (_tmp4_) { + gboolean _tmp5_ = FALSE; + const gchar* _tmp6_; + gboolean _tmp8_; + _tmp6_ = self->priv->_Polarization; + if (g_strcmp0 (_tmp6_, "v") == 0) { + _tmp5_ = TRUE; } else { - _tmp3_ = g_strcmp0 (self->priv->_Polarization, "h") == 0; + const gchar* _tmp7_; + _tmp7_ = self->priv->_Polarization; + _tmp5_ = g_strcmp0 (_tmp7_, "h") == 0; } - _tmp0_ = _tmp3_; + _tmp8_ = _tmp5_; + _tmp0_ = _tmp8_; } else { _tmp0_ = FALSE; } - result = _tmp0_; + _tmp9_ = _tmp0_; + result = _tmp9_; return result; } static void dvb_satellite_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source) { DVBSatelliteChannel * self; - guint _tmp0_; + GstElement* _tmp0_; + guint _tmp1_; + guint _tmp2_; + GstElement* _tmp3_; + const gchar* _tmp4_; + GstElement* _tmp5_; + guint _tmp6_; + GstElement* _tmp7_; + gint _tmp8_; self = (DVBSatelliteChannel*) base; g_return_if_fail (source != NULL); - _tmp0_ = dvb_channel_get_Frequency ((DVBChannel*) self); - g_object_set ((GObject*) source, "frequency", _tmp0_, NULL); - g_object_set ((GObject*) source, "polarity", self->priv->_Polarization, NULL); - g_object_set ((GObject*) source, "symbol-rate", self->priv->_SymbolRate, NULL); - g_object_set ((GObject*) source, "diseqc-source", self->priv->_DiseqcSource, NULL); + _tmp0_ = source; + _tmp1_ = dvb_channel_get_Frequency ((DVBChannel*) self); + _tmp2_ = _tmp1_; + g_object_set ((GObject*) _tmp0_, "frequency", _tmp2_, NULL); + _tmp3_ = source; + _tmp4_ = self->priv->_Polarization; + g_object_set ((GObject*) _tmp3_, "polarity", _tmp4_, NULL); + _tmp5_ = source; + _tmp6_ = self->priv->_SymbolRate; + g_object_set ((GObject*) _tmp5_, "symbol-rate", _tmp6_, NULL); + _tmp7_ = source; + _tmp8_ = self->priv->_DiseqcSource; + g_object_set ((GObject*) _tmp7_, "diseqc-source", _tmp8_, NULL); } static gchar* dvb_satellite_channel_real_to_string (DVBChannel* base) { DVBSatelliteChannel * self; gchar* result = NULL; - const gchar* _tmp0_ = NULL; - guint _tmp1_; + const gchar* _tmp0_; + const gchar* _tmp1_; guint _tmp2_; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - guint _tmp5_; - gchar* _tmp6_ = NULL; - gchar* _tmp7_; + guint _tmp3_; + const gchar* _tmp4_; + gint _tmp5_; + guint _tmp6_; + guint _tmp7_; + guint _tmp8_; + gchar* _tmp9_ = NULL; + gchar* _tmp10_; + guint _tmp11_; + guint _tmp12_; + gchar* _tmp13_ = NULL; + gchar* _tmp14_; self = (DVBSatelliteChannel*) base; - _tmp0_ = dvb_channel_get_Name (DVB_CHANNEL (self)); - _tmp1_ = dvb_channel_get_Frequency (DVB_CHANNEL (self)); - _tmp2_ = dvb_channel_get_VideoPID (DVB_CHANNEL (self)); - _tmp3_ = dvb_channel_get_audio_pids_string (DVB_CHANNEL (self)); - _tmp4_ = _tmp3_; - _tmp5_ = dvb_channel_get_Sid (DVB_CHANNEL (self)); - _tmp6_ = g_strdup_printf ("%s:%u:%s:%d:%u:%u:%s:%u", _tmp0_, _tmp1_, self->priv->_Polarization, self->priv->_DiseqcSource, self->priv->_SymbolRate, _tmp2_, _tmp4_, _tmp5_); - result = (_tmp7_ = _tmp6_, _g_free0 (_tmp4_), _tmp7_); + _tmp0_ = dvb_channel_get_Name ((DVBChannel*) self); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_channel_get_Frequency ((DVBChannel*) self); + _tmp3_ = _tmp2_; + _tmp4_ = self->priv->_Polarization; + _tmp5_ = self->priv->_DiseqcSource; + _tmp6_ = self->priv->_SymbolRate; + _tmp7_ = dvb_channel_get_VideoPID ((DVBChannel*) self); + _tmp8_ = _tmp7_; + _tmp9_ = dvb_channel_get_audio_pids_string ((DVBChannel*) self); + _tmp10_ = _tmp9_; + _tmp11_ = dvb_channel_get_Sid ((DVBChannel*) self); + _tmp12_ = _tmp11_; + _tmp13_ = g_strdup_printf ("%s:%u:%s:%d:%u:%u:%s:%u", _tmp1_, _tmp3_, _tmp4_, _tmp5_, _tmp6_, _tmp8_, _tmp10_, _tmp12_); + _tmp14_ = _tmp13_; + _g_free0 (_tmp10_); + result = _tmp14_; return result; } -DVBSatelliteChannel* dvb_satellite_channel_construct (GType object_type) { - DVBSatelliteChannel * self = NULL; - self = (DVBSatelliteChannel*) dvb_channel_construct (object_type); - return self; -} - - -DVBSatelliteChannel* dvb_satellite_channel_new (void) { - return dvb_satellite_channel_construct (DVB_TYPE_SATELLITE_CHANNEL); -} - - const gchar* dvb_satellite_channel_get_Polarization (DVBSatelliteChannel* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Polarization; + _tmp0_ = self->priv->_Polarization; + result = _tmp0_; return result; } void dvb_satellite_channel_set_Polarization (DVBSatelliteChannel* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_Polarization); self->priv->_Polarization = _tmp1_; g_object_notify ((GObject *) self, "Polarization"); @@ -229,30 +277,38 @@ guint dvb_satellite_channel_get_SymbolRate (DVBSatelliteChannel* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_SymbolRate; + _tmp0_ = self->priv->_SymbolRate; + result = _tmp0_; return result; } void dvb_satellite_channel_set_SymbolRate (DVBSatelliteChannel* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_SymbolRate = value; + _tmp0_ = value; + self->priv->_SymbolRate = _tmp0_; g_object_notify ((GObject *) self, "SymbolRate"); } gint dvb_satellite_channel_get_DiseqcSource (DVBSatelliteChannel* self) { gint result; + gint _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_DiseqcSource; + _tmp0_ = self->priv->_DiseqcSource; + result = _tmp0_; return result; } void dvb_satellite_channel_set_DiseqcSource (DVBSatelliteChannel* self, gint value) { + gint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_DiseqcSource = value; + _tmp0_ = value; + self->priv->_DiseqcSource = _tmp0_; g_object_notify ((GObject *) self, "DiseqcSource"); } diff -Nru gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteChannel.vala gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteChannel.vala --- gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteChannel.vala 2010-05-26 16:23:44.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteChannel.vala 2011-09-29 20:27:47.000000000 +0000 @@ -26,6 +26,10 @@ public uint SymbolRate {get; set;} public int DiseqcSource {get; set;} + public SatelliteChannel (uint group_id) { + base (group_id); + } + public SatelliteChannel.without_schedule () { Channel.without_schedule (); } @@ -43,9 +47,9 @@ } public override string to_string () { - return "%s:%u:%s:%d:%u:%u:%s:%u".printf(base.Name, base.Frequency, + return "%s:%u:%s:%d:%u:%u:%s:%u".printf(this.Name, this.Frequency, this.Polarization, this.DiseqcSource, this.SymbolRate, - base.VideoPID, base.get_audio_pids_string (), base.Sid); + this.VideoPID, this.get_audio_pids_string (), this.Sid); } } diff -Nru gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteScanner.c gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteScanner.c --- gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteScanner.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteScanner.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* SatelliteScanner.c generated by valac 0.11.3, the Vala compiler +/* SatelliteScanner.c generated by valac 0.14.0, the Vala compiler * generated from SatelliteScanner.vala, do not modify */ /* @@ -22,13 +22,11 @@ #include #include -#include -#include +#include #include #include #include #include -#include #include #include @@ -40,10 +38,11 @@ typedef struct _DVBIDBusSatelliteScanner DVBIDBusSatelliteScanner; typedef struct _DVBIDBusSatelliteScannerIface DVBIDBusSatelliteScannerIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_TYPE_ID_BUS_SATELLITE_SCANNER_PROXY (dvb_id_bus_satellite_scanner_proxy_get_type ()) +typedef GDBusProxy DVBIDBusSatelliteScannerProxy; +typedef GDBusProxyClass DVBIDBusSatelliteScannerProxyClass; #define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _DVBIDBusSatelliteScannerDBusProxy DVBIDBusSatelliteScannerDBusProxy; -typedef DBusGProxyClass DVBIDBusSatelliteScannerDBusProxyClass; #define DVB_TYPE_SCANNER (dvb_scanner_get_type ()) #define DVB_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCANNER, DVBScanner)) @@ -86,6 +85,16 @@ typedef struct _DVBChannelList DVBChannelList; typedef struct _DVBChannelListClass DVBChannelListClass; +#define DVB_TYPE_ID_BUS_SCANNER (dvb_id_bus_scanner_get_type ()) +#define DVB_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScanner)) +#define DVB_IS_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_SCANNER)) +#define DVB_ID_BUS_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScannerIface)) + +typedef struct _DVBIDBusScanner DVBIDBusScanner; +typedef struct _DVBIDBusScannerIface DVBIDBusScannerIface; + +#define DVB_TYPE_ID_BUS_SCANNER_PROXY (dvb_id_bus_scanner_proxy_get_type ()) + #define DVB_TYPE_SATELLITE_SCANNER (dvb_satellite_scanner_get_type ()) #define DVB_SATELLITE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SATELLITE_SCANNER, DVBSatelliteScanner)) #define DVB_SATELLITE_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SATELLITE_SCANNER, DVBSatelliteScannerClass)) @@ -140,15 +149,6 @@ gboolean (*AddScanningDataFromFile) (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusSatelliteScannerDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - struct _DVBScanner { GObject parent_instance; DVBScannerPrivate * priv; @@ -168,6 +168,16 @@ void (*add_scanning_data_from_string) (DVBScanner* self, const gchar* line); }; +struct _DVBIDBusScannerIface { + GTypeInterface parent_iface; + void (*Run) (DVBIDBusScanner* self, GError** error); + void (*Destroy) (DVBIDBusScanner* self, GError** error); + gboolean (*WriteAllChannelsToFile) (DVBIDBusScanner* self, const gchar* path, GError** error); + gboolean (*WriteChannelsToFile) (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); + gboolean (*AddScanningData) (DVBIDBusScanner* self, GHashTable* data, GError** error); + gboolean (*AddScanningDataFromFile) (DVBIDBusScanner* self, const gchar* path, GError** error); +}; + struct _DVBSatelliteScanner { DVBScanner parent_instance; DVBSatelliteScannerPrivate * priv; @@ -179,9 +189,10 @@ static gpointer dvb_satellite_scanner_parent_class = NULL; -static DVBIDBusSatelliteScannerIface* dvb_satellite_scanner_dvb_id_bus_satellite_scanner_parent_iface = NULL; +static DVBIDBusScannerIface* dvb_satellite_scanner_dvb_id_bus_scanner_parent_iface = NULL; -DVBIDBusSatelliteScanner* dvb_id_bus_satellite_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_satellite_scanner_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_satellite_scanner_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_id_bus_satellite_scanner_get_type (void) G_GNUC_CONST; void dvb_id_bus_satellite_scanner_Run (DVBIDBusSatelliteScanner* self, GError** error); void dvb_id_bus_satellite_scanner_Destroy (DVBIDBusSatelliteScanner* self, GError** error); @@ -192,57 +203,47 @@ static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); static void g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_satellite_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_satellite_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_satellite_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_introspect (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_property_get_all (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_Run (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_Destroy (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_AddScanningData (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_satellite_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, DBusConnection* _connection); -static void _dbus_dvb_id_bus_satellite_scanner_finished (GObject* _sender, DBusConnection* _connection); -static void _dbus_dvb_id_bus_satellite_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, DBusConnection* _connection); -static void _dbus_dvb_id_bus_satellite_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, DBusConnection* _connection); -GType dvb_id_bus_satellite_scanner_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_satellite_scanner_frequency_scanned (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_satellite_scanner_finished (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_satellite_scanner_channel_added (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_satellite_scanner_frontend_stats (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_satellite_scanner_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_SATELLITE_SCANNER_DBUS_PROXY_DUMMY_PROPERTY -}; -static void dvb_id_bus_satellite_scanner_dbus_proxy_Run (DVBIDBusSatelliteScanner* self, GError** error); -static void dvb_id_bus_satellite_scanner_dbus_proxy_Destroy (DVBIDBusSatelliteScanner* self, GError** error); -static gboolean dvb_id_bus_satellite_scanner_dbus_proxy_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error); -static gboolean dvb_id_bus_satellite_scanner_dbus_proxy_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); -static void dvb_id_bus_satellite_scanner_dbus_proxy_AddScanningData (DVBIDBusSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate, GError** error); -static gboolean dvb_id_bus_satellite_scanner_dbus_proxy_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error); -static void dvb_id_bus_satellite_scanner_dbus_proxy_dvb_id_bus_satellite_scanner__interface_init (DVBIDBusSatelliteScannerIface* iface); -static void _vala_dvb_id_bus_satellite_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_satellite_scanner_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +static void dvb_id_bus_satellite_scanner_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_satellite_scanner_frequency_scanned (DVBIDBusSatelliteScanner* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_satellite_scanner_finished (DVBIDBusSatelliteScanner* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_satellite_scanner_channel_added (DVBIDBusSatelliteScanner* self, GVariant* parameters); +static void _dbus_handle_dvb_id_bus_satellite_scanner_frontend_stats (DVBIDBusSatelliteScanner* self, GVariant* parameters); +static void dvb_id_bus_satellite_scanner_proxy_Run (DVBIDBusSatelliteScanner* self, GError** error); +static void dvb_id_bus_satellite_scanner_proxy_Destroy (DVBIDBusSatelliteScanner* self, GError** error); +static gboolean dvb_id_bus_satellite_scanner_proxy_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error); +static gboolean dvb_id_bus_satellite_scanner_proxy_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); +static void dvb_id_bus_satellite_scanner_proxy_AddScanningData (DVBIDBusSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate, GError** error); +static gboolean dvb_id_bus_satellite_scanner_proxy_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error); +static void dvb_id_bus_satellite_scanner_proxy_dvb_id_bus_satellite_scanner_interface_init (DVBIDBusSatelliteScannerIface* iface); +static void _dbus_dvb_id_bus_satellite_scanner_Run (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_satellite_scanner_Destroy (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_satellite_scanner_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_satellite_scanner_AddScanningData (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void _dbus_dvb_id_bus_satellite_scanner_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation); +static void dvb_id_bus_satellite_scanner_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data); +static GVariant* dvb_id_bus_satellite_scanner_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data); +static gboolean dvb_id_bus_satellite_scanner_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data); +static void _dbus_dvb_id_bus_satellite_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, gpointer* _data); +static void _dbus_dvb_id_bus_satellite_scanner_finished (GObject* _sender, gpointer* _data); +static void _dbus_dvb_id_bus_satellite_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, gpointer* _data); +static void _dbus_dvb_id_bus_satellite_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, gpointer* _data); +static void _dvb_id_bus_satellite_scanner_unregister_object (gpointer user_data); GType dvb_scanner_get_type (void) G_GNUC_CONST; GType dvb_scanned_item_get_type (void) G_GNUC_CONST; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_channel_list_get_type (void) G_GNUC_CONST; +GType dvb_id_bus_scanner_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_scanner_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_id_bus_scanner_get_type (void) G_GNUC_CONST; GType dvb_satellite_scanner_get_type (void) G_GNUC_CONST; enum { DVB_SATELLITE_SCANNER_DUMMY_PROPERTY }; -void dvb_satellite_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_satellite_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_satellite_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_satellite_scanner_introspect (DVBSatelliteScanner* self, DBusConnection* connection, DBusMessage* message); GType dvb_device_get_type (void) G_GNUC_CONST; DVBSatelliteScanner* dvb_satellite_scanner_new (DVBDevice* device); DVBSatelliteScanner* dvb_satellite_scanner_construct (GType object_type, DVBDevice* device); -static void dvb_satellite_scanner_real_AddScanningData (DVBIDBusSatelliteScanner* base, guint frequency, const gchar* polarization, guint symbol_rate, GError** error); +static gboolean dvb_satellite_scanner_real_AddScanningData (DVBIDBusScanner* base, GHashTable* data, GError** error); static inline void dvb_satellite_scanner_add_scanning_data (DVBSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); static void dvb_satellite_scanner_real_add_scanning_data_from_string (DVBScanner* base, const gchar* line); @@ -270,32 +271,84 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); static gint _vala_array_length (gpointer array); -static const DBusObjectPathVTable _dvb_id_bus_satellite_scanner_dbus_path_vtable = {_dvb_id_bus_satellite_scanner_dbus_unregister, dvb_id_bus_satellite_scanner_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_satellite_scanner_dbus_vtable = {dvb_id_bus_satellite_scanner_dbus_register_object}; -static const DBusObjectPathVTable _dvb_satellite_scanner_dbus_path_vtable = {_dvb_satellite_scanner_dbus_unregister, dvb_satellite_scanner_dbus_message}; -static const _DBusObjectVTable _dvb_satellite_scanner_dbus_vtable = {dvb_satellite_scanner_dbus_register_object}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_Run_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_Run_out[] = {NULL}; +static const GDBusMethodInfo _dvb_id_bus_satellite_scanner_dbus_method_info_Run = {-1, "Run", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_Run_in), (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_Run_out)}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_Destroy_in[] = {NULL}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_Destroy_out[] = {NULL}; +static const GDBusMethodInfo _dvb_id_bus_satellite_scanner_dbus_method_info_Destroy = {-1, "Destroy", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_Destroy_in), (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_Destroy_out)}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_path = {-1, "path", "s"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_in[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_path, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_out[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_satellite_scanner_dbus_method_info_WriteAllChannelsToFile = {-1, "WriteAllChannelsToFile", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_in), (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteAllChannelsToFile_out)}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_channel_sids = {-1, "channel_sids", "au"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_path = {-1, "path", "s"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_in[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_channel_sids, &_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_path, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_out[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_satellite_scanner_dbus_method_info_WriteChannelsToFile = {-1, "WriteChannelsToFile", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_in), (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_WriteChannelsToFile_out)}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_frequency = {-1, "frequency", "u"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_polarization = {-1, "polarization", "s"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_symbol_rate = {-1, "symbol_rate", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_in[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_frequency, &_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_polarization, &_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_symbol_rate, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_out[] = {NULL}; +static const GDBusMethodInfo _dvb_id_bus_satellite_scanner_dbus_method_info_AddScanningData = {-1, "AddScanningData", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_in), (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningData_out)}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_path = {-1, "path", "s"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_result = {-1, "result", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_in[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_path, NULL}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_out[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_result, NULL}; +static const GDBusMethodInfo _dvb_id_bus_satellite_scanner_dbus_method_info_AddScanningDataFromFile = {-1, "AddScanningDataFromFile", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_in), (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_AddScanningDataFromFile_out)}; +static const GDBusMethodInfo * const _dvb_id_bus_satellite_scanner_dbus_method_info[] = {&_dvb_id_bus_satellite_scanner_dbus_method_info_Run, &_dvb_id_bus_satellite_scanner_dbus_method_info_Destroy, &_dvb_id_bus_satellite_scanner_dbus_method_info_WriteAllChannelsToFile, &_dvb_id_bus_satellite_scanner_dbus_method_info_WriteChannelsToFile, &_dvb_id_bus_satellite_scanner_dbus_method_info_AddScanningData, &_dvb_id_bus_satellite_scanner_dbus_method_info_AddScanningDataFromFile, NULL}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_frequency_scanned_frequency = {-1, "frequency", "u"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_frequency_scanned_freq_left = {-1, "freq_left", "u"}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_frequency_scanned[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_frequency_scanned_frequency, &_dvb_id_bus_satellite_scanner_dbus_arg_info_frequency_scanned_freq_left, NULL}; +static const GDBusSignalInfo _dvb_id_bus_satellite_scanner_dbus_signal_info_frequency_scanned = {-1, "FrequencyScanned", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_frequency_scanned)}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_finished[] = {NULL}; +static const GDBusSignalInfo _dvb_id_bus_satellite_scanner_dbus_signal_info_finished = {-1, "Finished", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_finished)}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_frequency = {-1, "frequency", "u"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_sid = {-1, "sid", "u"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_name = {-1, "name", "s"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_network = {-1, "network", "s"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_type = {-1, "type", "s"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_scrambled = {-1, "scrambled", "b"}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_frequency, &_dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_sid, &_dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_name, &_dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_network, &_dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_type, &_dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added_scrambled, NULL}; +static const GDBusSignalInfo _dvb_id_bus_satellite_scanner_dbus_signal_info_channel_added = {-1, "ChannelAdded", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_channel_added)}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_frontend_stats_signal_strength = {-1, "signal_strength", "d"}; +static const GDBusArgInfo _dvb_id_bus_satellite_scanner_dbus_arg_info_frontend_stats_signal_noise_ratio = {-1, "signal_noise_ratio", "d"}; +static const GDBusArgInfo * const _dvb_id_bus_satellite_scanner_dbus_arg_info_frontend_stats[] = {&_dvb_id_bus_satellite_scanner_dbus_arg_info_frontend_stats_signal_strength, &_dvb_id_bus_satellite_scanner_dbus_arg_info_frontend_stats_signal_noise_ratio, NULL}; +static const GDBusSignalInfo _dvb_id_bus_satellite_scanner_dbus_signal_info_frontend_stats = {-1, "FrontendStats", (GDBusArgInfo **) (&_dvb_id_bus_satellite_scanner_dbus_arg_info_frontend_stats)}; +static const GDBusSignalInfo * const _dvb_id_bus_satellite_scanner_dbus_signal_info[] = {&_dvb_id_bus_satellite_scanner_dbus_signal_info_frequency_scanned, &_dvb_id_bus_satellite_scanner_dbus_signal_info_finished, &_dvb_id_bus_satellite_scanner_dbus_signal_info_channel_added, &_dvb_id_bus_satellite_scanner_dbus_signal_info_frontend_stats, NULL}; +static const GDBusPropertyInfo * const _dvb_id_bus_satellite_scanner_dbus_property_info[] = {NULL}; +static const GDBusInterfaceInfo _dvb_id_bus_satellite_scanner_dbus_interface_info = {-1, "org.gnome.DVB.Scanner.Satellite", (GDBusMethodInfo **) (&_dvb_id_bus_satellite_scanner_dbus_method_info), (GDBusSignalInfo **) (&_dvb_id_bus_satellite_scanner_dbus_signal_info), (GDBusPropertyInfo **) (&_dvb_id_bus_satellite_scanner_dbus_property_info)}; +static const GDBusInterfaceVTable _dvb_id_bus_satellite_scanner_dbus_interface_vtable = {dvb_id_bus_satellite_scanner_dbus_interface_method_call, dvb_id_bus_satellite_scanner_dbus_interface_get_property, dvb_id_bus_satellite_scanner_dbus_interface_set_property}; void dvb_id_bus_satellite_scanner_Run (DVBIDBusSatelliteScanner* self, GError** error) { + g_return_if_fail (self != NULL); DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->Run (self, error); } void dvb_id_bus_satellite_scanner_Destroy (DVBIDBusSatelliteScanner* self, GError** error) { + g_return_if_fail (self != NULL); DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->Destroy (self, error); } gboolean dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->WriteAllChannelsToFile (self, path, error); } gboolean dvb_id_bus_satellite_scanner_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, error); } void dvb_id_bus_satellite_scanner_AddScanningData (DVBIDBusSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate, GError** error) { + g_return_if_fail (self != NULL); DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->AddScanningData (self, frequency, polarization, symbol_rate, error); } @@ -307,6 +360,7 @@ * Parses initial tuning data from a file as provided by dvb-apps */ gboolean dvb_id_bus_satellite_scanner_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error) { + g_return_val_if_fail (self != NULL, FALSE); return DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->AddScanningDataFromFile (self, path, error); } @@ -315,7 +369,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2); register GMarshalFunc_VOID__UINT_UINT callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -334,7 +389,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (gpointer data1, guint arg_1, guint arg_2, const char* arg_3, const char* arg_4, const char* arg_5, gboolean arg_6, gpointer data2); register GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 7); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -353,7 +409,8 @@ typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE) (gpointer data1, gdouble arg_1, gdouble arg_2, gpointer data2); register GMarshalFunc_VOID__DOUBLE_DOUBLE callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -368,1061 +425,6 @@ } -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_id_bus_satellite_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_introspect (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_property_get_all (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.Scanner.Satellite") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_Run (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dvb_id_bus_satellite_scanner_Run (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_Destroy (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dvb_id_bus_satellite_scanner_Destroy (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* path = NULL; - const char* _tmp1_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp2_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp1_); - result = dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (self, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (path); - _tmp2_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp2_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint* channel_sids = NULL; - int channel_sids_length1; - guint* _tmp3_; - int _tmp3__length; - int _tmp3__size; - int _tmp3__length1; - DBusMessageIter _tmp4_; - gchar* path = NULL; - const char* _tmp6_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp7_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "aus")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - channel_sids_length1 = 0; - _tmp3_ = g_new (guint, 5); - _tmp3__length = 0; - _tmp3__size = 4; - _tmp3__length1 = 0; - dbus_message_iter_recurse (&iter, &_tmp4_); - for (; dbus_message_iter_get_arg_type (&_tmp4_); _tmp3__length1++) { - dbus_uint32_t _tmp5_; - if (_tmp3__size == _tmp3__length) { - _tmp3__size = 2 * _tmp3__size; - _tmp3_ = g_renew (guint, _tmp3_, _tmp3__size + 1); - } - dbus_message_iter_get_basic (&_tmp4_, &_tmp5_); - dbus_message_iter_next (&_tmp4_); - _tmp3_[_tmp3__length++] = _tmp5_; - } - channel_sids_length1 = _tmp3__length1; - dbus_message_iter_next (&iter); - channel_sids = _tmp3_; - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp6_); - result = dvb_id_bus_satellite_scanner_WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - channel_sids = (g_free (channel_sids), NULL); - _g_free0 (path); - _tmp7_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp7_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_AddScanningData (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint frequency = 0U; - dbus_uint32_t _tmp8_; - gchar* polarization = NULL; - const char* _tmp9_; - guint symbol_rate = 0U; - dbus_uint32_t _tmp10_; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "usu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp8_); - dbus_message_iter_next (&iter); - frequency = _tmp8_; - dbus_message_iter_get_basic (&iter, &_tmp9_); - dbus_message_iter_next (&iter); - polarization = g_strdup (_tmp9_); - dbus_message_iter_get_basic (&iter, &_tmp10_); - dbus_message_iter_next (&iter); - symbol_rate = _tmp10_; - dvb_id_bus_satellite_scanner_AddScanningData (self, frequency, polarization, symbol_rate, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (polarization); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_satellite_scanner_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* path = NULL; - const char* _tmp11_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp12_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp11_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp11_); - result = dvb_id_bus_satellite_scanner_AddScanningDataFromFile (self, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (path); - _tmp12_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp12_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_satellite_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_satellite_scanner_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_satellite_scanner_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Satellite", "Run")) { - result = _dbus_dvb_id_bus_satellite_scanner_Run (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Satellite", "Destroy")) { - result = _dbus_dvb_id_bus_satellite_scanner_Destroy (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Satellite", "WriteAllChannelsToFile")) { - result = _dbus_dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Satellite", "WriteChannelsToFile")) { - result = _dbus_dvb_id_bus_satellite_scanner_WriteChannelsToFile (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Satellite", "AddScanningData")) { - result = _dbus_dvb_id_bus_satellite_scanner_AddScanningData (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Satellite", "AddScanningDataFromFile")) { - result = _dbus_dvb_id_bus_satellite_scanner_AddScanningDataFromFile (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static void _dbus_dvb_id_bus_satellite_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp13_; - dbus_uint32_t _tmp14_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Satellite", "FrequencyScanned"); - dbus_message_iter_init_append (_message, &_iter); - _tmp13_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp13_); - _tmp14_ = freq_left; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp14_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_satellite_scanner_finished (GObject* _sender, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Satellite", "Finished"); - dbus_message_iter_init_append (_message, &_iter); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_satellite_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp15_; - dbus_uint32_t _tmp16_; - const char* _tmp17_; - const char* _tmp18_; - const char* _tmp19_; - dbus_bool_t _tmp20_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Satellite", "ChannelAdded"); - dbus_message_iter_init_append (_message, &_iter); - _tmp15_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp15_); - _tmp16_ = sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp16_); - _tmp17_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp17_); - _tmp18_ = network; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp18_); - _tmp19_ = type; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp19_); - _tmp20_ = scrambled; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_BOOLEAN, &_tmp20_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_satellite_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - double _tmp21_; - double _tmp22_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Satellite", "FrontendStats"); - dbus_message_iter_init_append (_message, &_iter); - _tmp21_ = signal_strength; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_DOUBLE, &_tmp21_); - _tmp22_ = signal_noise_ratio; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_DOUBLE, &_tmp22_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_satellite_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_satellite_scanner_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "frequency-scanned", (GCallback) _dbus_dvb_id_bus_satellite_scanner_frequency_scanned, connection); - g_signal_connect (object, "finished", (GCallback) _dbus_dvb_id_bus_satellite_scanner_finished, connection); - g_signal_connect (object, "channel-added", (GCallback) _dbus_dvb_id_bus_satellite_scanner_channel_added, connection); - g_signal_connect (object, "frontend-stats", (GCallback) _dbus_dvb_id_bus_satellite_scanner_frontend_stats, connection); -} - - static void dvb_id_bus_satellite_scanner_base_init (DVBIDBusSatelliteScannerIface * iface) { static gboolean initialized = FALSE; if (!initialized) { @@ -1431,7 +433,6 @@ g_signal_new ("finished", DVB_TYPE_ID_BUS_SATELLITE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); g_signal_new ("channel_added", DVB_TYPE_ID_BUS_SATELLITE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN, G_TYPE_NONE, 6, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); g_signal_new ("frontend_stats", DVB_TYPE_ID_BUS_SATELLITE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); - g_type_set_qdata (DVB_TYPE_ID_BUS_SATELLITE_SCANNER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_satellite_scanner_dbus_vtable)); } } @@ -1443,108 +444,78 @@ GType dvb_id_bus_satellite_scanner_type_id; dvb_id_bus_satellite_scanner_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusSatelliteScanner", &g_define_type_info, 0); g_type_interface_add_prerequisite (dvb_id_bus_satellite_scanner_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_satellite_scanner_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_satellite_scanner_dbus_proxy_get_type); + g_type_set_qdata (dvb_id_bus_satellite_scanner_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dvb_id_bus_satellite_scanner_proxy_get_type); + g_type_set_qdata (dvb_id_bus_satellite_scanner_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.DVB.Scanner.Satellite"); + g_type_set_qdata (dvb_id_bus_satellite_scanner_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dvb_id_bus_satellite_scanner_register_object); g_once_init_leave (&dvb_id_bus_satellite_scanner_type_id__volatile, dvb_id_bus_satellite_scanner_type_id); } return dvb_id_bus_satellite_scanner_type_id__volatile; } -G_DEFINE_TYPE_EXTENDED (DVBIDBusSatelliteScannerDBusProxy, dvb_id_bus_satellite_scanner_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_SATELLITE_SCANNER, dvb_id_bus_satellite_scanner_dbus_proxy_dvb_id_bus_satellite_scanner__interface_init) ); -DVBIDBusSatelliteScanner* dvb_id_bus_satellite_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusSatelliteScanner* self; - self = g_object_new (dvb_id_bus_satellite_scanner_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.Scanner.Satellite", NULL); - return self; -} - - -static GObject* dvb_id_bus_satellite_scanner_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_satellite_scanner_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_satellite_scanner_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; +G_DEFINE_TYPE_EXTENDED (DVBIDBusSatelliteScannerProxy, dvb_id_bus_satellite_scanner_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_SATELLITE_SCANNER, dvb_id_bus_satellite_scanner_proxy_dvb_id_bus_satellite_scanner_interface_init) ) +static void dvb_id_bus_satellite_scanner_proxy_class_init (DVBIDBusSatelliteScannerProxyClass* klass) { + G_DBUS_PROXY_CLASS (klass)->g_signal = dvb_id_bus_satellite_scanner_proxy_g_signal; } -static void _dbus_handle_dvb_id_bus_satellite_scanner_frequency_scanned (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; +static void _dbus_handle_dvb_id_bus_satellite_scanner_frequency_scanned (DVBIDBusSatelliteScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; guint frequency = 0U; - dbus_uint32_t _tmp30_; + GVariant* _tmp0_; guint freq_left = 0U; - dbus_uint32_t _tmp31_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp30_); - dbus_message_iter_next (&iter); - frequency = _tmp30_; - dbus_message_iter_get_basic (&iter, &_tmp31_); - dbus_message_iter_next (&iter); - freq_left = _tmp31_; + GVariant* _tmp1_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp0_ = g_variant_iter_next_value (&_arguments_iter); + frequency = g_variant_get_uint32 (_tmp0_); + g_variant_unref (_tmp0_); + _tmp1_ = g_variant_iter_next_value (&_arguments_iter); + freq_left = g_variant_get_uint32 (_tmp1_); + g_variant_unref (_tmp1_); g_signal_emit_by_name (self, "frequency-scanned", frequency, freq_left); } -static void _dbus_handle_dvb_id_bus_satellite_scanner_finished (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "")) { - return; - } - dbus_message_iter_init (message, &iter); +static void _dbus_handle_dvb_id_bus_satellite_scanner_finished (DVBIDBusSatelliteScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; + g_variant_iter_init (&_arguments_iter, parameters); g_signal_emit_by_name (self, "finished"); } -static void _dbus_handle_dvb_id_bus_satellite_scanner_channel_added (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; +static void _dbus_handle_dvb_id_bus_satellite_scanner_channel_added (DVBIDBusSatelliteScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; guint frequency = 0U; - dbus_uint32_t _tmp32_; + GVariant* _tmp2_; guint sid = 0U; - dbus_uint32_t _tmp33_; + GVariant* _tmp3_; gchar* name = NULL; - const char* _tmp34_; + GVariant* _tmp4_; gchar* network = NULL; - const char* _tmp35_; + GVariant* _tmp5_; gchar* type = NULL; - const char* _tmp36_; + GVariant* _tmp6_; gboolean scrambled = FALSE; - dbus_bool_t _tmp37_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uusssb")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp32_); - dbus_message_iter_next (&iter); - frequency = _tmp32_; - dbus_message_iter_get_basic (&iter, &_tmp33_); - dbus_message_iter_next (&iter); - sid = _tmp33_; - dbus_message_iter_get_basic (&iter, &_tmp34_); - dbus_message_iter_next (&iter); - name = g_strdup (_tmp34_); - dbus_message_iter_get_basic (&iter, &_tmp35_); - dbus_message_iter_next (&iter); - network = g_strdup (_tmp35_); - dbus_message_iter_get_basic (&iter, &_tmp36_); - dbus_message_iter_next (&iter); - type = g_strdup (_tmp36_); - dbus_message_iter_get_basic (&iter, &_tmp37_); - dbus_message_iter_next (&iter); - scrambled = _tmp37_; + GVariant* _tmp7_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp2_ = g_variant_iter_next_value (&_arguments_iter); + frequency = g_variant_get_uint32 (_tmp2_); + g_variant_unref (_tmp2_); + _tmp3_ = g_variant_iter_next_value (&_arguments_iter); + sid = g_variant_get_uint32 (_tmp3_); + g_variant_unref (_tmp3_); + _tmp4_ = g_variant_iter_next_value (&_arguments_iter); + name = g_variant_dup_string (_tmp4_, NULL); + g_variant_unref (_tmp4_); + _tmp5_ = g_variant_iter_next_value (&_arguments_iter); + network = g_variant_dup_string (_tmp5_, NULL); + g_variant_unref (_tmp5_); + _tmp6_ = g_variant_iter_next_value (&_arguments_iter); + type = g_variant_dup_string (_tmp6_, NULL); + g_variant_unref (_tmp6_); + _tmp7_ = g_variant_iter_next_value (&_arguments_iter); + scrambled = g_variant_get_boolean (_tmp7_); + g_variant_unref (_tmp7_); g_signal_emit_by_name (self, "channel-added", frequency, sid, name, network, type, scrambled); _g_free0 (name); _g_free0 (network); @@ -1552,825 +523,575 @@ } -static void _dbus_handle_dvb_id_bus_satellite_scanner_frontend_stats (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; +static void _dbus_handle_dvb_id_bus_satellite_scanner_frontend_stats (DVBIDBusSatelliteScanner* self, GVariant* parameters) { + GVariantIter _arguments_iter; gdouble signal_strength = 0.0; - double _tmp38_; + GVariant* _tmp8_; gdouble signal_noise_ratio = 0.0; - double _tmp39_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "dd")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp38_); - dbus_message_iter_next (&iter); - signal_strength = _tmp38_; - dbus_message_iter_get_basic (&iter, &_tmp39_); - dbus_message_iter_next (&iter); - signal_noise_ratio = _tmp39_; + GVariant* _tmp9_; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp8_ = g_variant_iter_next_value (&_arguments_iter); + signal_strength = g_variant_get_double (_tmp8_); + g_variant_unref (_tmp8_); + _tmp9_ = g_variant_iter_next_value (&_arguments_iter); + signal_noise_ratio = g_variant_get_double (_tmp9_); + g_variant_unref (_tmp9_); g_signal_emit_by_name (self, "frontend-stats", signal_strength, signal_noise_ratio); } -DBusHandlerResult dvb_id_bus_satellite_scanner_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Satellite", "FrequencyScanned")) { - _dbus_handle_dvb_id_bus_satellite_scanner_frequency_scanned (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Satellite", "Finished")) { - _dbus_handle_dvb_id_bus_satellite_scanner_finished (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Satellite", "ChannelAdded")) { - _dbus_handle_dvb_id_bus_satellite_scanner_channel_added (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Satellite", "FrontendStats")) { - _dbus_handle_dvb_id_bus_satellite_scanner_frontend_stats (user_data, connection, message); - } +static void dvb_id_bus_satellite_scanner_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) { + if (strcmp (signal_name, "FrequencyScanned") == 0) { + _dbus_handle_dvb_id_bus_satellite_scanner_frequency_scanned ((DVBIDBusSatelliteScanner*) proxy, parameters); + } else if (strcmp (signal_name, "Finished") == 0) { + _dbus_handle_dvb_id_bus_satellite_scanner_finished ((DVBIDBusSatelliteScanner*) proxy, parameters); + } else if (strcmp (signal_name, "ChannelAdded") == 0) { + _dbus_handle_dvb_id_bus_satellite_scanner_channel_added ((DVBIDBusSatelliteScanner*) proxy, parameters); + } else if (strcmp (signal_name, "FrontendStats") == 0) { + _dbus_handle_dvb_id_bus_satellite_scanner_frontend_stats ((DVBIDBusSatelliteScanner*) proxy, parameters); } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -static void dvb_id_bus_satellite_scanner_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - return; - } - ((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_satellite_scanner_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_satellite_scanner_dbus_proxy_parent_class)->dispose (self); -} - - -static void dvb_id_bus_satellite_scanner_dbus_proxy_class_init (DVBIDBusSatelliteScannerDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_satellite_scanner_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_satellite_scanner_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_satellite_scanner_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_satellite_scanner_dbus_proxy_set_property; +static void dvb_id_bus_satellite_scanner_proxy_init (DVBIDBusSatelliteScannerProxy* self) { } -static void dvb_id_bus_satellite_scanner_dbus_proxy_init (DVBIDBusSatelliteScannerDBusProxy* self) { -} - - -static void dvb_id_bus_satellite_scanner_dbus_proxy_Run (DVBIDBusSatelliteScanner* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); +static void dvb_id_bus_satellite_scanner_proxy_Run (DVBIDBusSatelliteScanner* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner.Satellite", "Run"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Satellite", "Run"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp40_; - _edomain = DBUS_GERROR; - _tmp40_ = _dbus_error.name + 27; - if (strcmp (_tmp40_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp40_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp40_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp40_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp40_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp40_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp40_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp40_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp40_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp40_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp40_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp40_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp40_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp40_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp40_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp40_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp40_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp40_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp40_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp40_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp40_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp40_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp40_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp40_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp40_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp40_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp40_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp40_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp40_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp40_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp40_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp40_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp40_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return; - } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); + g_object_unref (_reply_message); } -static void dvb_id_bus_satellite_scanner_dbus_proxy_Destroy (DVBIDBusSatelliteScanner* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Satellite", "Destroy"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp41_; - _edomain = DBUS_GERROR; - _tmp41_ = _dbus_error.name + 27; - if (strcmp (_tmp41_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp41_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp41_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp41_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp41_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp41_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp41_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp41_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp41_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp41_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp41_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp41_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp41_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp41_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp41_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp41_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp41_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp41_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp41_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp41_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp41_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp41_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp41_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp41_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp41_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp41_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp41_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp41_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp41_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp41_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp41_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp41_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp41_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); +static void dvb_id_bus_satellite_scanner_proxy_Destroy (DVBIDBusSatelliteScanner* self, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner.Satellite", "Destroy"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return; } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); + g_object_unref (_reply_message); } -static gboolean dvb_id_bus_satellite_scanner_dbus_proxy_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp42_; +static gboolean dvb_id_bus_satellite_scanner_proxy_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp43_; - if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Satellite", "WriteAllChannelsToFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp42_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp42_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp44_; - _edomain = DBUS_GERROR; - _tmp44_ = _dbus_error.name + 27; - if (strcmp (_tmp44_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp44_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp44_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp44_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp44_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp44_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp44_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp44_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp44_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp44_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp44_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp44_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp44_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp44_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp44_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp44_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp44_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp44_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp44_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp44_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp44_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp44_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp44_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp44_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp44_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp44_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp44_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp44_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp44_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp44_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp44_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp10_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner.Satellite", "WriteAllChannelsToFile"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp43_); - dbus_message_iter_next (&_iter); - _result = _tmp43_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp10_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp10_); + g_variant_unref (_tmp10_); + g_object_unref (_reply_message); return _result; } -static gboolean dvb_id_bus_satellite_scanner_dbus_proxy_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint* _tmp45_; - DBusMessageIter _tmp46_; - int _tmp47_; - const char* _tmp49_; +static gboolean dvb_id_bus_satellite_scanner_proxy_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + guint* _tmp11_; + GVariantBuilder _tmp12_; + int _tmp13_; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp50_; - if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Satellite", "WriteChannelsToFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp45_ = channel_sids; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "u", &_tmp46_); - for (_tmp47_ = 0; _tmp47_ < channel_sids_length1; _tmp47_++) { - dbus_uint32_t _tmp48_; - _tmp48_ = *_tmp45_; - dbus_message_iter_append_basic (&_tmp46_, DBUS_TYPE_UINT32, &_tmp48_); - _tmp45_++; - } - dbus_message_iter_close_container (&_iter, &_tmp46_); - _tmp49_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp49_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp51_; - _edomain = DBUS_GERROR; - _tmp51_ = _dbus_error.name + 27; - if (strcmp (_tmp51_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp51_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp51_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp51_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp51_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp51_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp51_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp51_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp51_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp51_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp51_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp51_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp51_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp51_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp51_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp51_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp51_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp51_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp51_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp51_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp51_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp51_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp51_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp51_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp51_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp51_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp51_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp51_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp51_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp51_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp51_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp51_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp51_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + GVariant* _tmp14_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner.Satellite", "WriteChannelsToFile"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _tmp11_ = channel_sids; + g_variant_builder_init (&_tmp12_, G_VARIANT_TYPE ("au")); + for (_tmp13_ = 0; _tmp13_ < channel_sids_length1; _tmp13_++) { + g_variant_builder_add_value (&_tmp12_, g_variant_new_uint32 (*_tmp11_)); + _tmp11_++; + } + g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp12_)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp50_); - dbus_message_iter_next (&_iter); - _result = _tmp50_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp14_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp14_); + g_variant_unref (_tmp14_); + g_object_unref (_reply_message); return _result; } -static void dvb_id_bus_satellite_scanner_dbus_proxy_AddScanningData (DVBIDBusSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp52_; - const char* _tmp53_; - dbus_uint32_t _tmp54_; - if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Satellite", "AddScanningData"); - dbus_message_iter_init_append (_message, &_iter); - _tmp52_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp52_); - _tmp53_ = polarization; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp53_); - _tmp54_ = symbol_rate; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp54_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp55_; - _edomain = DBUS_GERROR; - _tmp55_ = _dbus_error.name + 27; - if (strcmp (_tmp55_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp55_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp55_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp55_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp55_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp55_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp55_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp55_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp55_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp55_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp55_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp55_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp55_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp55_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp55_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp55_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp55_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp55_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp55_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp55_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp55_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp55_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp55_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp55_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp55_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp55_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp55_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp55_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp55_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp55_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp55_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp55_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp55_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); +static void dvb_id_bus_satellite_scanner_proxy_AddScanningData (DVBIDBusSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner.Satellite", "AddScanningData"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frequency)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (polarization)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (symbol_rate)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return; } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); + g_object_unref (_reply_message); } -static gboolean dvb_id_bus_satellite_scanner_dbus_proxy_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp56_; +static gboolean dvb_id_bus_satellite_scanner_proxy_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, const gchar* path, GError** error) { + GDBusMessage *_message; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + GDBusMessage *_reply_message; + GVariant *_reply; + GVariantIter _reply_iter; gboolean _result; - dbus_bool_t _tmp57_; - if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); + GVariant* _tmp15_; + G_DBUS_ERROR; + _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.DVB.Scanner.Satellite", "AddScanningDataFromFile"); + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_message_set_body (_message, _arguments); + _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error); + g_object_unref (_message); + if (!_reply_message) { return FALSE; } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Satellite", "AddScanningDataFromFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp56_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp56_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp58_; - _edomain = DBUS_GERROR; - _tmp58_ = _dbus_error.name + 27; - if (strcmp (_tmp58_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp58_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp58_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp58_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp58_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp58_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp58_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp58_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp58_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp58_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp58_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp58_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp58_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp58_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp58_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp58_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp58_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp58_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp58_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp58_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp58_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp58_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp58_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp58_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp58_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp58_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp58_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp58_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp58_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp58_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp58_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp58_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp58_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); + if (g_dbus_message_to_gerror (_reply_message, error)) { + g_object_unref (_reply_message); return FALSE; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp57_); - dbus_message_iter_next (&_iter); - _result = _tmp57_; - dbus_message_unref (_reply); + _reply = g_dbus_message_get_body (_reply_message); + g_variant_iter_init (&_reply_iter, _reply); + _tmp15_ = g_variant_iter_next_value (&_reply_iter); + _result = g_variant_get_boolean (_tmp15_); + g_variant_unref (_tmp15_); + g_object_unref (_reply_message); return _result; } -static void dvb_id_bus_satellite_scanner_dbus_proxy_dvb_id_bus_satellite_scanner__interface_init (DVBIDBusSatelliteScannerIface* iface) { - iface->Run = dvb_id_bus_satellite_scanner_dbus_proxy_Run; - iface->Destroy = dvb_id_bus_satellite_scanner_dbus_proxy_Destroy; - iface->WriteAllChannelsToFile = dvb_id_bus_satellite_scanner_dbus_proxy_WriteAllChannelsToFile; - iface->WriteChannelsToFile = dvb_id_bus_satellite_scanner_dbus_proxy_WriteChannelsToFile; - iface->AddScanningData = dvb_id_bus_satellite_scanner_dbus_proxy_AddScanningData; - iface->AddScanningDataFromFile = dvb_id_bus_satellite_scanner_dbus_proxy_AddScanningDataFromFile; +static void dvb_id_bus_satellite_scanner_proxy_dvb_id_bus_satellite_scanner_interface_init (DVBIDBusSatelliteScannerIface* iface) { + iface->Run = dvb_id_bus_satellite_scanner_proxy_Run; + iface->Destroy = dvb_id_bus_satellite_scanner_proxy_Destroy; + iface->WriteAllChannelsToFile = dvb_id_bus_satellite_scanner_proxy_WriteAllChannelsToFile; + iface->WriteChannelsToFile = dvb_id_bus_satellite_scanner_proxy_WriteChannelsToFile; + iface->AddScanningData = dvb_id_bus_satellite_scanner_proxy_AddScanningData; + iface->AddScanningDataFromFile = dvb_id_bus_satellite_scanner_proxy_AddScanningDataFromFile; } -static void _vala_dvb_id_bus_satellite_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +static void _dbus_dvb_id_bus_satellite_scanner_Run (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + g_variant_iter_init (&_arguments_iter, parameters); + dvb_id_bus_satellite_scanner_Run (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static void _vala_dvb_id_bus_satellite_scanner_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void _dbus_dvb_id_bus_satellite_scanner_Destroy (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + g_variant_iter_init (&_arguments_iter, parameters); + dvb_id_bus_satellite_scanner_Destroy (self, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -void _dvb_satellite_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { +static void _dbus_dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gchar* path = NULL; + GVariant* _tmp16_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp16_ = g_variant_iter_next_value (&_arguments_iter); + path = g_variant_dup_string (_tmp16_, NULL); + g_variant_unref (_tmp16_); + result = dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (self, path, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (path); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -static DBusHandlerResult _dbus_dvb_satellite_scanner_introspect (DVBSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); +static void _dbus_dvb_id_bus_satellite_scanner_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint* channel_sids = NULL; + int channel_sids_length1 = 0; + GVariant* _tmp17_; + guint* _tmp18_; + int _tmp18__length; + int _tmp18__size; + int _tmp18__length1; + GVariantIter _tmp19_; + GVariant* _tmp20_; + gchar* path = NULL; + GVariant* _tmp21_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp17_ = g_variant_iter_next_value (&_arguments_iter); + _tmp18_ = g_new (guint, 5); + _tmp18__length = 0; + _tmp18__size = 4; + _tmp18__length1 = 0; + g_variant_iter_init (&_tmp19_, _tmp17_); + for (; (_tmp20_ = g_variant_iter_next_value (&_tmp19_)) != NULL; _tmp18__length1++) { + if (_tmp18__size == _tmp18__length) { + _tmp18__size = 2 * _tmp18__size; + _tmp18_ = g_renew (guint, _tmp18_, _tmp18__size + 1); + } + _tmp18_[_tmp18__length++] = g_variant_get_uint32 (_tmp20_); + g_variant_unref (_tmp20_); } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + channel_sids_length1 = _tmp18__length1; + channel_sids = _tmp18_; + g_variant_unref (_tmp17_); + _tmp21_ = g_variant_iter_next_value (&_arguments_iter); + path = g_variant_dup_string (_tmp21_, NULL); + g_variant_unref (_tmp21_); + result = dvb_id_bus_satellite_scanner_WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; + } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + channel_sids = (g_free (channel_sids), NULL); + _g_free0 (path); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void _dbus_dvb_id_bus_satellite_scanner_AddScanningData (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + guint frequency = 0U; + GVariant* _tmp22_; + gchar* polarization = NULL; + GVariant* _tmp23_; + guint symbol_rate = 0U; + GVariant* _tmp24_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp22_ = g_variant_iter_next_value (&_arguments_iter); + frequency = g_variant_get_uint32 (_tmp22_); + g_variant_unref (_tmp22_); + _tmp23_ = g_variant_iter_next_value (&_arguments_iter); + polarization = g_variant_dup_string (_tmp23_, NULL); + g_variant_unref (_tmp23_); + _tmp24_ = g_variant_iter_next_value (&_arguments_iter); + symbol_rate = g_variant_get_uint32 (_tmp24_); + g_variant_unref (_tmp24_); + dvb_id_bus_satellite_scanner_AddScanningData (self, frequency, polarization, symbol_rate, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; } + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (polarization); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); } -DBusHandlerResult dvb_satellite_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_satellite_scanner_introspect (object, connection, message); +static void _dbus_dvb_id_bus_satellite_scanner_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, GVariant* parameters, GDBusMethodInvocation* invocation) { + GError* error = NULL; + GVariantIter _arguments_iter; + gchar* path = NULL; + GVariant* _tmp25_; + GDBusMessage* _reply_message; + GVariant* _reply; + GVariantBuilder _reply_builder; + gboolean result; + g_variant_iter_init (&_arguments_iter, parameters); + _tmp25_ = g_variant_iter_next_value (&_arguments_iter); + path = g_variant_dup_string (_tmp25_, NULL); + g_variant_unref (_tmp25_); + result = dvb_id_bus_satellite_scanner_AddScanningDataFromFile (self, path, &error); + if (error) { + g_dbus_method_invocation_return_gerror (invocation, error); + return; } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_satellite_scanner_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; + _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); + g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result)); + _reply = g_variant_builder_end (&_reply_builder); + g_dbus_message_set_body (_reply_message, _reply); + _g_free0 (path); + g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); + g_object_unref (invocation); + g_object_unref (_reply_message); +} + + +static void dvb_id_bus_satellite_scanner_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + if (strcmp (method_name, "Run") == 0) { + _dbus_dvb_id_bus_satellite_scanner_Run (object, parameters, invocation); + } else if (strcmp (method_name, "Destroy") == 0) { + _dbus_dvb_id_bus_satellite_scanner_Destroy (object, parameters, invocation); + } else if (strcmp (method_name, "WriteAllChannelsToFile") == 0) { + _dbus_dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (object, parameters, invocation); + } else if (strcmp (method_name, "WriteChannelsToFile") == 0) { + _dbus_dvb_id_bus_satellite_scanner_WriteChannelsToFile (object, parameters, invocation); + } else if (strcmp (method_name, "AddScanningData") == 0) { + _dbus_dvb_id_bus_satellite_scanner_AddScanningData (object, parameters, invocation); + } else if (strcmp (method_name, "AddScanningDataFromFile") == 0) { + _dbus_dvb_id_bus_satellite_scanner_AddScanningDataFromFile (object, parameters, invocation); } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + g_object_unref (invocation); } } -void dvb_satellite_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_satellite_scanner_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - dvb_id_bus_satellite_scanner_dbus_register_object (connection, path, object); +static GVariant* dvb_id_bus_satellite_scanner_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return NULL; +} + + +static gboolean dvb_id_bus_satellite_scanner_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { + gpointer* data; + gpointer object; + data = user_data; + object = data[0]; + return FALSE; +} + + +static void _dbus_dvb_id_bus_satellite_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frequency)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (freq_left)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner.Satellite", "FrequencyScanned", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_satellite_scanner_finished (GObject* _sender, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner.Satellite", "Finished", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_satellite_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (frequency)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (sid)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (network)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (type)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (scrambled)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner.Satellite", "ChannelAdded", _arguments, NULL); +} + + +static void _dbus_dvb_id_bus_satellite_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, gpointer* _data) { + GDBusConnection * _connection; + const gchar * _path; + GVariant *_arguments; + GVariantBuilder _arguments_builder; + _connection = _data[1]; + _path = _data[2]; + g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_double (signal_strength)); + g_variant_builder_add_value (&_arguments_builder, g_variant_new_double (signal_noise_ratio)); + _arguments = g_variant_builder_end (&_arguments_builder); + g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.DVB.Scanner.Satellite", "FrontendStats", _arguments, NULL); +} + + +guint dvb_id_bus_satellite_scanner_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { + guint result; + gpointer *data; + data = g_new (gpointer, 3); + data[0] = g_object_ref (object); + data[1] = g_object_ref (connection); + data[2] = g_strdup (path); + result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_dvb_id_bus_satellite_scanner_dbus_interface_info), &_dvb_id_bus_satellite_scanner_dbus_interface_vtable, data, _dvb_id_bus_satellite_scanner_unregister_object, error); + if (!result) { + return 0; + } + g_signal_connect (object, "frequency-scanned", (GCallback) _dbus_dvb_id_bus_satellite_scanner_frequency_scanned, data); + g_signal_connect (object, "finished", (GCallback) _dbus_dvb_id_bus_satellite_scanner_finished, data); + g_signal_connect (object, "channel-added", (GCallback) _dbus_dvb_id_bus_satellite_scanner_channel_added, data); + g_signal_connect (object, "frontend-stats", (GCallback) _dbus_dvb_id_bus_satellite_scanner_frontend_stats, data); + return result; +} + + +static void _dvb_id_bus_satellite_scanner_unregister_object (gpointer user_data) { + gpointer* data; + data = user_data; + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_satellite_scanner_frequency_scanned, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_satellite_scanner_finished, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_satellite_scanner_channel_added, data); + g_signal_handlers_disconnect_by_func (data[0], _dbus_dvb_id_bus_satellite_scanner_frontend_stats, data); + g_object_unref (data[0]); + g_object_unref (data[1]); + g_free (data[2]); + g_free (data); } DVBSatelliteScanner* dvb_satellite_scanner_construct (GType object_type, DVBDevice* device) { DVBSatelliteScanner * self = NULL; + DVBDevice* _tmp0_; g_return_val_if_fail (device != NULL, NULL); - self = (DVBSatelliteScanner*) g_object_new (object_type, "Device", device, NULL); + _tmp0_ = device; + self = (DVBSatelliteScanner*) g_object_new (object_type, "Device", _tmp0_, NULL); return self; } @@ -2380,11 +1101,79 @@ } -static void dvb_satellite_scanner_real_AddScanningData (DVBIDBusSatelliteScanner* base, guint frequency, const gchar* polarization, guint symbol_rate, GError** error) { +static gboolean dvb_satellite_scanner_real_AddScanningData (DVBIDBusScanner* base, GHashTable* data, GError** error) { DVBSatelliteScanner * self; + gboolean result = FALSE; + guint frequency = 0U; + guint symbol_rate = 0U; + gchar* polarization = NULL; + GVariant* _var = NULL; + GHashTable* _tmp0_; + gconstpointer _tmp1_ = NULL; + GVariant* _tmp2_; + GVariant* _tmp3_; + guint32 _tmp4_ = 0U; + GHashTable* _tmp5_; + gconstpointer _tmp6_ = NULL; + GVariant* _tmp7_; + GVariant* _tmp8_; + guint32 _tmp9_ = 0U; + GHashTable* _tmp10_; + gconstpointer _tmp11_ = NULL; + GVariant* _tmp12_; + GVariant* _tmp13_; + const gchar* _tmp14_ = NULL; + gchar* _tmp15_; + guint _tmp16_; + const gchar* _tmp17_; + guint _tmp18_; self = (DVBSatelliteScanner*) base; - g_return_if_fail (polarization != NULL); - dvb_satellite_scanner_add_scanning_data (self, frequency, polarization, symbol_rate); + g_return_val_if_fail (data != NULL, FALSE); + _tmp0_ = data; + _tmp1_ = g_hash_table_lookup (_tmp0_, "frequency"); + _var = (GVariant*) _tmp1_; + _tmp2_ = _var; + if (_tmp2_ == NULL) { + result = FALSE; + _g_free0 (polarization); + return result; + } + _tmp3_ = _var; + _tmp4_ = g_variant_get_uint32 (_tmp3_); + frequency = (guint) _tmp4_; + _tmp5_ = data; + _tmp6_ = g_hash_table_lookup (_tmp5_, "symbol-rate"); + _var = (GVariant*) _tmp6_; + _tmp7_ = _var; + if (_tmp7_ == NULL) { + result = FALSE; + _g_free0 (polarization); + return result; + } + _tmp8_ = _var; + _tmp9_ = g_variant_get_uint32 (_tmp8_); + symbol_rate = (guint) _tmp9_; + _tmp10_ = data; + _tmp11_ = g_hash_table_lookup (_tmp10_, "polarization"); + _var = (GVariant*) _tmp11_; + _tmp12_ = _var; + if (_tmp12_ == NULL) { + result = FALSE; + _g_free0 (polarization); + return result; + } + _tmp13_ = _var; + _tmp14_ = g_variant_get_string (_tmp13_, NULL); + _tmp15_ = g_strdup (_tmp14_); + _g_free0 (polarization); + polarization = _tmp15_; + _tmp16_ = frequency; + _tmp17_ = polarization; + _tmp18_ = symbol_rate; + dvb_satellite_scanner_add_scanning_data (self, _tmp16_, _tmp17_, _tmp18_); + result = TRUE; + _g_free0 (polarization); + return result; } @@ -2394,67 +1183,97 @@ static inline void dvb_satellite_scanner_add_scanning_data (DVBSatelliteScanner* self, guint frequency, const gchar* polarization, guint symbol_rate) { - GstStructure* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + const gchar* _tmp2_; + GstStructure* _tmp3_; GstStructure* tuning_params; - GstStructure* _tmp1_; + GstStructure* _tmp4_; g_return_if_fail (self != NULL); g_return_if_fail (polarization != NULL); - _tmp0_ = gst_structure_new ("tuning_params", "frequency", G_TYPE_UINT, frequency, "symbol-rate", G_TYPE_UINT, symbol_rate, "polarization", G_TYPE_STRING, polarization, NULL); - tuning_params = _tmp0_; - _tmp1_ = _gst_structure_copy0 (tuning_params); - dvb_scanner_add_structure_to_scan (DVB_SCANNER (self), _tmp1_); + _tmp0_ = frequency; + _tmp1_ = symbol_rate; + _tmp2_ = polarization; + _tmp3_ = gst_structure_new ("tuning_params", "frequency", G_TYPE_UINT, _tmp0_, "symbol-rate", G_TYPE_UINT, _tmp1_, "polarization", G_TYPE_STRING, _tmp2_, NULL); + tuning_params = _tmp3_; + _tmp4_ = _gst_structure_copy0 (tuning_params); + dvb_scanner_add_structure_to_scan (DVB_SCANNER (self), _tmp4_); _gst_structure_free0 (tuning_params); } static void dvb_satellite_scanner_real_add_scanning_data_from_string (DVBScanner* base, const gchar* line) { DVBSatelliteScanner * self; - gchar** _tmp0_; - gchar** _tmp1_ = NULL; + const gchar* _tmp0_; + gchar** _tmp1_; + gchar** _tmp2_ = NULL; + gchar** cols; gint cols_length1; gint _cols_size_; - gchar** _tmp2_; - gchar** cols; - gint _tmp3_; + gchar** _tmp3_; + gint _tmp3__length1; + gchar** _tmp4_; + gint _tmp4__length1; + const gchar* _tmp5_; + gint _tmp6_ = 0; guint freq; - gint _tmp4_; + gchar** _tmp7_; + gint _tmp7__length1; + const gchar* _tmp8_; + gint _tmp9_ = 0; guint symbol_rate; - gchar* pol; - gchar* _tmp5_ = NULL; + gchar* pol = NULL; + gchar** _tmp10_; + gint _tmp10__length1; + const gchar* _tmp11_; + gchar* _tmp12_ = NULL; gchar* lower_pol; + const gchar* _tmp13_; + guint _tmp17_; + const gchar* _tmp18_; + guint _tmp19_; self = (DVBSatelliteScanner*) base; g_return_if_fail (line != NULL); - _tmp1_ = _tmp0_ = g_regex_split_simple ("\\s+", line, 0, 0); - _tmp2_ = _tmp1_; - cols_length1 = _vala_array_length (_tmp0_); - _cols_size_ = cols_length1; + _tmp0_ = line; + _tmp2_ = _tmp1_ = g_regex_split_simple ("\\s+", _tmp0_, 0, 0); cols = _tmp2_; - if (cols_length1 < 5) { + cols_length1 = _vala_array_length (_tmp1_); + _cols_size_ = cols_length1; + _tmp3_ = cols; + _tmp3__length1 = cols_length1; + if (_tmp3__length1 < 5) { cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); return; } - _tmp3_ = atoi (cols[1]); - freq = (guint) _tmp3_; - _tmp4_ = atoi (cols[3]); - symbol_rate = ((guint) _tmp4_) / 1000; - pol = NULL; - _tmp5_ = g_utf8_strdown (cols[2], (gssize) (-1)); - lower_pol = _tmp5_; - if (g_strcmp0 (lower_pol, "h") == 0) { - gchar* _tmp6_; - gchar* _tmp7_; - _tmp6_ = g_strdup ("horizontal"); - _tmp7_ = _tmp6_; + _tmp4_ = cols; + _tmp4__length1 = cols_length1; + _tmp5_ = _tmp4_[1]; + _tmp6_ = atoi (_tmp5_); + freq = (guint) _tmp6_; + _tmp7_ = cols; + _tmp7__length1 = cols_length1; + _tmp8_ = _tmp7_[3]; + _tmp9_ = atoi (_tmp8_); + symbol_rate = (guint) (_tmp9_ / 1000); + _tmp10_ = cols; + _tmp10__length1 = cols_length1; + _tmp11_ = _tmp10_[2]; + _tmp12_ = g_utf8_strdown (_tmp11_, (gssize) (-1)); + lower_pol = _tmp12_; + _tmp13_ = lower_pol; + if (g_strcmp0 (_tmp13_, "h") == 0) { + gchar* _tmp14_; + _tmp14_ = g_strdup ("horizontal"); _g_free0 (pol); - pol = _tmp7_; + pol = _tmp14_; } else { - if (g_strcmp0 (lower_pol, "v") == 0) { - gchar* _tmp8_; - gchar* _tmp9_; - _tmp8_ = g_strdup ("vertical"); - _tmp9_ = _tmp8_; + const gchar* _tmp15_; + _tmp15_ = lower_pol; + if (g_strcmp0 (_tmp15_, "v") == 0) { + gchar* _tmp16_; + _tmp16_ = g_strdup ("vertical"); _g_free0 (pol); - pol = _tmp9_; + pol = _tmp16_; } else { _g_free0 (lower_pol); _g_free0 (pol); @@ -2462,104 +1281,192 @@ return; } } - dvb_satellite_scanner_add_scanning_data (self, freq, pol, symbol_rate); + _tmp17_ = freq; + _tmp18_ = pol; + _tmp19_ = symbol_rate; + dvb_satellite_scanner_add_scanning_data (self, _tmp17_, _tmp18_, _tmp19_); _g_free0 (lower_pol); _g_free0 (pol); cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); } -static const gchar* string_offset (const gchar* self, glong offset) { - const gchar* result = NULL; - g_return_val_if_fail (self != NULL, NULL); - result = (const gchar*) (((gchar*) self) + offset); - return result; +static glong string_strnlen (gchar* str, glong maxlen) { + glong result = 0L; + gchar* _tmp0_; + glong _tmp1_; + gchar* _tmp2_ = NULL; + gchar* end; + gchar* _tmp3_; + _tmp0_ = str; + _tmp1_ = maxlen; + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); + end = _tmp2_; + _tmp3_ = end; + if (_tmp3_ == NULL) { + glong _tmp4_; + _tmp4_ = maxlen; + result = _tmp4_; + return result; + } else { + gchar* _tmp5_; + gchar* _tmp6_; + _tmp5_ = end; + _tmp6_ = str; + result = (glong) (_tmp5_ - _tmp6_); + return result; + } } static gchar* string_substring (const gchar* self, glong offset, glong len) { gchar* result = NULL; - gint _tmp0_; - glong string_length; - const gchar* _tmp1_ = NULL; - const gchar* start; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; + glong string_length = 0L; + gboolean _tmp0_ = FALSE; + glong _tmp1_; + gboolean _tmp3_; + glong _tmp9_; + glong _tmp15_; + glong _tmp18_; + glong _tmp19_; + glong _tmp20_; + glong _tmp21_; + glong _tmp22_; + gchar* _tmp23_ = NULL; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = strlen (self); - string_length = (glong) _tmp0_; - if (offset < 0) { - offset = string_length + offset; - g_return_val_if_fail (offset >= 0, NULL); + _tmp1_ = offset; + if (_tmp1_ >= ((glong) 0)) { + glong _tmp2_; + _tmp2_ = len; + _tmp0_ = _tmp2_ >= ((glong) 0); } else { - g_return_val_if_fail (offset <= string_length, NULL); + _tmp0_ = FALSE; } - if (len < 0) { - len = string_length - offset; - } - g_return_val_if_fail ((offset + len) <= string_length, NULL); - _tmp1_ = string_offset (self, offset); - start = _tmp1_; - _tmp2_ = string_offset (start, len); - _tmp3_ = g_strndup (start, ((gchar*) _tmp2_) - ((gchar*) start)); - result = _tmp3_; + _tmp3_ = _tmp0_; + if (_tmp3_) { + glong _tmp4_; + glong _tmp5_; + glong _tmp6_ = 0L; + _tmp4_ = offset; + _tmp5_ = len; + _tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_); + string_length = _tmp6_; + } else { + gint _tmp7_; + gint _tmp8_; + _tmp7_ = strlen (self); + _tmp8_ = _tmp7_; + string_length = (glong) _tmp8_; + } + _tmp9_ = offset; + if (_tmp9_ < ((glong) 0)) { + glong _tmp10_; + glong _tmp11_; + glong _tmp12_; + _tmp10_ = string_length; + _tmp11_ = offset; + offset = _tmp10_ + _tmp11_; + _tmp12_ = offset; + g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL); + } else { + glong _tmp13_; + glong _tmp14_; + _tmp13_ = offset; + _tmp14_ = string_length; + g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL); + } + _tmp15_ = len; + if (_tmp15_ < ((glong) 0)) { + glong _tmp16_; + glong _tmp17_; + _tmp16_ = string_length; + _tmp17_ = offset; + len = _tmp16_ - _tmp17_; + } + _tmp18_ = offset; + _tmp19_ = len; + _tmp20_ = string_length; + g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL); + _tmp21_ = offset; + _tmp22_ = len; + _tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_); + result = _tmp23_; return result; } static void dvb_satellite_scanner_real_prepare (DVBScanner* base) { DVBSatelliteScanner * self; - GstElement* _tmp0_ = NULL; + GstElement* _tmp0_; + GstElement* _tmp1_ = NULL; GstElement* dvbsrc; - gchar* _tmp1_; gchar* _tmp2_; - gchar** _tmp3_ = NULL; + gchar* _tmp3_; + gchar** _tmp4_ = NULL; + gchar** uint_keys; gint uint_keys_length1; gint _uint_keys_size_; - gchar** _tmp4_; - gchar** uint_keys; - const gchar* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; + gchar** _tmp5_; + gint _tmp5__length1; + const GstStructure* _tmp10_; + const gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; gchar* polarity; + GstElement* _tmp13_; guint code_rate = 0U; - guint _tmp8_; + const GstStructure* _tmp14_; + guint _tmp15_ = 0U; + GstElement* _tmp16_; self = (DVBSatelliteScanner*) base; - g_debug ("SatelliteScanner.vala:98: Setting up pipeline for DVB-S scan"); - _tmp0_ = gst_bin_get_by_name (GST_BIN (DVB_SCANNER (self)->pipeline), "dvbsrc"); - dvbsrc = _tmp0_; - _tmp1_ = g_strdup ("frequency"); - _tmp2_ = g_strdup ("symbol-rate"); - _tmp3_ = g_new0 (gchar*, 2 + 1); - _tmp3_[0] = _tmp1_; - _tmp3_[1] = _tmp2_; - _tmp4_ = _tmp3_; + g_debug ("SatelliteScanner.vala:119: Setting up pipeline for DVB-S scan"); + _tmp0_ = DVB_SCANNER (self)->pipeline; + _tmp1_ = gst_bin_get_by_name (GST_BIN (_tmp0_), "dvbsrc"); + dvbsrc = _tmp1_; + _tmp2_ = g_strdup ("frequency"); + _tmp3_ = g_strdup ("symbol-rate"); + _tmp4_ = g_new0 (gchar*, 2 + 1); + _tmp4_[0] = _tmp2_; + _tmp4_[1] = _tmp3_; + uint_keys = _tmp4_; uint_keys_length1 = 2; _uint_keys_size_ = uint_keys_length1; - uint_keys = _tmp4_; + _tmp5_ = uint_keys; + _tmp5__length1 = uint_keys_length1; { - gchar** key_collection; - int key_collection_length1; - int key_it; - key_collection = uint_keys; - key_collection_length1 = uint_keys_length1; - for (key_it = 0; key_it < uint_keys_length1; key_it = key_it + 1) { - gchar* _tmp5_; - gchar* key; - _tmp5_ = g_strdup (key_collection[key_it]); - key = _tmp5_; + gchar** key_collection = NULL; + gint key_collection_length1 = 0; + gint _key_collection_size_ = 0; + gint key_it = 0; + key_collection = _tmp5_; + key_collection_length1 = _tmp5__length1; + for (key_it = 0; key_it < _tmp5__length1; key_it = key_it + 1) { + gchar* _tmp6_; + gchar* key = NULL; + _tmp6_ = g_strdup (key_collection[key_it]); + key = _tmp6_; { - dvb_scanner_set_uint_property (dvbsrc, DVB_SCANNER (self)->current_tuning_params, key); + GstElement* _tmp7_; + const GstStructure* _tmp8_; + const gchar* _tmp9_; + _tmp7_ = dvbsrc; + _tmp8_ = DVB_SCANNER (self)->current_tuning_params; + _tmp9_ = key; + dvb_scanner_set_uint_property (_tmp7_, _tmp8_, _tmp9_); _g_free0 (key); } } } - _tmp6_ = gst_structure_get_string (DVB_SCANNER (self)->current_tuning_params, "polarization"); - _tmp7_ = string_substring (_tmp6_, (glong) 0, (glong) 1); - polarity = _tmp7_; - g_object_set ((GObject*) dvbsrc, "polarity", polarity, NULL); - gst_structure_get_uint (DVB_SCANNER (self)->current_tuning_params, "inner-fec", &_tmp8_); - code_rate = _tmp8_; - g_object_set ((GObject*) dvbsrc, "code-rate-hp", code_rate, NULL); + _tmp10_ = DVB_SCANNER (self)->current_tuning_params; + _tmp11_ = gst_structure_get_string (_tmp10_, "polarization"); + _tmp12_ = string_substring (_tmp11_, (glong) 0, (glong) 1); + polarity = _tmp12_; + _tmp13_ = dvbsrc; + g_object_set ((GObject*) _tmp13_, "polarity", polarity, NULL); + _tmp14_ = DVB_SCANNER (self)->current_tuning_params; + gst_structure_get_uint (_tmp14_, "inner-fec", &_tmp15_); + code_rate = _tmp15_; + _tmp16_ = dvbsrc; + g_object_set ((GObject*) _tmp16_, "code-rate-hp", code_rate, NULL); _g_free0 (polarity); uint_keys = (_vala_array_free (uint_keys, uint_keys_length1, (GDestroyNotify) g_free), NULL); _gst_object_unref0 (dvbsrc); @@ -2569,21 +1476,25 @@ static DVBScannedItem* dvb_satellite_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure) { DVBSatelliteScanner * self; DVBScannedItem* result = NULL; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; + const GstStructure* _tmp0_; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; gchar* pol; guint freq = 0U; - guint _tmp2_; - DVBScannedSatteliteItem* _tmp3_ = NULL; + const GstStructure* _tmp3_; + guint _tmp4_ = 0U; + DVBScannedSatteliteItem* _tmp5_; self = (DVBSatelliteScanner*) base; g_return_val_if_fail (structure != NULL, NULL); - _tmp0_ = gst_structure_get_string (structure, "polarization"); - _tmp1_ = g_strdup_printf ("%s", _tmp0_); - pol = _tmp1_; - gst_structure_get_uint (structure, "frequency", &_tmp2_); - freq = _tmp2_; - _tmp3_ = dvb_scanned_sattelite_item_new (freq, pol); - result = (DVBScannedItem*) _tmp3_; + _tmp0_ = structure; + _tmp1_ = gst_structure_get_string (_tmp0_, "polarization"); + _tmp2_ = g_strdup_printf ("%s", _tmp1_); + pol = _tmp2_; + _tmp3_ = structure; + gst_structure_get_uint (_tmp3_, "frequency", &_tmp4_); + freq = _tmp4_; + _tmp5_ = dvb_scanned_sattelite_item_new (freq, pol); + result = (DVBScannedItem*) _tmp5_; _g_free0 (pol); return result; } @@ -2592,7 +1503,7 @@ static DVBChannel* dvb_satellite_scanner_real_get_new_channel (DVBScanner* base) { DVBSatelliteScanner * self; DVBChannel* result = NULL; - DVBSatelliteChannel* _tmp0_ = NULL; + DVBSatelliteChannel* _tmp0_; self = (DVBSatelliteScanner*) base; _tmp0_ = dvb_satellite_channel_new_without_schedule (); result = (DVBChannel*) _tmp0_; @@ -2607,35 +1518,57 @@ static void dvb_satellite_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel) { DVBSatelliteScanner * self; - DVBSatelliteChannel* _tmp0_; + DVBChannel* _tmp0_; + DVBChannel* _tmp1_; + DVBSatelliteChannel* _tmp2_; DVBSatelliteChannel* sc; guint freq = 0U; - guint _tmp1_; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; + const GstStructure* _tmp3_; + guint _tmp4_ = 0U; + DVBSatelliteChannel* _tmp5_; + guint _tmp6_; + DVBSatelliteChannel* _tmp7_; + const GstStructure* _tmp8_; + const gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_; guint srate = 0U; - guint _tmp5_; + const GstStructure* _tmp12_; + guint _tmp13_ = 0U; + DVBSatelliteChannel* _tmp14_; + guint _tmp15_; + DVBSatelliteChannel* _tmp16_; self = (DVBSatelliteScanner*) base; g_return_if_fail (delivery != NULL); g_return_if_fail (channel != NULL); - if (!DVB_IS_SATELLITE_CHANNEL (channel)) { + _tmp0_ = channel; + if (!DVB_IS_SATELLITE_CHANNEL (_tmp0_)) { return; } - _tmp0_ = _g_object_ref0 (DVB_SATELLITE_CHANNEL (channel)); - sc = _tmp0_; - gst_structure_get_uint (delivery, "frequency", &_tmp1_); - freq = _tmp1_; - dvb_channel_set_Frequency ((DVBChannel*) sc, freq); - _tmp2_ = gst_structure_get_string (delivery, "polarization"); - _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 1); - _tmp4_ = _tmp3_; - dvb_satellite_channel_set_Polarization (sc, _tmp4_); - _g_free0 (_tmp4_); - gst_structure_get_uint (delivery, "symbol-rate", &_tmp5_); - srate = _tmp5_; - dvb_satellite_channel_set_SymbolRate (sc, srate); - dvb_satellite_channel_set_DiseqcSource (sc, -1); + _tmp1_ = channel; + _tmp2_ = _g_object_ref0 (DVB_SATELLITE_CHANNEL (_tmp1_)); + sc = _tmp2_; + _tmp3_ = delivery; + gst_structure_get_uint (_tmp3_, "frequency", &_tmp4_); + freq = _tmp4_; + _tmp5_ = sc; + _tmp6_ = freq; + dvb_channel_set_Frequency ((DVBChannel*) _tmp5_, _tmp6_); + _tmp7_ = sc; + _tmp8_ = delivery; + _tmp9_ = gst_structure_get_string (_tmp8_, "polarization"); + _tmp10_ = string_substring (_tmp9_, (glong) 0, (glong) 1); + _tmp11_ = _tmp10_; + dvb_satellite_channel_set_Polarization (_tmp7_, _tmp11_); + _g_free0 (_tmp11_); + _tmp12_ = delivery; + gst_structure_get_uint (_tmp12_, "symbol-rate", &_tmp13_); + srate = _tmp13_; + _tmp14_ = sc; + _tmp15_ = srate; + dvb_satellite_channel_set_SymbolRate (_tmp14_, _tmp15_); + _tmp16_ = sc; + dvb_satellite_channel_set_DiseqcSource (_tmp16_, -1); _g_object_unref0 (sc); } @@ -2647,18 +1580,17 @@ DVB_SCANNER_CLASS (klass)->get_scanned_item = dvb_satellite_scanner_real_get_scanned_item; DVB_SCANNER_CLASS (klass)->get_new_channel = dvb_satellite_scanner_real_get_new_channel; DVB_SCANNER_CLASS (klass)->add_values_from_structure_to_channel = dvb_satellite_scanner_real_add_values_from_structure_to_channel; - g_type_set_qdata (DVB_TYPE_SATELLITE_SCANNER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_satellite_scanner_dbus_vtable)); } -static void dvb_satellite_scanner_dvb_id_bus_satellite_scanner_interface_init (DVBIDBusSatelliteScannerIface * iface) { - dvb_satellite_scanner_dvb_id_bus_satellite_scanner_parent_iface = g_type_interface_peek_parent (iface); - iface->AddScanningData = (void (*)(DVBIDBusSatelliteScanner* ,guint ,const gchar* ,guint ,GError**)) dvb_satellite_scanner_real_AddScanningData; - iface->Run = (void (*)(DVBIDBusSatelliteScanner* ,GError**)) dvb_scanner_Run; - iface->Destroy = (void (*)(DVBIDBusSatelliteScanner* ,GError**)) dvb_scanner_Destroy; - iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusSatelliteScanner* ,const gchar* ,GError**)) dvb_scanner_WriteAllChannelsToFile; - iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusSatelliteScanner* ,guint* ,int ,const gchar* ,GError**)) dvb_scanner_WriteChannelsToFile; - iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusSatelliteScanner* ,const gchar* ,GError**)) dvb_scanner_AddScanningDataFromFile; +static void dvb_satellite_scanner_dvb_id_bus_scanner_interface_init (DVBIDBusScannerIface * iface) { + dvb_satellite_scanner_dvb_id_bus_scanner_parent_iface = g_type_interface_peek_parent (iface); + iface->AddScanningData = (gboolean (*)(DVBIDBusScanner*, GHashTable*, GError**)) dvb_satellite_scanner_real_AddScanningData; + iface->Run = (void (*)(DVBIDBusScanner*, GError**)) dvb_scanner_Run; + iface->Destroy = (void (*)(DVBIDBusScanner*, GError**)) dvb_scanner_Destroy; + iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusScanner*, const gchar*, GError**)) dvb_scanner_WriteAllChannelsToFile; + iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusScanner*, guint*, int, const gchar*, GError**)) dvb_scanner_WriteChannelsToFile; + iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusScanner*, const gchar*, GError**)) dvb_scanner_AddScanningDataFromFile; } @@ -2670,10 +1602,10 @@ static volatile gsize dvb_satellite_scanner_type_id__volatile = 0; if (g_once_init_enter (&dvb_satellite_scanner_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBSatelliteScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_satellite_scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBSatelliteScanner), 0, (GInstanceInitFunc) dvb_satellite_scanner_instance_init, NULL }; - static const GInterfaceInfo dvb_id_bus_satellite_scanner_info = { (GInterfaceInitFunc) dvb_satellite_scanner_dvb_id_bus_satellite_scanner_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo dvb_id_bus_scanner_info = { (GInterfaceInitFunc) dvb_satellite_scanner_dvb_id_bus_scanner_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; GType dvb_satellite_scanner_type_id; dvb_satellite_scanner_type_id = g_type_register_static (DVB_TYPE_SCANNER, "DVBSatelliteScanner", &g_define_type_info, 0); - g_type_add_interface_static (dvb_satellite_scanner_type_id, DVB_TYPE_ID_BUS_SATELLITE_SCANNER, &dvb_id_bus_satellite_scanner_info); + g_type_add_interface_static (dvb_satellite_scanner_type_id, DVB_TYPE_ID_BUS_SCANNER, &dvb_id_bus_scanner_info); g_once_init_leave (&dvb_satellite_scanner_type_id__volatile, dvb_satellite_scanner_type_id); } return dvb_satellite_scanner_type_id__volatile; diff -Nru gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteScanner.vala gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteScanner.vala --- gnome-dvb-daemon-0.1.23/src/Satellite/SatelliteScanner.vala 2010-12-05 12:03:56.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Satellite/SatelliteScanner.vala 2011-04-19 20:46:24.000000000 +0000 @@ -31,14 +31,14 @@ public abstract signal void frontend_stats (double signal_strength, double signal_noise_ratio); - public abstract void Run () throws DBus.Error; - public abstract void Destroy () throws DBus.Error; - public abstract bool WriteAllChannelsToFile (string path) throws DBus.Error; - public abstract bool WriteChannelsToFile (uint[] channel_sids, string path) throws DBus.Error; + public abstract void Run () throws DBusError; + public abstract void Destroy () throws DBusError; + public abstract bool WriteAllChannelsToFile (string path) throws DBusError; + public abstract bool WriteChannelsToFile (uint[] channel_sids, string path) throws DBusError; public abstract void AddScanningData (uint frequency, string polarization, // "horizontal", "vertical" - uint symbol_rate) throws DBus.Error; + uint symbol_rate) throws DBusError; /** * @path: Path to file containing scanning data @@ -46,18 +46,39 @@ * * Parses initial tuning data from a file as provided by dvb-apps */ - public abstract bool AddScanningDataFromFile (string path) throws DBus.Error; + public abstract bool AddScanningDataFromFile (string path) throws DBusError; } - public class SatelliteScanner : Scanner, IDBusSatelliteScanner { + public class SatelliteScanner : Scanner, IDBusScanner { public SatelliteScanner (DVB.Device device) { Object (Device: device); } - public void AddScanningData (uint frequency, - string polarization, uint symbol_rate) throws DBus.Error { + public bool AddScanningData (GLib.HashTable data) throws DBusError + { + uint frequency, symbol_rate; + string polarization; + + unowned Variant _var; + + _var = data.lookup ("frequency"); + if (_var == null) + return false; + frequency = _var.get_uint32 (); + + _var = data.lookup ("symbol-rate"); + if (_var == null) + return false; + symbol_rate = _var.get_uint32 (); + + _var = data.lookup ("polarization"); + if (_var == null) + return false; + polarization = _var.get_string (); + this.add_scanning_data (frequency, polarization, symbol_rate); + return true; } private inline void add_scanning_data (uint frequency, @@ -77,8 +98,8 @@ if (cols.length < 5) return; - uint freq = (uint)cols[1].to_int (); - uint symbol_rate = (uint)cols[3].to_int () / 1000; + uint freq = (uint)int.parse (cols[1]); + uint symbol_rate = (uint)(int.parse (cols[3]) / 1000); string pol; string lower_pol = cols[2].down (); diff -Nru gnome-dvb-daemon-0.1.23/src/ScannedItem.c gnome-dvb-daemon-0.2.7/src/ScannedItem.c --- gnome-dvb-daemon-0.1.23/src/ScannedItem.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ScannedItem.c 2011-09-22 12:34:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* ScannedItem.c generated by valac 0.11.3, the Vala compiler +/* ScannedItem.c generated by valac 0.14.0, the Vala compiler * generated from ScannedItem.vala, do not modify */ /* @@ -37,6 +37,26 @@ typedef struct _DVBScannedItemClass DVBScannedItemClass; typedef struct _DVBScannedItemPrivate DVBScannedItemPrivate; +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; + #define DVB_TYPE_SCANNED_SATTELITE_ITEM (dvb_scanned_sattelite_item_get_type ()) #define DVB_SCANNED_SATTELITE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCANNED_SATTELITE_ITEM, DVBScannedSatteliteItem)) #define DVB_SCANNED_SATTELITE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SCANNED_SATTELITE_ITEM, DVBScannedSatteliteItemClass)) @@ -78,6 +98,8 @@ static gpointer dvb_scanned_item_parent_class = NULL; +static DVBLoggingLogger* dvb_scanned_item_log; +static DVBLoggingLogger* dvb_scanned_item_log = NULL; static gpointer dvb_scanned_sattelite_item_parent_class = NULL; GType dvb_scanned_item_get_type (void) G_GNUC_CONST; @@ -86,6 +108,10 @@ DVB_SCANNED_ITEM_DUMMY_PROPERTY, DVB_SCANNED_ITEM_FREQUENCY }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_SCANNED_ITEM_PRIME 31 DVBScannedItem* dvb_scanned_item_new (guint frequency); DVBScannedItem* dvb_scanned_item_construct (GType object_type, guint frequency); @@ -94,6 +120,7 @@ guint dvb_scanned_item_get_Frequency (DVBScannedItem* self); const gchar* dvb_scanned_sattelite_item_get_Polarization (DVBScannedSatteliteItem* self); gboolean dvb_scanned_item_equal (DVBScannedItem* o1, DVBScannedItem* o2); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); static void dvb_scanned_item_set_Frequency (DVBScannedItem* self, guint value); static void dvb_scanned_item_finalize (GObject* obj); static void _vala_dvb_scanned_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -113,7 +140,9 @@ DVBScannedItem* dvb_scanned_item_construct (GType object_type, guint frequency) { DVBScannedItem * self = NULL; - self = (DVBScannedItem*) g_object_new (object_type, "Frequency", frequency, NULL); + guint _tmp0_; + _tmp0_ = frequency; + self = (DVBScannedItem*) g_object_new (object_type, "Frequency", _tmp0_, NULL); return self; } @@ -126,15 +155,31 @@ guint dvb_scanned_item_hash (DVBScannedItem* o) { guint result = 0U; guint hashval = 0U; - if (DVB_IS_SCANNED_SATTELITE_ITEM (o)) { - const gchar* _tmp0_ = NULL; - guint _tmp1_; - _tmp0_ = dvb_scanned_sattelite_item_get_Polarization (DVB_SCANNED_SATTELITE_ITEM (o)); - _tmp1_ = g_str_hash (_tmp0_); - hashval = ((2 * DVB_SCANNED_ITEM_PRIME) + (DVB_SCANNED_ITEM_PRIME * o->priv->_Frequency)) + _tmp1_; + DVBScannedItem* _tmp0_; + _tmp0_ = o; + if (DVB_IS_SCANNED_SATTELITE_ITEM (_tmp0_)) { + DVBScannedItem* _tmp1_; + guint _tmp2_; + DVBScannedItem* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + guint _tmp6_ = 0U; + _tmp1_ = o; + _tmp2_ = _tmp1_->priv->_Frequency; + _tmp3_ = o; + _tmp4_ = dvb_scanned_sattelite_item_get_Polarization (DVB_SCANNED_SATTELITE_ITEM (_tmp3_)); + _tmp5_ = _tmp4_; + _tmp6_ = g_str_hash (_tmp5_); + hashval = ((2 * DVB_SCANNED_ITEM_PRIME) + (DVB_SCANNED_ITEM_PRIME * _tmp2_)) + _tmp6_; } else { - if (DVB_IS_SCANNED_ITEM (o)) { - hashval = o->priv->_Frequency; + DVBScannedItem* _tmp7_; + _tmp7_ = o; + if (DVB_IS_SCANNED_ITEM (_tmp7_)) { + DVBScannedItem* _tmp8_; + guint _tmp9_; + _tmp8_ = o; + _tmp9_ = _tmp8_->priv->_Frequency; + hashval = _tmp9_; } else { hashval = (guint) 0; } @@ -152,66 +197,116 @@ gboolean dvb_scanned_item_equal (DVBScannedItem* o1, DVBScannedItem* o2) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; - GType _tmp1_; - const gchar* _tmp2_ = NULL; - GType _tmp3_; - const gchar* _tmp4_ = NULL; - if (o1 == NULL) { + DVBScannedItem* _tmp1_; + gboolean _tmp3_; + DVBScannedItem* _tmp4_; + GType _tmp5_ = 0UL; + const gchar* _tmp6_ = NULL; + DVBScannedItem* _tmp7_; + GType _tmp8_ = 0UL; + const gchar* _tmp9_ = NULL; + DVBScannedItem* _tmp10_; + _tmp1_ = o1; + if (_tmp1_ == NULL) { _tmp0_ = TRUE; } else { - _tmp0_ = o2 == NULL; + DVBScannedItem* _tmp2_; + _tmp2_ = o2; + _tmp0_ = _tmp2_ == NULL; } - if (_tmp0_) { + _tmp3_ = _tmp0_; + if (_tmp3_) { result = FALSE; return result; } - _tmp1_ = G_TYPE_FROM_INSTANCE ((GObject*) o1); - _tmp2_ = g_type_name (_tmp1_); - _tmp3_ = G_TYPE_FROM_INSTANCE ((GObject*) o2); - _tmp4_ = g_type_name (_tmp3_); - if (g_strcmp0 (_tmp2_, _tmp4_) != 0) { + _tmp4_ = o1; + _tmp5_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp4_); + _tmp6_ = g_type_name (_tmp5_); + _tmp7_ = o2; + _tmp8_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp7_); + _tmp9_ = g_type_name (_tmp8_); + if (g_strcmp0 (_tmp6_, _tmp9_) != 0) { result = FALSE; return result; } - if (DVB_IS_SCANNED_SATTELITE_ITEM (o1)) { - DVBScannedSatteliteItem* _tmp5_; + _tmp10_ = o1; + if (DVB_IS_SCANNED_SATTELITE_ITEM (_tmp10_)) { + DVBScannedItem* _tmp11_; + DVBScannedSatteliteItem* _tmp12_; DVBScannedSatteliteItem* item1; - DVBScannedSatteliteItem* _tmp6_; + DVBScannedItem* _tmp13_; + DVBScannedSatteliteItem* _tmp14_; DVBScannedSatteliteItem* item2; - gboolean _tmp7_ = FALSE; - _tmp5_ = _g_object_ref0 (DVB_SCANNED_SATTELITE_ITEM (o1)); - item1 = _tmp5_; - _tmp6_ = _g_object_ref0 (DVB_SCANNED_SATTELITE_ITEM (o2)); - item2 = _tmp6_; - if (DVB_SCANNED_ITEM (item1)->priv->_Frequency == DVB_SCANNED_ITEM (item2)->priv->_Frequency) { - const gchar* _tmp8_ = NULL; - const gchar* _tmp9_ = NULL; - _tmp8_ = dvb_scanned_sattelite_item_get_Polarization (item1); - _tmp9_ = dvb_scanned_sattelite_item_get_Polarization (item2); - _tmp7_ = g_strcmp0 (_tmp8_, _tmp9_) == 0; + gboolean _tmp15_ = FALSE; + DVBScannedSatteliteItem* _tmp16_; + guint _tmp17_; + DVBScannedSatteliteItem* _tmp18_; + guint _tmp19_; + gboolean _tmp26_; + _tmp11_ = o1; + _tmp12_ = _g_object_ref0 (DVB_SCANNED_SATTELITE_ITEM (_tmp11_)); + item1 = _tmp12_; + _tmp13_ = o2; + _tmp14_ = _g_object_ref0 (DVB_SCANNED_SATTELITE_ITEM (_tmp13_)); + item2 = _tmp14_; + _tmp16_ = item1; + _tmp17_ = DVB_SCANNED_ITEM (_tmp16_)->priv->_Frequency; + _tmp18_ = item2; + _tmp19_ = DVB_SCANNED_ITEM (_tmp18_)->priv->_Frequency; + if (_tmp17_ == _tmp19_) { + DVBScannedSatteliteItem* _tmp20_; + const gchar* _tmp21_; + const gchar* _tmp22_; + DVBScannedSatteliteItem* _tmp23_; + const gchar* _tmp24_; + const gchar* _tmp25_; + _tmp20_ = item1; + _tmp21_ = dvb_scanned_sattelite_item_get_Polarization (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = item2; + _tmp24_ = dvb_scanned_sattelite_item_get_Polarization (_tmp23_); + _tmp25_ = _tmp24_; + _tmp15_ = g_strcmp0 (_tmp22_, _tmp25_) == 0; } else { - _tmp7_ = FALSE; + _tmp15_ = FALSE; } - result = _tmp7_; + _tmp26_ = _tmp15_; + result = _tmp26_; _g_object_unref0 (item2); _g_object_unref0 (item1); return result; } else { - if (DVB_IS_SCANNED_ITEM (o1)) { - DVBScannedItem* _tmp10_; + DVBScannedItem* _tmp27_; + _tmp27_ = o1; + if (DVB_IS_SCANNED_ITEM (_tmp27_)) { + DVBScannedItem* _tmp28_; + DVBScannedItem* _tmp29_; DVBScannedItem* item1; - DVBScannedItem* _tmp11_; + DVBScannedItem* _tmp30_; + DVBScannedItem* _tmp31_; DVBScannedItem* item2; - _tmp10_ = _g_object_ref0 (DVB_SCANNED_ITEM (o1)); - item1 = _tmp10_; - _tmp11_ = _g_object_ref0 (DVB_SCANNED_ITEM (o2)); - item2 = _tmp11_; - result = item1->priv->_Frequency == item2->priv->_Frequency; + DVBScannedItem* _tmp32_; + guint _tmp33_; + DVBScannedItem* _tmp34_; + guint _tmp35_; + _tmp28_ = o1; + _tmp29_ = _g_object_ref0 (DVB_SCANNED_ITEM (_tmp28_)); + item1 = _tmp29_; + _tmp30_ = o2; + _tmp31_ = _g_object_ref0 (DVB_SCANNED_ITEM (_tmp30_)); + item2 = _tmp31_; + _tmp32_ = item1; + _tmp33_ = _tmp32_->priv->_Frequency; + _tmp34_ = item2; + _tmp35_ = _tmp34_->priv->_Frequency; + result = _tmp33_ == _tmp35_; _g_object_unref0 (item2); _g_object_unref0 (item1); return result; } else { - g_critical ("ScannedItem.vala:68: Don't comparing ScannedItem instances"); + DVBLoggingLogger* _tmp36_; + _tmp36_ = dvb_scanned_item_log; + dvb_logging_logger_error (_tmp36_, "ScannedItem.vala:71: Don't comparing ScannedItem instances"); result = FALSE; return result; } @@ -221,26 +316,35 @@ guint dvb_scanned_item_get_Frequency (DVBScannedItem* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Frequency; + _tmp0_ = self->priv->_Frequency; + result = _tmp0_; return result; } static void dvb_scanned_item_set_Frequency (DVBScannedItem* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Frequency = value; + _tmp0_ = value; + self->priv->_Frequency = _tmp0_; g_object_notify ((GObject *) self, "Frequency"); } static void dvb_scanned_item_class_init (DVBScannedItemClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_scanned_item_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBScannedItemPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_scanned_item_get_property; G_OBJECT_CLASS (klass)->set_property = _vala_dvb_scanned_item_set_property; G_OBJECT_CLASS (klass)->finalize = dvb_scanned_item_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_SCANNED_ITEM_FREQUENCY, g_param_spec_uint ("Frequency", "Frequency", "Frequency", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_scanned_item_log = _tmp1_; } @@ -302,8 +406,12 @@ DVBScannedSatteliteItem* dvb_scanned_sattelite_item_construct (GType object_type, guint frequency, const gchar* polarization) { DVBScannedSatteliteItem * self = NULL; + guint _tmp0_; + const gchar* _tmp1_; g_return_val_if_fail (polarization != NULL, NULL); - self = (DVBScannedSatteliteItem*) g_object_new (object_type, "Frequency", frequency, "Polarization", polarization, NULL); + _tmp0_ = frequency; + _tmp1_ = polarization; + self = (DVBScannedSatteliteItem*) g_object_new (object_type, "Frequency", _tmp0_, "Polarization", _tmp1_, NULL); return self; } @@ -315,18 +423,20 @@ const gchar* dvb_scanned_sattelite_item_get_Polarization (DVBScannedSatteliteItem* self) { const gchar* result; + const gchar* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Polarization; + _tmp0_ = self->priv->_Polarization; + result = _tmp0_; return result; } static void dvb_scanned_sattelite_item_set_Polarization (DVBScannedSatteliteItem* self, const gchar* value) { - gchar* _tmp0_; + const gchar* _tmp0_; gchar* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = g_strdup (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = g_strdup (_tmp0_); _g_free0 (self->priv->_Polarization); self->priv->_Polarization = _tmp1_; g_object_notify ((GObject *) self, "Polarization"); diff -Nru gnome-dvb-daemon-0.1.23/src/ScannedItem.vala gnome-dvb-daemon-0.2.7/src/ScannedItem.vala --- gnome-dvb-daemon-0.1.23/src/ScannedItem.vala 2010-04-01 09:50:32.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/ScannedItem.vala 2011-04-19 21:18:36.000000000 +0000 @@ -18,6 +18,7 @@ */ using GLib; +using DVB.Logging; namespace DVB { @@ -27,6 +28,8 @@ */ public class ScannedItem : GLib.Object { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + public uint Frequency {get; construct;} private static const int PRIME = 31; @@ -65,7 +68,7 @@ return (item1.Frequency == item2.Frequency); } else { - critical ("Don't comparing ScannedItem instances"); + log.error ("Don't comparing ScannedItem instances"); return false; } } diff -Nru gnome-dvb-daemon-0.1.23/src/Scanner.c gnome-dvb-daemon-0.2.7/src/Scanner.c --- gnome-dvb-daemon-0.1.23/src/Scanner.c 2011-01-14 16:56:07.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Scanner.c 2011-09-29 19:51:17.000000000 +0000 @@ -1,4 +1,4 @@ -/* Scanner.c generated by valac 0.11.3, the Vala compiler +/* Scanner.c generated by valac 0.14.0, the Vala compiler * generated from Scanner.vala, do not modify */ /* @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include #include @@ -84,6 +82,26 @@ typedef struct _DVBDevice DVBDevice; typedef struct _DVBDeviceClass DVBDeviceClass; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) #define _g_queue_free0(var) ((var == NULL) ? NULL : (var = (g_queue_free (var), NULL))) @@ -146,6 +164,8 @@ static gpointer dvb_scanner_parent_class = NULL; +static DVBLoggingLogger* dvb_scanner_log; +static DVBLoggingLogger* dvb_scanner_log = NULL; GType dvb_scanner_get_type (void) G_GNUC_CONST; GType dvb_scanned_item_get_type (void) G_GNUC_CONST; @@ -158,6 +178,10 @@ DVB_SCANNER_DEVICE, DVB_SCANNER_CHANNELS }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_SCANNER_BASE_PIDS "16:17" #define DVB_SCANNER_PIPELINE_TEMPLATE "dvbsrc name=dvbsrc adapter=%u frontend=%u pids=%s stats-reporting-inte" \ "rval=100 ! mpegtsparse ! fakesink silent=true" @@ -172,8 +196,9 @@ void dvb_scanner_add_scanning_data_from_string (DVBScanner* self, const gchar* line); static void dvb_scanner_real_add_scanning_data_from_string (DVBScanner* self, const gchar* line); void dvb_scanner_Run (DVBScanner* self, GError** error); -static gboolean dvb_scanner_worker (DVBScanner* self); +static void* dvb_scanner_worker (DVBScanner* self); static gpointer _dvb_scanner_worker_gthread_func (gpointer self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); DVBChannelList* dvb_channel_list_new (GFile* channels); DVBChannelList* dvb_channel_list_construct (GType object_type, GFile* channels); DVBDevice* dvb_scanner_get_Device (DVBScanner* self); @@ -198,6 +223,7 @@ gboolean dvb_scanner_WriteChannelsToFile (DVBScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); gboolean dvb_scanner_AddScanningDataFromFile (DVBScanner* self, const gchar* path, GError** error); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); gboolean dvb_utils_is_readable_file (GFile* file); void dvb_scanner_clear_frequencies (DVBScanner* self); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); @@ -254,13 +280,13 @@ * Setup the pipeline correctly */ static void dvb_scanner_real_prepare (DVBScanner* self) { - g_return_if_fail (self != NULL); g_critical ("Type `%s' does not implement abstract method `dvb_scanner_prepare'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return; } void dvb_scanner_prepare (DVBScanner* self) { + g_return_if_fail (self != NULL); DVB_SCANNER_GET_CLASS (self)->prepare (self); } @@ -270,13 +296,13 @@ * mark the tuning paramters as already used */ static DVBScannedItem* dvb_scanner_real_get_scanned_item (DVBScanner* self, const GstStructure* structure) { - g_return_val_if_fail (self != NULL, NULL); g_critical ("Type `%s' does not implement abstract method `dvb_scanner_get_scanned_item'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return NULL; } DVBScannedItem* dvb_scanner_get_scanned_item (DVBScanner* self, const GstStructure* structure) { + g_return_val_if_fail (self != NULL, NULL); return DVB_SCANNER_GET_CLASS (self)->get_scanned_item (self, structure); } @@ -285,13 +311,13 @@ * Return a new empty channel */ static DVBChannel* dvb_scanner_real_get_new_channel (DVBScanner* self) { - g_return_val_if_fail (self != NULL, NULL); g_critical ("Type `%s' does not implement abstract method `dvb_scanner_get_new_channel'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return NULL; } DVBChannel* dvb_scanner_get_new_channel (DVBScanner* self) { + g_return_val_if_fail (self != NULL, NULL); return DVB_SCANNER_GET_CLASS (self)->get_new_channel (self); } @@ -300,13 +326,13 @@ * Retrieve the data from structure and add it to the Channel */ static void dvb_scanner_real_add_values_from_structure_to_channel (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel) { - g_return_if_fail (self != NULL); g_critical ("Type `%s' does not implement abstract method `dvb_scanner_add_values_from_structure_to_channel'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return; } void dvb_scanner_add_values_from_structure_to_channel (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel) { + g_return_if_fail (self != NULL); DVB_SCANNER_GET_CLASS (self)->add_values_from_structure_to_channel (self, delivery, channel); } @@ -315,13 +341,13 @@ * Called to parse a line from the initial tuning data */ static void dvb_scanner_real_add_scanning_data_from_string (DVBScanner* self, const gchar* line) { - g_return_if_fail (self != NULL); g_critical ("Type `%s' does not implement abstract method `dvb_scanner_add_scanning_data_from_string'", g_type_name (G_TYPE_FROM_INSTANCE (self))); return; } void dvb_scanner_add_scanning_data_from_string (DVBScanner* self, const gchar* line) { + g_return_if_fail (self != NULL); DVB_SCANNER_GET_CLASS (self)->add_scanning_data_from_string (self, line); } @@ -344,57 +370,62 @@ void dvb_scanner_Run (DVBScanner* self, GError** error) { - GMainLoop* _tmp0_ = NULL; - GMainLoop* _tmp1_; - GThread* _tmp2_ = NULL; - GThread* _tmp3_; - DVBChannelList* _tmp4_ = NULL; - DVBChannelList* _tmp5_; - guint _tmp6_; - guint _tmp7_; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - GstElement* _tmp10_ = NULL; - GstElement* _tmp11_; - GstElement* _tmp12_; - GstElement* _tmp13_; - GstBus* _tmp14_ = NULL; + gboolean _tmp0_; + GMainContext* _tmp1_; + GMainLoop* _tmp2_; + DVBChannelList* _tmp8_; + GstElement* _tmp23_; + GstBus* _tmp24_ = NULL; GstBus* bus; - guint _tmp15_; + GstBus* _tmp25_; + GMainContext* _tmp26_; + guint _tmp27_ = 0U; + GstElement* _tmp28_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - if (self->priv->running) { + _tmp0_ = self->priv->running; + if (_tmp0_) { return; } self->priv->running = TRUE; - _tmp0_ = g_main_loop_new (self->priv->context, FALSE); - _tmp1_ = _tmp0_; + _tmp1_ = self->priv->context; + _tmp2_ = g_main_loop_new (_tmp1_, FALSE); _g_main_loop_unref0 (self->priv->loop); - self->priv->loop = _tmp1_; - _tmp2_ = g_thread_create (_dvb_scanner_worker_gthread_func, self, TRUE, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_THREAD_ERROR) { - goto __catch138_g_thread_error; + self->priv->loop = _tmp2_; + { + GThread* _tmp3_ = NULL; + GThread* _tmp4_; + _tmp3_ = g_thread_create (_dvb_scanner_worker_gthread_func, self, TRUE, &_inner_error_); + _tmp4_ = _tmp3_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_THREAD_ERROR) { + goto __catch149_g_thread_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + self->priv->worker_thread = _tmp4_; } - self->priv->worker_thread = _tmp3_; - goto __finally138; - __catch138_g_thread_error: + goto __finally149; + __catch149_g_thread_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp5_; + GError* _tmp6_; + const gchar* _tmp7_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:160: Could not create thread: %s", e->message); + _tmp5_ = dvb_scanner_log; + _tmp6_ = e; + _tmp7_ = _tmp6_->message; + dvb_logging_logger_error (_tmp5_, "Scanner.vala:163: Could not create thread: %s", _tmp7_); _g_error_free0 (e); return; } - __finally138: + __finally149: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return; } else { @@ -403,35 +434,58 @@ return; } } - _tmp4_ = dvb_channel_list_new (NULL); - _tmp5_ = _tmp4_; + _tmp8_ = dvb_channel_list_new (NULL); _g_object_unref0 (self->channels); - self->channels = _tmp5_; - _tmp6_ = dvb_device_get_Adapter (self->priv->_Device); - _tmp7_ = dvb_device_get_Frontend (self->priv->_Device); - _tmp8_ = g_strdup_printf (DVB_SCANNER_PIPELINE_TEMPLATE, _tmp6_, _tmp7_, DVB_SCANNER_BASE_PIDS); - _tmp9_ = _tmp8_; - _tmp10_ = gst_parse_launch (_tmp9_, &_inner_error_); - _tmp12_ = (_tmp11_ = _tmp10_, _g_free0 (_tmp9_), _tmp11_); - if (_inner_error_ != NULL) { - goto __catch139_g_error; + self->channels = _tmp8_; + { + DVBDevice* _tmp9_; + guint _tmp10_; + guint _tmp11_; + DVBDevice* _tmp12_; + guint _tmp13_; + guint _tmp14_; + gchar* _tmp15_ = NULL; + gchar* _tmp16_; + GstElement* _tmp17_ = NULL; + GstElement* _tmp18_; + GstElement* _tmp19_; + _tmp9_ = self->priv->_Device; + _tmp10_ = dvb_device_get_Adapter (_tmp9_); + _tmp11_ = _tmp10_; + _tmp12_ = self->priv->_Device; + _tmp13_ = dvb_device_get_Frontend (_tmp12_); + _tmp14_ = _tmp13_; + _tmp15_ = g_strdup_printf (DVB_SCANNER_PIPELINE_TEMPLATE, _tmp11_, _tmp14_, DVB_SCANNER_BASE_PIDS); + _tmp16_ = _tmp15_; + _tmp17_ = gst_parse_launch (_tmp16_, &_inner_error_); + _tmp18_ = _tmp17_; + _g_free0 (_tmp16_); + _tmp19_ = _tmp18_; + if (_inner_error_ != NULL) { + goto __catch150_g_error; + } + _gst_object_unref0 (self->pipeline); + self->pipeline = _tmp19_; } - _tmp13_ = _tmp12_; - _gst_object_unref0 (self->pipeline); - self->pipeline = _tmp13_; - goto __finally139; - __catch139_g_error: + goto __finally150; + __catch150_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp20_; + GError* _tmp21_; + const gchar* _tmp22_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:171: Could not create pipeline: %s", e->message); + _tmp20_ = dvb_scanner_log; + _tmp21_ = e; + _tmp22_ = _tmp21_->message; + dvb_logging_logger_error (_tmp20_, "Scanner.vala:174: Could not create pipeline: %s", _tmp22_); _g_error_free0 (e); return; } - __finally139: + __finally150: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return; } else { @@ -440,11 +494,15 @@ return; } } - _tmp14_ = gst_element_get_bus (self->pipeline); - bus = _tmp14_; - _tmp15_ = gst_bus_add_watch_context (bus, _dvb_scanner_bus_watch_func_gst_bus_func, self, self->priv->context); - self->priv->bus_watch_id = _tmp15_; - gst_element_set_state (self->pipeline, GST_STATE_READY); + _tmp23_ = self->pipeline; + _tmp24_ = gst_element_get_bus (_tmp23_); + bus = _tmp24_; + _tmp25_ = bus; + _tmp26_ = self->priv->context; + _tmp27_ = gst_bus_add_watch_context (_tmp25_, _dvb_scanner_bus_watch_func_gst_bus_func, self, _tmp26_); + self->priv->bus_watch_id = _tmp27_; + _tmp28_ = self->pipeline; + gst_element_set_state (_tmp28_, GST_STATE_READY); dvb_scanner_queue_start_scan (self); _gst_object_unref0 (bus); } @@ -461,22 +519,26 @@ void dvb_scanner_do_destroy (DVBScanner* self) { DVBChannelList* _tmp0_; + GMainLoop* _tmp1_; g_return_if_fail (self != NULL); dvb_scanner_destroy_start_scan_source (self); dvb_scanner_remove_check_for_lock_timeout (self); dvb_scanner_remove_wait_for_tables_timeout (self); dvb_scanner_clear_and_reset_all (self); - dvb_channel_list_clear (self->channels); - _tmp0_ = NULL; + _tmp0_ = self->channels; + dvb_channel_list_clear (_tmp0_); _g_object_unref0 (self->channels); - self->channels = _tmp0_; - if (self->priv->loop != NULL) { - GMainLoop* _tmp1_; - g_main_loop_quit (self->priv->loop); - _tmp1_ = NULL; + self->channels = NULL; + _tmp1_ = self->priv->loop; + if (_tmp1_ != NULL) { + GMainLoop* _tmp2_; + GThread* _tmp3_; + _tmp2_ = self->priv->loop; + g_main_loop_quit (_tmp2_); _g_main_loop_unref0 (self->priv->loop); - self->priv->loop = _tmp1_; - g_thread_join (self->priv->worker_thread); + self->priv->loop = NULL; + _tmp3_ = self->priv->worker_thread; + g_thread_join (_tmp3_); self->priv->worker_thread = NULL; } g_signal_emit_by_name (self, "destroyed"); @@ -491,51 +553,73 @@ gboolean dvb_scanner_WriteAllChannelsToFile (DVBScanner* self, const gchar* path, GError** error) { gboolean result = FALSE; gboolean success; - GFile* _tmp0_ = NULL; - GFile* _tmp1_; - DVBioChannelListWriter* _tmp2_ = NULL; + const gchar* _tmp0_; + GFile* _tmp1_ = NULL; + GFile* _tmp2_; DVBioChannelListWriter* _tmp3_; + DVBioChannelListWriter* _tmp4_; DVBioChannelListWriter* writer; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (path != NULL, FALSE); success = TRUE; - _tmp0_ = g_file_new_for_path (path); - _tmp1_ = _tmp0_; - _tmp2_ = dvb_io_channel_list_writer_new (_tmp1_); - writer = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); + _tmp0_ = path; + _tmp1_ = g_file_new_for_path (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_io_channel_list_writer_new (_tmp2_); + _tmp4_ = _tmp3_; + _g_object_unref0 (_tmp2_); + writer = _tmp4_; { - GeeIterator* _tmp4_ = NULL; + DVBChannelList* _tmp5_; + GeeIterator* _tmp6_ = NULL; GeeIterator* _c_it; - _tmp4_ = gee_iterable_iterator ((GeeIterable*) self->channels); - _c_it = _tmp4_; + _tmp5_ = self->channels; + _tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_); + _c_it = _tmp6_; while (TRUE) { - gboolean _tmp5_; - gpointer _tmp6_ = NULL; + GeeIterator* _tmp7_; + gboolean _tmp8_ = FALSE; + GeeIterator* _tmp9_; + gpointer _tmp10_ = NULL; DVBChannel* c; - _tmp5_ = gee_iterator_next (_c_it); - if (!_tmp5_) { + _tmp7_ = _c_it; + _tmp8_ = gee_iterator_next (_tmp7_); + if (!_tmp8_) { break; } - _tmp6_ = gee_iterator_get (_c_it); - c = (DVBChannel*) _tmp6_; - dvb_io_channel_list_writer_write (writer, c, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch140_g_error; + _tmp9_ = _c_it; + _tmp10_ = gee_iterator_get (_tmp9_); + c = (DVBChannel*) _tmp10_; + { + DVBioChannelListWriter* _tmp11_; + DVBChannel* _tmp12_; + _tmp11_ = writer; + _tmp12_ = c; + dvb_io_channel_list_writer_write (_tmp11_, _tmp12_, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch151_g_error; + } } - goto __finally140; - __catch140_g_error: + goto __finally151; + __catch151_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp13_; + GError* _tmp14_; + const gchar* _tmp15_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:220: Could not write to file: %s", e->message); + _tmp13_ = dvb_scanner_log; + _tmp14_ = e; + _tmp15_ = _tmp14_->message; + dvb_logging_logger_error (_tmp13_, "Scanner.vala:223: Could not write to file: %s", _tmp15_); success = FALSE; _g_error_free0 (e); } - __finally140: + __finally151: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (c); _g_object_unref0 (_c_it); @@ -554,23 +638,33 @@ } _g_object_unref0 (_c_it); } - dvb_io_channel_list_writer_close (writer, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch141_g_error; + { + DVBioChannelListWriter* _tmp16_; + _tmp16_ = writer; + dvb_io_channel_list_writer_close (_tmp16_, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch152_g_error; + } } - goto __finally141; - __catch141_g_error: + goto __finally152; + __catch152_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp17_; + GError* _tmp18_; + const gchar* _tmp19_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:228: Could not close file handle: %s", e->message); + _tmp17_ = dvb_scanner_log; + _tmp18_ = e; + _tmp19_ = _tmp18_->message; + dvb_logging_logger_error (_tmp17_, "Scanner.vala:231: Could not close file handle: %s", _tmp19_); success = FALSE; _g_error_free0 (e); } - __finally141: + __finally152: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (writer); return FALSE; @@ -596,55 +690,84 @@ gboolean dvb_scanner_WriteChannelsToFile (DVBScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { gboolean result = FALSE; gboolean success; - GFile* _tmp0_ = NULL; - GFile* _tmp1_; - DVBioChannelListWriter* _tmp2_ = NULL; + const gchar* _tmp0_; + GFile* _tmp1_ = NULL; + GFile* _tmp2_; DVBioChannelListWriter* _tmp3_; + DVBioChannelListWriter* _tmp4_; DVBioChannelListWriter* writer; + guint* _tmp5_; + gint _tmp5__length1; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (path != NULL, FALSE); success = TRUE; - _tmp0_ = g_file_new_for_path (path); - _tmp1_ = _tmp0_; - _tmp2_ = dvb_io_channel_list_writer_new (_tmp1_); - writer = (_tmp3_ = _tmp2_, _g_object_unref0 (_tmp1_), _tmp3_); - { - guint* sid_collection; - int sid_collection_length1; - int sid_it; - sid_collection = channel_sids; - sid_collection_length1 = channel_sids_length1; - for (sid_it = 0; sid_it < channel_sids_length1; sid_it = sid_it + 1) { - guint sid; + _tmp0_ = path; + _tmp1_ = g_file_new_for_path (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_io_channel_list_writer_new (_tmp2_); + _tmp4_ = _tmp3_; + _g_object_unref0 (_tmp2_); + writer = _tmp4_; + _tmp5_ = channel_sids; + _tmp5__length1 = channel_sids_length1; + { + guint* sid_collection = NULL; + gint sid_collection_length1 = 0; + gint _sid_collection_size_ = 0; + gint sid_it = 0; + sid_collection = _tmp5_; + sid_collection_length1 = _tmp5__length1; + for (sid_it = 0; sid_it < _tmp5__length1; sid_it = sid_it + 1) { + guint sid = 0U; sid = sid_collection[sid_it]; { - DVBChannel* _tmp4_ = NULL; + DVBChannelList* _tmp6_; + guint _tmp7_; + DVBChannel* _tmp8_ = NULL; DVBChannel* c; - _tmp4_ = dvb_channel_list_get_channel (self->channels, sid); - c = _tmp4_; - if (c == NULL) { - g_warning ("Scanner.vala:249: Channel with SID 0x%x does not exist", sid); + DVBChannel* _tmp9_; + _tmp6_ = self->channels; + _tmp7_ = sid; + _tmp8_ = dvb_channel_list_get_channel (_tmp6_, _tmp7_); + c = _tmp8_; + _tmp9_ = c; + if (_tmp9_ == NULL) { + guint _tmp10_; + _tmp10_ = sid; + g_warning ("Scanner.vala:252: Channel with SID 0x%x does not exist", _tmp10_); _g_object_unref0 (c); continue; } - dvb_io_channel_list_writer_write (writer, c, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch142_g_error; + { + DVBioChannelListWriter* _tmp11_; + DVBChannel* _tmp12_; + _tmp11_ = writer; + _tmp12_ = c; + dvb_io_channel_list_writer_write (_tmp11_, _tmp12_, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch153_g_error; + } } - goto __finally142; - __catch142_g_error: + goto __finally153; + __catch153_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp13_; + GError* _tmp14_; + const gchar* _tmp15_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:255: Could not write to file: %s", e->message); + _tmp13_ = dvb_scanner_log; + _tmp14_ = e; + _tmp15_ = _tmp14_->message; + dvb_logging_logger_error (_tmp13_, "Scanner.vala:258: Could not write to file: %s", _tmp15_); success = FALSE; _g_error_free0 (e); } - __finally142: + __finally153: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (c); _g_object_unref0 (writer); @@ -661,23 +784,33 @@ } } } - dvb_io_channel_list_writer_close (writer, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch143_g_error; + { + DVBioChannelListWriter* _tmp16_; + _tmp16_ = writer; + dvb_io_channel_list_writer_close (_tmp16_, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch154_g_error; + } } - goto __finally143; - __catch143_g_error: + goto __finally154; + __catch154_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp17_; + GError* _tmp18_; + const gchar* _tmp19_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:263: Could not close file handle: %s", e->message); + _tmp17_ = dvb_scanner_log; + _tmp18_ = e; + _tmp19_ = _tmp18_->message; + dvb_logging_logger_error (_tmp17_, "Scanner.vala:266: Could not close file handle: %s", _tmp19_); success = FALSE; _g_error_free0 (e); } - __finally143: + __finally154: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (writer); return FALSE; @@ -698,10 +831,12 @@ gchar* result = NULL; gchar* _tmp0_ = NULL; gchar* _result_; + const gchar* _tmp1_; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = g_strdup (self); _result_ = _tmp0_; - g_strchug (_result_); + _tmp1_ = _result_; + g_strchug (_tmp1_); result = _result_; return result; } @@ -709,57 +844,74 @@ gboolean dvb_scanner_AddScanningDataFromFile (DVBScanner* self, const gchar* path, GError** error) { gboolean result = FALSE; - GFile* _tmp0_ = NULL; + const gchar* _tmp0_; + GFile* _tmp1_ = NULL; GFile* datafile; - gboolean _tmp1_; - GDataInputStream* reader; - GFileInputStream* _tmp2_ = NULL; - GFileInputStream* _tmp3_; - GFileInputStream* _tmp4_; - GDataInputStream* _tmp5_ = NULL; - GDataInputStream* _tmp6_; + DVBLoggingLogger* _tmp2_; + const gchar* _tmp3_; + GFile* _tmp4_; + gboolean _tmp5_ = FALSE; + GDataInputStream* reader = NULL; gchar* line; gsize len = 0UL; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (path != NULL, FALSE); - _tmp0_ = g_file_new_for_path (path); - datafile = _tmp0_; - g_debug ("Scanner.vala:273: Reading scanning data from %s", path); - _tmp1_ = dvb_utils_is_readable_file (datafile); - if (!_tmp1_) { + _tmp0_ = path; + _tmp1_ = g_file_new_for_path (_tmp0_); + datafile = _tmp1_; + _tmp2_ = dvb_scanner_log; + _tmp3_ = path; + dvb_logging_logger_debug (_tmp2_, "Scanner.vala:276: Reading scanning data from %s", _tmp3_); + _tmp4_ = datafile; + _tmp5_ = dvb_utils_is_readable_file (_tmp4_); + if (!_tmp5_) { result = FALSE; _g_object_unref0 (datafile); return result; } - reader = NULL; - _tmp2_ = g_file_read (datafile, NULL, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - goto __catch144_g_error; + { + GFile* _tmp6_; + GFileInputStream* _tmp7_ = NULL; + GFileInputStream* _tmp8_; + GFileInputStream* _tmp9_; + GDataInputStream* _tmp10_; + _tmp6_ = datafile; + _tmp7_ = g_file_read (_tmp6_, NULL, &_inner_error_); + _tmp8_ = _tmp7_; + if (_inner_error_ != NULL) { + goto __catch155_g_error; + } + _tmp9_ = _tmp8_; + _tmp10_ = g_data_input_stream_new ((GInputStream*) _tmp9_); + _g_object_unref0 (reader); + reader = _tmp10_; + _g_object_unref0 (_tmp9_); } - _tmp4_ = _tmp3_; - _tmp5_ = g_data_input_stream_new ((GInputStream*) _tmp4_); - _tmp6_ = _tmp5_; - _g_object_unref0 (reader); - reader = _tmp6_; - _g_object_unref0 (_tmp4_); - goto __finally144; - __catch144_g_error: + goto __finally155; + __catch155_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp11_; + const gchar* _tmp12_; + GError* _tmp13_; + const gchar* _tmp14_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:281: Could not open %s: %s", path, e->message); + _tmp11_ = dvb_scanner_log; + _tmp12_ = path; + _tmp13_ = e; + _tmp14_ = _tmp13_->message; + dvb_logging_logger_error (_tmp11_, "Scanner.vala:284: Could not open %s: %s", _tmp12_, _tmp14_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (reader); _g_object_unref0 (datafile); return result; } - __finally144: + __finally155: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (reader); _g_object_unref0 (datafile); @@ -773,46 +925,64 @@ } } line = NULL; - while (TRUE) { - gsize _tmp7_; - gchar* _tmp8_ = NULL; - gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_ = NULL; - gchar* _tmp12_; - gboolean _tmp13_; - _tmp8_ = g_data_input_stream_read_line (reader, &_tmp7_, NULL, &_inner_error_); - len = _tmp7_; - _tmp9_ = _tmp8_; - if (_inner_error_ != NULL) { - goto __catch145_g_error; - } - _tmp10_ = _tmp9_; - _g_free0 (line); - line = _tmp10_; - if (!(line != NULL)) { - break; - } - if (len == 0) { - continue; - } - _tmp11_ = string_chug (line); - _tmp12_ = _tmp11_; - _g_free0 (line); - line = _tmp12_; - _tmp13_ = g_str_has_prefix (line, "#"); - if (_tmp13_) { - continue; + { + while (TRUE) { + GDataInputStream* _tmp15_; + gsize _tmp16_ = 0UL; + gchar* _tmp17_ = NULL; + gchar* _tmp18_; + const gchar* _tmp19_; + gsize _tmp20_; + const gchar* _tmp21_; + gchar* _tmp22_ = NULL; + const gchar* _tmp23_; + gboolean _tmp24_ = FALSE; + const gchar* _tmp25_; + _tmp15_ = reader; + _tmp17_ = g_data_input_stream_read_line (_tmp15_, &_tmp16_, NULL, &_inner_error_); + len = _tmp16_; + _tmp18_ = _tmp17_; + if (_inner_error_ != NULL) { + goto __catch156_g_error; + } + _g_free0 (line); + line = _tmp18_; + _tmp19_ = line; + if (!(_tmp19_ != NULL)) { + break; + } + _tmp20_ = len; + if (_tmp20_ == ((gsize) 0)) { + continue; + } + _tmp21_ = line; + _tmp22_ = string_chug (_tmp21_); + _g_free0 (line); + line = _tmp22_; + _tmp23_ = line; + _tmp24_ = g_str_has_prefix (_tmp23_, "#"); + if (_tmp24_) { + continue; + } + _tmp25_ = line; + dvb_scanner_add_scanning_data_from_string (self, _tmp25_); } - dvb_scanner_add_scanning_data_from_string (self, line); } - goto __finally145; - __catch145_g_error: + goto __finally156; + __catch156_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp26_; + const gchar* _tmp27_; + GError* _tmp28_; + const gchar* _tmp29_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:297: Could not read %s: %s", path, e->message); + _tmp26_ = dvb_scanner_log; + _tmp27_ = path; + _tmp28_ = e; + _tmp29_ = _tmp28_->message; + dvb_logging_logger_error (_tmp26_, "Scanner.vala:300: Could not read %s: %s", _tmp27_, _tmp29_); result = FALSE; _g_error_free0 (e); _g_free0 (line); @@ -820,9 +990,9 @@ _g_object_unref0 (datafile); return result; } - __finally145: + __finally156: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (line); _g_object_unref0 (reader); @@ -837,17 +1007,27 @@ return FALSE; } } - g_input_stream_close ((GInputStream*) reader, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch146_g_error; + { + GDataInputStream* _tmp30_; + _tmp30_ = reader; + g_input_stream_close ((GInputStream*) _tmp30_, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch157_g_error; + } } - goto __finally146; - __catch146_g_error: + goto __finally157; + __catch157_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp31_; + GError* _tmp32_; + const gchar* _tmp33_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Scanner.vala:304: Could not close file handle: %s", e->message); + _tmp31_ = dvb_scanner_log; + _tmp32_ = e; + _tmp33_ = _tmp32_->message; + dvb_logging_logger_error (_tmp31_, "Scanner.vala:307: Could not close file handle: %s", _tmp33_); result = FALSE; _g_error_free0 (e); _g_free0 (line); @@ -855,9 +1035,9 @@ _g_object_unref0 (datafile); return result; } - __finally146: + __finally157: if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_free0 (line); _g_object_unref0 (reader); @@ -880,11 +1060,13 @@ } -static gboolean dvb_scanner_worker (DVBScanner* self) { - gboolean result = FALSE; - g_return_val_if_fail (self != NULL, FALSE); - g_main_loop_run (self->priv->loop); - result = TRUE; +static void* dvb_scanner_worker (DVBScanner* self) { + void* result = NULL; + GMainLoop* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->loop; + g_main_loop_run (_tmp0_); + result = NULL; return result; } @@ -895,56 +1077,74 @@ void dvb_scanner_clear_and_reset_all (DVBScanner* self) { - GstStructure* _tmp3_; - g_return_if_fail (self != NULL); - if (self->pipeline != NULL) { - GSource* _tmp0_ = NULL; - GSource* _tmp1_; + GstElement* _tmp0_; + GeeHashSet* _tmp9_; + GeeArrayList* _tmp10_; + g_return_if_fail (self != NULL); + _tmp0_ = self->pipeline; + if (_tmp0_ != NULL) { + GMainContext* _tmp1_; + guint _tmp2_; + GSource* _tmp3_ = NULL; + GSource* _tmp4_; GSource* bus_watch_source; - GstElement* _tmp2_; - _tmp0_ = g_main_context_find_source_by_id (self->priv->context, self->priv->bus_watch_id); - _tmp1_ = _g_source_ref0 (_tmp0_); - bus_watch_source = _tmp1_; - if (bus_watch_source != NULL) { - g_source_destroy (bus_watch_source); + GSource* _tmp5_; + DVBLoggingLogger* _tmp7_; + GstElement* _tmp8_; + _tmp1_ = self->priv->context; + _tmp2_ = self->priv->bus_watch_id; + _tmp3_ = g_main_context_find_source_by_id (_tmp1_, _tmp2_); + _tmp4_ = _g_source_ref0 (_tmp3_); + bus_watch_source = _tmp4_; + _tmp5_ = bus_watch_source; + if (_tmp5_ != NULL) { + GSource* _tmp6_; + _tmp6_ = bus_watch_source; + g_source_destroy (_tmp6_); self->priv->bus_watch_id = (guint) 0; } - g_debug ("Scanner.vala:326: Disposing pipeline"); - gst_element_set_state (self->pipeline, GST_STATE_NULL); - _tmp2_ = NULL; + _tmp7_ = dvb_scanner_log; + dvb_logging_logger_debug (_tmp7_, "Scanner.vala:329: Disposing pipeline"); + _tmp8_ = self->pipeline; + gst_element_set_state (_tmp8_, GST_STATE_NULL); _gst_object_unref0 (self->pipeline); - self->pipeline = _tmp2_; + self->pipeline = NULL; _g_source_unref0 (bus_watch_source); } - gee_abstract_collection_clear ((GeeAbstractCollection*) self->scanned_frequencies); + _tmp9_ = self->scanned_frequencies; + gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp9_); dvb_scanner_clear_frequencies (self); - _tmp3_ = NULL; _gst_structure_free0 (self->current_tuning_params); - self->current_tuning_params = _tmp3_; - gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->new_channels); + self->current_tuning_params = NULL; + _tmp10_ = self->priv->new_channels; + gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp10_); self->priv->running = FALSE; } void dvb_scanner_clear_frequencies (DVBScanner* self) { + GQueue* _tmp4_; g_return_if_fail (self != NULL); while (TRUE) { - gboolean _tmp0_; - gpointer _tmp1_ = NULL; + GQueue* _tmp0_; + gboolean _tmp1_ = FALSE; + GQueue* _tmp2_; + gpointer _tmp3_ = NULL; GstStructure* s; - GstStructure* _tmp2_; - _tmp0_ = g_queue_is_empty (self->frequencies); - if (!(!_tmp0_)) { + _tmp0_ = self->frequencies; + _tmp1_ = g_queue_is_empty (_tmp0_); + if (!(!_tmp1_)) { break; } - _tmp1_ = g_queue_pop_head (self->frequencies); - s = (GstStructure*) _tmp1_; - _tmp2_ = NULL; + _tmp2_ = self->frequencies; + _tmp3_ = g_queue_pop_head (_tmp2_); + s = (GstStructure*) _tmp3_; _gst_structure_free0 (s); - s = _tmp2_; + s = NULL; _gst_structure_free0 (s); } - g_queue_clear (self->frequencies); + _tmp4_ = self->frequencies; + g_queue_clear (_tmp4_); } @@ -954,26 +1154,48 @@ void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure) { - DVBScannedItem* _tmp0_ = NULL; + const GstStructure* _tmp0_; + const GstStructure* _tmp1_; + DVBScannedItem* _tmp2_ = NULL; DVBScannedItem* item; - gboolean _tmp1_; + GeeHashSet* _tmp3_; + DVBScannedItem* _tmp4_; + gboolean _tmp5_ = FALSE; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - if (structure == NULL) { + _tmp0_ = structure; + if (_tmp0_ == NULL) { _gst_structure_free0 (structure); return; } - _tmp0_ = dvb_scanner_get_scanned_item (self, structure); - item = _tmp0_; - _tmp1_ = gee_abstract_collection_contains ((GeeAbstractCollection*) self->scanned_frequencies, item); - if (!_tmp1_) { - guint _tmp2_; - GstStructure* _tmp3_; - _tmp2_ = dvb_scanned_item_get_Frequency (item); - g_debug ("Scanner.vala:354: Queueing new frequency %u", _tmp2_); - _tmp3_ = _gst_structure_copy0 (structure); - g_queue_push_tail (self->frequencies, _tmp3_); - gee_abstract_collection_add ((GeeAbstractCollection*) self->scanned_frequencies, item); + _tmp1_ = structure; + _tmp2_ = dvb_scanner_get_scanned_item (self, _tmp1_); + item = _tmp2_; + _tmp3_ = self->scanned_frequencies; + _tmp4_ = item; + _tmp5_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp3_, _tmp4_); + if (!_tmp5_) { + DVBLoggingLogger* _tmp6_; + DVBScannedItem* _tmp7_; + guint _tmp8_; + guint _tmp9_; + GQueue* _tmp10_; + const GstStructure* _tmp11_; + GstStructure* _tmp12_; + GeeHashSet* _tmp13_; + DVBScannedItem* _tmp14_; + _tmp6_ = dvb_scanner_log; + _tmp7_ = item; + _tmp8_ = dvb_scanned_item_get_Frequency (_tmp7_); + _tmp9_ = _tmp8_; + dvb_logging_logger_debug (_tmp6_, "Scanner.vala:357: Queueing new frequency %u", _tmp9_); + _tmp10_ = self->frequencies; + _tmp11_ = structure; + _tmp12_ = _gst_structure_copy0 (_tmp11_); + g_queue_push_tail (_tmp10_, _tmp12_); + _tmp13_ = self->scanned_frequencies; + _tmp14_ = item; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp14_); } _g_object_unref0 (item); _gst_structure_free0 (structure); @@ -1017,109 +1239,190 @@ gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; + gboolean _tmp3_; + gboolean _tmp5_; + gboolean _tmp7_; + gboolean _tmp9_; gboolean all_tables; - gchar* _tmp3_ = NULL; - gchar* _tmp4_; - gchar* _tmp5_ = NULL; - gchar* _tmp6_; - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - gchar* _tmp11_ = NULL; - gchar* _tmp12_; + DVBLoggingLogger* _tmp10_; + gboolean _tmp11_; + gchar* _tmp12_ = NULL; + gchar* _tmp13_; gboolean _tmp14_; - gpointer _tmp19_ = NULL; - GstStructure* _tmp20_; + gchar* _tmp15_ = NULL; + gchar* _tmp16_; + gboolean _tmp17_; + gchar* _tmp18_ = NULL; + gchar* _tmp19_; + gboolean _tmp20_; + gchar* _tmp21_ = NULL; + gchar* _tmp22_; + gboolean _tmp23_; + gchar* _tmp24_ = NULL; + gchar* _tmp25_; + const GstStructure* _tmp26_; + GQueue* _tmp32_; + gboolean _tmp33_ = FALSE; + GQueue* _tmp53_; + gpointer _tmp54_ = NULL; guint freq = 0U; - guint _tmp21_; - guint _tmp22_; - GstElement* _tmp23_ = NULL; + const GstStructure* _tmp55_; + guint _tmp56_ = 0U; + guint _tmp57_; + GQueue* _tmp58_; + guint _tmp59_ = 0U; + GstElement* _tmp60_; + GstElement* _tmp61_; + GstElement* _tmp62_ = NULL; GstElement* dvbsrc; - GSource* _tmp24_ = NULL; - GSource* _tmp25_; + GstElement* _tmp63_; + GSource* _tmp64_; + GSource* _tmp65_; + GSource* _tmp66_; + GMainContext* _tmp67_; + GstElement* _tmp68_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - if (self->priv->sdt_arrived) { - _tmp2_ = self->priv->nit_arrived; + _tmp3_ = self->priv->sdt_arrived; + if (_tmp3_) { + gboolean _tmp4_; + _tmp4_ = self->priv->nit_arrived; + _tmp2_ = _tmp4_; } else { _tmp2_ = FALSE; } - if (_tmp2_) { - _tmp1_ = self->priv->pat_arrived; + _tmp5_ = _tmp2_; + if (_tmp5_) { + gboolean _tmp6_; + _tmp6_ = self->priv->pat_arrived; + _tmp1_ = _tmp6_; } else { _tmp1_ = FALSE; } - if (_tmp1_) { - _tmp0_ = self->priv->pmt_arrived; + _tmp7_ = _tmp1_; + if (_tmp7_) { + gboolean _tmp8_; + _tmp8_ = self->priv->pmt_arrived; + _tmp0_ = _tmp8_; } else { _tmp0_ = FALSE; } - all_tables = _tmp0_; - _tmp3_ = bool_to_string (all_tables); - _tmp4_ = _tmp3_; - _tmp5_ = bool_to_string (self->priv->pat_arrived); - _tmp6_ = _tmp5_; - _tmp7_ = bool_to_string (self->priv->sdt_arrived); - _tmp8_ = _tmp7_; - _tmp9_ = bool_to_string (self->priv->nit_arrived); - _tmp10_ = _tmp9_; - _tmp11_ = bool_to_string (self->priv->pmt_arrived); - _tmp12_ = _tmp11_; - g_debug ("Scanner.vala:367: Received all tables: %s (pat: %s, sdt: %s, nit: %s, " \ -"pmt: %s)", _tmp4_, _tmp6_, _tmp8_, _tmp10_, _tmp12_); - _g_free0 (_tmp12_); - _g_free0 (_tmp10_); - _g_free0 (_tmp8_); - _g_free0 (_tmp6_); - _g_free0 (_tmp4_); + _tmp9_ = _tmp0_; + all_tables = _tmp9_; + _tmp10_ = dvb_scanner_log; + _tmp11_ = all_tables; + _tmp12_ = bool_to_string (_tmp11_); + _tmp13_ = _tmp12_; + _tmp14_ = self->priv->pat_arrived; + _tmp15_ = bool_to_string (_tmp14_); + _tmp16_ = _tmp15_; + _tmp17_ = self->priv->sdt_arrived; + _tmp18_ = bool_to_string (_tmp17_); + _tmp19_ = _tmp18_; + _tmp20_ = self->priv->nit_arrived; + _tmp21_ = bool_to_string (_tmp20_); + _tmp22_ = _tmp21_; + _tmp23_ = self->priv->pmt_arrived; + _tmp24_ = bool_to_string (_tmp23_); + _tmp25_ = _tmp24_; + dvb_logging_logger_debug (_tmp10_, "Scanner.vala:370: Received all tables: %s (pat: %s, sdt: %s, nit: %s, " \ +"pmt: %s)", _tmp13_, _tmp16_, _tmp19_, _tmp22_, _tmp25_); + _g_free0 (_tmp25_); + _g_free0 (_tmp22_); + _g_free0 (_tmp19_); + _g_free0 (_tmp16_); + _g_free0 (_tmp13_); self->priv->nit_arrived = FALSE; self->priv->sdt_arrived = FALSE; self->priv->pat_arrived = FALSE; self->priv->pmt_arrived = FALSE; self->priv->locked = FALSE; - if (self->current_tuning_params != NULL) { + _tmp26_ = self->current_tuning_params; + if (_tmp26_ != NULL) { guint old_freq = 0U; - guint _tmp13_; - gst_structure_get_uint (self->current_tuning_params, "frequency", &_tmp13_); - old_freq = _tmp13_; - g_signal_emit_by_name (self, "frequency-scanned", old_freq, self->frequencies->length); - } - _tmp14_ = g_queue_is_empty (self->frequencies); - if (_tmp14_) { - g_message ("Scanner.vala:385: Finished scanning"); + const GstStructure* _tmp27_; + guint _tmp28_ = 0U; + guint _tmp29_; + GQueue* _tmp30_; + guint _tmp31_; + _tmp27_ = self->current_tuning_params; + gst_structure_get_uint (_tmp27_, "frequency", &_tmp28_); + old_freq = _tmp28_; + _tmp29_ = old_freq; + _tmp30_ = self->frequencies; + _tmp31_ = _tmp30_->length; + g_signal_emit_by_name (self, "frequency-scanned", _tmp29_, _tmp31_); + } + _tmp32_ = self->frequencies; + _tmp33_ = g_queue_is_empty (_tmp32_); + if (_tmp33_) { + g_message ("Scanner.vala:388: Finished scanning"); { - gint _tmp15_; + GeeArrayList* _tmp34_; + _tmp34_ = self->priv->new_channels; g_static_rec_mutex_lock (&self->priv->__lock_new_channels); - _tmp15_ = gee_collection_get_size ((GeeCollection*) self->priv->new_channels); - g_debug ("Scanner.vala:389: %u channels still have missing or invalid informatio" \ -"n", (guint) _tmp15_); { - GeeArrayList* _tmp16_; - GeeArrayList* _sid_list; - gint _tmp17_; - gint _sid_size; - gint _sid_index; - _tmp16_ = _g_object_ref0 (self->priv->new_channels); - _sid_list = _tmp16_; - _tmp17_ = gee_collection_get_size ((GeeCollection*) _sid_list); - _sid_size = _tmp17_; - _sid_index = -1; - while (TRUE) { - gpointer _tmp18_ = NULL; - guint sid; - _sid_index = _sid_index + 1; - if (!(_sid_index < _sid_size)) { - break; + DVBLoggingLogger* _tmp35_; + GeeArrayList* _tmp36_; + gint _tmp37_; + gint _tmp38_; + _tmp35_ = dvb_scanner_log; + _tmp36_ = self->priv->new_channels; + _tmp37_ = gee_collection_get_size ((GeeCollection*) _tmp36_); + _tmp38_ = _tmp37_; + dvb_logging_logger_debug (_tmp35_, "Scanner.vala:392: %u channels still have missing or invalid informatio" \ +"n", (guint) _tmp38_); + { + GeeArrayList* _tmp39_; + GeeArrayList* _tmp40_; + GeeArrayList* _sid_list; + GeeArrayList* _tmp41_; + gint _tmp42_; + gint _tmp43_; + gint _sid_size; + gint _sid_index; + _tmp39_ = self->priv->new_channels; + _tmp40_ = _g_object_ref0 (_tmp39_); + _sid_list = _tmp40_; + _tmp41_ = _sid_list; + _tmp42_ = gee_collection_get_size ((GeeCollection*) _tmp41_); + _tmp43_ = _tmp42_; + _sid_size = _tmp43_; + _sid_index = -1; + while (TRUE) { + gint _tmp44_; + gint _tmp45_; + gint _tmp46_; + GeeArrayList* _tmp47_; + gint _tmp48_; + gpointer _tmp49_ = NULL; + guint sid; + DVBChannelList* _tmp50_; + guint _tmp51_; + _tmp44_ = _sid_index; + _sid_index = _tmp44_ + 1; + _tmp45_ = _sid_index; + _tmp46_ = _sid_size; + if (!(_tmp45_ < _tmp46_)) { + break; + } + _tmp47_ = _sid_list; + _tmp48_ = _sid_index; + _tmp49_ = gee_abstract_list_get ((GeeAbstractList*) _tmp47_, _tmp48_); + sid = GPOINTER_TO_UINT (_tmp49_); + _tmp50_ = self->channels; + _tmp51_ = sid; + dvb_channel_list_remove (_tmp50_, _tmp51_); } - _tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _sid_list, _sid_index); - sid = GPOINTER_TO_UINT (_tmp18_); - dvb_channel_list_remove (self->channels, sid); + _g_object_unref0 (_sid_list); } - _g_object_unref0 (_sid_list); } - __finally147: - g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); + __finally158: + { + GeeArrayList* _tmp52_; + _tmp52_ = self->priv->new_channels; + g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1131,26 +1434,35 @@ result = FALSE; return result; } - _tmp19_ = g_queue_pop_head (self->frequencies); - _tmp20_ = (GstStructure*) _tmp19_; + _tmp53_ = self->frequencies; + _tmp54_ = g_queue_pop_head (_tmp53_); _gst_structure_free0 (self->current_tuning_params); - self->current_tuning_params = _tmp20_; - gst_structure_get_uint (self->current_tuning_params, "frequency", &_tmp21_); - freq = _tmp21_; - _tmp22_ = g_queue_get_length (self->frequencies); - g_debug ("Scanner.vala:406: Starting scanning frequency %u (%u left)", freq, _tmp22_); - gst_element_set_state (self->pipeline, GST_STATE_READY); + self->current_tuning_params = (GstStructure*) _tmp54_; + _tmp55_ = self->current_tuning_params; + gst_structure_get_uint (_tmp55_, "frequency", &_tmp56_); + freq = _tmp56_; + _tmp57_ = freq; + _tmp58_ = self->frequencies; + _tmp59_ = g_queue_get_length (_tmp58_); + g_debug ("Scanner.vala:409: Starting scanning frequency %u (%u left)", _tmp57_, _tmp59_); + _tmp60_ = self->pipeline; + gst_element_set_state (_tmp60_, GST_STATE_READY); dvb_scanner_prepare (self); - _tmp23_ = gst_bin_get_by_name (GST_BIN (self->pipeline), "dvbsrc"); - dvbsrc = _tmp23_; - g_object_set ((GObject*) dvbsrc, "pids", DVB_SCANNER_BASE_PIDS, NULL); - _tmp24_ = g_timeout_source_new_seconds ((guint) 5); - _tmp25_ = _tmp24_; + _tmp61_ = self->pipeline; + _tmp62_ = gst_bin_get_by_name (GST_BIN (_tmp61_), "dvbsrc"); + dvbsrc = _tmp62_; + _tmp63_ = dvbsrc; + g_object_set ((GObject*) _tmp63_, "pids", DVB_SCANNER_BASE_PIDS, NULL); + _tmp64_ = g_timeout_source_new_seconds ((guint) 5); _g_source_unref0 (self->priv->check_for_lock_source); - self->priv->check_for_lock_source = _tmp25_; - g_source_set_callback (self->priv->check_for_lock_source, _dvb_scanner_check_for_lock_gsource_func, g_object_ref (self), g_object_unref); - g_source_attach (self->priv->check_for_lock_source, self->priv->context); - gst_element_set_state (self->pipeline, GST_STATE_PLAYING); + self->priv->check_for_lock_source = _tmp64_; + _tmp65_ = self->priv->check_for_lock_source; + g_source_set_callback (_tmp65_, _dvb_scanner_check_for_lock_gsource_func, g_object_ref (self), g_object_unref); + _tmp66_ = self->priv->check_for_lock_source; + _tmp67_ = self->priv->context; + g_source_attach (_tmp66_, _tmp67_); + _tmp68_ = self->pipeline; + gst_element_set_state (_tmp68_, GST_STATE_PLAYING); result = FALSE; _gst_object_unref0 (dvbsrc); return result; @@ -1163,9 +1475,13 @@ */ gboolean dvb_scanner_check_for_lock (DVBScanner* self) { gboolean result = FALSE; + gboolean _tmp0_; g_return_val_if_fail (self != NULL, FALSE); - if (!self->priv->locked) { - gst_element_set_state (self->pipeline, GST_STATE_READY); + _tmp0_ = self->priv->locked; + if (!_tmp0_) { + GstElement* _tmp1_; + _tmp1_ = self->pipeline; + gst_element_set_state (_tmp1_, GST_STATE_READY); dvb_scanner_queue_start_scan (self); } result = FALSE; @@ -1178,24 +1494,40 @@ gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; + gboolean _tmp3_; + gboolean _tmp5_; + gboolean _tmp7_; + gboolean _tmp9_; g_return_val_if_fail (self != NULL, FALSE); - if (self->priv->sdt_arrived) { - _tmp2_ = self->priv->nit_arrived; + _tmp3_ = self->priv->sdt_arrived; + if (_tmp3_) { + gboolean _tmp4_; + _tmp4_ = self->priv->nit_arrived; + _tmp2_ = _tmp4_; } else { _tmp2_ = FALSE; } - if (_tmp2_) { - _tmp1_ = self->priv->pat_arrived; + _tmp5_ = _tmp2_; + if (_tmp5_) { + gboolean _tmp6_; + _tmp6_ = self->priv->pat_arrived; + _tmp1_ = _tmp6_; } else { _tmp1_ = FALSE; } - if (_tmp1_) { - _tmp0_ = self->priv->pmt_arrived; + _tmp7_ = _tmp1_; + if (_tmp7_) { + gboolean _tmp8_; + _tmp8_ = self->priv->pmt_arrived; + _tmp0_ = _tmp8_; } else { _tmp0_ = FALSE; } - if (!_tmp0_) { - gst_element_set_state (self->pipeline, GST_STATE_READY); + _tmp9_ = _tmp0_; + if (!_tmp9_) { + GstElement* _tmp10_; + _tmp10_ = self->pipeline; + gst_element_set_state (_tmp10_, GST_STATE_READY); dvb_scanner_queue_start_scan (self); } result = FALSE; @@ -1205,60 +1537,78 @@ void dvb_scanner_destroy_start_scan_source (DVBScanner* self) { gboolean _tmp0_ = FALSE; + GSource* _tmp1_; + gboolean _tmp4_; g_return_if_fail (self != NULL); - if (self->priv->start_scan_source != NULL) { - gboolean _tmp1_; - _tmp1_ = g_source_is_destroyed (self->priv->start_scan_source); - _tmp0_ = !_tmp1_; + _tmp1_ = self->priv->start_scan_source; + if (_tmp1_ != NULL) { + GSource* _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp2_ = self->priv->start_scan_source; + _tmp3_ = g_source_is_destroyed (_tmp2_); + _tmp0_ = !_tmp3_; } else { _tmp0_ = FALSE; } - if (_tmp0_) { - GSource* _tmp2_; - g_source_destroy (self->priv->start_scan_source); - _tmp2_ = NULL; + _tmp4_ = _tmp0_; + if (_tmp4_) { + GSource* _tmp5_; + _tmp5_ = self->priv->start_scan_source; + g_source_destroy (_tmp5_); _g_source_unref0 (self->priv->start_scan_source); - self->priv->start_scan_source = _tmp2_; + self->priv->start_scan_source = NULL; } } void dvb_scanner_remove_check_for_lock_timeout (DVBScanner* self) { gboolean _tmp0_ = FALSE; + GSource* _tmp1_; + gboolean _tmp4_; g_return_if_fail (self != NULL); - if (self->priv->check_for_lock_source != NULL) { - gboolean _tmp1_; - _tmp1_ = g_source_is_destroyed (self->priv->check_for_lock_source); - _tmp0_ = !_tmp1_; + _tmp1_ = self->priv->check_for_lock_source; + if (_tmp1_ != NULL) { + GSource* _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp2_ = self->priv->check_for_lock_source; + _tmp3_ = g_source_is_destroyed (_tmp2_); + _tmp0_ = !_tmp3_; } else { _tmp0_ = FALSE; } - if (_tmp0_) { - GSource* _tmp2_; - g_source_destroy (self->priv->check_for_lock_source); - _tmp2_ = NULL; + _tmp4_ = _tmp0_; + if (_tmp4_) { + GSource* _tmp5_; + _tmp5_ = self->priv->check_for_lock_source; + g_source_destroy (_tmp5_); _g_source_unref0 (self->priv->check_for_lock_source); - self->priv->check_for_lock_source = _tmp2_; + self->priv->check_for_lock_source = NULL; } } void dvb_scanner_remove_wait_for_tables_timeout (DVBScanner* self) { gboolean _tmp0_ = FALSE; + GSource* _tmp1_; + gboolean _tmp4_; g_return_if_fail (self != NULL); - if (self->priv->wait_for_tables_source != NULL) { - gboolean _tmp1_; - _tmp1_ = g_source_is_destroyed (self->priv->wait_for_tables_source); - _tmp0_ = !_tmp1_; + _tmp1_ = self->priv->wait_for_tables_source; + if (_tmp1_ != NULL) { + GSource* _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp2_ = self->priv->wait_for_tables_source; + _tmp3_ = g_source_is_destroyed (_tmp2_); + _tmp0_ = !_tmp3_; } else { _tmp0_ = FALSE; } - if (_tmp0_) { - GSource* _tmp2_; - g_source_destroy (self->priv->wait_for_tables_source); - _tmp2_ = NULL; + _tmp4_ = _tmp0_; + if (_tmp4_) { + GSource* _tmp5_; + _tmp5_ = self->priv->wait_for_tables_source; + g_source_destroy (_tmp5_); _g_source_unref0 (self->priv->wait_for_tables_source); - self->priv->wait_for_tables_source = _tmp2_; + self->priv->wait_for_tables_source = NULL; } } @@ -1272,37 +1622,57 @@ void dvb_scanner_queue_start_scan (DVBScanner* self) { gboolean _tmp0_ = FALSE; + GSource* _tmp1_; + gboolean _tmp4_; g_return_if_fail (self != NULL); - if (self->priv->start_scan_source == NULL) { + _tmp1_ = self->priv->start_scan_source; + if (_tmp1_ == NULL) { _tmp0_ = TRUE; } else { - gboolean _tmp1_; - _tmp1_ = g_source_is_destroyed (self->priv->start_scan_source); - _tmp0_ = _tmp1_; - } - if (_tmp0_) { - GSource* _tmp2_ = NULL; - GSource* _tmp3_; - g_debug ("Scanner.vala:476: Queueing start_scan"); - _tmp2_ = g_idle_source_new (); - _tmp3_ = _tmp2_; + GSource* _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp2_ = self->priv->start_scan_source; + _tmp3_ = g_source_is_destroyed (_tmp2_); + _tmp0_ = _tmp3_; + } + _tmp4_ = _tmp0_; + if (_tmp4_) { + DVBLoggingLogger* _tmp5_; + GSource* _tmp6_; + GSource* _tmp7_; + GSource* _tmp8_; + GMainContext* _tmp9_; + _tmp5_ = dvb_scanner_log; + dvb_logging_logger_debug (_tmp5_, "Scanner.vala:479: Queueing start_scan"); + _tmp6_ = g_idle_source_new (); _g_source_unref0 (self->priv->start_scan_source); - self->priv->start_scan_source = _tmp3_; - g_source_set_callback (self->priv->start_scan_source, _dvb_scanner_start_scan_gsource_func, g_object_ref (self), g_object_unref); - g_source_attach (self->priv->start_scan_source, self->priv->context); + self->priv->start_scan_source = _tmp6_; + _tmp7_ = self->priv->start_scan_source; + g_source_set_callback (_tmp7_, _dvb_scanner_start_scan_gsource_func, g_object_ref (self), g_object_unref); + _tmp8_ = self->priv->start_scan_source; + _tmp9_ = self->priv->context; + g_source_attach (_tmp8_, _tmp9_); } } void dvb_scanner_set_uint_property (GstElement* src, const GstStructure* params, const gchar* key) { guint val = 0U; - guint _tmp0_; + const GstStructure* _tmp0_; + const gchar* _tmp1_; + guint _tmp2_ = 0U; + GstElement* _tmp3_; + const gchar* _tmp4_; g_return_if_fail (src != NULL); g_return_if_fail (params != NULL); g_return_if_fail (key != NULL); - gst_structure_get_uint (params, key, &_tmp0_); - val = _tmp0_; - g_object_set ((GObject*) src, key, val, NULL); + _tmp0_ = params; + _tmp1_ = key; + gst_structure_get_uint (_tmp0_, _tmp1_, &_tmp2_); + val = _tmp2_; + _tmp3_ = src; + _tmp4_ = key; + g_object_set ((GObject*) _tmp3_, _tmp4_, val, NULL); } @@ -1315,150 +1685,227 @@ void dvb_scanner_on_dvb_frontend_stats_structure (DVBScanner* self, const GstStructure* structure) { gboolean has_lock = FALSE; - gboolean _tmp0_; + const GstStructure* _tmp0_; gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_; + gboolean _tmp5_; gint _signal = 0; - gint _tmp4_; + const GstStructure* _tmp10_; + gint _tmp11_ = 0; gint _snr = 0; - gint _tmp5_; + const GstStructure* _tmp12_; + gint _tmp13_ = 0; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - gst_structure_get_boolean (structure, "lock", &_tmp0_); - has_lock = _tmp0_; - if (has_lock) { - _tmp1_ = !self->priv->locked; + _tmp0_ = structure; + gst_structure_get_boolean (_tmp0_, "lock", &_tmp1_); + has_lock = _tmp1_; + _tmp3_ = has_lock; + if (_tmp3_) { + gboolean _tmp4_; + _tmp4_ = self->priv->locked; + _tmp2_ = !_tmp4_; } else { - _tmp1_ = FALSE; + _tmp2_ = FALSE; } - if (_tmp1_) { - GSource* _tmp2_ = NULL; - GSource* _tmp3_; - g_debug ("Scanner.vala:494: Got lock"); + _tmp5_ = _tmp2_; + if (_tmp5_) { + GSource* _tmp6_; + GSource* _tmp7_; + GSource* _tmp8_; + GMainContext* _tmp9_; + g_debug ("Scanner.vala:497: Got lock"); dvb_scanner_remove_check_for_lock_timeout (self); - _tmp2_ = g_timeout_source_new_seconds ((guint) 10); - _tmp3_ = _tmp2_; + _tmp6_ = g_timeout_source_new_seconds ((guint) 10); _g_source_unref0 (self->priv->wait_for_tables_source); - self->priv->wait_for_tables_source = _tmp3_; - g_source_set_callback (self->priv->wait_for_tables_source, _dvb_scanner_wait_for_tables_gsource_func, g_object_ref (self), g_object_unref); - g_source_attach (self->priv->wait_for_tables_source, self->priv->context); - } - gst_structure_get_int (structure, "signal", &_tmp4_); - _signal = _tmp4_; - gst_structure_get_int (structure, "snr", &_tmp5_); - _snr = _tmp5_; + self->priv->wait_for_tables_source = _tmp6_; + _tmp7_ = self->priv->wait_for_tables_source; + g_source_set_callback (_tmp7_, _dvb_scanner_wait_for_tables_gsource_func, g_object_ref (self), g_object_unref); + _tmp8_ = self->priv->wait_for_tables_source; + _tmp9_ = self->priv->context; + g_source_attach (_tmp8_, _tmp9_); + } + _tmp10_ = structure; + gst_structure_get_int (_tmp10_, "signal", &_tmp11_); + _signal = _tmp11_; + _tmp12_ = structure; + gst_structure_get_int (_tmp12_, "snr", &_tmp13_); + _snr = _tmp13_; g_signal_emit_by_name (self, "frontend-stats", _signal / ((gdouble) 0xffff), _snr / ((gdouble) 0xffff)); } void dvb_scanner_on_dvb_read_failure_structure (DVBScanner* self) { g_return_if_fail (self != NULL); - g_warning ("Scanner.vala:510: Read failure"); + g_warning ("Scanner.vala:513: Read failure"); } void dvb_scanner_on_pat_structure (DVBScanner* self, const GstStructure* structure) { - GeeHashSet* _tmp0_ = NULL; + GeeHashSet* _tmp0_; GeeSet* pid_set; - GValue* _tmp1_ = NULL; + GeeSet* _tmp1_; + GeeSet* _tmp2_; + const GstStructure* _tmp3_; + GValue* _tmp4_ = NULL; GValue programs; - guint _tmp2_; + guint _tmp5_ = 0U; guint size; GValue val = {0}; - const GstStructure* program; - GString* _tmp8_ = NULL; + const GstStructure* program = NULL; + GString* _tmp20_; GString* new_pids; gint i; - gint _tmp17_; - GstElement* _tmp18_ = NULL; + DVBLoggingLogger* _tmp40_; + GeeSet* _tmp41_; + gint _tmp42_; + gint _tmp43_; + GString* _tmp44_; + const gchar* _tmp45_; + GstElement* _tmp46_; + GstElement* _tmp47_ = NULL; GstElement* dvbsrc; + GString* _tmp48_; + const gchar* _tmp49_; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - g_debug ("Scanner.vala:517: Received PAT"); + g_debug ("Scanner.vala:520: Received PAT"); _tmp0_ = gee_hash_set_new (G_TYPE_UINT, NULL, NULL, NULL, NULL); pid_set = (GeeSet*) _tmp0_; - gee_collection_add ((GeeCollection*) pid_set, GUINT_TO_POINTER ((guint) 16)); - gee_collection_add ((GeeCollection*) pid_set, GUINT_TO_POINTER ((guint) 17)); - _tmp1_ = gst_structure_get_value (structure, "programs"); - programs = *_tmp1_; - _tmp2_ = gst_value_list_get_size (&programs); - size = _tmp2_; - program = NULL; + _tmp1_ = pid_set; + gee_collection_add ((GeeCollection*) _tmp1_, GUINT_TO_POINTER ((guint) 16)); + _tmp2_ = pid_set; + gee_collection_add ((GeeCollection*) _tmp2_, GUINT_TO_POINTER ((guint) 17)); + _tmp3_ = structure; + _tmp4_ = gst_structure_get_value (_tmp3_, "programs"); + programs = *_tmp4_; + _tmp5_ = gst_value_list_get_size (&programs); + size = _tmp5_; { guint i; i = (guint) 0; { - gboolean _tmp3_; - _tmp3_ = TRUE; + gboolean _tmp6_; + _tmp6_ = TRUE; while (TRUE) { - GValue* _tmp4_ = NULL; - const GstStructure* _tmp5_ = NULL; + gboolean _tmp7_; + guint _tmp9_; + guint _tmp10_; + guint _tmp11_; + GValue* _tmp12_ = NULL; + const GstStructure* _tmp13_ = NULL; guint sid = 0U; - guint _tmp6_; + const GstStructure* _tmp14_; + guint _tmp15_ = 0U; guint pmt = 0U; - guint _tmp7_; - if (!_tmp3_) { - i++; - } - _tmp3_ = FALSE; - if (!(i < size)) { + const GstStructure* _tmp16_; + guint _tmp17_ = 0U; + GeeSet* _tmp18_; + guint _tmp19_; + _tmp7_ = _tmp6_; + if (!_tmp7_) { + guint _tmp8_; + _tmp8_ = i; + i = _tmp8_ + 1; + } + _tmp6_ = FALSE; + _tmp9_ = i; + _tmp10_ = size; + if (!(_tmp9_ < _tmp10_)) { break; } - _tmp4_ = gst_value_list_get_value (&programs, i); - val = *_tmp4_; - _tmp5_ = gst_value_get_structure (&val); - program = _tmp5_; - gst_structure_get_uint (program, "program-number", &_tmp6_); - sid = _tmp6_; - gst_structure_get_uint (program, "pid", &_tmp7_); - pmt = _tmp7_; - gee_collection_add ((GeeCollection*) pid_set, GUINT_TO_POINTER (pmt)); + _tmp11_ = i; + _tmp12_ = gst_value_list_get_value (&programs, _tmp11_); + val = *_tmp12_; + _tmp13_ = gst_value_get_structure (&val); + program = _tmp13_; + _tmp14_ = program; + gst_structure_get_uint (_tmp14_, "program-number", &_tmp15_); + sid = _tmp15_; + _tmp16_ = program; + gst_structure_get_uint (_tmp16_, "pid", &_tmp17_); + pmt = _tmp17_; + _tmp18_ = pid_set; + _tmp19_ = pmt; + gee_collection_add ((GeeCollection*) _tmp18_, GUINT_TO_POINTER (_tmp19_)); } } } - _tmp8_ = g_string_new (""); - new_pids = _tmp8_; + _tmp20_ = g_string_new (""); + new_pids = _tmp20_; i = 0; { - GeeIterator* _tmp9_ = NULL; + GeeSet* _tmp21_; + GeeIterator* _tmp22_ = NULL; GeeIterator* _pid_it; - _tmp9_ = gee_iterable_iterator ((GeeIterable*) pid_set); - _pid_it = _tmp9_; + _tmp21_ = pid_set; + _tmp22_ = gee_iterable_iterator ((GeeIterable*) _tmp21_); + _pid_it = _tmp22_; while (TRUE) { - gboolean _tmp10_; - gpointer _tmp11_ = NULL; + GeeIterator* _tmp23_; + gboolean _tmp24_ = FALSE; + GeeIterator* _tmp25_; + gpointer _tmp26_ = NULL; guint pid; - gint _tmp12_; - _tmp10_ = gee_iterator_next (_pid_it); - if (!_tmp10_) { + gint _tmp27_; + GeeSet* _tmp28_; + gint _tmp29_; + gint _tmp30_; + gint _tmp39_; + _tmp23_ = _pid_it; + _tmp24_ = gee_iterator_next (_tmp23_); + if (!_tmp24_) { break; } - _tmp11_ = gee_iterator_get (_pid_it); - pid = GPOINTER_TO_UINT (_tmp11_); - _tmp12_ = gee_collection_get_size ((GeeCollection*) pid_set); - if ((i + 1) == _tmp12_) { - gchar* _tmp13_ = NULL; - gchar* _tmp14_; - _tmp13_ = g_strdup_printf ("%u", pid); - _tmp14_ = _tmp13_; - g_string_append (new_pids, _tmp14_); - _g_free0 (_tmp14_); + _tmp25_ = _pid_it; + _tmp26_ = gee_iterator_get (_tmp25_); + pid = GPOINTER_TO_UINT (_tmp26_); + _tmp27_ = i; + _tmp28_ = pid_set; + _tmp29_ = gee_collection_get_size ((GeeCollection*) _tmp28_); + _tmp30_ = _tmp29_; + if ((_tmp27_ + 1) == _tmp30_) { + GString* _tmp31_; + guint _tmp32_; + gchar* _tmp33_ = NULL; + gchar* _tmp34_; + _tmp31_ = new_pids; + _tmp32_ = pid; + _tmp33_ = g_strdup_printf ("%u", _tmp32_); + _tmp34_ = _tmp33_; + g_string_append (_tmp31_, _tmp34_); + _g_free0 (_tmp34_); } else { - gchar* _tmp15_ = NULL; - gchar* _tmp16_; - _tmp15_ = g_strdup_printf ("%u:", pid); - _tmp16_ = _tmp15_; - g_string_append (new_pids, _tmp16_); - _g_free0 (_tmp16_); + GString* _tmp35_; + guint _tmp36_; + gchar* _tmp37_ = NULL; + gchar* _tmp38_; + _tmp35_ = new_pids; + _tmp36_ = pid; + _tmp37_ = g_strdup_printf ("%u:", _tmp36_); + _tmp38_ = _tmp37_; + g_string_append (_tmp35_, _tmp38_); + _g_free0 (_tmp38_); } - i++; + _tmp39_ = i; + i = _tmp39_ + 1; } _g_object_unref0 (_pid_it); } - _tmp17_ = gee_collection_get_size ((GeeCollection*) pid_set); - g_debug ("Scanner.vala:552: Setting %d pids: %s", _tmp17_, new_pids->str); - _tmp18_ = gst_bin_get_by_name (GST_BIN (self->pipeline), "dvbsrc"); - dvbsrc = _tmp18_; - g_object_set ((GObject*) dvbsrc, "pids", new_pids->str, NULL); + _tmp40_ = dvb_scanner_log; + _tmp41_ = pid_set; + _tmp42_ = gee_collection_get_size ((GeeCollection*) _tmp41_); + _tmp43_ = _tmp42_; + _tmp44_ = new_pids; + _tmp45_ = _tmp44_->str; + dvb_logging_logger_debug (_tmp40_, "Scanner.vala:555: Setting %d pids: %s", _tmp43_, _tmp45_); + _tmp46_ = self->pipeline; + _tmp47_ = gst_bin_get_by_name (GST_BIN (_tmp46_), "dvbsrc"); + dvbsrc = _tmp47_; + _tmp48_ = new_pids; + _tmp49_ = _tmp48_->str; + g_object_set ((GObject*) dvbsrc, "pids", _tmp49_, NULL); self->priv->pat_arrived = TRUE; _gst_object_unref0 (dvbsrc); _g_string_free0 (new_pids); @@ -1466,95 +1913,170 @@ } -static const gchar* string_offset (const gchar* self, glong offset) { - const gchar* result = NULL; - g_return_val_if_fail (self != NULL, NULL); - result = (const gchar*) (((gchar*) self) + offset); - return result; +static glong string_strnlen (gchar* str, glong maxlen) { + glong result = 0L; + gchar* _tmp0_; + glong _tmp1_; + gchar* _tmp2_ = NULL; + gchar* end; + gchar* _tmp3_; + _tmp0_ = str; + _tmp1_ = maxlen; + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); + end = _tmp2_; + _tmp3_ = end; + if (_tmp3_ == NULL) { + glong _tmp4_; + _tmp4_ = maxlen; + result = _tmp4_; + return result; + } else { + gchar* _tmp5_; + gchar* _tmp6_; + _tmp5_ = end; + _tmp6_ = str; + result = (glong) (_tmp5_ - _tmp6_); + return result; + } } static gchar* string_substring (const gchar* self, glong offset, glong len) { gchar* result = NULL; - gint _tmp0_; - glong string_length; - const gchar* _tmp1_ = NULL; - const gchar* start; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; + glong string_length = 0L; + gboolean _tmp0_ = FALSE; + glong _tmp1_; + gboolean _tmp3_; + glong _tmp9_; + glong _tmp15_; + glong _tmp18_; + glong _tmp19_; + glong _tmp20_; + glong _tmp21_; + glong _tmp22_; + gchar* _tmp23_ = NULL; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = strlen (self); - string_length = (glong) _tmp0_; - if (offset < 0) { - offset = string_length + offset; - g_return_val_if_fail (offset >= 0, NULL); - } else { - g_return_val_if_fail (offset <= string_length, NULL); - } - if (len < 0) { - len = string_length - offset; - } - g_return_val_if_fail ((offset + len) <= string_length, NULL); - _tmp1_ = string_offset (self, offset); - start = _tmp1_; - _tmp2_ = string_offset (start, len); - _tmp3_ = g_strndup (start, ((gchar*) _tmp2_) - ((gchar*) start)); - result = _tmp3_; + _tmp1_ = offset; + if (_tmp1_ >= ((glong) 0)) { + glong _tmp2_; + _tmp2_ = len; + _tmp0_ = _tmp2_ >= ((glong) 0); + } else { + _tmp0_ = FALSE; + } + _tmp3_ = _tmp0_; + if (_tmp3_) { + glong _tmp4_; + glong _tmp5_; + glong _tmp6_ = 0L; + _tmp4_ = offset; + _tmp5_ = len; + _tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_); + string_length = _tmp6_; + } else { + gint _tmp7_; + gint _tmp8_; + _tmp7_ = strlen (self); + _tmp8_ = _tmp7_; + string_length = (glong) _tmp8_; + } + _tmp9_ = offset; + if (_tmp9_ < ((glong) 0)) { + glong _tmp10_; + glong _tmp11_; + glong _tmp12_; + _tmp10_ = string_length; + _tmp11_ = offset; + offset = _tmp10_ + _tmp11_; + _tmp12_ = offset; + g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL); + } else { + glong _tmp13_; + glong _tmp14_; + _tmp13_ = offset; + _tmp14_ = string_length; + g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL); + } + _tmp15_ = len; + if (_tmp15_ < ((glong) 0)) { + glong _tmp16_; + glong _tmp17_; + _tmp16_ = string_length; + _tmp17_ = offset; + len = _tmp16_ - _tmp17_; + } + _tmp18_ = offset; + _tmp19_ = len; + _tmp20_ = string_length; + g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL); + _tmp21_ = offset; + _tmp22_ = len; + _tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_); + result = _tmp23_; return result; } static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { gchar* result = NULL; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - GRegex* _tmp2_ = NULL; - GRegex* _tmp3_; - GRegex* regex; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (old != NULL, NULL); g_return_val_if_fail (replacement != NULL, NULL); - _tmp0_ = g_regex_escape_string (old, -1); - _tmp1_ = _tmp0_; - _tmp2_ = g_regex_new (_tmp1_, 0, 0, &_inner_error_); - regex = (_tmp3_ = _tmp2_, _g_free0 (_tmp1_), _tmp3_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch148_g_regex_error; + { + const gchar* _tmp0_; + gchar* _tmp1_ = NULL; + gchar* _tmp2_; + GRegex* _tmp3_; + GRegex* _tmp4_; + GRegex* regex; + GRegex* _tmp5_; + const gchar* _tmp6_; + gchar* _tmp7_ = NULL; + gchar* _tmp8_; + _tmp0_ = old; + _tmp1_ = g_regex_escape_string (_tmp0_, -1); + _tmp2_ = _tmp1_; + _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_); + _tmp4_ = _tmp3_; + _g_free0 (_tmp2_); + regex = _tmp4_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch159_g_regex_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; - } - _tmp4_ = g_regex_replace_literal (regex, self, (gssize) (-1), 0, replacement, 0, &_inner_error_); - _tmp5_ = _tmp4_; - if (_inner_error_ != NULL) { - _g_regex_unref0 (regex); - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch148_g_regex_error; + _tmp5_ = regex; + _tmp6_ = replacement; + _tmp7_ = g_regex_replace_literal (_tmp5_, self, (gssize) (-1), 0, _tmp6_, 0, &_inner_error_); + _tmp8_ = _tmp7_; + if (_inner_error_ != NULL) { + _g_regex_unref0 (regex); + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch159_g_regex_error; + } + _g_regex_unref0 (regex); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } + result = _tmp8_; _g_regex_unref0 (regex); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + return result; } - result = _tmp5_; - _g_regex_unref0 (regex); - return result; - _g_regex_unref0 (regex); - goto __finally148; - __catch148_g_regex_error: + goto __finally159; + __catch159_g_regex_error: { - GError * e; + GError* e = NULL; e = _inner_error_; _inner_error_ = NULL; g_assert_not_reached (); _g_error_free0 (e); } - __finally148: + __finally159: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1565,132 +2087,215 @@ void dvb_scanner_on_sdt_structure (DVBScanner* self, const GstStructure* structure) { guint tsid = 0U; - guint _tmp0_; - GValue* _tmp1_ = NULL; - GValue services; + const GstStructure* _tmp0_; + guint _tmp1_ = 0U; guint _tmp2_; + const GstStructure* _tmp3_; + GValue* _tmp4_ = NULL; + GValue services; + guint _tmp5_ = 0U; guint size; GValue val = {0}; - const GstStructure* service; + const GstStructure* service = NULL; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - gst_structure_get_uint (structure, "transport-stream-id", &_tmp0_); - tsid = _tmp0_; - g_debug ("Scanner.vala:564: Received SDT (0x%x)", tsid); - _tmp1_ = gst_structure_get_value (structure, "services"); - services = *_tmp1_; - _tmp2_ = gst_value_list_get_size (&services); - size = _tmp2_; - service = NULL; + _tmp0_ = structure; + gst_structure_get_uint (_tmp0_, "transport-stream-id", &_tmp1_); + tsid = _tmp1_; + _tmp2_ = tsid; + g_debug ("Scanner.vala:567: Received SDT (0x%x)", _tmp2_); + _tmp3_ = structure; + _tmp4_ = gst_structure_get_value (_tmp3_, "services"); + services = *_tmp4_; + _tmp5_ = gst_value_list_get_size (&services); + size = _tmp5_; { guint i; i = (guint) 0; { - gboolean _tmp3_; - _tmp3_ = TRUE; + gboolean _tmp6_; + _tmp6_ = TRUE; while (TRUE) { - GValue* _tmp4_ = NULL; - const GstStructure* _tmp5_ = NULL; - const gchar* _tmp6_ = NULL; - gchar* _tmp7_; + gboolean _tmp7_; + guint _tmp9_; + guint _tmp10_; + guint _tmp11_; + GValue* _tmp12_ = NULL; + const GstStructure* _tmp13_ = NULL; + const GstStructure* _tmp14_; + const gchar* _tmp15_ = NULL; + gchar* _tmp16_; gchar* name; - gint _tmp8_; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - gint _tmp11_; - gint _tmp12_; + const gchar* _tmp17_; + const gchar* _tmp18_; + gint _tmp19_; + gint _tmp20_; + gchar* _tmp21_ = NULL; + gchar* _tmp22_; + gint _tmp23_ = 0; + gint _tmp24_; gint sid; - gboolean _tmp13_; - gboolean _tmp17_; - DVBChannel* _tmp18_ = NULL; + const GstStructure* _tmp25_; + gboolean _tmp26_ = FALSE; + DVBChannelList* _tmp30_; + gint _tmp31_; + gboolean _tmp32_ = FALSE; + DVBChannelList* _tmp34_; + gint _tmp35_; + DVBChannel* _tmp36_ = NULL; DVBChannel* channel; - gboolean _tmp19_; - gboolean _tmp21_; - const gchar* _tmp24_ = NULL; - gchar* _tmp25_; + const GstStructure* _tmp37_; + gboolean _tmp38_ = FALSE; + const gchar* _tmp44_; + gboolean _tmp45_ = FALSE; + DVBChannel* _tmp50_; + guint _tmp51_; + const GstStructure* _tmp52_; + const gchar* _tmp53_ = NULL; + gchar* _tmp54_; gchar* provider; - gboolean _tmp26_ = FALSE; - const gchar* _tmp28_ = NULL; - gboolean _tmp29_; - gchar* _tmp30_ = NULL; - gchar* _tmp31_; - if (!_tmp3_) { - i++; - } - _tmp3_ = FALSE; - if (!(i < size)) { + gboolean _tmp55_ = FALSE; + const gchar* _tmp56_; + gboolean _tmp59_; + DVBLoggingLogger* _tmp63_; + gint _tmp64_; + DVBChannel* _tmp65_; + const gchar* _tmp66_; + const gchar* _tmp67_; + DVBChannel* _tmp68_; + gboolean _tmp69_; + gboolean _tmp70_; + gchar* _tmp71_ = NULL; + gchar* _tmp72_; + _tmp7_ = _tmp6_; + if (!_tmp7_) { + guint _tmp8_; + _tmp8_ = i; + i = _tmp8_ + 1; + } + _tmp6_ = FALSE; + _tmp9_ = i; + _tmp10_ = size; + if (!(_tmp9_ < _tmp10_)) { break; } - _tmp4_ = gst_value_list_get_value (&services, i); - val = *_tmp4_; - _tmp5_ = gst_value_get_structure (&val); - service = _tmp5_; - _tmp6_ = gst_structure_get_name (service); - _tmp7_ = g_strdup (_tmp6_); - name = _tmp7_; - _tmp8_ = strlen (name); - _tmp9_ = string_substring (name, (glong) 8, (glong) (_tmp8_ - 8)); - _tmp10_ = _tmp9_; - _tmp11_ = atoi (_tmp10_); - sid = (_tmp12_ = _tmp11_, _g_free0 (_tmp10_), _tmp12_); - _tmp13_ = gst_structure_has_field (service, "name"); - if (_tmp13_) { - const gchar* _tmp14_ = NULL; - gchar* _tmp15_; - gchar* _tmp16_; - _tmp14_ = gst_structure_get_string (service, "name"); - _tmp15_ = g_strdup (_tmp14_); - _tmp16_ = _tmp15_; + _tmp11_ = i; + _tmp12_ = gst_value_list_get_value (&services, _tmp11_); + val = *_tmp12_; + _tmp13_ = gst_value_get_structure (&val); + service = _tmp13_; + _tmp14_ = service; + _tmp15_ = gst_structure_get_name (_tmp14_); + _tmp16_ = g_strdup (_tmp15_); + name = _tmp16_; + _tmp17_ = name; + _tmp18_ = name; + _tmp19_ = strlen (_tmp18_); + _tmp20_ = _tmp19_; + _tmp21_ = string_substring (_tmp17_, (glong) 8, (glong) (_tmp20_ - 8)); + _tmp22_ = _tmp21_; + _tmp23_ = atoi (_tmp22_); + _tmp24_ = _tmp23_; + _g_free0 (_tmp22_); + sid = _tmp24_; + _tmp25_ = service; + _tmp26_ = gst_structure_has_field (_tmp25_, "name"); + if (_tmp26_) { + const GstStructure* _tmp27_; + const gchar* _tmp28_ = NULL; + gchar* _tmp29_; + _tmp27_ = service; + _tmp28_ = gst_structure_get_string (_tmp27_, "name"); + _tmp29_ = g_strdup (_tmp28_); _g_free0 (name); - name = _tmp16_; + name = _tmp29_; } - _tmp17_ = dvb_channel_list_contains (self->channels, (guint) sid); - if (!_tmp17_) { - dvb_scanner_add_new_channel (self, (guint) sid); - } - _tmp18_ = dvb_channel_list_get_channel (self->channels, (guint) sid); - channel = _tmp18_; - _tmp19_ = gst_structure_has_field (service, "scrambled"); - if (_tmp19_) { + _tmp30_ = self->channels; + _tmp31_ = sid; + _tmp32_ = dvb_channel_list_contains (_tmp30_, (guint) _tmp31_); + if (!_tmp32_) { + gint _tmp33_; + _tmp33_ = sid; + dvb_scanner_add_new_channel (self, (guint) _tmp33_); + } + _tmp34_ = self->channels; + _tmp35_ = sid; + _tmp36_ = dvb_channel_list_get_channel (_tmp34_, (guint) _tmp35_); + channel = _tmp36_; + _tmp37_ = service; + _tmp38_ = gst_structure_has_field (_tmp37_, "scrambled"); + if (_tmp38_) { gboolean scrambled = FALSE; - gboolean _tmp20_; - gst_structure_get_boolean (service, "scrambled", &_tmp20_); - scrambled = _tmp20_; - dvb_channel_set_Scrambled (channel, scrambled); + const GstStructure* _tmp39_; + gboolean _tmp40_ = FALSE; + DVBChannel* _tmp41_; + gboolean _tmp42_; + _tmp39_ = service; + gst_structure_get_boolean (_tmp39_, "scrambled", &_tmp40_); + scrambled = _tmp40_; + _tmp41_ = channel; + _tmp42_ = scrambled; + dvb_channel_set_Scrambled (_tmp41_, _tmp42_); } else { - dvb_channel_set_Scrambled (channel, FALSE); - } - _tmp21_ = g_utf8_validate (name, (gssize) (-1), NULL); - if (_tmp21_) { - gchar* _tmp22_ = NULL; - gchar* _tmp23_; - _tmp22_ = string_replace (name, "\\s", " "); - _tmp23_ = _tmp22_; - dvb_channel_set_Name (channel, _tmp23_); - _g_free0 (_tmp23_); - } - dvb_channel_set_TransportStreamId (channel, tsid); - _tmp24_ = gst_structure_get_string (service, "provider-name"); - _tmp25_ = g_strdup (_tmp24_); - provider = _tmp25_; - if (provider != NULL) { - gboolean _tmp27_; - _tmp27_ = g_utf8_validate (provider, (gssize) (-1), NULL); - _tmp26_ = _tmp27_; + DVBChannel* _tmp43_; + _tmp43_ = channel; + dvb_channel_set_Scrambled (_tmp43_, FALSE); + } + _tmp44_ = name; + _tmp45_ = g_utf8_validate (_tmp44_, (gssize) (-1), NULL); + if (_tmp45_) { + DVBChannel* _tmp46_; + const gchar* _tmp47_; + gchar* _tmp48_ = NULL; + gchar* _tmp49_; + _tmp46_ = channel; + _tmp47_ = name; + _tmp48_ = string_replace (_tmp47_, "\\s", " "); + _tmp49_ = _tmp48_; + dvb_channel_set_Name (_tmp46_, _tmp49_); + _g_free0 (_tmp49_); + } + _tmp50_ = channel; + _tmp51_ = tsid; + dvb_channel_set_TransportStreamId (_tmp50_, _tmp51_); + _tmp52_ = service; + _tmp53_ = gst_structure_get_string (_tmp52_, "provider-name"); + _tmp54_ = g_strdup (_tmp53_); + provider = _tmp54_; + _tmp56_ = provider; + if (_tmp56_ != NULL) { + const gchar* _tmp57_; + gboolean _tmp58_ = FALSE; + _tmp57_ = provider; + _tmp58_ = g_utf8_validate (_tmp57_, (gssize) (-1), NULL); + _tmp55_ = _tmp58_; } else { - _tmp26_ = FALSE; + _tmp55_ = FALSE; } - if (_tmp26_) { - dvb_channel_set_Network (channel, provider); + _tmp59_ = _tmp55_; + if (_tmp59_) { + DVBChannel* _tmp60_; + const gchar* _tmp61_; + _tmp60_ = channel; + _tmp61_ = provider; + dvb_channel_set_Network (_tmp60_, _tmp61_); } else { - dvb_channel_set_Network (channel, ""); - } - _tmp28_ = dvb_channel_get_Name (channel); - _tmp29_ = dvb_channel_get_Scrambled (channel); - _tmp30_ = bool_to_string (_tmp29_); - _tmp31_ = _tmp30_; - g_debug ("Scanner.vala:610: Found service 0x%x, %s, scrambled: %s", (guint) sid, _tmp28_, _tmp31_); - _g_free0 (_tmp31_); + DVBChannel* _tmp62_; + _tmp62_ = channel; + dvb_channel_set_Network (_tmp62_, ""); + } + _tmp63_ = dvb_scanner_log; + _tmp64_ = sid; + _tmp65_ = channel; + _tmp66_ = dvb_channel_get_Name (_tmp65_); + _tmp67_ = _tmp66_; + _tmp68_ = channel; + _tmp69_ = dvb_channel_get_Scrambled (_tmp68_); + _tmp70_ = _tmp69_; + _tmp71_ = bool_to_string (_tmp70_); + _tmp72_ = _tmp71_; + dvb_logging_logger_debug (_tmp63_, "Scanner.vala:613: Found service 0x%x, %s, scrambled: %s", (guint) _tmp64_, _tmp67_, _tmp72_); + _g_free0 (_tmp72_); _g_free0 (provider); _g_object_unref0 (channel); _g_free0 (name); @@ -1703,155 +2308,230 @@ void dvb_scanner_on_nit_structure (DVBScanner* self, const GstStructure* structure) { gboolean actual = FALSE; - gboolean _tmp0_; - gchar* name; - gboolean _tmp1_; - GValue* _tmp8_ = NULL; + const GstStructure* _tmp0_; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_; + gchar* name = NULL; + const GstStructure* _tmp3_; + gboolean _tmp4_ = FALSE; + DVBLoggingLogger* _tmp12_; + const gchar* _tmp13_; + const GstStructure* _tmp14_; + GValue* _tmp15_ = NULL; GValue transports; - guint _tmp9_; + guint _tmp16_ = 0U; guint size; GValue val = {0}; - const GstStructure* transport; + const GstStructure* transport = NULL; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - gst_structure_get_boolean (structure, "actual-network", &_tmp0_); - actual = _tmp0_; - if (!actual) { + _tmp0_ = structure; + gst_structure_get_boolean (_tmp0_, "actual-network", &_tmp1_); + actual = _tmp1_; + _tmp2_ = actual; + if (!_tmp2_) { return; } - g_debug ("Scanner.vala:623: Received NIT"); - name = NULL; - _tmp1_ = gst_structure_has_field (structure, "network-name"); - if (_tmp1_) { - const gchar* _tmp2_ = NULL; - gchar* _tmp3_; - gchar* _tmp4_; - _tmp2_ = gst_structure_get_string (structure, "network-name"); - _tmp3_ = g_strdup (_tmp2_); - _tmp4_ = _tmp3_; + g_debug ("Scanner.vala:626: Received NIT"); + _tmp3_ = structure; + _tmp4_ = gst_structure_has_field (_tmp3_, "network-name"); + if (_tmp4_) { + const GstStructure* _tmp5_; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_; + _tmp5_ = structure; + _tmp6_ = gst_structure_get_string (_tmp5_, "network-name"); + _tmp7_ = g_strdup (_tmp6_); _g_free0 (name); - name = _tmp4_; + name = _tmp7_; } else { guint nid = 0U; - guint _tmp5_; - gchar* _tmp6_ = NULL; - gchar* _tmp7_; - gst_structure_get_uint (structure, "network-id", &_tmp5_); - nid = _tmp5_; - _tmp6_ = g_strdup_printf ("%u", nid); - _tmp7_ = _tmp6_; + const GstStructure* _tmp8_; + guint _tmp9_ = 0U; + guint _tmp10_; + gchar* _tmp11_ = NULL; + _tmp8_ = structure; + gst_structure_get_uint (_tmp8_, "network-id", &_tmp9_); + nid = _tmp9_; + _tmp10_ = nid; + _tmp11_ = g_strdup_printf ("%u", _tmp10_); _g_free0 (name); - name = _tmp7_; + name = _tmp11_; } - g_debug ("Scanner.vala:633: Network name '%s'", name); - _tmp8_ = gst_structure_get_value (structure, "transports"); - transports = *_tmp8_; - _tmp9_ = gst_value_list_get_size (&transports); - size = _tmp9_; - transport = NULL; + _tmp12_ = dvb_scanner_log; + _tmp13_ = name; + dvb_logging_logger_debug (_tmp12_, "Scanner.vala:636: Network name '%s'", _tmp13_); + _tmp14_ = structure; + _tmp15_ = gst_structure_get_value (_tmp14_, "transports"); + transports = *_tmp15_; + _tmp16_ = gst_value_list_get_size (&transports); + size = _tmp16_; { guint i; i = (guint) 0; { - gboolean _tmp10_; - _tmp10_ = TRUE; + gboolean _tmp17_; + _tmp17_ = TRUE; while (TRUE) { - GValue* _tmp11_ = NULL; - const GstStructure* _tmp12_ = NULL; + gboolean _tmp18_; + guint _tmp20_; + guint _tmp21_; + guint _tmp22_; + GValue* _tmp23_ = NULL; + const GstStructure* _tmp24_ = NULL; guint tsid = 0U; - guint _tmp13_; - gboolean _tmp14_; - gboolean _tmp19_; - if (!_tmp10_) { - i++; - } - _tmp10_ = FALSE; - if (!(i < size)) { + const GstStructure* _tmp25_; + guint _tmp26_ = 0U; + const GstStructure* _tmp27_; + gboolean _tmp28_ = FALSE; + const GstStructure* _tmp38_; + gboolean _tmp39_ = FALSE; + _tmp18_ = _tmp17_; + if (!_tmp18_) { + guint _tmp19_; + _tmp19_ = i; + i = _tmp19_ + 1; + } + _tmp17_ = FALSE; + _tmp20_ = i; + _tmp21_ = size; + if (!(_tmp20_ < _tmp21_)) { break; } - _tmp11_ = gst_value_list_get_value (&transports, i); - val = *_tmp11_; - _tmp12_ = gst_value_get_structure (&val); - transport = _tmp12_; - gst_structure_get_uint (transport, "transport-stream-id", &_tmp13_); - tsid = _tmp13_; - _tmp14_ = gst_structure_has_field (transport, "delivery"); - if (_tmp14_) { - GValue* _tmp15_ = NULL; + _tmp22_ = i; + _tmp23_ = gst_value_list_get_value (&transports, _tmp22_); + val = *_tmp23_; + _tmp24_ = gst_value_get_structure (&val); + transport = _tmp24_; + _tmp25_ = transport; + gst_structure_get_uint (_tmp25_, "transport-stream-id", &_tmp26_); + tsid = _tmp26_; + _tmp27_ = transport; + _tmp28_ = gst_structure_has_field (_tmp27_, "delivery"); + if (_tmp28_) { + const GstStructure* _tmp29_; + GValue* _tmp30_ = NULL; GValue delivery_val; - const GstStructure* _tmp16_ = NULL; + const GstStructure* _tmp31_ = NULL; const GstStructure* delivery; + DVBLoggingLogger* _tmp32_; + guint _tmp33_; guint freq = 0U; - guint _tmp17_; - GstStructure* _tmp18_; - _tmp15_ = gst_structure_get_value (transport, "delivery"); - delivery_val = *_tmp15_; - _tmp16_ = gst_value_get_structure (&delivery_val); - delivery = _tmp16_; - g_debug ("Scanner.vala:652: Received TS 0x%x", tsid); - gst_structure_get_uint (delivery, "frequency", &_tmp17_); - freq = _tmp17_; - _tmp18_ = _gst_structure_copy0 (delivery); - dvb_scanner_add_structure_to_scan (self, _tmp18_); - } - _tmp19_ = gst_structure_has_field (transport, "channels"); - if (_tmp19_) { - GValue* _tmp20_ = NULL; + const GstStructure* _tmp34_; + guint _tmp35_ = 0U; + const GstStructure* _tmp36_; + GstStructure* _tmp37_; + _tmp29_ = transport; + _tmp30_ = gst_structure_get_value (_tmp29_, "delivery"); + delivery_val = *_tmp30_; + _tmp31_ = gst_value_get_structure (&delivery_val); + delivery = _tmp31_; + _tmp32_ = dvb_scanner_log; + _tmp33_ = tsid; + dvb_logging_logger_debug (_tmp32_, "Scanner.vala:655: Received TS 0x%x", _tmp33_); + _tmp34_ = delivery; + gst_structure_get_uint (_tmp34_, "frequency", &_tmp35_); + freq = _tmp35_; + _tmp36_ = delivery; + _tmp37_ = _gst_structure_copy0 (_tmp36_); + dvb_scanner_add_structure_to_scan (self, _tmp37_); + } + _tmp38_ = transport; + _tmp39_ = gst_structure_has_field (_tmp38_, "channels"); + if (_tmp39_) { + const GstStructure* _tmp40_; + GValue* _tmp41_ = NULL; GValue channels; - guint _tmp21_; + guint _tmp42_ = 0U; guint channels_size; GValue channel_val = {0}; - const GstStructure* channel_struct; - _tmp20_ = gst_structure_get_value (transport, "channels"); - channels = *_tmp20_; - _tmp21_ = gst_value_list_get_size (&channels); - channels_size = _tmp21_; - channel_struct = NULL; + const GstStructure* channel_struct = NULL; + _tmp40_ = transport; + _tmp41_ = gst_structure_get_value (_tmp40_, "channels"); + channels = *_tmp41_; + _tmp42_ = gst_value_list_get_size (&channels); + channels_size = _tmp42_; { gint j; j = 0; { - gboolean _tmp22_; - _tmp22_ = TRUE; + gboolean _tmp43_; + _tmp43_ = TRUE; while (TRUE) { - GValue* _tmp23_ = NULL; - const GstStructure* _tmp24_ = NULL; + gboolean _tmp44_; + gint _tmp46_; + guint _tmp47_; + gint _tmp48_; + GValue* _tmp49_ = NULL; + const GstStructure* _tmp50_ = NULL; guint sid = 0U; - guint _tmp25_; - gboolean _tmp26_; - DVBChannel* _tmp27_ = NULL; + const GstStructure* _tmp51_; + guint _tmp52_ = 0U; + DVBChannelList* _tmp53_; + guint _tmp54_; + gboolean _tmp55_ = FALSE; + DVBChannelList* _tmp57_; + guint _tmp58_; + DVBChannel* _tmp59_ = NULL; DVBChannel* dvb_channel; - gboolean _tmp28_; + const gchar* _tmp60_; + gboolean _tmp61_ = FALSE; guint lcnumber = 0U; - guint _tmp29_; - if (!_tmp22_) { - j++; + const GstStructure* _tmp65_; + guint _tmp66_ = 0U; + DVBChannel* _tmp67_; + guint _tmp68_; + _tmp44_ = _tmp43_; + if (!_tmp44_) { + gint _tmp45_; + _tmp45_ = j; + j = _tmp45_ + 1; } - _tmp22_ = FALSE; - if (!(j < channels_size)) { + _tmp43_ = FALSE; + _tmp46_ = j; + _tmp47_ = channels_size; + if (!(((guint) _tmp46_) < _tmp47_)) { break; } - _tmp23_ = gst_value_list_get_value (&channels, (guint) j); - channel_val = *_tmp23_; - _tmp24_ = gst_value_get_structure (&channel_val); - channel_struct = _tmp24_; - gst_structure_get_uint (channel_struct, "service-id", &_tmp25_); - sid = _tmp25_; - _tmp26_ = dvb_channel_list_contains (self->channels, sid); - if (!_tmp26_) { - dvb_scanner_add_new_channel (self, sid); + _tmp48_ = j; + _tmp49_ = gst_value_list_get_value (&channels, (guint) _tmp48_); + channel_val = *_tmp49_; + _tmp50_ = gst_value_get_structure (&channel_val); + channel_struct = _tmp50_; + _tmp51_ = channel_struct; + gst_structure_get_uint (_tmp51_, "service-id", &_tmp52_); + sid = _tmp52_; + _tmp53_ = self->channels; + _tmp54_ = sid; + _tmp55_ = dvb_channel_list_contains (_tmp53_, _tmp54_); + if (!_tmp55_) { + guint _tmp56_; + _tmp56_ = sid; + dvb_scanner_add_new_channel (self, _tmp56_); } - _tmp27_ = dvb_channel_list_get_channel (self->channels, sid); - dvb_channel = _tmp27_; - _tmp28_ = g_utf8_validate (name, (gssize) (-1), NULL); - if (_tmp28_) { - dvb_channel_set_Network (dvb_channel, name); + _tmp57_ = self->channels; + _tmp58_ = sid; + _tmp59_ = dvb_channel_list_get_channel (_tmp57_, _tmp58_); + dvb_channel = _tmp59_; + _tmp60_ = name; + _tmp61_ = g_utf8_validate (_tmp60_, (gssize) (-1), NULL); + if (_tmp61_) { + DVBChannel* _tmp62_; + const gchar* _tmp63_; + _tmp62_ = dvb_channel; + _tmp63_ = name; + dvb_channel_set_Network (_tmp62_, _tmp63_); } else { - dvb_channel_set_Network (dvb_channel, ""); + DVBChannel* _tmp64_; + _tmp64_ = dvb_channel; + dvb_channel_set_Network (_tmp64_, ""); } - gst_structure_get_uint (channel_struct, "logical-channel-number", &_tmp29_); - lcnumber = _tmp29_; - dvb_channel_set_LogicalChannelNumber (dvb_channel, &lcnumber); + _tmp65_ = channel_struct; + gst_structure_get_uint (_tmp65_, "logical-channel-number", &_tmp66_); + lcnumber = _tmp66_; + _tmp67_ = dvb_channel; + _tmp68_ = lcnumber; + dvb_channel_set_LogicalChannelNumber (_tmp67_, &_tmp68_); _g_object_unref0 (dvb_channel); } } @@ -1866,68 +2546,109 @@ void dvb_scanner_on_pmt_structure (DVBScanner* self, const GstStructure* structure) { + DVBLoggingLogger* _tmp0_; guint program_number = 0U; - guint _tmp0_; - gboolean _tmp1_; - DVBChannel* _tmp2_ = NULL; + const GstStructure* _tmp1_; + guint _tmp2_ = 0U; + DVBChannelList* _tmp3_; + guint _tmp4_; + gboolean _tmp5_ = FALSE; + DVBChannelList* _tmp7_; + guint _tmp8_; + DVBChannel* _tmp9_ = NULL; DVBChannel* dvb_channel; - GValue* _tmp3_ = NULL; + const GstStructure* _tmp10_; + GValue* _tmp11_ = NULL; GValue streams; - guint _tmp4_; + guint _tmp12_ = 0U; guint size; GValue stream_val = {0}; - const GstStructure* stream; + const GstStructure* stream = NULL; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - g_debug ("Scanner.vala:697: Received PMT"); - gst_structure_get_uint (structure, "program-number", &_tmp0_); - program_number = _tmp0_; - _tmp1_ = dvb_channel_list_contains (self->channels, program_number); - if (!_tmp1_) { - dvb_scanner_add_new_channel (self, program_number); - } - _tmp2_ = dvb_channel_list_get_channel (self->channels, program_number); - dvb_channel = _tmp2_; - _tmp3_ = gst_structure_get_value (structure, "streams"); - streams = *_tmp3_; - _tmp4_ = gst_value_list_get_size (&streams); - size = _tmp4_; - stream = NULL; + _tmp0_ = dvb_scanner_log; + dvb_logging_logger_debug (_tmp0_, "Scanner.vala:700: Received PMT"); + _tmp1_ = structure; + gst_structure_get_uint (_tmp1_, "program-number", &_tmp2_); + program_number = _tmp2_; + _tmp3_ = self->channels; + _tmp4_ = program_number; + _tmp5_ = dvb_channel_list_contains (_tmp3_, _tmp4_); + if (!_tmp5_) { + guint _tmp6_; + _tmp6_ = program_number; + dvb_scanner_add_new_channel (self, _tmp6_); + } + _tmp7_ = self->channels; + _tmp8_ = program_number; + _tmp9_ = dvb_channel_list_get_channel (_tmp7_, _tmp8_); + dvb_channel = _tmp9_; + _tmp10_ = structure; + _tmp11_ = gst_structure_get_value (_tmp10_, "streams"); + streams = *_tmp11_; + _tmp12_ = gst_value_list_get_size (&streams); + size = _tmp12_; { gint i; i = 0; { - gboolean _tmp5_; - _tmp5_ = TRUE; + gboolean _tmp13_; + _tmp13_ = TRUE; while (TRUE) { - GValue* _tmp6_ = NULL; - const GstStructure* _tmp7_ = NULL; + gboolean _tmp14_; + gint _tmp16_; + guint _tmp17_; + gint _tmp18_; + GValue* _tmp19_ = NULL; + const GstStructure* _tmp20_ = NULL; guint pid = 0U; - guint _tmp8_; + const GstStructure* _tmp21_; + guint _tmp22_ = 0U; guint stream_type = 0U; - guint _tmp9_; - if (!_tmp5_) { - i++; - } - _tmp5_ = FALSE; - if (!(i < size)) { + const GstStructure* _tmp23_; + guint _tmp24_ = 0U; + guint _tmp25_; + _tmp14_ = _tmp13_; + if (!_tmp14_) { + gint _tmp15_; + _tmp15_ = i; + i = _tmp15_ + 1; + } + _tmp13_ = FALSE; + _tmp16_ = i; + _tmp17_ = size; + if (!(((guint) _tmp16_) < _tmp17_)) { break; } - _tmp6_ = gst_value_list_get_value (&streams, (guint) i); - stream_val = *_tmp6_; - _tmp7_ = gst_value_get_structure (&stream_val); - stream = _tmp7_; - gst_structure_get_uint (stream, "pid", &_tmp8_); - pid = _tmp8_; - gst_structure_get_uint (stream, "stream-type", &_tmp9_); - stream_type = _tmp9_; - switch (stream_type) { + _tmp18_ = i; + _tmp19_ = gst_value_list_get_value (&streams, (guint) _tmp18_); + stream_val = *_tmp19_; + _tmp20_ = gst_value_get_structure (&stream_val); + stream = _tmp20_; + _tmp21_ = stream; + gst_structure_get_uint (_tmp21_, "pid", &_tmp22_); + pid = _tmp22_; + _tmp23_ = stream; + gst_structure_get_uint (_tmp23_, "stream-type", &_tmp24_); + stream_type = _tmp24_; + _tmp25_ = stream_type; + switch (_tmp25_) { case 0x01: case 0x02: case 0x1b: { - g_debug ("Scanner.vala:729: Found video PID 0x%x for channel 0x%x", pid, program_number); - dvb_channel_set_VideoPID (dvb_channel, pid); + DVBLoggingLogger* _tmp26_; + guint _tmp27_; + guint _tmp28_; + DVBChannel* _tmp29_; + guint _tmp30_; + _tmp26_ = dvb_scanner_log; + _tmp27_ = pid; + _tmp28_ = program_number; + dvb_logging_logger_debug (_tmp26_, "Scanner.vala:732: Found video PID 0x%x for channel 0x%x", _tmp27_, _tmp28_); + _tmp29_ = dvb_channel; + _tmp30_ = pid; + dvb_channel_set_VideoPID (_tmp29_, _tmp30_); break; } case 0x03: @@ -1935,15 +2656,31 @@ case 0x0f: case 0x11: { - GeeList* _tmp10_ = NULL; - g_debug ("Scanner.vala:737: Found audio PID 0x%x for channel 0x%x", pid, program_number); - _tmp10_ = dvb_channel_get_AudioPIDs (dvb_channel); - gee_collection_add ((GeeCollection*) _tmp10_, GUINT_TO_POINTER (pid)); + DVBLoggingLogger* _tmp31_; + guint _tmp32_; + guint _tmp33_; + DVBChannel* _tmp34_; + GeeList* _tmp35_; + GeeList* _tmp36_; + guint _tmp37_; + _tmp31_ = dvb_scanner_log; + _tmp32_ = pid; + _tmp33_ = program_number; + dvb_logging_logger_debug (_tmp31_, "Scanner.vala:740: Found audio PID 0x%x for channel 0x%x", _tmp32_, _tmp33_); + _tmp34_ = dvb_channel; + _tmp35_ = dvb_channel_get_AudioPIDs (_tmp34_); + _tmp36_ = _tmp35_; + _tmp37_ = pid; + gee_collection_add ((GeeCollection*) _tmp36_, GUINT_TO_POINTER (_tmp37_)); break; } default: { - g_debug ("Scanner.vala:742: Other stream type: 0x%02x", stream_type); + DVBLoggingLogger* _tmp38_; + guint _tmp39_; + _tmp38_ = dvb_scanner_log; + _tmp39_ = stream_type; + dvb_logging_logger_debug (_tmp38_, "Scanner.vala:745: Other stream type: 0x%02x", _tmp39_); break; } } @@ -1957,48 +2694,85 @@ gboolean dvb_scanner_bus_watch_func (DVBScanner* self, GstBus* bus, GstMessage* message) { gboolean result = FALSE; - gboolean _tmp6_ = FALSE; - gboolean _tmp7_ = FALSE; - gboolean _tmp28_ = FALSE; - gboolean _tmp29_ = FALSE; - gboolean _tmp30_ = FALSE; + GstMessage* _tmp0_; + GstMessageType _tmp1_; + gboolean _tmp25_ = FALSE; + gboolean _tmp26_ = FALSE; + gboolean _tmp27_; + gboolean _tmp29_; + gboolean _tmp31_; + gboolean _tmp94_ = FALSE; + gboolean _tmp95_ = FALSE; + gboolean _tmp96_ = FALSE; + gboolean _tmp97_; + gboolean _tmp99_; + gboolean _tmp101_; + gboolean _tmp103_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (bus != NULL, FALSE); g_return_val_if_fail (message != NULL, FALSE); - switch (message->type) { + _tmp0_ = message; + _tmp1_ = _tmp0_->type; + switch (_tmp1_) { case GST_MESSAGE_ELEMENT: { { - const GstStructure* _tmp0_ = NULL; - GstStructure* _tmp1_; + GstMessage* _tmp2_; + const GstStructure* _tmp3_ = NULL; + GstStructure* _tmp4_; GstStructure* structure; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_; + const GstStructure* _tmp5_; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_; gchar* structure_name; - _tmp0_ = gst_message_get_structure (message); - _tmp1_ = _gst_structure_copy0 (_tmp0_); - structure = _tmp1_; - _tmp2_ = gst_structure_get_name (structure); - _tmp3_ = g_strdup (_tmp2_); - structure_name = _tmp3_; - if (g_strcmp0 (structure_name, "dvb-frontend-stats") == 0) { - dvb_scanner_on_dvb_frontend_stats_structure (self, structure); + const gchar* _tmp8_; + _tmp2_ = message; + _tmp3_ = gst_message_get_structure (_tmp2_); + _tmp4_ = _gst_structure_copy0 (_tmp3_); + structure = _tmp4_; + _tmp5_ = structure; + _tmp6_ = gst_structure_get_name (_tmp5_); + _tmp7_ = g_strdup (_tmp6_); + structure_name = _tmp7_; + _tmp8_ = structure_name; + if (g_strcmp0 (_tmp8_, "dvb-frontend-stats") == 0) { + const GstStructure* _tmp9_; + _tmp9_ = structure; + dvb_scanner_on_dvb_frontend_stats_structure (self, _tmp9_); } else { - if (g_strcmp0 (structure_name, "dvb-read-failure") == 0) { + const gchar* _tmp10_; + _tmp10_ = structure_name; + if (g_strcmp0 (_tmp10_, "dvb-read-failure") == 0) { dvb_scanner_on_dvb_read_failure_structure (self); } else { - if (g_strcmp0 (structure_name, "sdt") == 0) { - dvb_scanner_on_sdt_structure (self, structure); + const gchar* _tmp11_; + _tmp11_ = structure_name; + if (g_strcmp0 (_tmp11_, "sdt") == 0) { + const GstStructure* _tmp12_; + _tmp12_ = structure; + dvb_scanner_on_sdt_structure (self, _tmp12_); } else { - if (g_strcmp0 (structure_name, "nit") == 0) { - dvb_scanner_on_nit_structure (self, structure); + const gchar* _tmp13_; + _tmp13_ = structure_name; + if (g_strcmp0 (_tmp13_, "nit") == 0) { + const GstStructure* _tmp14_; + _tmp14_ = structure; + dvb_scanner_on_nit_structure (self, _tmp14_); } else { - if (g_strcmp0 (structure_name, "pat") == 0) { - dvb_scanner_on_pat_structure (self, structure); + const gchar* _tmp15_; + _tmp15_ = structure_name; + if (g_strcmp0 (_tmp15_, "pat") == 0) { + const GstStructure* _tmp16_; + _tmp16_ = structure; + dvb_scanner_on_pat_structure (self, _tmp16_); } else { - if (g_strcmp0 (structure_name, "pmt") == 0) { - dvb_scanner_on_pmt_structure (self, structure); + const gchar* _tmp17_; + _tmp17_ = structure_name; + if (g_strcmp0 (_tmp17_, "pmt") == 0) { + const GstStructure* _tmp18_; + _tmp18_ = structure; + dvb_scanner_on_pmt_structure (self, _tmp18_); } else { result = TRUE; _g_free0 (structure_name); @@ -2018,18 +2792,24 @@ case GST_MESSAGE_ERROR: { { - GError* gerror; - gchar* debug; - GError* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; - gerror = NULL; - debug = NULL; - gst_message_parse_error (message, &_tmp4_, &_tmp5_); + GError* gerror = NULL; + gchar* debug = NULL; + GstMessage* _tmp19_; + GError* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; + GError* _tmp22_; + const gchar* _tmp23_; + const gchar* _tmp24_; + _tmp19_ = message; + gst_message_parse_error (_tmp19_, &_tmp20_, &_tmp21_); _g_error_free0 (gerror); - gerror = _tmp4_; + gerror = _tmp20_; _g_free0 (debug); - debug = _tmp5_; - g_warning ("Scanner.vala:775: %s %s", gerror->message, debug); + debug = _tmp21_; + _tmp22_ = gerror; + _tmp23_ = _tmp22_->message; + _tmp24_ = debug; + g_warning ("Scanner.vala:778: %s %s", _tmp23_, _tmp24_); result = TRUE; _g_free0 (debug); _g_error_free0 (gerror); @@ -2042,120 +2822,214 @@ return result; } } - if (self->priv->nit_arrived) { - _tmp7_ = self->priv->sdt_arrived; + _tmp27_ = self->priv->nit_arrived; + if (_tmp27_) { + gboolean _tmp28_; + _tmp28_ = self->priv->sdt_arrived; + _tmp26_ = _tmp28_; } else { - _tmp7_ = FALSE; + _tmp26_ = FALSE; } - if (_tmp7_) { - _tmp6_ = self->priv->pat_arrived; + _tmp29_ = _tmp26_; + if (_tmp29_) { + gboolean _tmp30_; + _tmp30_ = self->priv->pat_arrived; + _tmp25_ = _tmp30_; } else { - _tmp6_ = FALSE; + _tmp25_ = FALSE; } - if (_tmp6_) { + _tmp31_ = _tmp25_; + if (_tmp31_) { { - GeeArrayList* _tmp8_ = NULL; - GeeArrayList* del_channels; + GeeArrayList* _tmp32_; + _tmp32_ = self->priv->new_channels; g_static_rec_mutex_lock (&self->priv->__lock_new_channels); - _tmp8_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); - del_channels = _tmp8_; { - GeeArrayList* _tmp9_; - GeeArrayList* _sid_list; - gint _tmp10_; - gint _sid_size; - gint _sid_index; - _tmp9_ = _g_object_ref0 (self->priv->new_channels); - _sid_list = _tmp9_; - _tmp10_ = gee_collection_get_size ((GeeCollection*) _sid_list); - _sid_size = _tmp10_; - _sid_index = -1; - while (TRUE) { - gpointer _tmp11_ = NULL; - guint sid; - DVBChannel* _tmp12_ = NULL; - DVBChannel* channel; - gboolean _tmp13_; - _sid_index = _sid_index + 1; - if (!(_sid_index < _sid_size)) { - break; - } - _tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _sid_list, _sid_index); - sid = GPOINTER_TO_UINT (_tmp11_); - _tmp12_ = dvb_channel_list_get_channel (self->channels, sid); - channel = _tmp12_; - _tmp13_ = dvb_channel_is_valid (channel); - if (_tmp13_) { - const gchar* _tmp14_; - gboolean _tmp15_; - gchar* _tmp16_; - gchar* type; - gchar* _tmp17_ = NULL; - gchar* _tmp18_; - guint _tmp19_; - const gchar* _tmp20_ = NULL; - const gchar* _tmp21_ = NULL; - gboolean _tmp22_; - _tmp14_ = NULL; - _tmp15_ = dvb_channel_is_radio (channel); - if (_tmp15_) { - _tmp14_ = "Radio"; + GeeArrayList* _tmp33_; + GeeArrayList* del_channels; + _tmp33_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); + del_channels = _tmp33_; + { + GeeArrayList* _tmp34_; + GeeArrayList* _tmp35_; + GeeArrayList* _sid_list; + GeeArrayList* _tmp36_; + gint _tmp37_; + gint _tmp38_; + gint _sid_size; + gint _sid_index; + _tmp34_ = self->priv->new_channels; + _tmp35_ = _g_object_ref0 (_tmp34_); + _sid_list = _tmp35_; + _tmp36_ = _sid_list; + _tmp37_ = gee_collection_get_size ((GeeCollection*) _tmp36_); + _tmp38_ = _tmp37_; + _sid_size = _tmp38_; + _sid_index = -1; + while (TRUE) { + gint _tmp39_; + gint _tmp40_; + gint _tmp41_; + GeeArrayList* _tmp42_; + gint _tmp43_; + gpointer _tmp44_ = NULL; + guint sid; + DVBChannelList* _tmp45_; + guint _tmp46_; + DVBChannel* _tmp47_ = NULL; + DVBChannel* channel; + DVBChannel* _tmp48_; + gboolean _tmp49_ = FALSE; + _tmp39_ = _sid_index; + _sid_index = _tmp39_ + 1; + _tmp40_ = _sid_index; + _tmp41_ = _sid_size; + if (!(_tmp40_ < _tmp41_)) { + break; + } + _tmp42_ = _sid_list; + _tmp43_ = _sid_index; + _tmp44_ = gee_abstract_list_get ((GeeAbstractList*) _tmp42_, _tmp43_); + sid = GPOINTER_TO_UINT (_tmp44_); + _tmp45_ = self->channels; + _tmp46_ = sid; + _tmp47_ = dvb_channel_list_get_channel (_tmp45_, _tmp46_); + channel = _tmp47_; + _tmp48_ = channel; + _tmp49_ = dvb_channel_is_valid (_tmp48_); + if (_tmp49_) { + const gchar* _tmp50_ = NULL; + DVBChannel* _tmp51_; + gboolean _tmp52_ = FALSE; + const gchar* _tmp53_; + gchar* _tmp54_; + gchar* type; + DVBLoggingLogger* _tmp55_; + DVBChannel* _tmp56_; + gchar* _tmp57_ = NULL; + gchar* _tmp58_; + DVBChannel* _tmp59_; + guint _tmp60_; + guint _tmp61_; + guint _tmp62_; + DVBChannel* _tmp63_; + const gchar* _tmp64_; + const gchar* _tmp65_; + DVBChannel* _tmp66_; + const gchar* _tmp67_; + const gchar* _tmp68_; + const gchar* _tmp69_; + DVBChannel* _tmp70_; + gboolean _tmp71_; + gboolean _tmp72_; + GeeArrayList* _tmp73_; + guint _tmp74_; + _tmp51_ = channel; + _tmp52_ = dvb_channel_is_radio (_tmp51_); + if (_tmp52_) { + _tmp50_ = "Radio"; + } else { + _tmp50_ = "TV"; + } + _tmp53_ = _tmp50_; + _tmp54_ = g_strdup (_tmp53_); + type = _tmp54_; + _tmp55_ = dvb_scanner_log; + _tmp56_ = channel; + _tmp57_ = dvb_channel_to_string (_tmp56_); + _tmp58_ = _tmp57_; + dvb_logging_logger_debug (_tmp55_, "Scanner.vala:797: Channel added: %s", _tmp58_); + _g_free0 (_tmp58_); + _tmp59_ = channel; + _tmp60_ = dvb_channel_get_Frequency (_tmp59_); + _tmp61_ = _tmp60_; + _tmp62_ = sid; + _tmp63_ = channel; + _tmp64_ = dvb_channel_get_Name (_tmp63_); + _tmp65_ = _tmp64_; + _tmp66_ = channel; + _tmp67_ = dvb_channel_get_Network (_tmp66_); + _tmp68_ = _tmp67_; + _tmp69_ = type; + _tmp70_ = channel; + _tmp71_ = dvb_channel_get_Scrambled (_tmp70_); + _tmp72_ = _tmp71_; + g_signal_emit_by_name (self, "channel-added", _tmp61_, _tmp62_, _tmp65_, _tmp68_, _tmp69_, _tmp72_); + _tmp73_ = del_channels; + _tmp74_ = sid; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp73_, GUINT_TO_POINTER (_tmp74_)); + _g_free0 (type); } else { - _tmp14_ = "TV"; + DVBLoggingLogger* _tmp75_; + guint _tmp76_; + DVBChannel* _tmp77_; + gchar* _tmp78_ = NULL; + gchar* _tmp79_; + _tmp75_ = dvb_scanner_log; + _tmp76_ = sid; + _tmp77_ = channel; + _tmp78_ = dvb_channel_to_string (_tmp77_); + _tmp79_ = _tmp78_; + dvb_logging_logger_debug (_tmp75_, "Scanner.vala:804: Channel 0x%x is not valid: %s", _tmp76_, _tmp79_); + _g_free0 (_tmp79_); + self->priv->pmt_arrived = FALSE; } - _tmp16_ = g_strdup (_tmp14_); - type = _tmp16_; - _tmp17_ = dvb_channel_to_string (channel); - _tmp18_ = _tmp17_; - g_debug ("Scanner.vala:794: Channel added: %s", _tmp18_); - _g_free0 (_tmp18_); - _tmp19_ = dvb_channel_get_Frequency (channel); - _tmp20_ = dvb_channel_get_Name (channel); - _tmp21_ = dvb_channel_get_Network (channel); - _tmp22_ = dvb_channel_get_Scrambled (channel); - g_signal_emit_by_name (self, "channel-added", _tmp19_, sid, _tmp20_, _tmp21_, type, _tmp22_); - gee_abstract_collection_add ((GeeAbstractCollection*) del_channels, GUINT_TO_POINTER (sid)); - _g_free0 (type); - } else { - gchar* _tmp23_ = NULL; - gchar* _tmp24_; - _tmp23_ = dvb_channel_to_string (channel); - _tmp24_ = _tmp23_; - g_debug ("Scanner.vala:801: Channel 0x%x is not valid: %s", sid, _tmp24_); - _g_free0 (_tmp24_); - self->priv->pmt_arrived = FALSE; + _g_object_unref0 (channel); } - _g_object_unref0 (channel); + _g_object_unref0 (_sid_list); } - _g_object_unref0 (_sid_list); - } - { - GeeArrayList* _tmp25_; - GeeArrayList* _sid_list; - gint _tmp26_; - gint _sid_size; - gint _sid_index; - _tmp25_ = _g_object_ref0 (del_channels); - _sid_list = _tmp25_; - _tmp26_ = gee_collection_get_size ((GeeCollection*) _sid_list); - _sid_size = _tmp26_; - _sid_index = -1; - while (TRUE) { - gpointer _tmp27_ = NULL; - guint sid; - _sid_index = _sid_index + 1; - if (!(_sid_index < _sid_size)) { - break; + { + GeeArrayList* _tmp80_; + GeeArrayList* _tmp81_; + GeeArrayList* _sid_list; + GeeArrayList* _tmp82_; + gint _tmp83_; + gint _tmp84_; + gint _sid_size; + gint _sid_index; + _tmp80_ = del_channels; + _tmp81_ = _g_object_ref0 (_tmp80_); + _sid_list = _tmp81_; + _tmp82_ = _sid_list; + _tmp83_ = gee_collection_get_size ((GeeCollection*) _tmp82_); + _tmp84_ = _tmp83_; + _sid_size = _tmp84_; + _sid_index = -1; + while (TRUE) { + gint _tmp85_; + gint _tmp86_; + gint _tmp87_; + GeeArrayList* _tmp88_; + gint _tmp89_; + gpointer _tmp90_ = NULL; + guint sid; + GeeArrayList* _tmp91_; + guint _tmp92_; + _tmp85_ = _sid_index; + _sid_index = _tmp85_ + 1; + _tmp86_ = _sid_index; + _tmp87_ = _sid_size; + if (!(_tmp86_ < _tmp87_)) { + break; + } + _tmp88_ = _sid_list; + _tmp89_ = _sid_index; + _tmp90_ = gee_abstract_list_get ((GeeAbstractList*) _tmp88_, _tmp89_); + sid = GPOINTER_TO_UINT (_tmp90_); + _tmp91_ = self->priv->new_channels; + _tmp92_ = sid; + gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp91_, GUINT_TO_POINTER (_tmp92_)); } - _tmp27_ = gee_abstract_list_get ((GeeAbstractList*) _sid_list, _sid_index); - sid = GPOINTER_TO_UINT (_tmp27_); - gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->new_channels, GUINT_TO_POINTER (sid)); + _g_object_unref0 (_sid_list); } - _g_object_unref0 (_sid_list); + _g_object_unref0 (del_channels); + } + __finally160: + { + GeeArrayList* _tmp93_; + _tmp93_ = self->priv->new_channels; + g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); } - _g_object_unref0 (del_channels); - __finally149: - g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -2163,22 +3037,32 @@ } } } - if (self->priv->sdt_arrived) { - _tmp30_ = self->priv->nit_arrived; + _tmp97_ = self->priv->sdt_arrived; + if (_tmp97_) { + gboolean _tmp98_; + _tmp98_ = self->priv->nit_arrived; + _tmp96_ = _tmp98_; + } else { + _tmp96_ = FALSE; + } + _tmp99_ = _tmp96_; + if (_tmp99_) { + gboolean _tmp100_; + _tmp100_ = self->priv->pat_arrived; + _tmp95_ = _tmp100_; + } else { + _tmp95_ = FALSE; + } + _tmp101_ = _tmp95_; + if (_tmp101_) { + gboolean _tmp102_; + _tmp102_ = self->priv->pmt_arrived; + _tmp94_ = _tmp102_; } else { - _tmp30_ = FALSE; + _tmp94_ = FALSE; } - if (_tmp30_) { - _tmp29_ = self->priv->pat_arrived; - } else { - _tmp29_ = FALSE; - } - if (_tmp29_) { - _tmp28_ = self->priv->pmt_arrived; - } else { - _tmp28_ = FALSE; - } - if (_tmp28_) { + _tmp103_ = _tmp94_; + if (_tmp103_) { dvb_scanner_remove_wait_for_tables_timeout (self); dvb_scanner_queue_start_scan (self); } @@ -2188,21 +3072,43 @@ void dvb_scanner_add_new_channel (DVBScanner* self, guint sid) { - DVBChannel* _tmp0_ = NULL; + DVBLoggingLogger* _tmp0_; + guint _tmp1_; + DVBChannel* _tmp2_ = NULL; DVBChannel* new_channel; + guint _tmp3_; + const GstStructure* _tmp4_; + DVBChannelList* _tmp5_; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_debug ("Scanner.vala:827: Adding new channel with SID 0x%x", sid); - _tmp0_ = dvb_scanner_get_new_channel (self); - new_channel = _tmp0_; - dvb_channel_set_Sid (new_channel, sid); - dvb_scanner_add_values_from_structure_to_channel (self, self->current_tuning_params, new_channel); - dvb_channel_list_add (self->channels, new_channel); + _tmp0_ = dvb_scanner_log; + _tmp1_ = sid; + dvb_logging_logger_debug (_tmp0_, "Scanner.vala:830: Adding new channel with SID 0x%x", _tmp1_); + _tmp2_ = dvb_scanner_get_new_channel (self); + new_channel = _tmp2_; + _tmp3_ = sid; + dvb_channel_set_Sid (new_channel, _tmp3_); + _tmp4_ = self->current_tuning_params; + dvb_scanner_add_values_from_structure_to_channel (self, _tmp4_, new_channel); + _tmp5_ = self->channels; + dvb_channel_list_add (_tmp5_, new_channel); { + GeeArrayList* _tmp6_; + _tmp6_ = self->priv->new_channels; g_static_rec_mutex_lock (&self->priv->__lock_new_channels); - gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->new_channels, GUINT_TO_POINTER (sid)); - __finally150: - g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); + { + GeeArrayList* _tmp7_; + guint _tmp8_; + _tmp7_ = self->priv->new_channels; + _tmp8_ = sid; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, GUINT_TO_POINTER (_tmp8_)); + } + __finally161: + { + GeeArrayList* _tmp9_; + _tmp9_ = self->priv->new_channels; + g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); + } if (_inner_error_ != NULL) { _g_object_unref0 (new_channel); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -2223,8 +3129,10 @@ DVBDevice* dvb_scanner_get_Device (DVBScanner* self) { DVBDevice* result; + DVBDevice* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Device; + _tmp0_ = self->priv->_Device; + result = _tmp0_; return result; } @@ -2233,8 +3141,8 @@ DVBDevice* _tmp0_; DVBDevice* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_Device); self->priv->_Device = _tmp1_; g_object_notify ((GObject *) self, "Device"); @@ -2243,8 +3151,10 @@ DVBChannelList* dvb_scanner_get_Channels (DVBScanner* self) { DVBChannelList* result; + DVBChannelList* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->channels; + _tmp0_ = self->channels; + result = _tmp0_; return result; } @@ -2253,7 +3163,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2); register GMarshalFunc_VOID__UINT_UINT callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -2272,7 +3183,8 @@ typedef void (*GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (gpointer data1, guint arg_1, guint arg_2, const char* arg_3, const char* arg_4, const char* arg_5, gboolean arg_6, gpointer data2); register GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 7); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -2291,7 +3203,8 @@ typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE) (gpointer data1, gdouble arg_1, gdouble arg_2, gpointer data2); register GMarshalFunc_VOID__DOUBLE_DOUBLE callback; register GCClosure * cc; - register gpointer data1, data2; + register gpointer data1; + register gpointer data2; cc = (GCClosure *) closure; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { @@ -2324,39 +3237,33 @@ GObject * obj; GObjectClass * parent_class; DVBScanner * self; - GeeHashSet* _tmp0_ = NULL; - GeeHashSet* _tmp1_; - GeeArrayList* _tmp2_ = NULL; - GeeArrayList* _tmp3_; - GQueue* _tmp4_ = NULL; - GQueue* _tmp5_; - GMainContext* _tmp6_ = NULL; - GMainContext* _tmp7_; + GeeHashSet* _tmp0_; + GeeArrayList* _tmp1_; + GQueue* _tmp2_; + GMainContext* _tmp3_; parent_class = G_OBJECT_CLASS (dvb_scanner_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_SCANNER (obj); _tmp0_ = gee_hash_set_new (DVB_TYPE_SCANNED_ITEM, (GBoxedCopyFunc) g_object_ref, g_object_unref, _dvb_scanned_item_hash_ghash_func, _dvb_scanned_item_equal_gequal_func); - _tmp1_ = _tmp0_; _g_object_unref0 (self->scanned_frequencies); - self->scanned_frequencies = _tmp1_; - _tmp2_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); - _tmp3_ = _tmp2_; + self->scanned_frequencies = _tmp0_; + _tmp1_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); _g_object_unref0 (self->priv->new_channels); - self->priv->new_channels = _tmp3_; - _tmp4_ = g_queue_new (); - _tmp5_ = _tmp4_; + self->priv->new_channels = _tmp1_; + _tmp2_ = g_queue_new (); _g_queue_free0 (self->frequencies); - self->frequencies = _tmp5_; - _tmp6_ = g_main_context_new (); - _tmp7_ = _tmp6_; + self->frequencies = _tmp2_; + _tmp3_ = g_main_context_new (); _g_main_context_unref0 (self->priv->context); - self->priv->context = _tmp7_; + self->priv->context = _tmp3_; self->priv->running = FALSE; return obj; } static void dvb_scanner_class_init (DVBScannerClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_scanner_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBScannerPrivate)); DVB_SCANNER_CLASS (klass)->prepare = dvb_scanner_real_prepare; @@ -2398,6 +3305,9 @@ * Emitted when all frequencies have been scanned */ g_signal_new ("finished", DVB_TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_scanner_log = _tmp1_; } diff -Nru gnome-dvb-daemon-0.1.23/src/Scanner.vala gnome-dvb-daemon-0.2.7/src/Scanner.vala --- gnome-dvb-daemon-0.1.23/src/Scanner.vala 2010-11-18 11:40:54.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Scanner.vala 2011-04-26 16:38:28.000000000 +0000 @@ -19,6 +19,7 @@ using GLib; using Gee; +using DVB.Logging; namespace DVB { @@ -27,6 +28,8 @@ */ public abstract class Scanner : GLib.Object { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + /** * Emitted when the Destroy () method is called */ @@ -107,7 +110,7 @@ private bool locked; private MainContext context; private MainLoop loop; - private unowned Thread worker_thread; + private unowned Thread worker_thread; private bool running; private uint bus_watch_id; @@ -149,15 +152,15 @@ /** * Start the scanner */ - public void Run () throws DBus.Error { + public void Run () throws DBusError { if (this.running) return; this.running = true; this.loop = new MainLoop (this.context, false); try { - this.worker_thread = Thread.create (this.worker, true); + this.worker_thread = Thread.create (this.worker, true); } catch (ThreadError e) { - critical ("Could not create thread: %s", e.message); + log.error ("Could not create thread: %s", e.message); return; } @@ -168,7 +171,7 @@ PIPELINE_TEMPLATE.printf (this.Device.Adapter, this.Device.Frontend, BASE_PIDS)); } catch (Error e) { - critical ("Could not create pipeline: %s", e.message); + log.error ("Could not create pipeline: %s", e.message); return; } @@ -184,7 +187,7 @@ /** * Abort scanning and cleanup */ - public void Destroy () throws DBus.Error { + public void Destroy () throws DBusError { this.do_destroy (); } @@ -210,14 +213,14 @@ * * Write all the channels stored in this.Channels to file */ - public bool WriteAllChannelsToFile (string path) throws DBus.Error { + public bool WriteAllChannelsToFile (string path) throws DBusError { bool success = true; var writer = new io.ChannelListWriter (File.new_for_path (path)); foreach (DVB.Channel c in this.channels) { try { writer.write (c); } catch (Error e) { - critical ("Could not write to file: %s", e.message); + log.error ("Could not write to file: %s", e.message); success = false; } } @@ -225,7 +228,7 @@ try { writer.close (); } catch (Error e) { - critical ("Could not close file handle: %s", e.message); + log.error ("Could not close file handle: %s", e.message); success = false; } @@ -239,7 +242,7 @@ * Write the channels with the given SIDs to file @path */ public bool WriteChannelsToFile (uint[] channel_sids, string path) - throws DBus.Error + throws DBusError { bool success = true; var writer = new io.ChannelListWriter (File.new_for_path (path)); @@ -252,7 +255,7 @@ try { writer.write (c); } catch (Error e) { - critical ("Could not write to file: %s", e.message); + log.error ("Could not write to file: %s", e.message); success = false; } } @@ -260,17 +263,17 @@ try { writer.close (); } catch (Error e) { - critical ("Could not close file handle: %s", e.message); + log.error ("Could not close file handle: %s", e.message); success = false; } return success; } - public bool AddScanningDataFromFile (string path) throws DBus.Error { + public bool AddScanningDataFromFile (string path) throws DBusError { File datafile = File.new_for_path(path); - debug ("Reading scanning data from %s", path); + log.debug ("Reading scanning data from %s", path); if (!Utils.is_readable_file (datafile)) return false; @@ -278,7 +281,7 @@ try { reader = new DataInputStream (datafile.read (null)); } catch (Error e) { - critical ("Could not open %s: %s", path, e.message); + log.error ("Could not open %s: %s", path, e.message); return false; } @@ -294,14 +297,14 @@ this.add_scanning_data_from_string (line); } } catch (Error e) { - critical ("Could not read %s: %s", path, e.message); + log.error ("Could not read %s: %s", path, e.message); return false; } try { reader.close (null); } catch (Error e) { - critical ("Could not close file handle: %s", e.message); + log.error ("Could not close file handle: %s", e.message); return false; } @@ -309,10 +312,10 @@ } /* Main Thread */ - private bool worker () { + private void* worker () { this.loop.run (); - return true; + return null; } protected void clear_and_reset_all () { @@ -323,7 +326,7 @@ bus_watch_source.destroy (); this.bus_watch_id = 0; } - debug ("Disposing pipeline"); + log.debug ("Disposing pipeline"); this.pipeline.set_state (Gst.State.NULL); // Free pipeline this.pipeline = null; @@ -351,7 +354,7 @@ ScannedItem item = this.get_scanned_item (structure); if (!this.scanned_frequencies.contains (item)) { - debug ("Queueing new frequency %u", item.Frequency); + log.debug ("Queueing new frequency %u", item.Frequency); this.frequencies.push_tail (structure); this.scanned_frequencies.add (item); } @@ -364,7 +367,7 @@ protected bool start_scan () { bool all_tables = (this.sdt_arrived && this.nit_arrived && this.pat_arrived && this.pmt_arrived); - debug ("Received all tables: %s (pat: %s, sdt: %s, nit: %s, pmt: %s)", + log.debug ("Received all tables: %s (pat: %s, sdt: %s, nit: %s, pmt: %s)", all_tables.to_string (), this.pat_arrived.to_string (), this.sdt_arrived.to_string (), this.nit_arrived.to_string (), this.pmt_arrived.to_string ()); @@ -386,7 +389,7 @@ // We don't have all the information for those channels // remove them lock (this.new_channels) { - debug ("%u channels still have missing or invalid information", + log.debug ("%u channels still have missing or invalid information", this.new_channels.size); foreach (uint sid in this.new_channels) { this.channels.remove (sid); @@ -473,7 +476,7 @@ /* Avoid creating source multiple times */ if (this.start_scan_source == null || this.start_scan_source.is_destroyed ()) { - debug ("Queueing start_scan"); + log.debug ("Queueing start_scan"); this.start_scan_source = new IdleSource (); this.start_scan_source.set_callback (this.start_scan); this.start_scan_source.attach (this.context); @@ -549,7 +552,7 @@ i++; } - debug ("Setting %d pids: %s", pid_set.size, new_pids.str); + log.debug ("Setting %d pids: %s", pid_set.size, new_pids.str); // We want to parse the pmt as well Gst.Element dvbsrc = ((Gst.Bin)this.pipeline).get_by_name ("dvbsrc"); dvbsrc.set ("pids", new_pids.str); @@ -576,7 +579,7 @@ // Returns "service-%d" string name = service.get_name (); // Get the number at the end - int sid = name.substring (8, name.length - 8).to_int (); + int sid = int.parse (name.substring (8, name.length - 8)); if (service.has_field ("name")) name = service.get_string ("name"); @@ -607,7 +610,7 @@ channel.Network = ""; } - debug ("Found service 0x%x, %s, scrambled: %s", sid, + log.debug ("Found service 0x%x, %s, scrambled: %s", sid, channel.Name, channel.Scrambled.to_string ()); } @@ -630,7 +633,7 @@ structure.get_uint ("network-id", out nid); name = "%u".printf (nid); } - debug ("Network name '%s'", name); + log.debug ("Network name '%s'", name); Gst.Value transports = structure.get_value ("transports"); uint size = transports.list_get_size (); @@ -649,7 +652,7 @@ weak Gst.Structure delivery = delivery_val.get_structure (); - debug ("Received TS 0x%x", tsid); + log.debug ("Received TS 0x%x", tsid); uint freq; delivery.get_uint ("frequency", out freq); @@ -694,7 +697,7 @@ } protected void on_pmt_structure (Gst.Structure structure) { - debug ("Received PMT"); + log.debug ("Received PMT"); uint program_number; structure.get_uint ("program-number", out program_number); @@ -726,7 +729,7 @@ case 0x01: case 0x02: case 0x1b: /* H.264 video stream */ - debug ("Found video PID 0x%x for channel 0x%x", + log.debug ("Found video PID 0x%x for channel 0x%x", pid, program_number); dvb_channel.VideoPID = pid; break; @@ -734,12 +737,12 @@ case 0x04: case 0x0f: case 0x11: - debug ("Found audio PID 0x%x for channel 0x%x", + log.debug ("Found audio PID 0x%x for channel 0x%x", pid, program_number); dvb_channel.AudioPIDs.add (pid); break; default: - debug ("Other stream type: 0x%02x", stream_type); + log.debug ("Other stream type: 0x%02x", stream_type); break; } } @@ -791,14 +794,14 @@ // because we didn't came across the sdt or pmt, yet if (channel.is_valid ()) { string type = (channel.is_radio ()) ? "Radio" : "TV"; - debug ("Channel added: %s", channel.to_string ()); + log.debug ("Channel added: %s", channel.to_string ()); this.channel_added (channel.Frequency, sid, channel.Name, channel.Network, type, channel.Scrambled); // Mark channel for deletion of this.new_channels del_channels.add (sid); } else { - debug ("Channel 0x%x is not valid: %s", sid, + log.debug ("Channel 0x%x is not valid: %s", sid, channel.to_string ()); this.pmt_arrived = false; } @@ -824,7 +827,7 @@ } protected void add_new_channel (uint sid) { - debug ("Adding new channel with SID 0x%x", sid); + log.debug ("Adding new channel with SID 0x%x", sid); Channel new_channel = this.get_new_channel (); new_channel.Sid = sid; // add values from Gst.Structure to Channel diff -Nru gnome-dvb-daemon-0.1.23/src/Schedule.c gnome-dvb-daemon-0.2.7/src/Schedule.c --- gnome-dvb-daemon-0.1.23/src/Schedule.c 2011-01-14 16:56:07.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Schedule.c 2011-09-29 19:59:31.000000000 +0000 @@ -1,4 +1,4 @@ -/* Schedule.c generated by valac 0.11.3, the Vala compiler +/* Schedule.c generated by valac 0.14.0, the Vala compiler * generated from Schedule.vala, do not modify */ /* @@ -22,12 +22,10 @@ #include #include -#include -#include +#include #include #include #include -#include #include #include #include @@ -41,6 +39,8 @@ typedef struct _DVBIDBusSchedule DVBIDBusSchedule; typedef struct _DVBIDBusScheduleIface DVBIDBusScheduleIface; +#define DVB_TYPE_ID_BUS_SCHEDULE_PROXY (dvb_id_bus_schedule_proxy_get_type ()) + #define DVB_TYPE_EVENT_INFO (dvb_event_info_get_type ()) typedef struct _DVBEventInfo DVBEventInfo; @@ -92,10 +92,30 @@ typedef struct _DVBEventStorage DVBEventStorage; typedef struct _DVBEventStorageClass DVBEventStorageClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) #define _dvb_event_unref0(var) ((var == NULL) ? NULL : (var = (dvb_event_unref (var), NULL))) +typedef struct _DvbScheduleRestoreData DvbScheduleRestoreData; #define DVB_TYPE_EVENT_ELEMENT (dvb_event_element_get_type ()) #define DVB_EVENT_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EVENT_ELEMENT, DVBEventElement)) @@ -150,6 +170,16 @@ typedef struct _DVBEventTeletextComponentClass DVBEventTeletextComponentClass; #define _g_free0(var) (var = (g_free (var), NULL)) +#define DVB_TYPE_FACTORY (dvb_factory_get_type ()) +#define DVB_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_FACTORY, DVBFactory)) +#define DVB_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_FACTORY, DVBFactoryClass)) +#define DVB_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_FACTORY)) +#define DVB_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_FACTORY)) +#define DVB_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_FACTORY, DVBFactoryClass)) + +typedef struct _DVBFactory DVBFactory; +typedef struct _DVBFactoryClass DVBFactoryClass; + struct _DVBEventInfo { guint32 id; guint32 next; @@ -231,8 +261,68 @@ GStaticRecMutex __lock_events; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); +struct _DvbScheduleRestoreData { + int _state_; + GObject* _source_object_; + GAsyncResult* _res_; + GSimpleAsyncResult* _async_result; + DVBSchedule* self; + GeeList* levents; + DVBdatabaseEPGStore* _tmp0_; + DVBChannel* _tmp1_; + guint _tmp2_; + guint _tmp3_; + DVBChannel* _tmp4_; + guint _tmp5_; + guint _tmp6_; + GeeList* _tmp7_; + GeeList* _tmp8_; + GError* e1; + DVBLoggingLogger* _tmp9_; + GError* _tmp10_; + const gchar* _tmp11_; + gint newest_expired; + DVBEvent* event; + gint i; + gboolean _tmp12_; + gboolean _tmp13_; + gint _tmp14_; + gint _tmp15_; + GeeList* _tmp16_; + gint _tmp17_; + gint _tmp18_; + GeeList* _tmp19_; + gint _tmp20_; + gpointer _tmp21_; + DVBEvent* _tmp22_; + gboolean _tmp23_; + gint _tmp24_; + DVBEventStorage* _tmp25_; + DVBEvent* _tmp26_; + gint _tmp27_; + GeeList* _tmp28_; + gint _tmp29_; + gpointer _tmp30_; + DVBdatabaseEPGStore* _tmp31_; + DVBEvent* _tmp32_; + DVBChannel* _tmp33_; + guint _tmp34_; + guint _tmp35_; + DVBChannel* _tmp36_; + guint _tmp37_; + guint _tmp38_; + GError* e2; + DVBLoggingLogger* _tmp39_; + GError* _tmp40_; + const gchar* _tmp41_; + DVBLoggingLogger* _tmp42_; + DVBEventStorage* _tmp43_; + gint _tmp44_; + gint _tmp45_; + DVBChannel* _tmp46_; + guint _tmp47_; + guint _tmp48_; + GError * _inner_error_; }; struct _DVBEventElement { @@ -275,11 +365,14 @@ static gpointer dvb_schedule_parent_class = NULL; +static DVBLoggingLogger* dvb_schedule_log; +static DVBLoggingLogger* dvb_schedule_log = NULL; static GStaticRecMutex dvb_schedule_mutex; static GStaticRecMutex dvb_schedule_mutex = {0}; static DVBIDBusScheduleIface* dvb_schedule_dvb_id_bus_schedule_parent_iface = NULL; -DVBIDBusSchedule* dvb_id_bus_schedule_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_schedule_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_schedule_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); GType dvb_event_info_get_type (void) G_GNUC_CONST; DVBEventInfo* dvb_event_info_dup (const DVBEventInfo* self); void dvb_event_info_free (DVBEventInfo* self); @@ -303,26 +396,29 @@ DVB_SCHEDULE_DUMMY_PROPERTY, DVB_SCHEDULE_CHANNEL }; -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_schedule_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_schedule_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_schedule_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_schedule_introspect (DVBSchedule* self, DBusConnection* connection, DBusMessage* message); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_SCHEDULE_MATCH_THRESHOLD 100 #define DVB_SCHEDULE_MIN_EVENT_OVERLAP 0.5 -static gboolean dvb_schedule_restore (DVBSchedule* self); +static void dvb_schedule_restore_data_free (gpointer _data); +void dvb_schedule_restore (DVBSchedule* self, GAsyncReadyCallback _callback_, gpointer _user_data_); +void dvb_schedule_restore_finish (DVBSchedule* self, GAsyncResult* _res_); +static gboolean dvb_schedule_restore_co (DvbScheduleRestoreData* _data_); GeeList* dvb_database_epg_store_get_events (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); DVBChannel* dvb_schedule_get_channel (DVBSchedule* self); guint dvb_channel_get_Sid (DVBChannel* self); guint dvb_channel_get_GroupId (DVBChannel* self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); gboolean dvb_event_has_expired (DVBEvent* self); void dvb_event_storage_insert (DVBEventStorage* self, DVBEvent* event); gboolean dvb_database_epg_store_remove_events_older_than (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); +gint dvb_event_storage_get_size (DVBEventStorage* self); DVBSchedule* dvb_schedule_new (DVBChannel* channel); DVBSchedule* dvb_schedule_construct (GType object_type, DVBChannel* channel); void dvb_schedule_remove_expired_events (DVBSchedule* self); -gint dvb_event_storage_get_size (DVBEventStorage* self); GType dvb_event_element_get_type (void) G_GNUC_CONST; DVBEventElement* dvb_event_storage_get (DVBEventStorage* self, gint index); DVBEvent* dvb_schedule_get_event (DVBSchedule* self, guint event_id); @@ -394,227 +490,226 @@ static GObject * dvb_schedule_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); DVBEventStorage* dvb_event_storage_new (void); DVBEventStorage* dvb_event_storage_construct (GType object_type); -DVBdatabaseEPGStore* dvb_factory_get_epg_store (void); -static gboolean _dvb_schedule_restore_gsource_func (gpointer self); +DVBFactory* dvb_factory_new (void); +DVBFactory* dvb_factory_construct (GType object_type); +GType dvb_factory_get_type (void) G_GNUC_CONST; +DVBdatabaseEPGStore* dvb_factory_get_epg_store (DVBFactory* self); static void dvb_schedule_finalize (GObject* obj); static void _vala_dvb_schedule_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void _vala_dvb_schedule_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static const DBusObjectPathVTable _dvb_schedule_dbus_path_vtable = {_dvb_schedule_dbus_unregister, dvb_schedule_dbus_message}; -static const _DBusObjectVTable _dvb_schedule_dbus_vtable = {dvb_schedule_dbus_register_object}; - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); +static void dvb_schedule_restore_data_free (gpointer _data) { + DvbScheduleRestoreData* _data_; + _data_ = _data; + _g_object_unref0 (_data_->self); + g_slice_free (DvbScheduleRestoreData, _data_); } -void _dvb_schedule_dbus_unregister (DBusConnection* connection, void* _user_data_) { +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; } -static DBusHandlerResult _dbus_dvb_schedule_introspect (DVBSchedule* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +void dvb_schedule_restore (DVBSchedule* self, GAsyncReadyCallback _callback_, gpointer _user_data_) { + DvbScheduleRestoreData* _data_; + DVBSchedule* _tmp0_; + _data_ = g_slice_new0 (DvbScheduleRestoreData); + _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, dvb_schedule_restore); + g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, dvb_schedule_restore_data_free); + _tmp0_ = _g_object_ref0 (self); + _data_->self = _tmp0_; + dvb_schedule_restore_co (_data_); } -DBusHandlerResult dvb_schedule_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_schedule_introspect (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { - return result; - } else if (dvb_id_bus_schedule_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } +void dvb_schedule_restore_finish (DVBSchedule* self, GAsyncResult* _res_) { + DvbScheduleRestoreData* _data_; + _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); } -void dvb_schedule_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_schedule_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); +static gboolean dvb_schedule_restore_co (DvbScheduleRestoreData* _data_) { + switch (_data_->_state_) { + case 0: + goto _state_0; + default: + g_assert_not_reached (); } - dvb_id_bus_schedule_dbus_register_object (connection, path, object); -} - - -static gboolean dvb_schedule_restore (DVBSchedule* self) { - gboolean result = FALSE; - GeeList* levents; - guint _tmp0_; - guint _tmp1_; - GeeList* _tmp2_ = NULL; - GeeList* _tmp3_; - GeeList* _tmp4_; - gint newest_expired; - guint _tmp12_; - GError * _inner_error_ = NULL; - g_return_val_if_fail (self != NULL, FALSE); - levents = NULL; - _tmp0_ = dvb_channel_get_Sid (self->priv->_channel); - _tmp1_ = dvb_channel_get_GroupId (self->priv->_channel); - _tmp2_ = dvb_database_epg_store_get_events (self->priv->epgstore, _tmp0_, _tmp1_, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch151_dvb_database_sql_error; + _state_0: + { + _data_->_tmp0_ = _data_->self->priv->epgstore; + _data_->_tmp1_ = _data_->self->priv->_channel; + _data_->_tmp2_ = dvb_channel_get_Sid (_data_->_tmp1_); + _data_->_tmp3_ = _data_->_tmp2_; + _data_->_tmp4_ = _data_->self->priv->_channel; + _data_->_tmp5_ = dvb_channel_get_GroupId (_data_->_tmp4_); + _data_->_tmp6_ = _data_->_tmp5_; + _data_->_tmp7_ = NULL; + _data_->_tmp7_ = dvb_database_epg_store_get_events (_data_->_tmp0_, _data_->_tmp3_, _data_->_tmp6_, &_data_->_inner_error_); + _data_->_tmp8_ = _data_->_tmp7_; + if (_data_->_inner_error_ != NULL) { + if (_data_->_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch162_dvb_database_sql_error; + } + _g_object_unref0 (_data_->levents); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); + g_clear_error (&_data_->_inner_error_); + return FALSE; } - _g_object_unref0 (levents); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; + _g_object_unref0 (_data_->levents); + _data_->levents = _data_->_tmp8_; } - _tmp4_ = _tmp3_; - _g_object_unref0 (levents); - levents = _tmp4_; - goto __finally151; - __catch151_dvb_database_sql_error: + goto __finally162; + __catch162_dvb_database_sql_error: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Schedule.vala:55: %s", e->message); - result = FALSE; - _g_error_free0 (e); - _g_object_unref0 (levents); - return result; + _data_->e1 = _data_->_inner_error_; + _data_->_inner_error_ = NULL; + _data_->_tmp9_ = dvb_schedule_log; + _data_->_tmp10_ = _data_->e1; + _data_->_tmp11_ = _data_->_tmp10_->message; + dvb_logging_logger_error (_data_->_tmp9_, "Schedule.vala:56: %s", _data_->_tmp11_); + _g_error_free0 (_data_->e1); + _g_object_unref0 (_data_->levents); + if (_data_->_state_ == 0) { + g_simple_async_result_complete_in_idle (_data_->_async_result); + } else { + g_simple_async_result_complete (_data_->_async_result); + } + g_object_unref (_data_->_async_result); + return FALSE; } - __finally151: - if (_inner_error_ != NULL) { - _g_object_unref0 (levents); - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); + __finally162: + if (_data_->_inner_error_ != NULL) { + _g_object_unref0 (_data_->levents); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); + g_clear_error (&_data_->_inner_error_); return FALSE; } - newest_expired = -1; + _data_->newest_expired = -1; { - gint i; - i = 0; + _data_->i = 0; { - gboolean _tmp5_; - _tmp5_ = TRUE; + _data_->_tmp12_ = TRUE; while (TRUE) { - gint _tmp6_; - gpointer _tmp7_ = NULL; - DVBEvent* event; - gboolean _tmp8_; - if (!_tmp5_) { - i++; - } - _tmp5_ = FALSE; - _tmp6_ = gee_collection_get_size ((GeeCollection*) levents); - if (!(i < _tmp6_)) { + _data_->_tmp13_ = _data_->_tmp12_; + if (!_data_->_tmp13_) { + _data_->_tmp14_ = _data_->i; + _data_->i = _data_->_tmp14_ + 1; + } + _data_->_tmp12_ = FALSE; + _data_->_tmp15_ = _data_->i; + _data_->_tmp16_ = _data_->levents; + _data_->_tmp17_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp16_); + _data_->_tmp18_ = _data_->_tmp17_; + if (!(_data_->_tmp15_ < _data_->_tmp18_)) { break; } - _tmp7_ = gee_list_get (levents, i); - event = (DVBEvent*) _tmp7_; - _tmp8_ = dvb_event_has_expired (event); - if (_tmp8_) { - newest_expired = i; + _data_->_tmp19_ = _data_->levents; + _data_->_tmp20_ = _data_->i; + _data_->_tmp21_ = NULL; + _data_->_tmp21_ = gee_list_get (_data_->_tmp19_, _data_->_tmp20_); + _dvb_event_unref0 (_data_->event); + _data_->event = (DVBEvent*) _data_->_tmp21_; + _data_->_tmp22_ = _data_->event; + _data_->_tmp23_ = FALSE; + _data_->_tmp23_ = dvb_event_has_expired (_data_->_tmp22_); + if (_data_->_tmp23_) { + _data_->_tmp24_ = _data_->i; + _data_->newest_expired = _data_->_tmp24_; } else { - dvb_event_storage_insert (self->priv->events, event); + _data_->_tmp25_ = _data_->self->priv->events; + _data_->_tmp26_ = _data_->event; + dvb_event_storage_insert (_data_->_tmp25_, _data_->_tmp26_); } - _dvb_event_unref0 (event); } } } - if (newest_expired != (-1)) { - gpointer _tmp9_ = NULL; - DVBEvent* event; - guint _tmp10_; - guint _tmp11_; - _tmp9_ = gee_list_get (levents, newest_expired); - event = (DVBEvent*) _tmp9_; - _tmp10_ = dvb_channel_get_Sid (self->priv->_channel); - _tmp11_ = dvb_channel_get_GroupId (self->priv->_channel); - dvb_database_epg_store_remove_events_older_than (self->priv->epgstore, event, _tmp10_, _tmp11_, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch152_dvb_database_sql_error; + _data_->_tmp27_ = _data_->newest_expired; + if (_data_->_tmp27_ != (-1)) { + _data_->_tmp28_ = _data_->levents; + _data_->_tmp29_ = _data_->newest_expired; + _data_->_tmp30_ = NULL; + _data_->_tmp30_ = gee_list_get (_data_->_tmp28_, _data_->_tmp29_); + _dvb_event_unref0 (_data_->event); + _data_->event = (DVBEvent*) _data_->_tmp30_; + { + _data_->_tmp31_ = _data_->self->priv->epgstore; + _data_->_tmp32_ = _data_->event; + _data_->_tmp33_ = _data_->self->priv->_channel; + _data_->_tmp34_ = dvb_channel_get_Sid (_data_->_tmp33_); + _data_->_tmp35_ = _data_->_tmp34_; + _data_->_tmp36_ = _data_->self->priv->_channel; + _data_->_tmp37_ = dvb_channel_get_GroupId (_data_->_tmp36_); + _data_->_tmp38_ = _data_->_tmp37_; + dvb_database_epg_store_remove_events_older_than (_data_->_tmp31_, _data_->_tmp32_, _data_->_tmp35_, _data_->_tmp38_, &_data_->_inner_error_); + if (_data_->_inner_error_ != NULL) { + if (_data_->_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch163_dvb_database_sql_error; + } + _dvb_event_unref0 (_data_->event); + _g_object_unref0 (_data_->levents); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); + g_clear_error (&_data_->_inner_error_); + return FALSE; } - _dvb_event_unref0 (event); - _g_object_unref0 (levents); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } - goto __finally152; - __catch152_dvb_database_sql_error: + goto __finally163; + __catch163_dvb_database_sql_error: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Schedule.vala:76: %s", e->message); - result = FALSE; - _g_error_free0 (e); - _dvb_event_unref0 (event); - _g_object_unref0 (levents); - return result; + _data_->e2 = _data_->_inner_error_; + _data_->_inner_error_ = NULL; + _data_->_tmp39_ = dvb_schedule_log; + _data_->_tmp40_ = _data_->e2; + _data_->_tmp41_ = _data_->_tmp40_->message; + dvb_logging_logger_error (_data_->_tmp39_, "Schedule.vala:78: %s", _data_->_tmp41_); + _g_error_free0 (_data_->e2); + _dvb_event_unref0 (_data_->event); + _g_object_unref0 (_data_->levents); + if (_data_->_state_ == 0) { + g_simple_async_result_complete_in_idle (_data_->_async_result); + } else { + g_simple_async_result_complete (_data_->_async_result); + } + g_object_unref (_data_->_async_result); + return FALSE; } - __finally152: - if (_inner_error_ != NULL) { - _dvb_event_unref0 (event); - _g_object_unref0 (levents); - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); + __finally163: + if (_data_->_inner_error_ != NULL) { + _dvb_event_unref0 (_data_->event); + _g_object_unref0 (_data_->levents); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); + g_clear_error (&_data_->_inner_error_); return FALSE; } - _dvb_event_unref0 (event); } - _tmp12_ = dvb_channel_get_Sid (self->priv->_channel); - g_debug ("Schedule.vala:81: Finished restoring EPG events for channel %u", _tmp12_); - result = FALSE; - _g_object_unref0 (levents); - return result; + _data_->_tmp42_ = dvb_schedule_log; + _data_->_tmp43_ = _data_->self->priv->events; + _data_->_tmp44_ = dvb_event_storage_get_size (_data_->_tmp43_); + _data_->_tmp45_ = _data_->_tmp44_; + _data_->_tmp46_ = _data_->self->priv->_channel; + _data_->_tmp47_ = dvb_channel_get_Sid (_data_->_tmp46_); + _data_->_tmp48_ = _data_->_tmp47_; + dvb_logging_logger_debug (_data_->_tmp42_, "Schedule.vala:83: Finished restoring %d EPG events for channel %u", _data_->_tmp45_, _data_->_tmp48_); + _dvb_event_unref0 (_data_->event); + _g_object_unref0 (_data_->levents); + if (_data_->_state_ == 0) { + g_simple_async_result_complete_in_idle (_data_->_async_result); + } else { + g_simple_async_result_complete (_data_->_async_result); + } + g_object_unref (_data_->_async_result); + return FALSE; } DVBSchedule* dvb_schedule_construct (GType object_type, DVBChannel* channel) { DVBSchedule * self = NULL; + DVBChannel* _tmp0_; g_return_val_if_fail (channel != NULL, NULL); - self = (DVBSchedule*) g_object_new (object_type, "channel", channel, NULL); + _tmp0_ = channel; + self = (DVBSchedule*) g_object_new (object_type, "channel", _tmp0_, NULL); return self; } @@ -630,124 +725,218 @@ g_return_if_fail (self != NULL); last_expired = -1; { - const gchar* _tmp6_ = NULL; - guint _tmp7_; + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); { - gint i; - i = 0; + DVBLoggingLogger* _tmp20_; + DVBChannel* _tmp21_; + const gchar* _tmp22_; + const gchar* _tmp23_; + DVBChannel* _tmp24_; + guint _tmp25_; + guint _tmp26_; + gint _tmp51_; { - gboolean _tmp0_; - _tmp0_ = TRUE; - while (TRUE) { - gint _tmp1_; - DVBEventElement* _tmp2_ = NULL; - DVBEventElement* element; - DVBEvent* _tmp3_ = NULL; - DVBEvent* e; - gboolean _tmp4_ = FALSE; - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - _tmp1_ = dvb_event_storage_get_size (self->priv->events); - if (!(i < _tmp1_)) { - break; - } - _tmp2_ = dvb_event_storage_get (self->priv->events, i); - element = _tmp2_; - _tmp3_ = dvb_schedule_get_event (self, element->id); - e = _tmp3_; - if (e != NULL) { - gboolean _tmp5_; - _tmp5_ = dvb_event_has_expired (e); - _tmp4_ = _tmp5_; - } else { - _tmp4_ = FALSE; - } - if (_tmp4_) { - last_expired = i; - } else { + gint i; + i = 0; + { + gboolean _tmp1_; + _tmp1_ = TRUE; + while (TRUE) { + gboolean _tmp2_; + gint _tmp4_; + DVBEventStorage* _tmp5_; + gint _tmp6_; + gint _tmp7_; + DVBEventStorage* _tmp8_; + gint _tmp9_; + DVBEventElement* _tmp10_ = NULL; + DVBEventElement* element; + DVBEventElement* _tmp11_; + guint _tmp12_; + DVBEvent* _tmp13_ = NULL; + DVBEvent* e; + gboolean _tmp14_ = FALSE; + DVBEvent* _tmp15_; + gboolean _tmp18_; + _tmp2_ = _tmp1_; + if (!_tmp2_) { + gint _tmp3_; + _tmp3_ = i; + i = _tmp3_ + 1; + } + _tmp1_ = FALSE; + _tmp4_ = i; + _tmp5_ = self->priv->events; + _tmp6_ = dvb_event_storage_get_size (_tmp5_); + _tmp7_ = _tmp6_; + if (!(_tmp4_ < _tmp7_)) { + break; + } + _tmp8_ = self->priv->events; + _tmp9_ = i; + _tmp10_ = dvb_event_storage_get (_tmp8_, _tmp9_); + element = _tmp10_; + _tmp11_ = element; + _tmp12_ = _tmp11_->id; + _tmp13_ = dvb_schedule_get_event (self, _tmp12_); + e = _tmp13_; + _tmp15_ = e; + if (_tmp15_ != NULL) { + DVBEvent* _tmp16_; + gboolean _tmp17_ = FALSE; + _tmp16_ = e; + _tmp17_ = dvb_event_has_expired (_tmp16_); + _tmp14_ = _tmp17_; + } else { + _tmp14_ = FALSE; + } + _tmp18_ = _tmp14_; + if (_tmp18_) { + gint _tmp19_; + _tmp19_ = i; + last_expired = _tmp19_; + } else { + _dvb_event_unref0 (e); + _g_object_unref0 (element); + break; + } _dvb_event_unref0 (e); _g_object_unref0 (element); - break; } - _dvb_event_unref0 (e); - _g_object_unref0 (element); } } - } - _tmp6_ = dvb_channel_get_Name (self->priv->_channel); - _tmp7_ = dvb_channel_get_Sid (self->priv->_channel); - g_debug ("Schedule.vala:105: Removing expired events of channel %s (%u)", _tmp6_, _tmp7_); - { - gint i; - i = 0; + _tmp20_ = dvb_schedule_log; + _tmp21_ = self->priv->_channel; + _tmp22_ = dvb_channel_get_Name (_tmp21_); + _tmp23_ = _tmp22_; + _tmp24_ = self->priv->_channel; + _tmp25_ = dvb_channel_get_Sid (_tmp24_); + _tmp26_ = _tmp25_; + dvb_logging_logger_debug (_tmp20_, "Schedule.vala:106: Removing expired events of channel %s (%u)", _tmp23_, _tmp26_); { - gboolean _tmp8_; - _tmp8_ = TRUE; - while (TRUE) { - DVBEventElement* _tmp9_ = NULL; - DVBEventElement* element; - DVBEvent* _tmp10_ = NULL; - DVBEvent* event; - guint _tmp11_; - guint _tmp12_; - if (!_tmp8_) { - i++; - } - _tmp8_ = FALSE; - if (!(i <= last_expired)) { - break; - } - _tmp9_ = dvb_event_storage_get (self->priv->events, i); - element = _tmp9_; - _tmp10_ = dvb_schedule_get_event (self, element->id); - event = _tmp10_; - _tmp11_ = dvb_channel_get_Sid (self->priv->_channel); - _tmp12_ = dvb_channel_get_GroupId (self->priv->_channel); - dvb_database_epg_store_remove_events_older_than (self->priv->epgstore, event, _tmp11_, _tmp12_, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch154_dvb_database_sql_error; + gint i; + i = 0; + { + gboolean _tmp27_; + _tmp27_ = TRUE; + while (TRUE) { + gboolean _tmp28_; + gint _tmp30_; + gint _tmp31_; + DVBEventStorage* _tmp32_; + gint _tmp33_; + DVBEventElement* _tmp34_ = NULL; + DVBEventElement* element; + DVBEventElement* _tmp35_; + guint _tmp36_; + DVBEvent* _tmp37_ = NULL; + DVBEvent* event; + _tmp28_ = _tmp27_; + if (!_tmp28_) { + gint _tmp29_; + _tmp29_ = i; + i = _tmp29_ + 1; + } + _tmp27_ = FALSE; + _tmp30_ = i; + _tmp31_ = last_expired; + if (!(_tmp30_ <= _tmp31_)) { + break; + } + _tmp32_ = self->priv->events; + _tmp33_ = i; + _tmp34_ = dvb_event_storage_get (_tmp32_, _tmp33_); + element = _tmp34_; + _tmp35_ = element; + _tmp36_ = _tmp35_->id; + _tmp37_ = dvb_schedule_get_event (self, _tmp36_); + event = _tmp37_; + { + DVBdatabaseEPGStore* _tmp38_; + DVBEvent* _tmp39_; + DVBChannel* _tmp40_; + guint _tmp41_; + guint _tmp42_; + DVBChannel* _tmp43_; + guint _tmp44_; + guint _tmp45_; + _tmp38_ = self->priv->epgstore; + _tmp39_ = event; + _tmp40_ = self->priv->_channel; + _tmp41_ = dvb_channel_get_Sid (_tmp40_); + _tmp42_ = _tmp41_; + _tmp43_ = self->priv->_channel; + _tmp44_ = dvb_channel_get_GroupId (_tmp43_); + _tmp45_ = _tmp44_; + dvb_database_epg_store_remove_events_older_than (_tmp38_, _tmp39_, _tmp42_, _tmp45_, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch165_dvb_database_sql_error; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + { + DVBEventStorage* _tmp46_; + _tmp46_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } + goto __finally165; + __catch165_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp47_; + GError* _tmp48_; + const gchar* _tmp49_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp47_ = dvb_schedule_log; + _tmp48_ = e; + _tmp49_ = _tmp48_->message; + dvb_logging_logger_error (_tmp47_, "Schedule.vala:116: %s", _tmp49_); + _g_error_free0 (e); + } + __finally165: + if (_inner_error_ != NULL) { + _dvb_event_unref0 (event); + _g_object_unref0 (element); + _dvb_event_unref0 (event); + _g_object_unref0 (element); + { + DVBEventStorage* _tmp50_; + _tmp50_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } _dvb_event_unref0 (event); _g_object_unref0 (element); - g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; - } - goto __finally154; - __catch154_dvb_database_sql_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Schedule.vala:115: %s", e->message); - _g_error_free0 (e); - } - __finally154: - if (_inner_error_ != NULL) { - _dvb_event_unref0 (event); - _g_object_unref0 (element); - _dvb_event_unref0 (event); - _g_object_unref0 (element); - g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } - _dvb_event_unref0 (event); - _g_object_unref0 (element); } } + _tmp51_ = last_expired; + if (_tmp51_ > (-1)) { + DVBEventStorage* _tmp52_; + gint _tmp53_; + _tmp52_ = self->priv->events; + _tmp53_ = last_expired; + dvb_event_storage_remove_range (_tmp52_, 0, _tmp53_); + } } - if (last_expired > (-1)) { - dvb_event_storage_remove_range (self->priv->events, 0, last_expired); + __finally164: + { + DVBEventStorage* _tmp54_; + _tmp54_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); } - __finally153: - g_static_rec_mutex_unlock (&self->priv->__lock_events); if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -759,38 +948,58 @@ DVBEvent* dvb_schedule_get_event (DVBSchedule* self, guint event_id) { DVBEvent* result = NULL; - guint _tmp0_; - guint _tmp1_; - DVBEvent* _tmp2_ = NULL; - DVBEvent* _tmp3_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = dvb_channel_get_Sid (self->priv->_channel); - _tmp1_ = dvb_channel_get_GroupId (self->priv->_channel); - _tmp2_ = dvb_database_epg_store_get_event (self->priv->epgstore, event_id, _tmp0_, _tmp1_, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch155_dvb_database_sql_error; + { + DVBdatabaseEPGStore* _tmp0_; + guint _tmp1_; + DVBChannel* _tmp2_; + guint _tmp3_; + guint _tmp4_; + DVBChannel* _tmp5_; + guint _tmp6_; + guint _tmp7_; + DVBEvent* _tmp8_ = NULL; + DVBEvent* _tmp9_; + _tmp0_ = self->priv->epgstore; + _tmp1_ = event_id; + _tmp2_ = self->priv->_channel; + _tmp3_ = dvb_channel_get_Sid (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = self->priv->_channel; + _tmp6_ = dvb_channel_get_GroupId (_tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = dvb_database_epg_store_get_event (_tmp0_, _tmp1_, _tmp4_, _tmp7_, &_inner_error_); + _tmp9_ = _tmp8_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch166_dvb_database_sql_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + result = _tmp9_; + return result; } - result = _tmp3_; - return result; - goto __finally155; - __catch155_dvb_database_sql_error: + goto __finally166; + __catch166_dvb_database_sql_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp10_; + GError* _tmp11_; + const gchar* _tmp12_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Schedule.vala:130: %s", e->message); + _tmp10_ = dvb_schedule_log; + _tmp11_ = e; + _tmp12_ = _tmp11_->message; + dvb_logging_logger_error (_tmp10_, "Schedule.vala:131: %s", _tmp12_); result = NULL; _g_error_free0 (e); return result; } - __finally155: + __finally166: g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return NULL; @@ -801,44 +1010,72 @@ * When an event with the same id already exists, it's replaced */ void dvb_schedule_add (DVBSchedule* self, DVBEvent* event) { - gboolean _tmp0_; + DVBEvent* _tmp0_; + gboolean _tmp1_ = FALSE; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (event != NULL); - _tmp0_ = dvb_event_has_expired (event); - if (_tmp0_) { + _tmp0_ = event; + _tmp1_ = dvb_event_has_expired (_tmp0_); + if (_tmp1_) { return; } { + DVBEventStorage* _tmp2_; + _tmp2_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - dvb_schedule_store_event (self, event, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch157_dvb_database_sql_error; + { + { + DVBEvent* _tmp3_; + _tmp3_ = event; + dvb_schedule_store_event (self, _tmp3_, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch168_dvb_database_sql_error; + } + { + DVBEventStorage* _tmp4_; + _tmp4_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } + goto __finally168; + __catch168_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp5_; + GError* _tmp6_; + const gchar* _tmp7_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp5_ = dvb_schedule_log; + _tmp6_ = e; + _tmp7_ = _tmp6_->message; + dvb_logging_logger_error (_tmp5_, "Schedule.vala:146: %s", _tmp7_); + _g_error_free0 (e); + } + __finally168: + if (_inner_error_ != NULL) { + { + DVBEventStorage* _tmp8_; + _tmp8_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } - goto __finally157; - __catch157_dvb_database_sql_error: + __finally167: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Schedule.vala:145: %s", e->message); - _g_error_free0 (e); - } - __finally157: - if (_inner_error_ != NULL) { + DVBEventStorage* _tmp9_; + _tmp9_ = self->priv->events; g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } - __finally156: - g_static_rec_mutex_unlock (&self->priv->__lock_events); if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -853,87 +1090,141 @@ g_return_if_fail (self != NULL); g_return_if_fail (new_events != NULL); { + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - g_static_rec_mutex_lock (&dvb_schedule_mutex); - dvb_database_sqlite_sqlite_database_begin_transaction (DVB_DATABASE_SQLITE_SQLITE_DATABASE (self->priv->epgstore), &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch159_dvb_database_sql_error; - } - g_static_rec_mutex_unlock (&dvb_schedule_mutex); - g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; - } { - GeeIterator* _tmp0_ = NULL; - GeeIterator* _event_it; - _tmp0_ = gee_iterable_iterator ((GeeIterable*) new_events); - _event_it = _tmp0_; - while (TRUE) { - gboolean _tmp1_; - gpointer _tmp2_ = NULL; - DVBEvent* event; - gboolean _tmp3_; - _tmp1_ = gee_iterator_next (_event_it); - if (!_tmp1_) { - break; - } - _tmp2_ = gee_iterator_get (_event_it); - event = (DVBEvent*) _tmp2_; - _tmp3_ = dvb_event_has_expired (event); - if (!_tmp3_) { - dvb_schedule_store_event (self, event, &_inner_error_); - if (_inner_error_ != NULL) { - _dvb_event_unref0 (event); - _g_object_unref0 (_event_it); - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch159_dvb_database_sql_error; + { + DVBdatabaseEPGStore* _tmp1_; + DVBdatabaseEPGStore* _tmp13_; + g_static_rec_mutex_lock (&dvb_schedule_mutex); + _tmp1_ = self->priv->epgstore; + dvb_database_sqlite_sqlite_database_begin_transaction (DVB_DATABASE_SQLITE_SQLITE_DATABASE (_tmp1_), &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch170_dvb_database_sql_error; + } + { + g_static_rec_mutex_unlock (&dvb_schedule_mutex); + } + { + DVBEventStorage* _tmp2_; + _tmp2_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + { + GeeCollection* _tmp3_; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _event_it; + _tmp3_ = new_events; + _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_); + _event_it = _tmp4_; + while (TRUE) { + GeeIterator* _tmp5_; + gboolean _tmp6_ = FALSE; + GeeIterator* _tmp7_; + gpointer _tmp8_ = NULL; + DVBEvent* event; + DVBEvent* _tmp9_; + gboolean _tmp10_ = FALSE; + _tmp5_ = _event_it; + _tmp6_ = gee_iterator_next (_tmp5_); + if (!_tmp6_) { + break; + } + _tmp7_ = _event_it; + _tmp8_ = gee_iterator_get (_tmp7_); + event = (DVBEvent*) _tmp8_; + _tmp9_ = event; + _tmp10_ = dvb_event_has_expired (_tmp9_); + if (!_tmp10_) { + DVBEvent* _tmp11_; + _tmp11_ = event; + dvb_schedule_store_event (self, _tmp11_, &_inner_error_); + if (_inner_error_ != NULL) { + _dvb_event_unref0 (event); + _g_object_unref0 (_event_it); + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch170_dvb_database_sql_error; + } + _dvb_event_unref0 (event); + _g_object_unref0 (_event_it); + { + g_static_rec_mutex_unlock (&dvb_schedule_mutex); + } + { + DVBEventStorage* _tmp12_; + _tmp12_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } } _dvb_event_unref0 (event); - _g_object_unref0 (_event_it); + } + _g_object_unref0 (_event_it); + } + _tmp13_ = self->priv->epgstore; + dvb_database_sqlite_sqlite_database_end_transaction (DVB_DATABASE_SQLITE_SQLITE_DATABASE (_tmp13_), &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch170_dvb_database_sql_error; + } + { g_static_rec_mutex_unlock (&dvb_schedule_mutex); + } + { + DVBEventStorage* _tmp14_; + _tmp14_ = self->priv->events; g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - _dvb_event_unref0 (event); } - _g_object_unref0 (_event_it); - } - dvb_database_sqlite_sqlite_database_end_transaction (DVB_DATABASE_SQLITE_SQLITE_DATABASE (self->priv->epgstore), &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch159_dvb_database_sql_error; + goto __finally170; + __catch170_dvb_database_sql_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp15_; + GError* _tmp16_; + const gchar* _tmp17_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp15_ = dvb_schedule_log; + _tmp16_ = e; + _tmp17_ = _tmp16_->message; + dvb_logging_logger_error (_tmp15_, "Schedule.vala:164: %s", _tmp17_); + _g_error_free0 (e); + } + __finally170: + { + g_static_rec_mutex_unlock (&dvb_schedule_mutex); + } + if (_inner_error_ != NULL) { + { + DVBEventStorage* _tmp18_; + _tmp18_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; } - g_static_rec_mutex_unlock (&dvb_schedule_mutex); - g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } - goto __finally159; - __catch159_dvb_database_sql_error: + __finally169: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Schedule.vala:163: %s", e->message); - _g_error_free0 (e); - } - __finally159: - g_static_rec_mutex_unlock (&dvb_schedule_mutex); - if (_inner_error_ != NULL) { + DVBEventStorage* _tmp19_; + _tmp19_ = self->priv->events; g_static_rec_mutex_unlock (&self->priv->__lock_events); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; } - __finally158: - g_static_rec_mutex_unlock (&self->priv->__lock_events); if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -944,26 +1235,53 @@ static void dvb_schedule_store_event (DVBSchedule* self, DVBEvent* event, GError** error) { - GeeList* _tmp0_ = NULL; + DVBEvent* _tmp0_; + GeeList* _tmp1_ = NULL; GeeList* overlap; - gint _tmp1_; + GeeList* _tmp2_; + DVBEvent* _tmp3_; + gint _tmp4_ = 0; gint s; - guint _tmp2_; - guint _tmp3_; - gboolean _tmp4_; + gint _tmp5_; + DVBdatabaseEPGStore* _tmp8_; + DVBEvent* _tmp9_; + DVBChannel* _tmp10_; + guint _tmp11_; + guint _tmp12_; + DVBChannel* _tmp13_; + guint _tmp14_; + guint _tmp15_; + DVBEventStorage* _tmp16_; + DVBEvent* _tmp17_; + guint _tmp18_; + gboolean _tmp19_ = FALSE; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (event != NULL); - _tmp0_ = dvb_schedule_get_overlapping_events (self, event); - overlap = _tmp0_; - _tmp1_ = dvb_schedule_match_events (self, overlap, event); - s = _tmp1_; - if (s > DVB_SCHEDULE_MATCH_THRESHOLD) { - dvb_event_storage_remove_all (self->priv->events, overlap); - } - _tmp2_ = dvb_channel_get_Sid (self->priv->_channel); - _tmp3_ = dvb_channel_get_GroupId (self->priv->_channel); - dvb_database_epg_store_add_or_update_event (self->priv->epgstore, event, _tmp2_, _tmp3_, &_inner_error_); + _tmp0_ = event; + _tmp1_ = dvb_schedule_get_overlapping_events (self, _tmp0_); + overlap = _tmp1_; + _tmp2_ = overlap; + _tmp3_ = event; + _tmp4_ = dvb_schedule_match_events (self, _tmp2_, _tmp3_); + s = _tmp4_; + _tmp5_ = s; + if (_tmp5_ > DVB_SCHEDULE_MATCH_THRESHOLD) { + DVBEventStorage* _tmp6_; + GeeList* _tmp7_; + _tmp6_ = self->priv->events; + _tmp7_ = overlap; + dvb_event_storage_remove_all (_tmp6_, _tmp7_); + } + _tmp8_ = self->priv->epgstore; + _tmp9_ = event; + _tmp10_ = self->priv->_channel; + _tmp11_ = dvb_channel_get_Sid (_tmp10_); + _tmp12_ = _tmp11_; + _tmp13_ = self->priv->_channel; + _tmp14_ = dvb_channel_get_GroupId (_tmp13_); + _tmp15_ = _tmp14_; + dvb_database_epg_store_add_or_update_event (_tmp8_, _tmp9_, _tmp12_, _tmp15_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); @@ -976,65 +1294,103 @@ return; } } - _tmp4_ = dvb_event_storage_contains_event_with_id (self->priv->events, event->id); - if (!_tmp4_) { - dvb_event_storage_insert (self->priv->events, event); + _tmp16_ = self->priv->events; + _tmp17_ = event; + _tmp18_ = _tmp17_->id; + _tmp19_ = dvb_event_storage_contains_event_with_id (_tmp16_, _tmp18_); + if (!_tmp19_) { + DVBEventStorage* _tmp20_; + DVBEvent* _tmp21_; + _tmp20_ = self->priv->events; + _tmp21_ = event; + dvb_event_storage_insert (_tmp20_, _tmp21_); } _g_object_unref0 (overlap); } -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - static GeeList* dvb_schedule_get_overlapping_events (DVBSchedule* self, DVBEvent* event) { GeeList* result = NULL; - GeeList* _tmp0_ = NULL; + DVBEventStorage* _tmp0_; + DVBEvent* _tmp1_; + GeeList* _tmp2_ = NULL; GeeList* elements; - GeeArrayList* _tmp1_ = NULL; + GeeArrayList* _tmp3_; GeeList* overlap; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (event != NULL, NULL); - _tmp0_ = dvb_event_storage_get_overlapping_events (self->priv->events, event); - elements = _tmp0_; - _tmp1_ = gee_array_list_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, NULL); - overlap = (GeeList*) _tmp1_; + _tmp0_ = self->priv->events; + _tmp1_ = event; + _tmp2_ = dvb_event_storage_get_overlapping_events (_tmp0_, _tmp1_); + elements = _tmp2_; + _tmp3_ = gee_array_list_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, NULL); + overlap = (GeeList*) _tmp3_; { - GeeList* _tmp2_; + GeeList* _tmp4_; + GeeList* _tmp5_; GeeList* _data_list; - gint _tmp3_; + GeeList* _tmp6_; + gint _tmp7_; + gint _tmp8_; gint _data_size; gint _data_index; - _tmp2_ = _g_object_ref0 (elements); - _data_list = _tmp2_; - _tmp3_ = gee_collection_get_size ((GeeCollection*) _data_list); - _data_size = _tmp3_; + _tmp4_ = elements; + _tmp5_ = _g_object_ref0 (_tmp4_); + _data_list = _tmp5_; + _tmp6_ = _data_list; + _tmp7_ = gee_collection_get_size ((GeeCollection*) _tmp6_); + _tmp8_ = _tmp7_; + _data_size = _tmp8_; _data_index = -1; while (TRUE) { - gpointer _tmp4_ = NULL; + gint _tmp9_; + gint _tmp10_; + gint _tmp11_; + GeeList* _tmp12_; + gint _tmp13_; + gpointer _tmp14_ = NULL; DVBEventElement* data; - DVBEvent* _tmp5_ = NULL; + DVBEventElement* _tmp15_; + guint _tmp16_; + DVBEvent* _tmp17_ = NULL; DVBEvent* e; - gboolean _tmp6_ = FALSE; - _data_index = _data_index + 1; - if (!(_data_index < _data_size)) { + gboolean _tmp18_ = FALSE; + DVBEvent* _tmp19_; + gboolean _tmp23_; + _tmp9_ = _data_index; + _data_index = _tmp9_ + 1; + _tmp10_ = _data_index; + _tmp11_ = _data_size; + if (!(_tmp10_ < _tmp11_)) { break; } - _tmp4_ = gee_list_get (_data_list, _data_index); - data = (DVBEventElement*) _tmp4_; - _tmp5_ = dvb_schedule_get_event (self, data->id); - e = _tmp5_; - if (e != NULL) { - gdouble _tmp7_; - _tmp7_ = dvb_event_get_overlap_percentage (e, event); - _tmp6_ = _tmp7_ >= DVB_SCHEDULE_MIN_EVENT_OVERLAP; + _tmp12_ = _data_list; + _tmp13_ = _data_index; + _tmp14_ = gee_list_get (_tmp12_, _tmp13_); + data = (DVBEventElement*) _tmp14_; + _tmp15_ = data; + _tmp16_ = _tmp15_->id; + _tmp17_ = dvb_schedule_get_event (self, _tmp16_); + e = _tmp17_; + _tmp19_ = e; + if (_tmp19_ != NULL) { + DVBEvent* _tmp20_; + DVBEvent* _tmp21_; + gdouble _tmp22_ = 0.0; + _tmp20_ = e; + _tmp21_ = event; + _tmp22_ = dvb_event_get_overlap_percentage (_tmp20_, _tmp21_); + _tmp18_ = _tmp22_ >= DVB_SCHEDULE_MIN_EVENT_OVERLAP; } else { - _tmp6_ = FALSE; + _tmp18_ = FALSE; } - if (_tmp6_) { - gee_collection_add ((GeeCollection*) overlap, e); + _tmp23_ = _tmp18_; + if (_tmp23_) { + GeeList* _tmp24_; + DVBEvent* _tmp25_; + _tmp24_ = overlap; + _tmp25_ = e; + gee_collection_add ((GeeCollection*) _tmp24_, _tmp25_); } _dvb_event_unref0 (e); _g_object_unref0 (data); @@ -1049,82 +1405,160 @@ static gint dvb_schedule_match_events (DVBSchedule* self, GeeList* events, DVBEvent* ref_event) { gint result = 0; - time_t _tmp0_; + DVBEvent* _tmp0_; + time_t _tmp1_ = 0; time_t ref_start; - time_t _tmp1_; + DVBEvent* _tmp2_; + time_t _tmp3_ = 0; time_t ref_end; gdouble max_score; + gdouble _tmp51_; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (events != NULL, 0); g_return_val_if_fail (ref_event != NULL, 0); - _tmp0_ = dvb_event_get_start_timestamp (ref_event); - ref_start = _tmp0_; - _tmp1_ = dvb_event_get_end_timestamp (ref_event); - ref_end = _tmp1_; + _tmp0_ = ref_event; + _tmp1_ = dvb_event_get_start_timestamp (_tmp0_); + ref_start = _tmp1_; + _tmp2_ = ref_event; + _tmp3_ = dvb_event_get_end_timestamp (_tmp2_); + ref_end = _tmp3_; max_score = (gdouble) 0; { - GeeList* _tmp2_; + GeeList* _tmp4_; + GeeList* _tmp5_; GeeList* _event_list; - gint _tmp3_; + GeeList* _tmp6_; + gint _tmp7_; + gint _tmp8_; gint _event_size; gint _event_index; - _tmp2_ = _g_object_ref0 (events); - _event_list = _tmp2_; - _tmp3_ = gee_collection_get_size ((GeeCollection*) _event_list); - _event_size = _tmp3_; + _tmp4_ = events; + _tmp5_ = _g_object_ref0 (_tmp4_); + _event_list = _tmp5_; + _tmp6_ = _event_list; + _tmp7_ = gee_collection_get_size ((GeeCollection*) _tmp6_); + _tmp8_ = _tmp7_; + _event_size = _tmp8_; _event_index = -1; while (TRUE) { - gpointer _tmp4_ = NULL; + gint _tmp9_; + gint _tmp10_; + gint _tmp11_; + GeeList* _tmp12_; + gint _tmp13_; + gpointer _tmp14_ = NULL; DVBEvent* event; gdouble score; - time_t _tmp5_; + DVBEvent* _tmp15_; + time_t _tmp16_ = 0; time_t e_start; - time_t _tmp6_; + DVBEvent* _tmp17_; + time_t _tmp18_ = 0; time_t e_end; - gdouble _tmp7_; - gdouble _tmp8_; - gdouble _tmp9_; - gboolean _tmp10_ = FALSE; - _event_index = _event_index + 1; - if (!(_event_index < _event_size)) { + gdouble _tmp19_; + time_t _tmp20_; + time_t _tmp21_; + gdouble _tmp22_ = 0.0; + gdouble _tmp23_; + time_t _tmp24_; + time_t _tmp25_; + gdouble _tmp26_ = 0.0; + gdouble _tmp27_; + DVBEvent* _tmp28_; + guint _tmp29_; + DVBEvent* _tmp30_; + guint _tmp31_; + gdouble _tmp32_ = 0.0; + gboolean _tmp33_ = FALSE; + DVBEvent* _tmp34_; + const gchar* _tmp35_; + gboolean _tmp38_; + gdouble _tmp48_; + gdouble _tmp49_; + _tmp9_ = _event_index; + _event_index = _tmp9_ + 1; + _tmp10_ = _event_index; + _tmp11_ = _event_size; + if (!(_tmp10_ < _tmp11_)) { break; } - _tmp4_ = gee_list_get (_event_list, _event_index); - event = (DVBEvent*) _tmp4_; + _tmp12_ = _event_list; + _tmp13_ = _event_index; + _tmp14_ = gee_list_get (_tmp12_, _tmp13_); + event = (DVBEvent*) _tmp14_; score = (gdouble) 0; - _tmp5_ = dvb_event_get_start_timestamp (event); - e_start = _tmp5_; - _tmp6_ = dvb_event_get_end_timestamp (event); - e_end = _tmp6_; - _tmp7_ = fabs ((gdouble) (ref_start - e_start)); - score = score + _tmp7_; - _tmp8_ = fabs ((gdouble) (ref_end - e_end)); - score = score + _tmp8_; - _tmp9_ = fabs ((gdouble) (ref_event->duration - event->duration)); - score = score + (_tmp9_ / 60.0); - if (ref_event->name != NULL) { - _tmp10_ = event->name != NULL; + _tmp15_ = event; + _tmp16_ = dvb_event_get_start_timestamp (_tmp15_); + e_start = _tmp16_; + _tmp17_ = event; + _tmp18_ = dvb_event_get_end_timestamp (_tmp17_); + e_end = _tmp18_; + _tmp19_ = score; + _tmp20_ = ref_start; + _tmp21_ = e_start; + _tmp22_ = fabs ((gdouble) (_tmp20_ - _tmp21_)); + score = _tmp19_ + _tmp22_; + _tmp23_ = score; + _tmp24_ = ref_end; + _tmp25_ = e_end; + _tmp26_ = fabs ((gdouble) (_tmp24_ - _tmp25_)); + score = _tmp23_ + _tmp26_; + _tmp27_ = score; + _tmp28_ = ref_event; + _tmp29_ = _tmp28_->duration; + _tmp30_ = event; + _tmp31_ = _tmp30_->duration; + _tmp32_ = fabs ((gdouble) (_tmp29_ - _tmp31_)); + score = _tmp27_ + (_tmp32_ / 60.0); + _tmp34_ = ref_event; + _tmp35_ = _tmp34_->name; + if (_tmp35_ != NULL) { + DVBEvent* _tmp36_; + const gchar* _tmp37_; + _tmp36_ = event; + _tmp37_ = _tmp36_->name; + _tmp33_ = _tmp37_ != NULL; } else { - _tmp10_ = FALSE; + _tmp33_ = FALSE; } - if (_tmp10_) { + _tmp38_ = _tmp33_; + if (_tmp38_) { glong unmatched = 0L; - glong _tmp11_; - glong _tmp12_; + DVBEvent* _tmp39_; + const gchar* _tmp40_; + DVBEvent* _tmp41_; + const gchar* _tmp42_; + glong _tmp43_ = 0L; + glong _tmp44_ = 0L; glong diff; - _tmp12_ = dvb_utils_strdiff (ref_event->name, event->name, &_tmp11_); - unmatched = _tmp11_; - diff = _tmp12_; - score = score + ((gdouble) (10 * (diff + (5 * unmatched)))); - } - if (score > max_score) { - max_score = score; + gdouble _tmp45_; + glong _tmp46_; + glong _tmp47_; + _tmp39_ = ref_event; + _tmp40_ = _tmp39_->name; + _tmp41_ = event; + _tmp42_ = _tmp41_->name; + _tmp44_ = dvb_utils_strdiff (_tmp40_, _tmp42_, &_tmp43_); + unmatched = _tmp43_; + diff = _tmp44_; + _tmp45_ = score; + _tmp46_ = diff; + _tmp47_ = unmatched; + score = _tmp45_ + (10 * (_tmp46_ + (5 * _tmp47_))); + } + _tmp48_ = score; + _tmp49_ = max_score; + if (_tmp48_ > _tmp49_) { + gdouble _tmp50_; + _tmp50_ = score; + max_score = _tmp50_; } _dvb_event_unref0 (event); } _g_object_unref0 (_event_list); } - result = (gint) max_score; + _tmp51_ = max_score; + result = (gint) _tmp51_; return result; } @@ -1135,12 +1569,24 @@ GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); { - gboolean _tmp0_; + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, event_id); - val = _tmp0_; - __finally160: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + { + DVBEventStorage* _tmp1_; + guint _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->events; + _tmp2_ = event_id; + _tmp3_ = dvb_event_storage_contains_event_with_id (_tmp1_, _tmp2_); + val = _tmp3_; + } + __finally171: + { + DVBEventStorage* _tmp4_; + _tmp4_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -1164,57 +1610,91 @@ g_return_val_if_fail (self != NULL, NULL); running_event = NULL; { + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); { - DVBEventStorage* _tmp0_; - DVBEventStorage* _element_list; - gint _tmp1_; - gint _element_size; - gint _element_index; - _tmp0_ = _g_object_ref0 (self->priv->events); - _element_list = _tmp0_; - _tmp1_ = dvb_event_storage_get_size (_element_list); - _element_size = _tmp1_; - _element_index = -1; - while (TRUE) { - DVBEventElement* _tmp2_ = NULL; - DVBEventElement* element; - DVBEvent* _tmp3_ = NULL; - DVBEvent* event; - gboolean _tmp4_ = FALSE; - _element_index = _element_index + 1; - if (!(_element_index < _element_size)) { - break; - } - _tmp2_ = dvb_event_storage_get (_element_list, _element_index); - element = _tmp2_; - _tmp3_ = dvb_schedule_get_event (self, element->id); - event = _tmp3_; - if (event != NULL) { - gboolean _tmp5_; - _tmp5_ = dvb_event_is_running (event); - _tmp4_ = _tmp5_; - } else { - _tmp4_ = FALSE; - } - if (_tmp4_) { - DVBEvent* _tmp6_; - DVBEvent* _tmp7_; - _tmp6_ = _dvb_event_ref0 (event); - _tmp7_ = _tmp6_; - _dvb_event_unref0 (running_event); - running_event = _tmp7_; + { + DVBEventStorage* _tmp1_; + DVBEventStorage* _tmp2_; + DVBEventStorage* _element_list; + DVBEventStorage* _tmp3_; + gint _tmp4_; + gint _tmp5_; + gint _element_size; + gint _element_index; + _tmp1_ = self->priv->events; + _tmp2_ = _g_object_ref0 (_tmp1_); + _element_list = _tmp2_; + _tmp3_ = _element_list; + _tmp4_ = dvb_event_storage_get_size (_tmp3_); + _tmp5_ = _tmp4_; + _element_size = _tmp5_; + _element_index = -1; + while (TRUE) { + gint _tmp6_; + gint _tmp7_; + gint _tmp8_; + DVBEventStorage* _tmp9_; + gint _tmp10_; + DVBEventElement* _tmp11_ = NULL; + DVBEventElement* element; + DVBEventElement* _tmp12_; + guint _tmp13_; + DVBEvent* _tmp14_ = NULL; + DVBEvent* event; + gboolean _tmp15_ = FALSE; + DVBEvent* _tmp16_; + gboolean _tmp19_; + _tmp6_ = _element_index; + _element_index = _tmp6_ + 1; + _tmp7_ = _element_index; + _tmp8_ = _element_size; + if (!(_tmp7_ < _tmp8_)) { + break; + } + _tmp9_ = _element_list; + _tmp10_ = _element_index; + _tmp11_ = dvb_event_storage_get (_tmp9_, _tmp10_); + element = _tmp11_; + _tmp12_ = element; + _tmp13_ = _tmp12_->id; + _tmp14_ = dvb_schedule_get_event (self, _tmp13_); + event = _tmp14_; + _tmp16_ = event; + if (_tmp16_ != NULL) { + DVBEvent* _tmp17_; + gboolean _tmp18_ = FALSE; + _tmp17_ = event; + _tmp18_ = dvb_event_is_running (_tmp17_); + _tmp15_ = _tmp18_; + } else { + _tmp15_ = FALSE; + } + _tmp19_ = _tmp15_; + if (_tmp19_) { + DVBEvent* _tmp20_; + DVBEvent* _tmp21_; + _tmp20_ = event; + _tmp21_ = _dvb_event_ref0 (_tmp20_); + _dvb_event_unref0 (running_event); + running_event = _tmp21_; + _dvb_event_unref0 (event); + _g_object_unref0 (element); + break; + } _dvb_event_unref0 (event); _g_object_unref0 (element); - break; } - _dvb_event_unref0 (event); - _g_object_unref0 (element); + _g_object_unref0 (_element_list); } - _g_object_unref0 (_element_list); } - __finally161: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally172: + { + DVBEventStorage* _tmp22_; + _tmp22_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { _dvb_event_unref0 (running_event); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1246,96 +1726,174 @@ DVBEvent* dvb_schedule_get_event_around (DVBSchedule* self, struct tm* start, guint duration) { DVBEvent* result = NULL; DVBEvent* _result_; - time_t _tmp0_; + time_t _tmp0_ = 0; time_t timer_start; + time_t _tmp1_; + guint _tmp2_; time_t timer_end; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (start != NULL, NULL); _result_ = NULL; _tmp0_ = mktime (start); timer_start = _tmp0_; - timer_end = timer_start + (duration * 60); + _tmp1_ = timer_start; + _tmp2_ = duration; + timer_end = _tmp1_ + (_tmp2_ * 60); { - time_t last_diff; + DVBEventStorage* _tmp3_; + _tmp3_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - last_diff = (time_t) 0; { - DVBEventStorage* _tmp1_; - DVBEventStorage* _element_list; - gint _tmp2_; - gint _element_size; - gint _element_index; - _tmp1_ = _g_object_ref0 (self->priv->events); - _element_list = _tmp1_; - _tmp2_ = dvb_event_storage_get_size (_element_list); - _element_size = _tmp2_; - _element_index = -1; - while (TRUE) { - DVBEventElement* _tmp3_ = NULL; - DVBEventElement* element; - struct tm _tmp4_ = {0}; - struct tm _tmp5_ = {0}; - time_t _tmp6_; - time_t event_start; - DVBEvent* _tmp7_ = NULL; - DVBEvent* event; - time_t event_end; - time_t _tmp8_; - time_t min_end; - time_t _tmp9_; - time_t max_start; - time_t overlap; - _element_index = _element_index + 1; - if (!(_element_index < _element_size)) { - break; - } - _tmp3_ = dvb_event_storage_get (_element_list, _element_index); - element = _tmp3_; - _tmp5_ = (g_time_local (element->starttime, &_tmp4_), _tmp4_); - _tmp6_ = timegm (&_tmp5_); - event_start = _tmp6_; - _tmp7_ = dvb_schedule_get_event (self, element->id); - event = _tmp7_; - if (event == NULL) { - _dvb_event_unref0 (event); - _g_object_unref0 (element); - continue; - } - event_end = event_start + event->duration; - if (timer_end < event_end) { - _tmp8_ = timer_end; - } else { - _tmp8_ = event_end; - } - min_end = _tmp8_; - if (timer_start > event_start) { - _tmp9_ = timer_start; - } else { - _tmp9_ = event_start; - } - max_start = _tmp9_; - overlap = min_end - max_start; - if (last_diff < overlap) { - DVBEvent* _tmp10_; - DVBEvent* _tmp11_; - last_diff = overlap; - _tmp10_ = _dvb_event_ref0 (event); - _tmp11_ = _tmp10_; - _dvb_event_unref0 (_result_); - _result_ = _tmp11_; - } - if (event_start > timer_end) { + time_t last_diff; + last_diff = (time_t) 0; + { + DVBEventStorage* _tmp4_; + DVBEventStorage* _tmp5_; + DVBEventStorage* _element_list; + DVBEventStorage* _tmp6_; + gint _tmp7_; + gint _tmp8_; + gint _element_size; + gint _element_index; + _tmp4_ = self->priv->events; + _tmp5_ = _g_object_ref0 (_tmp4_); + _element_list = _tmp5_; + _tmp6_ = _element_list; + _tmp7_ = dvb_event_storage_get_size (_tmp6_); + _tmp8_ = _tmp7_; + _element_size = _tmp8_; + _element_index = -1; + while (TRUE) { + gint _tmp9_; + gint _tmp10_; + gint _tmp11_; + DVBEventStorage* _tmp12_; + gint _tmp13_; + DVBEventElement* _tmp14_ = NULL; + DVBEventElement* element; + DVBEventElement* _tmp15_; + time_t _tmp16_; + struct tm _tmp17_ = {0}; + time_t _tmp18_ = 0; + time_t event_start; + DVBEventElement* _tmp19_; + guint _tmp20_; + DVBEvent* _tmp21_ = NULL; + DVBEvent* event; + DVBEvent* _tmp22_; + time_t _tmp23_; + DVBEvent* _tmp24_; + guint _tmp25_; + time_t event_end; + time_t _tmp26_ = 0; + time_t _tmp27_; + time_t _tmp28_; + time_t _tmp31_; + time_t min_end; + time_t _tmp32_ = 0; + time_t _tmp33_; + time_t _tmp34_; + time_t _tmp37_; + time_t max_start; + time_t _tmp38_; + time_t _tmp39_; + time_t overlap; + time_t _tmp40_; + time_t _tmp41_; + time_t _tmp45_; + time_t _tmp46_; + _tmp9_ = _element_index; + _element_index = _tmp9_ + 1; + _tmp10_ = _element_index; + _tmp11_ = _element_size; + if (!(_tmp10_ < _tmp11_)) { + break; + } + _tmp12_ = _element_list; + _tmp13_ = _element_index; + _tmp14_ = dvb_event_storage_get (_tmp12_, _tmp13_); + element = _tmp14_; + _tmp15_ = element; + _tmp16_ = _tmp15_->starttime; + g_time_local (_tmp16_, &_tmp17_); + _tmp18_ = timegm (&_tmp17_); + event_start = _tmp18_; + _tmp19_ = element; + _tmp20_ = _tmp19_->id; + _tmp21_ = dvb_schedule_get_event (self, _tmp20_); + event = _tmp21_; + _tmp22_ = event; + if (_tmp22_ == NULL) { + _dvb_event_unref0 (event); + _g_object_unref0 (element); + continue; + } + _tmp23_ = event_start; + _tmp24_ = event; + _tmp25_ = _tmp24_->duration; + event_end = _tmp23_ + _tmp25_; + _tmp27_ = timer_end; + _tmp28_ = event_end; + if (_tmp27_ < _tmp28_) { + time_t _tmp29_; + _tmp29_ = timer_end; + _tmp26_ = _tmp29_; + } else { + time_t _tmp30_; + _tmp30_ = event_end; + _tmp26_ = _tmp30_; + } + _tmp31_ = _tmp26_; + min_end = _tmp31_; + _tmp33_ = timer_start; + _tmp34_ = event_start; + if (_tmp33_ > _tmp34_) { + time_t _tmp35_; + _tmp35_ = timer_start; + _tmp32_ = _tmp35_; + } else { + time_t _tmp36_; + _tmp36_ = event_start; + _tmp32_ = _tmp36_; + } + _tmp37_ = _tmp32_; + max_start = _tmp37_; + _tmp38_ = min_end; + _tmp39_ = max_start; + overlap = _tmp38_ - _tmp39_; + _tmp40_ = last_diff; + _tmp41_ = overlap; + if (_tmp40_ < _tmp41_) { + time_t _tmp42_; + DVBEvent* _tmp43_; + DVBEvent* _tmp44_; + _tmp42_ = overlap; + last_diff = _tmp42_; + _tmp43_ = event; + _tmp44_ = _dvb_event_ref0 (_tmp43_); + _dvb_event_unref0 (_result_); + _result_ = _tmp44_; + } + _tmp45_ = event_start; + _tmp46_ = timer_end; + if (_tmp45_ > _tmp46_) { + _dvb_event_unref0 (event); + _g_object_unref0 (element); + break; + } _dvb_event_unref0 (event); _g_object_unref0 (element); - break; } - _dvb_event_unref0 (event); - _g_object_unref0 (element); + _g_object_unref0 (_element_list); } - _g_object_unref0 (_element_list); } - __finally162: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally173: + { + DVBEventStorage* _tmp47_; + _tmp47_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { _dvb_event_unref0 (_result_); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1351,68 +1909,110 @@ static guint32* dvb_schedule_real_GetAllEvents (DVBIDBusSchedule* base, int* result_length1, GError** error) { DVBSchedule * self; guint32* result = NULL; - GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp0_; GeeArrayList* events; - gint _tmp7_; - guint32* _tmp8_ = NULL; + GeeArrayList* _tmp25_; + gint _tmp26_; + gint _tmp27_; + guint32* _tmp28_ = NULL; + guint32* event_ids; gint event_ids_length1; gint _event_ids_size_; - guint32* _tmp9_; - guint32* event_ids; - guint32* _tmp12_; + guint32* _tmp40_; + gint _tmp40__length1; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; _tmp0_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); events = _tmp0_; { + DVBEventStorage* _tmp1_; + _tmp1_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); { - DVBEventStorage* _tmp1_; - DVBEventStorage* _element_list; - gint _tmp2_; - gint _element_size; - gint _element_index; - _tmp1_ = _g_object_ref0 (self->priv->events); - _element_list = _tmp1_; - _tmp2_ = dvb_event_storage_get_size (_element_list); - _element_size = _tmp2_; - _element_index = -1; - while (TRUE) { - DVBEventElement* _tmp3_ = NULL; - DVBEventElement* element; - DVBEvent* _tmp4_ = NULL; - DVBEvent* event; - gboolean _tmp5_ = FALSE; - _element_index = _element_index + 1; - if (!(_element_index < _element_size)) { - break; - } - _tmp3_ = dvb_event_storage_get (_element_list, _element_index); - element = _tmp3_; - _tmp4_ = dvb_schedule_get_event (self, element->id); - event = _tmp4_; - if (event == NULL) { - _tmp5_ = TRUE; - } else { - gboolean _tmp6_; - _tmp6_ = dvb_event_has_expired (event); - _tmp5_ = _tmp6_; - } - if (_tmp5_) { + { + DVBEventStorage* _tmp2_; + DVBEventStorage* _tmp3_; + DVBEventStorage* _element_list; + DVBEventStorage* _tmp4_; + gint _tmp5_; + gint _tmp6_; + gint _element_size; + gint _element_index; + _tmp2_ = self->priv->events; + _tmp3_ = _g_object_ref0 (_tmp2_); + _element_list = _tmp3_; + _tmp4_ = _element_list; + _tmp5_ = dvb_event_storage_get_size (_tmp4_); + _tmp6_ = _tmp5_; + _element_size = _tmp6_; + _element_index = -1; + while (TRUE) { + gint _tmp7_; + gint _tmp8_; + gint _tmp9_; + DVBEventStorage* _tmp10_; + gint _tmp11_; + DVBEventElement* _tmp12_ = NULL; + DVBEventElement* element; + DVBEventElement* _tmp13_; + guint _tmp14_; + DVBEvent* _tmp15_ = NULL; + DVBEvent* event; + gboolean _tmp16_ = FALSE; + DVBEvent* _tmp17_; + gboolean _tmp20_; + GeeArrayList* _tmp21_; + DVBEventElement* _tmp22_; + guint _tmp23_; + _tmp7_ = _element_index; + _element_index = _tmp7_ + 1; + _tmp8_ = _element_index; + _tmp9_ = _element_size; + if (!(_tmp8_ < _tmp9_)) { + break; + } + _tmp10_ = _element_list; + _tmp11_ = _element_index; + _tmp12_ = dvb_event_storage_get (_tmp10_, _tmp11_); + element = _tmp12_; + _tmp13_ = element; + _tmp14_ = _tmp13_->id; + _tmp15_ = dvb_schedule_get_event (self, _tmp14_); + event = _tmp15_; + _tmp17_ = event; + if (_tmp17_ == NULL) { + _tmp16_ = TRUE; + } else { + DVBEvent* _tmp18_; + gboolean _tmp19_ = FALSE; + _tmp18_ = event; + _tmp19_ = dvb_event_has_expired (_tmp18_); + _tmp16_ = _tmp19_; + } + _tmp20_ = _tmp16_; + if (_tmp20_) { + _dvb_event_unref0 (event); + _g_object_unref0 (element); + continue; + } + _tmp21_ = events; + _tmp22_ = element; + _tmp23_ = _tmp22_->id; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp21_, GUINT_TO_POINTER ((guint32) _tmp23_)); _dvb_event_unref0 (event); _g_object_unref0 (element); - continue; } - gee_abstract_collection_add ((GeeAbstractCollection*) events, GUINT_TO_POINTER ((guint32) element->id)); - _dvb_event_unref0 (event); - _g_object_unref0 (element); + _g_object_unref0 (_element_list); } - _g_object_unref0 (_element_list); } - __finally163: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally174: + { + DVBEventStorage* _tmp24_; + _tmp24_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (events); return NULL; @@ -1424,35 +2024,61 @@ } } } - _tmp7_ = gee_collection_get_size ((GeeCollection*) events); - _tmp8_ = g_new0 (guint32, _tmp7_); - _tmp9_ = _tmp8_; - event_ids_length1 = _tmp7_; + _tmp25_ = events; + _tmp26_ = gee_collection_get_size ((GeeCollection*) _tmp25_); + _tmp27_ = _tmp26_; + _tmp28_ = g_new0 (guint32, _tmp27_); + event_ids = _tmp28_; + event_ids_length1 = _tmp27_; _event_ids_size_ = event_ids_length1; - event_ids = _tmp9_; { gint i; i = 0; { - gboolean _tmp10_; - _tmp10_ = TRUE; + gboolean _tmp29_; + _tmp29_ = TRUE; while (TRUE) { - gpointer _tmp11_ = NULL; - if (!_tmp10_) { - i++; - } - _tmp10_ = FALSE; - if (!(i < event_ids_length1)) { + gboolean _tmp30_; + gint _tmp32_; + guint32* _tmp33_; + gint _tmp33__length1; + guint32* _tmp34_; + gint _tmp34__length1; + gint _tmp35_; + GeeArrayList* _tmp36_; + gint _tmp37_; + gpointer _tmp38_ = NULL; + guint32 _tmp39_; + _tmp30_ = _tmp29_; + if (!_tmp30_) { + gint _tmp31_; + _tmp31_ = i; + i = _tmp31_ + 1; + } + _tmp29_ = FALSE; + _tmp32_ = i; + _tmp33_ = event_ids; + _tmp33__length1 = event_ids_length1; + if (!(_tmp32_ < _tmp33__length1)) { break; } - _tmp11_ = gee_abstract_list_get ((GeeAbstractList*) events, i); - event_ids[i] = GPOINTER_TO_UINT (_tmp11_); + _tmp34_ = event_ids; + _tmp34__length1 = event_ids_length1; + _tmp35_ = i; + _tmp36_ = events; + _tmp37_ = i; + _tmp38_ = gee_abstract_list_get ((GeeAbstractList*) _tmp36_, _tmp37_); + _tmp34_[_tmp35_] = GPOINTER_TO_UINT (_tmp38_); + _tmp39_ = _tmp34_[_tmp35_]; } } } - _tmp12_ = event_ids; - *result_length1 = event_ids_length1; - result = _tmp12_; + _tmp40_ = event_ids; + _tmp40__length1 = event_ids_length1; + if (result_length1) { + *result_length1 = _tmp40__length1; + } + result = _tmp40_; _g_object_unref0 (events); return result; } @@ -1472,68 +2098,111 @@ static DVBEventInfo* dvb_schedule_real_GetAllEventInfos (DVBIDBusSchedule* base, int* result_length1, GError** error) { DVBSchedule * self; DVBEventInfo* result = NULL; - GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp0_; GeeArrayList* all_events; - gint _tmp7_; + GeeArrayList* _tmp24_; + gint _tmp25_; + gint _tmp26_; gint n_events; - DVBEventInfo* _tmp8_ = NULL; + gint _tmp27_; + DVBEventInfo* _tmp28_ = NULL; + DVBEventInfo* event_infos; gint event_infos_length1; gint _event_infos_size_; - DVBEventInfo* _tmp9_; - DVBEventInfo* event_infos; gint i; DVBEvent* event; - DVBEventInfo* _tmp18_; + gint _tmp29_; + gint _tmp30_; + DVBEventInfo* _tmp52_; + gint _tmp52__length1; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; _tmp0_ = gee_array_list_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, NULL); all_events = _tmp0_; { + DVBEventStorage* _tmp1_; + _tmp1_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); { - DVBEventStorage* _tmp1_; - DVBEventStorage* _element_list; - gint _tmp2_; - gint _element_size; - gint _element_index; - _tmp1_ = _g_object_ref0 (self->priv->events); - _element_list = _tmp1_; - _tmp2_ = dvb_event_storage_get_size (_element_list); - _element_size = _tmp2_; - _element_index = -1; - while (TRUE) { - DVBEventElement* _tmp3_ = NULL; - DVBEventElement* element; - DVBEvent* _tmp4_ = NULL; - DVBEvent* event; - gboolean _tmp5_ = FALSE; - _element_index = _element_index + 1; - if (!(_element_index < _element_size)) { - break; - } - _tmp3_ = dvb_event_storage_get (_element_list, _element_index); - element = _tmp3_; - _tmp4_ = dvb_schedule_get_event (self, element->id); - event = _tmp4_; - if (event != NULL) { - gboolean _tmp6_; - _tmp6_ = dvb_event_has_expired (event); - _tmp5_ = !_tmp6_; - } else { - _tmp5_ = FALSE; - } - if (_tmp5_) { - gee_abstract_collection_add ((GeeAbstractCollection*) all_events, event); + { + DVBEventStorage* _tmp2_; + DVBEventStorage* _tmp3_; + DVBEventStorage* _element_list; + DVBEventStorage* _tmp4_; + gint _tmp5_; + gint _tmp6_; + gint _element_size; + gint _element_index; + _tmp2_ = self->priv->events; + _tmp3_ = _g_object_ref0 (_tmp2_); + _element_list = _tmp3_; + _tmp4_ = _element_list; + _tmp5_ = dvb_event_storage_get_size (_tmp4_); + _tmp6_ = _tmp5_; + _element_size = _tmp6_; + _element_index = -1; + while (TRUE) { + gint _tmp7_; + gint _tmp8_; + gint _tmp9_; + DVBEventStorage* _tmp10_; + gint _tmp11_; + DVBEventElement* _tmp12_ = NULL; + DVBEventElement* element; + DVBEventElement* _tmp13_; + guint _tmp14_; + DVBEvent* _tmp15_ = NULL; + DVBEvent* event; + gboolean _tmp16_ = FALSE; + DVBEvent* _tmp17_; + gboolean _tmp20_; + _tmp7_ = _element_index; + _element_index = _tmp7_ + 1; + _tmp8_ = _element_index; + _tmp9_ = _element_size; + if (!(_tmp8_ < _tmp9_)) { + break; + } + _tmp10_ = _element_list; + _tmp11_ = _element_index; + _tmp12_ = dvb_event_storage_get (_tmp10_, _tmp11_); + element = _tmp12_; + _tmp13_ = element; + _tmp14_ = _tmp13_->id; + _tmp15_ = dvb_schedule_get_event (self, _tmp14_); + event = _tmp15_; + _tmp17_ = event; + if (_tmp17_ != NULL) { + DVBEvent* _tmp18_; + gboolean _tmp19_ = FALSE; + _tmp18_ = event; + _tmp19_ = dvb_event_has_expired (_tmp18_); + _tmp16_ = !_tmp19_; + } else { + _tmp16_ = FALSE; + } + _tmp20_ = _tmp16_; + if (_tmp20_) { + GeeArrayList* _tmp21_; + DVBEvent* _tmp22_; + _tmp21_ = all_events; + _tmp22_ = event; + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp21_, _tmp22_); + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); } - _dvb_event_unref0 (event); - _g_object_unref0 (element); + _g_object_unref0 (_element_list); } - _g_object_unref0 (_element_list); } - __finally164: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally175: + { + DVBEventStorage* _tmp23_; + _tmp23_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); _g_object_unref0 (all_events); return NULL; @@ -1545,54 +2214,94 @@ } } } - _tmp7_ = gee_collection_get_size ((GeeCollection*) all_events); - n_events = _tmp7_; - _tmp8_ = g_new0 (DVBEventInfo, n_events); - _tmp9_ = _tmp8_; - event_infos_length1 = n_events; + _tmp24_ = all_events; + _tmp25_ = gee_collection_get_size ((GeeCollection*) _tmp24_); + _tmp26_ = _tmp25_; + n_events = _tmp26_; + _tmp27_ = n_events; + _tmp28_ = g_new0 (DVBEventInfo, _tmp27_); + event_infos = _tmp28_; + event_infos_length1 = _tmp27_; _event_infos_size_ = event_infos_length1; - event_infos = _tmp9_; i = 0; event = NULL; - if (n_events > i) { - gpointer _tmp10_ = NULL; - DVBEvent* _tmp11_; - _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) all_events, i); - _tmp11_ = (DVBEvent*) _tmp10_; + _tmp29_ = n_events; + _tmp30_ = i; + if (_tmp29_ > _tmp30_) { + GeeArrayList* _tmp31_; + gint _tmp32_; + gpointer _tmp33_ = NULL; + _tmp31_ = all_events; + _tmp32_ = i; + _tmp33_ = gee_abstract_list_get ((GeeAbstractList*) _tmp31_, _tmp32_); _dvb_event_unref0 (event); - event = _tmp11_; + event = (DVBEvent*) _tmp33_; } while (TRUE) { - DVBEventInfo _tmp12_ = {0}; - DVBEventInfo _tmp13_ = {0}; - DVBEventInfo _tmp14_; - if (!(event != NULL)) { + DVBEvent* _tmp34_; + DVBEventInfo* _tmp35_; + gint _tmp35__length1; + gint _tmp36_; + DVBEvent* _tmp37_; + DVBEventInfo _tmp38_ = {0}; + DVBEventInfo _tmp39_; + gint _tmp40_; + gint _tmp41_; + gint _tmp51_; + _tmp34_ = event; + if (!(_tmp34_ != NULL)) { break; } - _tmp13_ = (dvb_schedule_event_to_event_info (event, &_tmp12_), _tmp12_); - _tmp14_ = _tmp13_; - dvb_event_info_destroy (&event_infos[i]); - event_infos[i] = _tmp14_; - if ((i + 1) == n_events) { - DVBEvent* _tmp15_; - event_infos[i].next = (guint32) 0; - _tmp15_ = NULL; + _tmp35_ = event_infos; + _tmp35__length1 = event_infos_length1; + _tmp36_ = i; + _tmp37_ = event; + dvb_schedule_event_to_event_info (_tmp37_, &_tmp38_); + dvb_event_info_destroy (&_tmp35_[_tmp36_]); + _tmp35_[_tmp36_] = _tmp38_; + _tmp39_ = _tmp35_[_tmp36_]; + _tmp40_ = i; + _tmp41_ = n_events; + if ((_tmp40_ + 1) == _tmp41_) { + DVBEventInfo* _tmp42_; + gint _tmp42__length1; + gint _tmp43_; + _tmp42_ = event_infos; + _tmp42__length1 = event_infos_length1; + _tmp43_ = i; + _tmp42_[_tmp43_].next = (guint32) 0; _dvb_event_unref0 (event); - event = _tmp15_; + event = NULL; } else { - gpointer _tmp16_ = NULL; - DVBEvent* _tmp17_; - _tmp16_ = gee_abstract_list_get ((GeeAbstractList*) all_events, i + 1); - _tmp17_ = (DVBEvent*) _tmp16_; + GeeArrayList* _tmp44_; + gint _tmp45_; + gpointer _tmp46_ = NULL; + DVBEventInfo* _tmp47_; + gint _tmp47__length1; + gint _tmp48_; + DVBEvent* _tmp49_; + guint _tmp50_; + _tmp44_ = all_events; + _tmp45_ = i; + _tmp46_ = gee_abstract_list_get ((GeeAbstractList*) _tmp44_, _tmp45_ + 1); _dvb_event_unref0 (event); - event = _tmp17_; - event_infos[i].next = (guint32) event->id; - } - i++; + event = (DVBEvent*) _tmp46_; + _tmp47_ = event_infos; + _tmp47__length1 = event_infos_length1; + _tmp48_ = i; + _tmp49_ = event; + _tmp50_ = _tmp49_->id; + _tmp47_[_tmp48_].next = (guint32) _tmp50_; + } + _tmp51_ = i; + i = _tmp51_ + 1; + } + _tmp52_ = event_infos; + _tmp52__length1 = event_infos_length1; + if (result_length1) { + *result_length1 = _tmp52__length1; } - _tmp18_ = event_infos; - *result_length1 = event_infos_length1; - result = _tmp18_; + result = _tmp52_; _dvb_event_unref0 (event); _g_object_unref0 (all_events); return result; @@ -1601,72 +2310,101 @@ static gboolean dvb_schedule_real_GetInformations (DVBIDBusSchedule* base, guint32 event_id, DVBEventInfo* event_info, GError** error) { DVBSchedule * self; - DVBEventInfo _event_info = {0}; + DVBEventInfo _vala_event_info = {0}; gboolean result = FALSE; gboolean ret = FALSE; + DVBEventInfo _tmp0_ = {0}; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; + memset (&_tmp0_, 0, sizeof (DVBEventInfo)); + dvb_event_info_destroy (&_vala_event_info); + _vala_event_info = _tmp0_; { - gboolean _tmp0_; + DVBEventStorage* _tmp1_; + _tmp1_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEventElement* _tmp1_ = NULL; - DVBEventElement* element; - DVBEvent* _tmp2_ = NULL; - DVBEvent* event; - DVBEventInfo _tmp3_ = {0}; - DVBEventInfo _tmp4_ = {0}; - DVBEventInfo _tmp5_; - DVBEventElement* _tmp6_ = NULL; - DVBEventElement* next_element; - _tmp1_ = dvb_event_storage_get_by_id (self->priv->events, (guint) event_id); - element = _tmp1_; - _tmp2_ = dvb_schedule_get_event (self, element->id); - event = _tmp2_; - _tmp4_ = (dvb_schedule_event_to_event_info (event, &_tmp3_), _tmp3_); - _tmp5_ = _tmp4_; - dvb_event_info_destroy (&_event_info); - _event_info = _tmp5_; - _tmp6_ = dvb_event_storage_next (self->priv->events, element); - next_element = _tmp6_; - if (next_element == NULL) { - _event_info.next = (guint32) 0; - } else { - DVBEventElement* _tmp7_; + { + DVBEventStorage* _tmp2_; + guint32 _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->priv->events; + _tmp3_ = event_id; + _tmp4_ = dvb_event_storage_contains_event_with_id (_tmp2_, (guint) _tmp3_); + if (_tmp4_) { + DVBEventStorage* _tmp5_; + guint32 _tmp6_; + DVBEventElement* _tmp7_ = NULL; + DVBEventElement* element; DVBEventElement* _tmp8_; - _tmp7_ = _g_object_ref0 (next_element); - _tmp8_ = _tmp7_; + guint _tmp9_; + DVBEvent* _tmp10_ = NULL; + DVBEvent* event; + DVBEvent* _tmp11_; + DVBEventInfo _tmp12_ = {0}; + DVBEventStorage* _tmp13_; + DVBEventElement* _tmp14_; + DVBEventElement* _tmp15_ = NULL; + DVBEventElement* next_element; + DVBEventElement* _tmp16_; + _tmp5_ = self->priv->events; + _tmp6_ = event_id; + _tmp7_ = dvb_event_storage_get_by_id (_tmp5_, (guint) _tmp6_); + element = _tmp7_; + _tmp8_ = element; + _tmp9_ = _tmp8_->id; + _tmp10_ = dvb_schedule_get_event (self, _tmp9_); + event = _tmp10_; + _tmp11_ = event; + dvb_schedule_event_to_event_info (_tmp11_, &_tmp12_); + dvb_event_info_destroy (&_vala_event_info); + _vala_event_info = _tmp12_; + _tmp13_ = self->priv->events; + _tmp14_ = element; + _tmp15_ = dvb_event_storage_next (_tmp13_, _tmp14_); + next_element = _tmp15_; + _tmp16_ = next_element; + if (_tmp16_ == NULL) { + _vala_event_info.next = (guint32) 0; + } else { + DVBEventElement* _tmp17_; + DVBEventElement* _tmp18_; + DVBEventElement* _tmp19_; + guint _tmp20_; + _tmp17_ = next_element; + _tmp18_ = _g_object_ref0 (_tmp17_); + _g_object_unref0 (element); + element = _tmp18_; + _tmp19_ = element; + _tmp20_ = _tmp19_->id; + _vala_event_info.next = (guint32) _tmp20_; + } + ret = TRUE; + _g_object_unref0 (next_element); + _dvb_event_unref0 (event); _g_object_unref0 (element); - element = _tmp8_; - _event_info.next = (guint32) element->id; + } else { + gchar* _tmp21_; + gchar* _tmp22_; + _vala_event_info.id = (guint32) 0; + _tmp21_ = g_strdup (""); + _g_free0 (_vala_event_info.name); + _vala_event_info.name = _tmp21_; + _vala_event_info.duration = (guint) 0; + _tmp22_ = g_strdup (""); + _g_free0 (_vala_event_info.short_description); + _vala_event_info.short_description = _tmp22_; + _vala_event_info.next = (guint32) 0; + ret = FALSE; } - ret = TRUE; - _g_object_unref0 (next_element); - _dvb_event_unref0 (event); - _g_object_unref0 (element); - } else { - gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; - _event_info.id = (guint32) 0; - _tmp9_ = g_strdup (""); - _tmp10_ = _tmp9_; - _g_free0 (_event_info.name); - _event_info.name = _tmp10_; - _event_info.duration = (guint) 0; - _tmp11_ = g_strdup (""); - _tmp12_ = _tmp11_; - _g_free0 (_event_info.short_description); - _event_info.short_description = _tmp12_; - _event_info.next = (guint32) 0; - ret = FALSE; } - __finally165: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally176: + { + DVBEventStorage* _tmp23_; + _tmp23_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1678,9 +2416,9 @@ } result = ret; if (event_info) { - *event_info = _event_info; + *event_info = _vala_event_info; } else { - dvb_event_info_destroy (&_event_info); + dvb_event_info_destroy (&_vala_event_info); } return result; } @@ -1692,15 +2430,23 @@ DVBEvent* _tmp0_ = NULL; DVBEvent* event; guint _tmp1_ = 0U; + DVBEvent* _tmp2_; + guint _tmp5_; self = (DVBSchedule*) base; _tmp0_ = dvb_schedule_get_running_event (self); event = _tmp0_; - if (event == NULL) { + _tmp2_ = event; + if (_tmp2_ == NULL) { _tmp1_ = (guint) 0; } else { - _tmp1_ = event->id; + DVBEvent* _tmp3_; + guint _tmp4_; + _tmp3_ = event; + _tmp4_ = _tmp3_->id; + _tmp1_ = _tmp4_; } - result = (guint32) _tmp1_; + _tmp5_ = _tmp1_; + result = (guint32) _tmp5_; _dvb_event_unref0 (event); return result; } @@ -1714,30 +2460,60 @@ self = (DVBSchedule*) base; next_event = (guint32) 0; { - gboolean _tmp0_; + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEventElement* _tmp1_ = NULL; - DVBEventElement* element; - DVBEventElement* _tmp2_ = NULL; - DVBEventElement* next; - _tmp1_ = dvb_event_storage_get_by_id (self->priv->events, (guint) event_id); - element = _tmp1_; - _tmp2_ = dvb_event_storage_next (self->priv->events, element); - next = _tmp2_; - if (next != NULL) { - next_event = (guint32) next->id; + { + DVBEventStorage* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->events; + _tmp2_ = event_id; + _tmp3_ = dvb_event_storage_contains_event_with_id (_tmp1_, (guint) _tmp2_); + if (_tmp3_) { + DVBEventStorage* _tmp4_; + guint32 _tmp5_; + DVBEventElement* _tmp6_ = NULL; + DVBEventElement* element; + DVBEventStorage* _tmp7_; + DVBEventElement* _tmp8_; + DVBEventElement* _tmp9_ = NULL; + DVBEventElement* next; + DVBEventElement* _tmp10_; + _tmp4_ = self->priv->events; + _tmp5_ = event_id; + _tmp6_ = dvb_event_storage_get_by_id (_tmp4_, (guint) _tmp5_); + element = _tmp6_; + _tmp7_ = self->priv->events; + _tmp8_ = element; + _tmp9_ = dvb_event_storage_next (_tmp7_, _tmp8_); + next = _tmp9_; + _tmp10_ = next; + if (_tmp10_ != NULL) { + DVBEventElement* _tmp11_; + guint _tmp12_; + _tmp11_ = next; + _tmp12_ = _tmp11_->id; + next_event = (guint32) _tmp12_; + } + _g_object_unref0 (next); + _g_object_unref0 (element); + } else { + DVBLoggingLogger* _tmp13_; + guint32 _tmp14_; + _tmp13_ = dvb_schedule_log; + _tmp14_ = event_id; + dvb_logging_logger_debug (_tmp13_, "Schedule.vala:391: No event with id %u", (guint) _tmp14_); } - _g_object_unref0 (next); - _g_object_unref0 (element); - } else { - g_debug ("Schedule.vala:389: No event with id %u", (guint) event_id); } - __finally166: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally177: + { + DVBEventStorage* _tmp15_; + _tmp15_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return 0U; } else { @@ -1754,44 +2530,76 @@ static gboolean dvb_schedule_real_GetName (DVBIDBusSchedule* base, guint32 event_id, gchar** name, GError** error) { DVBSchedule * self; - gchar* _name = NULL; + gchar* _vala_name = NULL; gboolean result = FALSE; gboolean ret; + gchar* _tmp0_; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _tmp0_ = g_strdup (""); + _g_free0 (_vala_name); + _vala_name = _tmp0_; { - gboolean _tmp0_; + DVBEventStorage* _tmp1_; + _tmp1_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - gboolean _tmp2_ = FALSE; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - _tmp2_ = event->name != NULL; - } else { - _tmp2_ = FALSE; - } - if (_tmp2_) { - gchar* _tmp3_; - gchar* _tmp4_; - _tmp3_ = g_strdup (event->name); - _tmp4_ = _tmp3_; - _g_free0 (_name); - _name = _tmp4_; - ret = TRUE; + { + DVBEventStorage* _tmp2_; + guint32 _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->priv->events; + _tmp3_ = event_id; + _tmp4_ = dvb_event_storage_contains_event_with_id (_tmp2_, (guint) _tmp3_); + if (_tmp4_) { + guint32 _tmp5_; + DVBEvent* _tmp6_ = NULL; + DVBEvent* event; + gboolean _tmp7_ = FALSE; + DVBEvent* _tmp8_; + gboolean _tmp11_; + _tmp5_ = event_id; + _tmp6_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp5_); + event = _tmp6_; + _tmp8_ = event; + if (_tmp8_ != NULL) { + DVBEvent* _tmp9_; + const gchar* _tmp10_; + _tmp9_ = event; + _tmp10_ = _tmp9_->name; + _tmp7_ = _tmp10_ != NULL; + } else { + _tmp7_ = FALSE; + } + _tmp11_ = _tmp7_; + if (_tmp11_) { + DVBEvent* _tmp12_; + const gchar* _tmp13_; + gchar* _tmp14_; + _tmp12_ = event; + _tmp13_ = _tmp12_->name; + _tmp14_ = g_strdup (_tmp13_); + _g_free0 (_vala_name); + _vala_name = _tmp14_; + ret = TRUE; + } + _dvb_event_unref0 (event); + } else { + DVBLoggingLogger* _tmp15_; + guint32 _tmp16_; + _tmp15_ = dvb_schedule_log; + _tmp16_ = event_id; + dvb_logging_logger_debug (_tmp15_, "Schedule.vala:410: No event with id %u", (guint) _tmp16_); } - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:407: No event with id %u", (guint) event_id); } - __finally167: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally178: + { + DVBEventStorage* _tmp17_; + _tmp17_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1801,19 +2609,11 @@ } } } - if (!ret) { - gchar* _tmp5_; - gchar* _tmp6_; - _tmp5_ = g_strdup (""); - _tmp6_ = _tmp5_; - _g_free0 (_name); - _name = _tmp6_; - } result = ret; if (name) { - *name = _name; + *name = _vala_name; } else { - _g_free0 (_name); + _g_free0 (_vala_name); } return result; } @@ -1821,44 +2621,76 @@ static gboolean dvb_schedule_real_GetShortDescription (DVBIDBusSchedule* base, guint32 event_id, gchar** description, GError** error) { DVBSchedule * self; - gchar* _description = NULL; + gchar* _vala_description = NULL; gboolean result = FALSE; gboolean ret; + gchar* _tmp0_; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _tmp0_ = g_strdup (""); + _g_free0 (_vala_description); + _vala_description = _tmp0_; { - gboolean _tmp0_; + DVBEventStorage* _tmp1_; + _tmp1_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - gboolean _tmp2_ = FALSE; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - _tmp2_ = event->description != NULL; - } else { - _tmp2_ = FALSE; - } - if (_tmp2_) { - gchar* _tmp3_; - gchar* _tmp4_; - _tmp3_ = g_strdup (event->description); - _tmp4_ = _tmp3_; - _g_free0 (_description); - _description = _tmp4_; - ret = TRUE; + { + DVBEventStorage* _tmp2_; + guint32 _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->priv->events; + _tmp3_ = event_id; + _tmp4_ = dvb_event_storage_contains_event_with_id (_tmp2_, (guint) _tmp3_); + if (_tmp4_) { + guint32 _tmp5_; + DVBEvent* _tmp6_ = NULL; + DVBEvent* event; + gboolean _tmp7_ = FALSE; + DVBEvent* _tmp8_; + gboolean _tmp11_; + _tmp5_ = event_id; + _tmp6_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp5_); + event = _tmp6_; + _tmp8_ = event; + if (_tmp8_ != NULL) { + DVBEvent* _tmp9_; + const gchar* _tmp10_; + _tmp9_ = event; + _tmp10_ = _tmp9_->description; + _tmp7_ = _tmp10_ != NULL; + } else { + _tmp7_ = FALSE; + } + _tmp11_ = _tmp7_; + if (_tmp11_) { + DVBEvent* _tmp12_; + const gchar* _tmp13_; + gchar* _tmp14_; + _tmp12_ = event; + _tmp13_ = _tmp12_->description; + _tmp14_ = g_strdup (_tmp13_); + _g_free0 (_vala_description); + _vala_description = _tmp14_; + ret = TRUE; + } + _dvb_event_unref0 (event); + } else { + DVBLoggingLogger* _tmp15_; + guint32 _tmp16_; + _tmp15_ = dvb_schedule_log; + _tmp16_ = event_id; + dvb_logging_logger_debug (_tmp15_, "Schedule.vala:431: No event with id %u", (guint) _tmp16_); } - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:427: No event with id %u", (guint) event_id); } - __finally168: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally179: + { + DVBEventStorage* _tmp17_; + _tmp17_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1868,19 +2700,11 @@ } } } - if (!ret) { - gchar* _tmp5_; - gchar* _tmp6_; - _tmp5_ = g_strdup (""); - _tmp6_ = _tmp5_; - _g_free0 (_description); - _description = _tmp6_; - } result = ret; if (description) { - *description = _description; + *description = _vala_description; } else { - _g_free0 (_description); + _g_free0 (_vala_description); } return result; } @@ -1888,44 +2712,76 @@ static gboolean dvb_schedule_real_GetExtendedDescription (DVBIDBusSchedule* base, guint32 event_id, gchar** description, GError** error) { DVBSchedule * self; - gchar* _description = NULL; + gchar* _vala_description = NULL; gboolean result = FALSE; gboolean ret; + gchar* _tmp0_; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _tmp0_ = g_strdup (""); + _g_free0 (_vala_description); + _vala_description = _tmp0_; { - gboolean _tmp0_; + DVBEventStorage* _tmp1_; + _tmp1_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - gboolean _tmp2_ = FALSE; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - _tmp2_ = event->extended_description != NULL; - } else { - _tmp2_ = FALSE; - } - if (_tmp2_) { - gchar* _tmp3_; - gchar* _tmp4_; - _tmp3_ = g_strdup (event->extended_description); - _tmp4_ = _tmp3_; - _g_free0 (_description); - _description = _tmp4_; - ret = TRUE; + { + DVBEventStorage* _tmp2_; + guint32 _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->priv->events; + _tmp3_ = event_id; + _tmp4_ = dvb_event_storage_contains_event_with_id (_tmp2_, (guint) _tmp3_); + if (_tmp4_) { + guint32 _tmp5_; + DVBEvent* _tmp6_ = NULL; + DVBEvent* event; + gboolean _tmp7_ = FALSE; + DVBEvent* _tmp8_; + gboolean _tmp11_; + _tmp5_ = event_id; + _tmp6_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp5_); + event = _tmp6_; + _tmp8_ = event; + if (_tmp8_ != NULL) { + DVBEvent* _tmp9_; + const gchar* _tmp10_; + _tmp9_ = event; + _tmp10_ = _tmp9_->extended_description; + _tmp7_ = _tmp10_ != NULL; + } else { + _tmp7_ = FALSE; + } + _tmp11_ = _tmp7_; + if (_tmp11_) { + DVBEvent* _tmp12_; + const gchar* _tmp13_; + gchar* _tmp14_; + _tmp12_ = event; + _tmp13_ = _tmp12_->extended_description; + _tmp14_ = g_strdup (_tmp13_); + _g_free0 (_vala_description); + _vala_description = _tmp14_; + ret = TRUE; + } + _dvb_event_unref0 (event); + } else { + DVBLoggingLogger* _tmp15_; + guint32 _tmp16_; + _tmp15_ = dvb_schedule_log; + _tmp16_ = event_id; + dvb_logging_logger_debug (_tmp15_, "Schedule.vala:452: No event with id %u", (guint) _tmp16_); } - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:447: No event with id %u", (guint) event_id); } - __finally169: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally180: + { + DVBEventStorage* _tmp17_; + _tmp17_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1935,19 +2791,11 @@ } } } - if (!ret) { - gchar* _tmp5_; - gchar* _tmp6_; - _tmp5_ = g_strdup (""); - _tmp6_ = _tmp5_; - _g_free0 (_description); - _description = _tmp6_; - } result = ret; if (description) { - *description = _description; + *description = _vala_description; } else { - _g_free0 (_description); + _g_free0 (_vala_description); } return result; } @@ -1955,33 +2803,58 @@ static gboolean dvb_schedule_real_GetDuration (DVBIDBusSchedule* base, guint32 event_id, guint* duration, GError** error) { DVBSchedule * self; - guint _duration = 0U; + guint _vala_duration = 0U; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _vala_duration = (guint) 0; { - gboolean _tmp0_; + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - _duration = event->duration; - ret = TRUE; + { + DVBEventStorage* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->events; + _tmp2_ = event_id; + _tmp3_ = dvb_event_storage_contains_event_with_id (_tmp1_, (guint) _tmp2_); + if (_tmp3_) { + guint32 _tmp4_; + DVBEvent* _tmp5_ = NULL; + DVBEvent* event; + DVBEvent* _tmp6_; + _tmp4_ = event_id; + _tmp5_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp4_); + event = _tmp5_; + _tmp6_ = event; + if (_tmp6_ != NULL) { + DVBEvent* _tmp7_; + guint _tmp8_; + _tmp7_ = event; + _tmp8_ = _tmp7_->duration; + _vala_duration = _tmp8_; + ret = TRUE; + } + _dvb_event_unref0 (event); + } else { + DVBLoggingLogger* _tmp9_; + guint32 _tmp10_; + _tmp9_ = dvb_schedule_log; + _tmp10_ = event_id; + dvb_logging_logger_debug (_tmp9_, "Schedule.vala:473: No event with id %u", (guint) _tmp10_); } - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:467: No event with id %u", (guint) event_id); } - __finally170: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally181: + { + DVBEventStorage* _tmp11_; + _tmp11_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -1993,7 +2866,7 @@ } result = ret; if (duration) { - *duration = _duration; + *duration = _vala_duration; } return result; } @@ -2001,53 +2874,72 @@ static gboolean dvb_schedule_real_GetLocalStartTime (DVBIDBusSchedule* base, guint32 event_id, guint** start_time, int* start_time_length1, GError** error) { DVBSchedule * self; - guint* _start_time = NULL; - int _start_time_length1 = 0; + guint* _vala_start_time = NULL; + int _vala_start_time_length1 = 0; gboolean result = FALSE; gboolean ret; + guint* _tmp0_ = NULL; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _tmp0_ = g_new0 (guint, 0); + _vala_start_time = (g_free (_vala_start_time), NULL); + _vala_start_time = _tmp0_; + _vala_start_time_length1 = 0; { - gboolean _tmp0_; + DVBEventStorage* _tmp1_; + _tmp1_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - struct tm _tmp2_ = {0}; - struct tm _tmp3_ = {0}; - struct tm local_time; - gint _tmp4_; - guint* _tmp5_ = NULL; - guint* _tmp6_; - _tmp3_ = (dvb_event_get_local_start_time (event, &_tmp2_), _tmp2_); - local_time = _tmp3_; - _tmp5_ = dvb_schedule_to_time_array (&local_time, &_tmp4_); - _tmp6_ = _tmp5_; - _start_time = (g_free (_start_time), NULL); - _start_time_length1 = _tmp4_; - _start_time = _tmp6_; - ret = TRUE; + { + DVBEventStorage* _tmp2_; + guint32 _tmp3_; + gboolean _tmp4_ = FALSE; + _tmp2_ = self->priv->events; + _tmp3_ = event_id; + _tmp4_ = dvb_event_storage_contains_event_with_id (_tmp2_, (guint) _tmp3_); + if (_tmp4_) { + guint32 _tmp5_; + DVBEvent* _tmp6_ = NULL; + DVBEvent* event; + DVBEvent* _tmp7_; + _tmp5_ = event_id; + _tmp6_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp5_); + event = _tmp6_; + _tmp7_ = event; + if (_tmp7_ != NULL) { + DVBEvent* _tmp8_; + struct tm _tmp9_ = {0}; + struct tm local_time; + struct tm _tmp10_; + gint _tmp11_ = 0; + guint* _tmp12_ = NULL; + _tmp8_ = event; + dvb_event_get_local_start_time (_tmp8_, &_tmp9_); + local_time = _tmp9_; + _tmp10_ = local_time; + _tmp12_ = dvb_schedule_to_time_array (&_tmp10_, &_tmp11_); + _vala_start_time = (g_free (_vala_start_time), NULL); + _vala_start_time = _tmp12_; + _vala_start_time_length1 = _tmp11_; + ret = TRUE; + } + _dvb_event_unref0 (event); + } else { + DVBLoggingLogger* _tmp13_; + guint32 _tmp14_; + _tmp13_ = dvb_schedule_log; + _tmp14_ = event_id; + dvb_logging_logger_debug (_tmp13_, "Schedule.vala:495: No event with id %u", (guint) _tmp14_); } - _dvb_event_unref0 (event); - } else { - guint* _tmp7_ = NULL; - guint* _tmp8_; - g_debug ("Schedule.vala:488: No event with id %u", (guint) event_id); - _tmp7_ = g_new0 (guint, 0); - _tmp8_ = _tmp7_; - _start_time = (g_free (_start_time), NULL); - _start_time_length1 = 0; - _start_time = _tmp8_; } - __finally171: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally182: + { + DVBEventStorage* _tmp15_; + _tmp15_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -2057,23 +2949,14 @@ } } } - if (!ret) { - guint* _tmp9_ = NULL; - guint* _tmp10_; - _tmp9_ = g_new0 (guint, 0); - _tmp10_ = _tmp9_; - _start_time = (g_free (_start_time), NULL); - _start_time_length1 = 0; - _start_time = _tmp10_; - } result = ret; if (start_time) { - *start_time = _start_time; + *start_time = _vala_start_time; } else { - _start_time = (g_free (_start_time), NULL); + _vala_start_time = (g_free (_vala_start_time), NULL); } if (start_time_length1) { - *start_time_length1 = _start_time_length1; + *start_time_length1 = _vala_start_time_length1; } return result; } @@ -2081,38 +2964,56 @@ static gboolean dvb_schedule_real_GetLocalStartTimestamp (DVBIDBusSchedule* base, guint32 event_id, gint64* timestamp, GError** error) { DVBSchedule * self; - gint64 _timestamp = 0LL; + gint64 _vala_timestamp = 0LL; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _vala_timestamp = (gint64) 0; { - gboolean _tmp0_; + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - struct tm _tmp2_ = {0}; - struct tm _tmp3_ = {0}; - struct tm local_time; - time_t _tmp4_; - _tmp3_ = (dvb_event_get_local_start_time (event, &_tmp2_), _tmp2_); - local_time = _tmp3_; - _tmp4_ = mktime (&local_time); - _timestamp = (gint64) _tmp4_; - ret = TRUE; + { + DVBEventStorage* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->events; + _tmp2_ = event_id; + _tmp3_ = dvb_event_storage_contains_event_with_id (_tmp1_, (guint) _tmp2_); + if (_tmp3_) { + guint32 _tmp4_; + DVBEvent* _tmp5_ = NULL; + DVBEvent* event; + DVBEvent* _tmp6_; + _tmp4_ = event_id; + _tmp5_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp4_); + event = _tmp5_; + _tmp6_ = event; + if (_tmp6_ != NULL) { + DVBEvent* _tmp7_; + struct tm _tmp8_ = {0}; + struct tm local_time; + time_t _tmp9_ = 0; + _tmp7_ = event; + dvb_event_get_local_start_time (_tmp7_, &_tmp8_); + local_time = _tmp8_; + _tmp9_ = mktime (&local_time); + _vala_timestamp = (gint64) _tmp9_; + ret = TRUE; + } + _dvb_event_unref0 (event); } - _dvb_event_unref0 (event); } - __finally172: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally183: + { + DVBEventStorage* _tmp10_; + _tmp10_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -2124,7 +3025,7 @@ } result = ret; if (timestamp) { - *timestamp = _timestamp; + *timestamp = _vala_timestamp; } return result; } @@ -2132,35 +3033,58 @@ static gboolean dvb_schedule_real_IsRunning (DVBIDBusSchedule* base, guint32 event_id, gboolean* running, GError** error) { DVBSchedule * self; - gboolean _running = FALSE; + gboolean _vala_running = FALSE; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _vala_running = FALSE; { - gboolean _tmp0_; + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - gboolean _tmp2_; - _tmp2_ = dvb_event_is_running (event); - _running = _tmp2_; - ret = TRUE; + { + DVBEventStorage* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->events; + _tmp2_ = event_id; + _tmp3_ = dvb_event_storage_contains_event_with_id (_tmp1_, (guint) _tmp2_); + if (_tmp3_) { + guint32 _tmp4_; + DVBEvent* _tmp5_ = NULL; + DVBEvent* event; + DVBEvent* _tmp6_; + _tmp4_ = event_id; + _tmp5_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp4_); + event = _tmp5_; + _tmp6_ = event; + if (_tmp6_ != NULL) { + DVBEvent* _tmp7_; + gboolean _tmp8_ = FALSE; + _tmp7_ = event; + _tmp8_ = dvb_event_is_running (_tmp7_); + _vala_running = _tmp8_; + ret = TRUE; + } + _dvb_event_unref0 (event); + } else { + DVBLoggingLogger* _tmp9_; + guint32 _tmp10_; + _tmp9_ = dvb_schedule_log; + _tmp10_ = event_id; + dvb_logging_logger_debug (_tmp9_, "Schedule.vala:536: No event with id %u", (guint) _tmp10_); } - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:528: No event with id %u", (guint) event_id); } - __finally173: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally184: + { + DVBEventStorage* _tmp11_; + _tmp11_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -2172,7 +3096,7 @@ } result = ret; if (running) { - *running = _running; + *running = _vala_running; } return result; } @@ -2180,33 +3104,58 @@ static gboolean dvb_schedule_real_IsScrambled (DVBIDBusSchedule* base, guint32 event_id, gboolean* scrambled, GError** error) { DVBSchedule * self; - gboolean _scrambled = FALSE; + gboolean _vala_scrambled = FALSE; gboolean result = FALSE; gboolean ret; GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; + _vala_scrambled = FALSE; { - gboolean _tmp0_; + DVBEventStorage* _tmp0_; + _tmp0_ = self->priv->events; g_static_rec_mutex_lock (&self->priv->__lock_events); - _tmp0_ = dvb_event_storage_contains_event_with_id (self->priv->events, (guint) event_id); - if (_tmp0_) { - DVBEvent* _tmp1_ = NULL; - DVBEvent* event; - _tmp1_ = dvb_schedule_get_extended_event_by_id (self, (guint) event_id); - event = _tmp1_; - if (event != NULL) { - _scrambled = !event->free_ca_mode; - ret = TRUE; + { + DVBEventStorage* _tmp1_; + guint32 _tmp2_; + gboolean _tmp3_ = FALSE; + _tmp1_ = self->priv->events; + _tmp2_ = event_id; + _tmp3_ = dvb_event_storage_contains_event_with_id (_tmp1_, (guint) _tmp2_); + if (_tmp3_) { + guint32 _tmp4_; + DVBEvent* _tmp5_ = NULL; + DVBEvent* event; + DVBEvent* _tmp6_; + _tmp4_ = event_id; + _tmp5_ = dvb_schedule_get_extended_event_by_id (self, (guint) _tmp4_); + event = _tmp5_; + _tmp6_ = event; + if (_tmp6_ != NULL) { + DVBEvent* _tmp7_; + gboolean _tmp8_; + _tmp7_ = event; + _tmp8_ = _tmp7_->free_ca_mode; + _vala_scrambled = !_tmp8_; + ret = TRUE; + } + _dvb_event_unref0 (event); + } else { + DVBLoggingLogger* _tmp9_; + guint32 _tmp10_; + _tmp9_ = dvb_schedule_log; + _tmp10_ = event_id; + dvb_logging_logger_debug (_tmp9_, "Schedule.vala:557: No event with id %u", (guint) _tmp10_); } - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:548: No event with id %u", (guint) event_id); } - __finally174: - g_static_rec_mutex_unlock (&self->priv->__lock_events); + __finally185: + { + DVBEventStorage* _tmp11_; + _tmp11_ = self->priv->events; + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { + if (_inner_error_->domain == G_DBUS_ERROR) { g_propagate_error (error, _inner_error_); return FALSE; } else { @@ -2218,7 +3167,7 @@ } result = ret; if (scrambled) { - *scrambled = _scrambled; + *scrambled = _vala_scrambled; } return result; } @@ -2226,14 +3175,20 @@ static DVBEvent* dvb_schedule_get_extended_event_by_id (DVBSchedule* self, guint event_id) { DVBEvent* result = NULL; - DVBEventElement* _tmp0_ = NULL; + DVBEventStorage* _tmp0_; + guint _tmp1_; + DVBEventElement* _tmp2_ = NULL; DVBEventElement* element; - DVBEvent* _tmp1_ = NULL; + guint _tmp3_; + DVBEvent* _tmp4_ = NULL; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = dvb_event_storage_get_by_id (self->priv->events, event_id); - element = _tmp0_; - _tmp1_ = dvb_schedule_get_event (self, element->id); - result = _tmp1_; + _tmp0_ = self->priv->events; + _tmp1_ = event_id; + _tmp2_ = dvb_event_storage_get_by_id (_tmp0_, _tmp1_); + element = _tmp2_; + _tmp3_ = element->id; + _tmp4_ = dvb_schedule_get_event (self, _tmp3_); + result = _tmp4_; _g_object_unref0 (element); return result; } @@ -2242,47 +3197,98 @@ static guint* dvb_schedule_to_time_array (struct tm* local_time, int* result_length1) { guint* result = NULL; guint* _tmp0_ = NULL; + guint* start; gint start_length1; gint _start_size_; - guint* _tmp1_; - guint* start; - guint* _tmp2_; + struct tm _tmp1_; + gint _tmp2_; + guint _tmp3_; + struct tm _tmp4_; + gint _tmp5_; + guint _tmp6_; + struct tm _tmp7_; + gint _tmp8_; + guint _tmp9_; + struct tm _tmp10_; + gint _tmp11_; + guint _tmp12_; + struct tm _tmp13_; + gint _tmp14_; + guint _tmp15_; + struct tm _tmp16_; + gint _tmp17_; + guint _tmp18_; + guint* _tmp19_; + gint _tmp19__length1; + g_return_val_if_fail (local_time != NULL, NULL); _tmp0_ = g_new0 (guint, 6); - _tmp1_ = _tmp0_; + start = _tmp0_; start_length1 = 6; _start_size_ = start_length1; - start = _tmp1_; - start[0] = (guint) ((*local_time).tm_year + 1900); - start[1] = (guint) ((*local_time).tm_mon + 1); - start[2] = (guint) (*local_time).tm_mday; - start[3] = (guint) (*local_time).tm_hour; - start[4] = (guint) (*local_time).tm_min; - start[5] = (guint) (*local_time).tm_sec; - _tmp2_ = start; - *result_length1 = start_length1; - result = _tmp2_; + _tmp1_ = *local_time; + _tmp2_ = _tmp1_.tm_year; + start[0] = (guint) (_tmp2_ + 1900); + _tmp3_ = start[0]; + _tmp4_ = *local_time; + _tmp5_ = _tmp4_.tm_mon; + start[1] = (guint) (_tmp5_ + 1); + _tmp6_ = start[1]; + _tmp7_ = *local_time; + _tmp8_ = _tmp7_.tm_mday; + start[2] = (guint) _tmp8_; + _tmp9_ = start[2]; + _tmp10_ = *local_time; + _tmp11_ = _tmp10_.tm_hour; + start[3] = (guint) _tmp11_; + _tmp12_ = start[3]; + _tmp13_ = *local_time; + _tmp14_ = _tmp13_.tm_min; + start[4] = (guint) _tmp14_; + _tmp15_ = start[4]; + _tmp16_ = *local_time; + _tmp17_ = _tmp16_.tm_sec; + start[5] = (guint) _tmp17_; + _tmp18_ = start[5]; + _tmp19_ = start; + _tmp19__length1 = start_length1; + if (result_length1) { + *result_length1 = _tmp19__length1; + } + result = _tmp19_; return result; } static void dvb_schedule_event_to_event_info (DVBEvent* event, DVBEventInfo* result) { DVBEventInfo event_info = {0}; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; + DVBEvent* _tmp0_; + guint _tmp1_; + DVBEvent* _tmp2_; + const gchar* _tmp3_; + gchar* _tmp4_; + DVBEvent* _tmp5_; + guint _tmp6_; + DVBEvent* _tmp7_; + const gchar* _tmp8_; + gchar* _tmp9_; g_return_if_fail (event != NULL); memset (&event_info, 0, sizeof (DVBEventInfo)); - event_info.id = (guint32) event->id; - _tmp0_ = g_strdup (event->name); - _tmp1_ = _tmp0_; + _tmp0_ = event; + _tmp1_ = _tmp0_->id; + event_info.id = (guint32) _tmp1_; + _tmp2_ = event; + _tmp3_ = _tmp2_->name; + _tmp4_ = g_strdup (_tmp3_); _g_free0 (event_info.name); - event_info.name = _tmp1_; - event_info.duration = event->duration; - _tmp2_ = g_strdup (event->description); - _tmp3_ = _tmp2_; + event_info.name = _tmp4_; + _tmp5_ = event; + _tmp6_ = _tmp5_->duration; + event_info.duration = _tmp6_; + _tmp7_ = event; + _tmp8_ = _tmp7_->description; + _tmp9_ = g_strdup (_tmp8_); _g_free0 (event_info.short_description); - event_info.short_description = _tmp3_; + event_info.short_description = _tmp9_; *result = event_info; return; } @@ -2290,53 +3296,51 @@ DVBChannel* dvb_schedule_get_channel (DVBSchedule* self) { DVBChannel* result; + DVBChannel* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_channel; + _tmp0_ = self->priv->_channel; + result = _tmp0_; return result; } static void dvb_schedule_set_channel (DVBSchedule* self, DVBChannel* value) { + DVBChannel* _tmp0_; g_return_if_fail (self != NULL); - self->priv->_channel = value; + _tmp0_ = value; + self->priv->_channel = _tmp0_; g_object_notify ((GObject *) self, "channel"); } -static gboolean _dvb_schedule_restore_gsource_func (gpointer self) { - gboolean result; - result = dvb_schedule_restore (self); - return result; -} - - static GObject * dvb_schedule_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { GObject * obj; GObjectClass * parent_class; DVBSchedule * self; - DVBEventStorage* _tmp0_ = NULL; - DVBEventStorage* _tmp1_; - DVBdatabaseEPGStore* _tmp2_ = NULL; - DVBdatabaseEPGStore* _tmp3_; + DVBEventStorage* _tmp0_; + DVBFactory* _tmp1_; + DVBFactory* _tmp2_; + DVBdatabaseEPGStore* _tmp3_ = NULL; parent_class = G_OBJECT_CLASS (dvb_schedule_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_SCHEDULE (obj); _tmp0_ = dvb_event_storage_new (); - _tmp1_ = _tmp0_; _g_object_unref0 (self->priv->events); - self->priv->events = _tmp1_; - _tmp2_ = dvb_factory_get_epg_store (); - _tmp3_ = _tmp2_; + self->priv->events = _tmp0_; + _tmp1_ = dvb_factory_new (); + _tmp2_ = _tmp1_; + _tmp3_ = dvb_factory_get_epg_store (_tmp2_); _g_object_unref0 (self->priv->epgstore); self->priv->epgstore = _tmp3_; - g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _dvb_schedule_restore_gsource_func, g_object_ref (self), g_object_unref); + _g_object_unref0 (_tmp2_); return obj; } static void dvb_schedule_class_init (DVBScheduleClass * klass) { - GStaticRecMutex _tmp0_ = {0}; - GStaticRecMutex _tmp1_ = {0}; + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; + GStaticRecMutex _tmp2_ = {0}; dvb_schedule_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBSchedulePrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_dvb_schedule_get_property; @@ -2344,28 +3348,29 @@ G_OBJECT_CLASS (klass)->constructor = dvb_schedule_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_schedule_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_SCHEDULE_CHANNEL, g_param_spec_object ("channel", "channel", "channel", DVB_TYPE_CHANNEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - g_type_set_qdata (DVB_TYPE_SCHEDULE, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_schedule_dbus_vtable)); - g_static_rec_mutex_init (&_tmp0_); - _tmp1_ = _tmp0_; - dvb_schedule_mutex = _tmp1_; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_schedule_log = _tmp1_; + g_static_rec_mutex_init (&_tmp2_); + dvb_schedule_mutex = _tmp2_; } static void dvb_schedule_dvb_id_bus_schedule_interface_init (DVBIDBusScheduleIface * iface) { dvb_schedule_dvb_id_bus_schedule_parent_iface = g_type_interface_peek_parent (iface); - iface->GetAllEvents = (guint32* (*)(DVBIDBusSchedule* ,int* ,GError**)) dvb_schedule_real_GetAllEvents; - iface->GetAllEventInfos = (DVBEventInfo* (*)(DVBIDBusSchedule* ,int* ,GError**)) dvb_schedule_real_GetAllEventInfos; - iface->GetInformations = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,DVBEventInfo* ,GError**)) dvb_schedule_real_GetInformations; - iface->NowPlaying = (guint32 (*)(DVBIDBusSchedule* ,GError**)) dvb_schedule_real_NowPlaying; - iface->Next = (guint32 (*)(DVBIDBusSchedule* ,guint32 ,GError**)) dvb_schedule_real_Next; - iface->GetName = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,gchar** ,GError**)) dvb_schedule_real_GetName; - iface->GetShortDescription = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,gchar** ,GError**)) dvb_schedule_real_GetShortDescription; - iface->GetExtendedDescription = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,gchar** ,GError**)) dvb_schedule_real_GetExtendedDescription; - iface->GetDuration = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,guint* ,GError**)) dvb_schedule_real_GetDuration; - iface->GetLocalStartTime = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,guint** ,int* ,GError**)) dvb_schedule_real_GetLocalStartTime; - iface->GetLocalStartTimestamp = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,gint64* ,GError**)) dvb_schedule_real_GetLocalStartTimestamp; - iface->IsRunning = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,gboolean* ,GError**)) dvb_schedule_real_IsRunning; - iface->IsScrambled = (gboolean (*)(DVBIDBusSchedule* ,guint32 ,gboolean* ,GError**)) dvb_schedule_real_IsScrambled; + iface->GetAllEvents = (guint32* (*)(DVBIDBusSchedule*, int*, GError**)) dvb_schedule_real_GetAllEvents; + iface->GetAllEventInfos = (DVBEventInfo* (*)(DVBIDBusSchedule*, int*, GError**)) dvb_schedule_real_GetAllEventInfos; + iface->GetInformations = (gboolean (*)(DVBIDBusSchedule*, guint32, DVBEventInfo*, GError**)) dvb_schedule_real_GetInformations; + iface->NowPlaying = (guint32 (*)(DVBIDBusSchedule*, GError**)) dvb_schedule_real_NowPlaying; + iface->Next = (guint32 (*)(DVBIDBusSchedule*, guint32, GError**)) dvb_schedule_real_Next; + iface->GetName = (gboolean (*)(DVBIDBusSchedule*, guint32, gchar**, GError**)) dvb_schedule_real_GetName; + iface->GetShortDescription = (gboolean (*)(DVBIDBusSchedule*, guint32, gchar**, GError**)) dvb_schedule_real_GetShortDescription; + iface->GetExtendedDescription = (gboolean (*)(DVBIDBusSchedule*, guint32, gchar**, GError**)) dvb_schedule_real_GetExtendedDescription; + iface->GetDuration = (gboolean (*)(DVBIDBusSchedule*, guint32, guint*, GError**)) dvb_schedule_real_GetDuration; + iface->GetLocalStartTime = (gboolean (*)(DVBIDBusSchedule*, guint32, guint**, int*, GError**)) dvb_schedule_real_GetLocalStartTime; + iface->GetLocalStartTimestamp = (gboolean (*)(DVBIDBusSchedule*, guint32, gint64*, GError**)) dvb_schedule_real_GetLocalStartTimestamp; + iface->IsRunning = (gboolean (*)(DVBIDBusSchedule*, guint32, gboolean*, GError**)) dvb_schedule_real_IsRunning; + iface->IsScrambled = (gboolean (*)(DVBIDBusSchedule*, guint32, gboolean*, GError**)) dvb_schedule_real_IsScrambled; } diff -Nru gnome-dvb-daemon-0.1.23/src/Schedule.vala gnome-dvb-daemon-0.2.7/src/Schedule.vala --- gnome-dvb-daemon-0.1.23/src/Schedule.vala 2011-01-07 11:36:24.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Schedule.vala 2011-09-29 20:27:47.000000000 +0000 @@ -20,6 +20,7 @@ using GLib; using Gee; using DVB.database; +using DVB.Logging; namespace DVB { @@ -28,6 +29,8 @@ */ public class Schedule : GLib.Object, IDBusSchedule { + private static Logger log = LogManager.getLogManager().getDefaultLogger(); + private static const int MATCH_THRESHOLD = 100; private static const double MIN_EVENT_OVERLAP = 0.5; @@ -41,24 +44,23 @@ construct { this.events = new EventStorage (); - this.epgstore = Factory.get_epg_store (); - - Idle.add (this.restore); + this.epgstore = new Factory().get_epg_store (); } - private bool restore () { + public async void restore () { Gee.List levents; try { levents = this.epgstore.get_events ( this.channel.Sid, this.channel.GroupId); - } catch (SqlError e) { - critical ("%s", e.message); - return false; + } catch (SqlError e1) { + log.error ("%s", e1.message); + return; } int newest_expired = -1; + Event event; for (int i=0; i events = new ArrayList (); lock (this.events) { foreach (EventElement element in this.events) { @@ -304,7 +305,7 @@ return event_ids; } - public EventInfo[] GetAllEventInfos () throws DBus.Error { + public EventInfo[] GetAllEventInfos () throws DBusError { ArrayList all_events = new ArrayList (); lock (this.events) { foreach (EventElement element in this.events) { @@ -337,9 +338,10 @@ } public bool GetInformations (uint32 event_id, out EventInfo event_info) - throws DBus.Error + throws DBusError { bool ret; + event_info = EventInfo(); lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -368,13 +370,13 @@ return ret; } - public uint32 NowPlaying () throws DBus.Error { + public uint32 NowPlaying () throws DBusError { Event? event = this.get_running_event (); return (event == null) ? 0 : event.id; } - public uint32 Next (uint32 event_id) throws DBus.Error { + public uint32 Next (uint32 event_id) throws DBusError { uint32 next_event = 0; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -386,15 +388,16 @@ next_event = next.id; } } else { - debug ("No event with id %u", event_id); + log.debug ("No event with id %u", event_id); } } return next_event; } - public bool GetName (uint32 event_id, out string name) throws DBus.Error { + public bool GetName (uint32 event_id, out string name) throws DBusError { bool ret = false; + name = ""; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -404,17 +407,18 @@ ret = true; } } else { - debug ("No event with id %u", event_id); + log.debug ("No event with id %u", event_id); } } - if (!ret) name = ""; + return ret; } public bool GetShortDescription (uint32 event_id, - out string description) throws DBus.Error + out string description) throws DBusError { bool ret = false; + description = ""; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -424,17 +428,18 @@ ret = true; } } else { - debug ("No event with id %u", event_id); + log.debug ("No event with id %u", event_id); } } - if (!ret) description = ""; + return ret; } public bool GetExtendedDescription (uint32 event_id, - out string description) throws DBus.Error + out string description) throws DBusError { bool ret = false; + description = ""; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -444,17 +449,18 @@ ret = true; } } else { - debug ("No event with id %u", event_id); + log.debug ("No event with id %u", event_id); } } - if (!ret) description = ""; + return ret; } public bool GetDuration (uint32 event_id, out uint duration) - throws DBus.Error + throws DBusError { bool ret = false; + duration = 0; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -464,17 +470,18 @@ ret = true; } } else { - debug ("No event with id %u", event_id); + log.debug ("No event with id %u", event_id); } } - + return ret; } public bool GetLocalStartTime (uint32 event_id, out uint[] start_time) - throws DBus.Error + throws DBusError { bool ret = false; + start_time = new uint[0]; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -485,20 +492,19 @@ ret = true; } } else { - debug ("No event with id %u", event_id); - start_time = new uint[] {}; + log.debug ("No event with id %u", event_id); } } - - if (!ret) start_time = new uint[0]; return ret; } public bool GetLocalStartTimestamp (uint32 event_id, out int64 timestamp) - throws DBus.Error + throws DBusError { bool ret = false; + timestamp = 0; + lock (this.events) { if (this.events.contains_event_with_id (event_id)) { Event? event = this.get_extended_event_by_id (event_id); @@ -509,13 +515,15 @@ } } } + return ret; } public bool IsRunning (uint32 event_id, out bool running) - throws DBus.Error + throws DBusError { bool ret = false; + running = false; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -525,7 +533,7 @@ ret = true; } } else { - debug ("No event with id %u", event_id); + log.debug ("No event with id %u", event_id); } } @@ -533,9 +541,10 @@ } public bool IsScrambled (uint32 event_id, out bool scrambled) - throws DBus.Error + throws DBusError { bool ret = false; + scrambled = false; lock (this.events) { if (this.events.contains_event_with_id (event_id)) { @@ -545,10 +554,10 @@ ret = true; } } else { - debug ("No event with id %u", event_id); + log.debug ("No event with id %u", event_id); } } - + return ret; } diff -Nru gnome-dvb-daemon-0.1.23/src/Settings.c gnome-dvb-daemon-0.2.7/src/Settings.c --- gnome-dvb-daemon-0.1.23/src/Settings.c 2011-01-14 17:08:57.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Settings.c 2011-09-29 19:51:17.000000000 +0000 @@ -1,4 +1,4 @@ -/* Settings.c generated by valac 0.11.3, the Vala compiler +/* Settings.c generated by valac 0.14.0, the Vala compiler * generated from Settings.vala, do not modify */ /* @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -39,11 +40,43 @@ typedef struct _DVBSettings DVBSettings; typedef struct _DVBSettingsClass DVBSettingsClass; typedef struct _DVBSettingsPrivate DVBSettingsPrivate; + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; + +#define DVB_LOGGING_TYPE_LOG_MANAGER (dvb_logging_log_manager_get_type ()) +#define DVB_LOGGING_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManager)) +#define DVB_LOGGING_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) +#define DVB_LOGGING_IS_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_IS_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOG_MANAGER)) +#define DVB_LOGGING_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOG_MANAGER, DVBLoggingLogManagerClass)) + +typedef struct _DVBLoggingLogManager DVBLoggingLogManager; +typedef struct _DVBLoggingLogManagerClass DVBLoggingLogManagerClass; #define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL))) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) + +#define DVB_TYPE_DEVICE (dvb_device_get_type ()) +#define DVB_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_DEVICE, DVBDevice)) +#define DVB_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_DEVICE, DVBDeviceClass)) +#define DVB_IS_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_DEVICE)) +#define DVB_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_DEVICE)) +#define DVB_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_DEVICE, DVBDeviceClass)) + +typedef struct _DVBDevice DVBDevice; +typedef struct _DVBDeviceClass DVBDeviceClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) + struct _DVBSettings { GObject parent_instance; DVBSettingsPrivate * priv; @@ -57,14 +90,27 @@ GKeyFile* keyfile; }; +typedef enum { + DVB_ADAPTER_TYPE_UNKNOWN, + DVB_ADAPTER_TYPE_DVB_T, + DVB_ADAPTER_TYPE_DVB_S, + DVB_ADAPTER_TYPE_DVB_C +} DVBAdapterType; + static gpointer dvb_settings_parent_class = NULL; +static DVBLoggingLogger* dvb_settings_log; +static DVBLoggingLogger* dvb_settings_log = NULL; GType dvb_settings_get_type (void) G_GNUC_CONST; #define DVB_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_SETTINGS, DVBSettingsPrivate)) enum { DVB_SETTINGS_DUMMY_PROPERTY }; +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +GType dvb_logging_log_manager_get_type (void) G_GNUC_CONST; +DVBLoggingLogManager* dvb_logging_log_manager_getLogManager (void); +DVBLoggingLogger* dvb_logging_log_manager_getDefaultLogger (DVBLoggingLogManager* self); #define DVB_SETTINGS_TIMERS_SECTION "timers" #define DVB_SETTINGS_MARGIN_START "margin_start" #define DVB_SETTINGS_MARGIN_END "margin_end" @@ -72,6 +118,13 @@ #define DVB_SETTINGS_SCAN_INTERVAL "scan_interval" #define DVB_SETTINGS_STREAMING_SECTION "streaming" #define DVB_SETTINGS_INTERFACE "interface" +#define DVB_SETTINGS_DEVICE_SECTION_PREFIX "device." +#define DVB_SETTINGS_DEVICE_NAME "name" +#define DVB_SETTINGS_DEVICE_TYPE "type" +#define DVB_SETTINGS_DEVICE_ADAPTER "adapter" +#define DVB_SETTINGS_DEVICE_FRONTEND "frontend" +#define DVB_SETTINGS_DEVICE_CHANNELS_FILE "channels_file" +#define DVB_SETTINGS_DEVICE_RECORDINGS_DIR "recordings_dir" #define DVB_SETTINGS_DEFAULT_MARGIN_START 5 #define DVB_SETTINGS_DEFAULT_MARGIN_END 5 #define DVB_SETTINGS_DEFAULT_SCAN_INTERVAL 30 @@ -85,12 +138,20 @@ " interface=lo" gint dvb_settings_get_epg_scan_interval (DVBSettings* self); gint dvb_settings_get_integer (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error); +void dvb_logging_logger_warning (DVBLoggingLogger* self, const gchar* format, ...); gint dvb_settings_get_timers_margin_start (DVBSettings* self); gint dvb_settings_get_timers_margin_end (DVBSettings* self); gchar* dvb_settings_get_streaming_interface (DVBSettings* self); gchar* dvb_settings_get_string (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error); +GType dvb_device_get_type (void) G_GNUC_CONST; +GeeList* dvb_settings_get_fake_devices (DVBSettings* self); +static DVBDevice* dvb_settings_get_device (DVBSettings* self, const gchar* group, GError** error); +GType dvb_adapter_type_get_type (void) G_GNUC_CONST; +DVBAdapterType dvb_device_get_type_from_string (const gchar* adapter_type); +DVBDevice* dvb_device_new_set_type (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, const gchar* name, DVBAdapterType type); GFile* dvb_settings_get_settings_file (DVBSettings* self); gboolean dvb_settings_load (DVBSettings* self); +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); gboolean dvb_settings_save (DVBSettings* self); gboolean dvb_settings_get_boolean (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error); gdouble dvb_settings_get_double (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error); @@ -110,43 +171,55 @@ DVBSettings* dvb_settings_construct (GType object_type); static GObject * dvb_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); static void dvb_settings_finalize (GObject* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); gint dvb_settings_get_epg_scan_interval (DVBSettings* self) { gint result = 0; gint val = 0; - gint _tmp0_; - gint _tmp1_; + gint _tmp5_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); - _tmp0_ = dvb_settings_get_integer (self, DVB_SETTINGS_EPG_SECTION, DVB_SETTINGS_SCAN_INTERVAL, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch175_g_key_file_error; + { + gint _tmp0_ = 0; + gint _tmp1_; + _tmp0_ = dvb_settings_get_integer (self, DVB_SETTINGS_EPG_SECTION, DVB_SETTINGS_SCAN_INTERVAL, &_inner_error_); + _tmp1_ = _tmp0_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + goto __catch186_g_key_file_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; + val = _tmp1_; } - val = _tmp1_; - goto __finally175; - __catch175_g_key_file_error: + goto __finally186; + __catch186_g_key_file_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp2_; + GError* _tmp3_; + const gchar* _tmp4_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("Settings.vala:61: %s", e->message); + _tmp2_ = dvb_settings_log; + _tmp3_ = e; + _tmp4_ = _tmp3_->message; + dvb_logging_logger_warning (_tmp2_, "Settings.vala:72: %s", _tmp4_); val = DVB_SETTINGS_DEFAULT_SCAN_INTERVAL; _g_error_free0 (e); } - __finally175: + __finally186: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return 0; } - result = val * 60; + _tmp5_ = val; + result = _tmp5_ * 60; return result; } @@ -154,32 +227,40 @@ gint dvb_settings_get_timers_margin_start (DVBSettings* self) { gint result = 0; gint start_margin = 0; - gint _tmp0_; - gint _tmp1_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); - _tmp0_ = dvb_settings_get_integer (self, DVB_SETTINGS_TIMERS_SECTION, DVB_SETTINGS_MARGIN_START, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch176_g_key_file_error; + { + gint _tmp0_ = 0; + gint _tmp1_; + _tmp0_ = dvb_settings_get_integer (self, DVB_SETTINGS_TIMERS_SECTION, DVB_SETTINGS_MARGIN_START, &_inner_error_); + _tmp1_ = _tmp0_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + goto __catch187_g_key_file_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; + start_margin = _tmp1_; } - start_margin = _tmp1_; - goto __finally176; - __catch176_g_key_file_error: + goto __finally187; + __catch187_g_key_file_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp2_; + GError* _tmp3_; + const gchar* _tmp4_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("Settings.vala:72: %s", e->message); + _tmp2_ = dvb_settings_log; + _tmp3_ = e; + _tmp4_ = _tmp3_->message; + dvb_logging_logger_warning (_tmp2_, "Settings.vala:83: %s", _tmp4_); start_margin = DVB_SETTINGS_DEFAULT_MARGIN_START; _g_error_free0 (e); } - __finally176: + __finally187: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -193,32 +274,40 @@ gint dvb_settings_get_timers_margin_end (DVBSettings* self) { gint result = 0; gint end_margin = 0; - gint _tmp0_; - gint _tmp1_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); - _tmp0_ = dvb_settings_get_integer (self, DVB_SETTINGS_TIMERS_SECTION, DVB_SETTINGS_MARGIN_END, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch177_g_key_file_error; + { + gint _tmp0_ = 0; + gint _tmp1_; + _tmp0_ = dvb_settings_get_integer (self, DVB_SETTINGS_TIMERS_SECTION, DVB_SETTINGS_MARGIN_END, &_inner_error_); + _tmp1_ = _tmp0_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + goto __catch188_g_key_file_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return 0; } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return 0; + end_margin = _tmp1_; } - end_margin = _tmp1_; - goto __finally177; - __catch177_g_key_file_error: + goto __finally188; + __catch188_g_key_file_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp2_; + GError* _tmp3_; + const gchar* _tmp4_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("Settings.vala:83: %s", e->message); + _tmp2_ = dvb_settings_log; + _tmp3_ = e; + _tmp4_ = _tmp3_->message; + dvb_logging_logger_warning (_tmp2_, "Settings.vala:94: %s", _tmp4_); end_margin = DVB_SETTINGS_DEFAULT_MARGIN_END; _g_error_free0 (e); } - __finally177: + __finally188: if (_inner_error_ != NULL) { g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); @@ -231,43 +320,46 @@ gchar* dvb_settings_get_streaming_interface (DVBSettings* self) { gchar* result = NULL; - gchar* val; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - gchar* _tmp2_; + gchar* val = NULL; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); - val = NULL; - _tmp0_ = dvb_settings_get_string (self, DVB_SETTINGS_STREAMING_SECTION, DVB_SETTINGS_INTERFACE, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch178_g_key_file_error; + { + gchar* _tmp0_ = NULL; + gchar* _tmp1_; + _tmp0_ = dvb_settings_get_string (self, DVB_SETTINGS_STREAMING_SECTION, DVB_SETTINGS_INTERFACE, &_inner_error_); + _tmp1_ = _tmp0_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + goto __catch189_g_key_file_error; + } + _g_free0 (val); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_free0 (val); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + val = _tmp1_; } - _tmp2_ = _tmp1_; - _g_free0 (val); - val = _tmp2_; - goto __finally178; - __catch178_g_key_file_error: - { - GError * e; - gchar* _tmp3_; - gchar* _tmp4_; + goto __finally189; + __catch189_g_key_file_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp2_; + GError* _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_; e = _inner_error_; _inner_error_ = NULL; - g_warning ("Settings.vala:94: %s", e->message); - _tmp3_ = g_strdup (DVB_SETTINGS_DEFAULT_INTERFACE); - _tmp4_ = _tmp3_; + _tmp2_ = dvb_settings_log; + _tmp3_ = e; + _tmp4_ = _tmp3_->message; + dvb_logging_logger_warning (_tmp2_, "Settings.vala:105: %s", _tmp4_); + _tmp5_ = g_strdup (DVB_SETTINGS_DEFAULT_INTERFACE); _g_free0 (val); - val = _tmp4_; + val = _tmp5_; _g_error_free0 (e); } - __finally178: + __finally189: if (_inner_error_ != NULL) { _g_free0 (val); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -279,6 +371,271 @@ } +GeeList* dvb_settings_get_fake_devices (DVBSettings* self) { + GeeList* result = NULL; + GeeArrayList* _tmp0_; + GeeList* devices; + GKeyFile* _tmp1_; + gsize _tmp2_; + gchar** _tmp3_ = NULL; + gchar** groups; + gint groups_length1; + gint _groups_size_; + gchar** _tmp4_; + gint _tmp4__length1; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = gee_array_list_new (DVB_TYPE_DEVICE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); + devices = (GeeList*) _tmp0_; + _tmp1_ = self->priv->keyfile; + _tmp3_ = g_key_file_get_groups (_tmp1_, &_tmp2_); + groups = _tmp3_; + groups_length1 = _tmp2_; + _groups_size_ = groups_length1; + _tmp4_ = groups; + _tmp4__length1 = groups_length1; + { + gchar** group_collection = NULL; + gint group_collection_length1 = 0; + gint _group_collection_size_ = 0; + gint group_it = 0; + group_collection = _tmp4_; + group_collection_length1 = _tmp4__length1; + for (group_it = 0; group_it < _tmp4__length1; group_it = group_it + 1) { + gchar* _tmp5_; + gchar* group = NULL; + _tmp5_ = g_strdup (group_collection[group_it]); + group = _tmp5_; + { + const gchar* _tmp6_; + gboolean _tmp7_ = FALSE; + _tmp6_ = group; + _tmp7_ = g_str_has_prefix (_tmp6_, DVB_SETTINGS_DEVICE_SECTION_PREFIX); + if (_tmp7_) { + { + const gchar* _tmp8_; + DVBDevice* _tmp9_ = NULL; + DVBDevice* dev; + GeeList* _tmp10_; + DVBDevice* _tmp11_; + _tmp8_ = group; + _tmp9_ = dvb_settings_get_device (self, _tmp8_, &_inner_error_); + dev = _tmp9_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + goto __catch190_g_key_file_error; + } + _g_free0 (group); + groups = (_vala_array_free (groups, groups_length1, (GDestroyNotify) g_free), NULL); + _g_object_unref0 (devices); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + _tmp10_ = devices; + _tmp11_ = dev; + gee_collection_add ((GeeCollection*) _tmp10_, _tmp11_); + _g_object_unref0 (dev); + } + goto __finally190; + __catch190_g_key_file_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp12_; + GError* _tmp13_; + const gchar* _tmp14_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp12_ = dvb_settings_log; + _tmp13_ = e; + _tmp14_ = _tmp13_->message; + dvb_logging_logger_warning (_tmp12_, "Settings.vala:120: %s", _tmp14_); + _g_error_free0 (e); + } + __finally190: + if (_inner_error_ != NULL) { + _g_free0 (group); + groups = (_vala_array_free (groups, groups_length1, (GDestroyNotify) g_free), NULL); + _g_object_unref0 (devices); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + _g_free0 (group); + } + } + } + result = devices; + groups = (_vala_array_free (groups, groups_length1, (GDestroyNotify) g_free), NULL); + return result; +} + + +static DVBDevice* dvb_settings_get_device (DVBSettings* self, const gchar* group, GError** error) { + DVBDevice* result = NULL; + const gchar* _tmp0_; + gchar* _tmp1_ = NULL; + gchar* name; + const gchar* _tmp2_; + gint _tmp3_ = 0; + gint adapter; + const gchar* _tmp4_; + gint _tmp5_ = 0; + gint frontend; + const gchar* _tmp6_; + gchar* _tmp7_ = NULL; + gchar* typestr; + const gchar* _tmp8_; + DVBAdapterType _tmp9_ = 0; + DVBAdapterType type; + const gchar* _tmp10_; + gchar* _tmp11_ = NULL; + gchar* _tmp12_; + gchar* _tmp13_; + GFile* _tmp14_ = NULL; + GFile* _tmp15_; + GFile* channels; + const gchar* _tmp16_; + gchar* _tmp17_ = NULL; + gchar* _tmp18_; + gchar* _tmp19_; + GFile* _tmp20_ = NULL; + GFile* _tmp21_; + GFile* rec_dir; + gint _tmp22_; + gint _tmp23_; + GFile* _tmp24_; + GFile* _tmp25_; + const gchar* _tmp26_; + DVBAdapterType _tmp27_; + DVBDevice* _tmp28_ = NULL; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (group != NULL, NULL); + _tmp0_ = group; + _tmp1_ = dvb_settings_get_string (self, _tmp0_, DVB_SETTINGS_DEVICE_NAME, &_inner_error_); + name = _tmp1_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + g_propagate_error (error, _inner_error_); + return NULL; + } else { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + _tmp2_ = group; + _tmp3_ = dvb_settings_get_integer (self, _tmp2_, DVB_SETTINGS_DEVICE_ADAPTER, &_inner_error_); + adapter = _tmp3_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (name); + return NULL; + } else { + _g_free0 (name); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + _tmp4_ = group; + _tmp5_ = dvb_settings_get_integer (self, _tmp4_, DVB_SETTINGS_DEVICE_FRONTEND, &_inner_error_); + frontend = _tmp5_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (name); + return NULL; + } else { + _g_free0 (name); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + _tmp6_ = group; + _tmp7_ = dvb_settings_get_string (self, _tmp6_, DVB_SETTINGS_DEVICE_TYPE, &_inner_error_); + typestr = _tmp7_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (name); + return NULL; + } else { + _g_free0 (name); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + _tmp8_ = typestr; + _tmp9_ = dvb_device_get_type_from_string (_tmp8_); + type = _tmp9_; + _tmp10_ = group; + _tmp11_ = dvb_settings_get_string (self, _tmp10_, DVB_SETTINGS_DEVICE_CHANNELS_FILE, &_inner_error_); + _tmp12_ = _tmp11_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (typestr); + _g_free0 (name); + return NULL; + } else { + _g_free0 (typestr); + _g_free0 (name); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + _tmp13_ = _tmp12_; + _tmp14_ = g_file_new_for_path (_tmp13_); + _tmp15_ = _tmp14_; + _g_free0 (_tmp13_); + channels = _tmp15_; + _tmp16_ = group; + _tmp17_ = dvb_settings_get_string (self, _tmp16_, DVB_SETTINGS_DEVICE_RECORDINGS_DIR, &_inner_error_); + _tmp18_ = _tmp17_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (channels); + _g_free0 (typestr); + _g_free0 (name); + return NULL; + } else { + _g_object_unref0 (channels); + _g_free0 (typestr); + _g_free0 (name); + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; + } + } + _tmp19_ = _tmp18_; + _tmp20_ = g_file_new_for_path (_tmp19_); + _tmp21_ = _tmp20_; + _g_free0 (_tmp19_); + rec_dir = _tmp21_; + _tmp22_ = adapter; + _tmp23_ = frontend; + _tmp24_ = channels; + _tmp25_ = rec_dir; + _tmp26_ = name; + _tmp27_ = type; + _tmp28_ = dvb_device_new_set_type ((guint) _tmp22_, (guint) _tmp23_, _tmp24_, _tmp25_, _tmp26_, _tmp27_); + result = _tmp28_; + _g_object_unref0 (rec_dir); + _g_object_unref0 (channels); + _g_free0 (typestr); + _g_free0 (name); + return result; +} + + GFile* dvb_settings_get_settings_file (DVBSettings* self) { GFile* result = NULL; const gchar* _tmp0_ = NULL; @@ -305,22 +662,32 @@ static guint8* string_get_data (const gchar* self, int* result_length1) { guint8* result; + guint8* res; gint res_length1; gint _res_size_; - guint8* _tmp0_; - guint8* res; + gint _tmp0_; gint _tmp1_; - guint8* _tmp2_; + gint _tmp2_; + guint8* _tmp3_; + gint _tmp3__length1; + guint8* _tmp4_; + gint _tmp4__length1; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = (guint8*) self; + res = (guint8*) self; res_length1 = -1; _res_size_ = res_length1; - res = _tmp0_; - _tmp1_ = strlen (self); + _tmp0_ = strlen (self); + _tmp1_ = _tmp0_; res_length1 = (gint) _tmp1_; - _tmp2_ = res; - *result_length1 = res_length1; - result = _tmp2_; + _tmp2_ = res_length1; + _tmp3_ = res; + _tmp3__length1 = res_length1; + _tmp4_ = _tmp3_; + _tmp4__length1 = _tmp3__length1; + if (result_length1) { + *result_length1 = _tmp4__length1; + } + result = _tmp4_; return result; } @@ -330,48 +697,59 @@ GFile* _tmp0_ = NULL; GFile* settings_file; gboolean success; - gboolean _tmp1_; + GFile* _tmp1_; + gboolean _tmp2_ = FALSE; + gboolean _tmp25_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = dvb_settings_get_settings_file (self); settings_file = _tmp0_; success = TRUE; - _tmp1_ = g_file_query_exists (settings_file, NULL); - if (!_tmp1_) { + _tmp1_ = settings_file; + _tmp2_ = g_file_query_exists (_tmp1_, NULL); + if (!_tmp2_) { GFileOutputStream* stream; - GFileOutputStream* _tmp2_ = NULL; - GFileOutputStream* _tmp3_; - GFileOutputStream* _tmp4_; - guint8* _tmp7_ = NULL; - gint _tmp8_; stream = NULL; - _tmp2_ = g_file_create (settings_file, 0, NULL, &_inner_error_); - _tmp3_ = _tmp2_; - if (_inner_error_ != NULL) { - goto __catch179_g_error; + { + GFile* _tmp3_; + GFileOutputStream* _tmp4_ = NULL; + GFileOutputStream* _tmp5_; + _tmp3_ = settings_file; + _tmp4_ = g_file_create (_tmp3_, 0, NULL, &_inner_error_); + _tmp5_ = _tmp4_; + if (_inner_error_ != NULL) { + goto __catch191_g_error; + } + _g_object_unref0 (stream); + stream = _tmp5_; } - _tmp4_ = _tmp3_; - _g_object_unref0 (stream); - stream = _tmp4_; - goto __finally179; - __catch179_g_error: + goto __finally191; + __catch191_g_error: { - GError * e; - gchar* _tmp5_ = NULL; - gchar* _tmp6_; + GError* e = NULL; + DVBLoggingLogger* _tmp6_; + GFile* _tmp7_; + gchar* _tmp8_ = NULL; + gchar* _tmp9_; + GError* _tmp10_; + const gchar* _tmp11_; e = _inner_error_; _inner_error_ = NULL; - _tmp5_ = g_file_get_path (settings_file); - _tmp6_ = _tmp5_; - g_critical ("Settings.vala:117: Could not create file %s: %s", _tmp6_, e->message); - _g_free0 (_tmp6_); + _tmp6_ = dvb_settings_log; + _tmp7_ = settings_file; + _tmp8_ = g_file_get_path (_tmp7_); + _tmp9_ = _tmp8_; + _tmp10_ = e; + _tmp11_ = _tmp10_->message; + dvb_logging_logger_error (_tmp6_, "Settings.vala:159: Could not create file %s: %s", _tmp9_, _tmp11_); + _g_free0 (_tmp9_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (stream); _g_object_unref0 (settings_file); return result; } - __finally179: + __finally191: if (_inner_error_ != NULL) { _g_object_unref0 (stream); _g_object_unref0 (settings_file); @@ -379,27 +757,45 @@ g_clear_error (&_inner_error_); return FALSE; } - _tmp7_ = string_get_data (DVB_SETTINGS_DEFAULT_SETTINGS, &_tmp8_); - g_output_stream_write ((GOutputStream*) stream, _tmp7_, (gsize) _tmp8_, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch180_g_error; + { + GFileOutputStream* _tmp12_; + guint8* _tmp13_; + gint _tmp13__length1; + guint8* _tmp14_; + gint _tmp14__length1; + _tmp12_ = stream; + _tmp13_ = string_get_data (DVB_SETTINGS_DEFAULT_SETTINGS, &_tmp13__length1); + _tmp14_ = _tmp13_; + _tmp14__length1 = _tmp13__length1; + g_output_stream_write ((GOutputStream*) _tmp12_, _tmp14_, (gsize) _tmp14__length1, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch192_g_error; + } } - goto __finally180; - __catch180_g_error: + goto __finally192; + __catch192_g_error: { - GError * e; - gchar* _tmp9_ = NULL; - gchar* _tmp10_; + GError* e = NULL; + DVBLoggingLogger* _tmp15_; + GFile* _tmp16_; + gchar* _tmp17_ = NULL; + gchar* _tmp18_; + GError* _tmp19_; + const gchar* _tmp20_; e = _inner_error_; _inner_error_ = NULL; - _tmp9_ = g_file_get_path (settings_file); - _tmp10_ = _tmp9_; - g_critical ("Settings.vala:125: Could not write to file %s: %s", _tmp10_, e->message); - _g_free0 (_tmp10_); + _tmp15_ = dvb_settings_log; + _tmp16_ = settings_file; + _tmp17_ = g_file_get_path (_tmp16_); + _tmp18_ = _tmp17_; + _tmp19_ = e; + _tmp20_ = _tmp19_->message; + dvb_logging_logger_error (_tmp15_, "Settings.vala:167: Could not write to file %s: %s", _tmp18_, _tmp20_); + _g_free0 (_tmp18_); success = FALSE; _g_error_free0 (e); } - __finally180: + __finally192: if (_inner_error_ != NULL) { _g_object_unref0 (stream); _g_object_unref0 (settings_file); @@ -407,21 +803,31 @@ g_clear_error (&_inner_error_); return FALSE; } - g_output_stream_close ((GOutputStream*) stream, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch181_g_error; + { + GFileOutputStream* _tmp21_; + _tmp21_ = stream; + g_output_stream_close ((GOutputStream*) _tmp21_, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch193_g_error; + } } - goto __finally181; - __catch181_g_error: + goto __finally193; + __catch193_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp22_; + GError* _tmp23_; + const gchar* _tmp24_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Settings.vala:133: %s", e->message); + _tmp22_ = dvb_settings_log; + _tmp23_ = e; + _tmp24_ = _tmp23_->message; + dvb_logging_logger_error (_tmp22_, "Settings.vala:175: %s", _tmp24_); success = FALSE; _g_error_free0 (e); } - __finally181: + __finally193: if (_inner_error_ != NULL) { _g_object_unref0 (stream); _g_object_unref0 (settings_file); @@ -431,46 +837,65 @@ } _g_object_unref0 (stream); } - if (success) { - gchar* _tmp11_ = NULL; - gchar* _tmp12_; - _tmp11_ = g_file_get_path (settings_file); - _tmp12_ = _tmp11_; - g_key_file_load_from_file (self->priv->keyfile, _tmp12_, 0, &_inner_error_); - _g_free0 (_tmp12_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch182_g_key_file_error; - } - if (_inner_error_->domain == G_FILE_ERROR) { - goto __catch182_g_file_error; + _tmp25_ = success; + if (_tmp25_) { + { + GKeyFile* _tmp26_; + GFile* _tmp27_; + gchar* _tmp28_ = NULL; + gchar* _tmp29_; + _tmp26_ = self->priv->keyfile; + _tmp27_ = settings_file; + _tmp28_ = g_file_get_path (_tmp27_); + _tmp29_ = _tmp28_; + g_key_file_load_from_file (_tmp26_, _tmp29_, 0, &_inner_error_); + _g_free0 (_tmp29_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_KEY_FILE_ERROR) { + goto __catch194_g_key_file_error; + } + if (_inner_error_->domain == G_FILE_ERROR) { + goto __catch194_g_file_error; + } + _g_object_unref0 (settings_file); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return FALSE; } - _g_object_unref0 (settings_file); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return FALSE; } - goto __finally182; - __catch182_g_key_file_error: + goto __finally194; + __catch194_g_key_file_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp30_; + GError* _tmp31_; + const gchar* _tmp32_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Settings.vala:142: Could not load settings: %s", e->message); + _tmp30_ = dvb_settings_log; + _tmp31_ = e; + _tmp32_ = _tmp31_->message; + dvb_logging_logger_error (_tmp30_, "Settings.vala:184: Could not load settings: %s", _tmp32_); success = FALSE; _g_error_free0 (e); } - goto __finally182; - __catch182_g_file_error: + goto __finally194; + __catch194_g_file_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp33_; + GError* _tmp34_; + const gchar* _tmp35_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Settings.vala:145: Could not load settings: %s", e->message); + _tmp33_ = dvb_settings_log; + _tmp34_ = e; + _tmp35_ = _tmp34_->message; + dvb_logging_logger_error (_tmp33_, "Settings.vala:187: Could not load settings: %s", _tmp35_); success = FALSE; _g_error_free0 (e); } - __finally182: + __finally194: if (_inner_error_ != NULL) { _g_object_unref0 (settings_file); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -489,48 +914,56 @@ GFile* _tmp0_ = NULL; GFile* settings_file; GFileOutputStream* stream; - GFileOutputStream* _tmp1_ = NULL; - GFileOutputStream* _tmp2_; - GFileOutputStream* _tmp3_; gchar* data; gsize data_len = 0UL; - gsize _tmp6_; - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - guint8* _tmp9_ = NULL; - gint _tmp10_; + GKeyFile* _tmp10_; + gsize _tmp11_ = 0UL; + gchar* _tmp12_ = NULL; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = dvb_settings_get_settings_file (self); settings_file = _tmp0_; stream = NULL; - _tmp1_ = g_file_replace (settings_file, NULL, TRUE, 0, NULL, &_inner_error_); - _tmp2_ = _tmp1_; - if (_inner_error_ != NULL) { - goto __catch183_g_error; + { + GFile* _tmp1_; + GFileOutputStream* _tmp2_ = NULL; + GFileOutputStream* _tmp3_; + _tmp1_ = settings_file; + _tmp2_ = g_file_replace (_tmp1_, NULL, TRUE, 0, NULL, &_inner_error_); + _tmp3_ = _tmp2_; + if (_inner_error_ != NULL) { + goto __catch195_g_error; + } + _g_object_unref0 (stream); + stream = _tmp3_; } - _tmp3_ = _tmp2_; - _g_object_unref0 (stream); - stream = _tmp3_; - goto __finally183; - __catch183_g_error: + goto __finally195; + __catch195_g_error: { - GError * e; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; + GError* e = NULL; + DVBLoggingLogger* _tmp4_; + GFile* _tmp5_; + gchar* _tmp6_ = NULL; + gchar* _tmp7_; + GError* _tmp8_; + const gchar* _tmp9_; e = _inner_error_; _inner_error_ = NULL; - _tmp4_ = g_file_get_path (settings_file); - _tmp5_ = _tmp4_; - g_critical ("Settings.vala:160: Could not replace file %s: %s", _tmp5_, e->message); - _g_free0 (_tmp5_); + _tmp4_ = dvb_settings_log; + _tmp5_ = settings_file; + _tmp6_ = g_file_get_path (_tmp5_); + _tmp7_ = _tmp6_; + _tmp8_ = e; + _tmp9_ = _tmp8_->message; + dvb_logging_logger_error (_tmp4_, "Settings.vala:202: Could not replace file %s: %s", _tmp7_, _tmp9_); + _g_free0 (_tmp7_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (stream); _g_object_unref0 (settings_file); return result; } - __finally183: + __finally195: if (_inner_error_ != NULL) { _g_object_unref0 (stream); _g_object_unref0 (settings_file); @@ -539,28 +972,48 @@ return FALSE; } data = NULL; - _tmp7_ = g_key_file_to_data (self->priv->keyfile, &_tmp6_, NULL); - data_len = _tmp6_; - _tmp8_ = _tmp7_; + _tmp10_ = self->priv->keyfile; + _tmp12_ = g_key_file_to_data (_tmp10_, &_tmp11_, NULL); + data_len = _tmp11_; _g_free0 (data); - data = _tmp8_; - _tmp9_ = string_get_data (data, &_tmp10_); - g_output_stream_write_all ((GOutputStream*) stream, _tmp9_, (gsize) _tmp10_, NULL, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch184_g_error; - } - goto __finally184; - __catch184_g_error: - { - GError * e; - gchar* _tmp11_ = NULL; - gchar* _tmp12_; + data = _tmp12_; + { + GFileOutputStream* _tmp13_; + const gchar* _tmp14_; + guint8* _tmp15_; + gint _tmp15__length1; + guint8* _tmp16_; + gint _tmp16__length1; + _tmp13_ = stream; + _tmp14_ = data; + _tmp15_ = string_get_data (_tmp14_, &_tmp15__length1); + _tmp16_ = _tmp15_; + _tmp16__length1 = _tmp15__length1; + g_output_stream_write_all ((GOutputStream*) _tmp13_, _tmp16_, (gsize) _tmp16__length1, NULL, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch196_g_error; + } + } + goto __finally196; + __catch196_g_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp17_; + GFile* _tmp18_; + gchar* _tmp19_ = NULL; + gchar* _tmp20_; + GError* _tmp21_; + const gchar* _tmp22_; e = _inner_error_; _inner_error_ = NULL; - _tmp11_ = g_file_get_path (settings_file); - _tmp12_ = _tmp11_; - g_critical ("Settings.vala:172: Could not write to file %s: %s", _tmp12_, e->message); - _g_free0 (_tmp12_); + _tmp17_ = dvb_settings_log; + _tmp18_ = settings_file; + _tmp19_ = g_file_get_path (_tmp18_); + _tmp20_ = _tmp19_; + _tmp21_ = e; + _tmp22_ = _tmp21_->message; + dvb_logging_logger_error (_tmp17_, "Settings.vala:214: Could not write to file %s: %s", _tmp20_, _tmp22_); + _g_free0 (_tmp20_); result = FALSE; _g_error_free0 (e); _g_free0 (data); @@ -568,7 +1021,7 @@ _g_object_unref0 (settings_file); return result; } - __finally184: + __finally196: if (_inner_error_ != NULL) { _g_free0 (data); _g_object_unref0 (stream); @@ -577,20 +1030,30 @@ g_clear_error (&_inner_error_); return FALSE; } - g_output_stream_close ((GOutputStream*) stream, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch185_g_error; + { + GFileOutputStream* _tmp23_; + _tmp23_ = stream; + g_output_stream_close ((GOutputStream*) _tmp23_, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch197_g_error; + } } - goto __finally185; - __catch185_g_error: + goto __finally197; + __catch197_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp24_; + GError* _tmp25_; + const gchar* _tmp26_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Settings.vala:181: %s", e->message); + _tmp24_ = dvb_settings_log; + _tmp25_ = e; + _tmp26_ = _tmp25_->message; + dvb_logging_logger_error (_tmp24_, "Settings.vala:223: %s", _tmp26_); _g_error_free0 (e); } - __finally185: + __finally197: if (_inner_error_ != NULL) { _g_free0 (data); _g_object_unref0 (stream); @@ -609,14 +1072,20 @@ gchar* dvb_settings_get_string (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error) { gchar* result = NULL; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_ = NULL; + gchar* _tmp4_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (group_name != NULL, NULL); g_return_val_if_fail (key != NULL, NULL); - _tmp0_ = g_key_file_get_string (self->priv->keyfile, group_name, key, &_inner_error_); - _tmp1_ = _tmp0_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = g_key_file_get_string (_tmp0_, _tmp1_, _tmp2_, &_inner_error_); + _tmp4_ = _tmp3_; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -627,21 +1096,27 @@ return NULL; } } - result = _tmp1_; + result = _tmp4_; return result; } gboolean dvb_settings_get_boolean (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error) { gboolean result = FALSE; - gboolean _tmp0_; - gboolean _tmp1_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (group_name != NULL, FALSE); g_return_val_if_fail (key != NULL, FALSE); - _tmp0_ = g_key_file_get_boolean (self->priv->keyfile, group_name, key, &_inner_error_); - _tmp1_ = _tmp0_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = g_key_file_get_boolean (_tmp0_, _tmp1_, _tmp2_, &_inner_error_); + _tmp4_ = _tmp3_; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -652,21 +1127,27 @@ return FALSE; } } - result = _tmp1_; + result = _tmp4_; return result; } gint dvb_settings_get_integer (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error) { gint result = 0; - gint _tmp0_; - gint _tmp1_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gint _tmp3_ = 0; + gint _tmp4_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (group_name != NULL, 0); g_return_val_if_fail (key != NULL, 0); - _tmp0_ = g_key_file_get_integer (self->priv->keyfile, group_name, key, &_inner_error_); - _tmp1_ = _tmp0_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = g_key_file_get_integer (_tmp0_, _tmp1_, _tmp2_, &_inner_error_); + _tmp4_ = _tmp3_; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -677,21 +1158,27 @@ return 0; } } - result = _tmp1_; + result = _tmp4_; return result; } gdouble dvb_settings_get_double (DVBSettings* self, const gchar* group_name, const gchar* key, GError** error) { gdouble result = 0.0; - gdouble _tmp0_; - gdouble _tmp1_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gdouble _tmp3_ = 0.0; + gdouble _tmp4_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0.0); g_return_val_if_fail (group_name != NULL, 0.0); g_return_val_if_fail (key != NULL, 0.0); - _tmp0_ = g_key_file_get_double (self->priv->keyfile, group_name, key, &_inner_error_); - _tmp1_ = _tmp0_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = g_key_file_get_double (_tmp0_, _tmp1_, _tmp2_, &_inner_error_); + _tmp4_ = _tmp3_; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -702,29 +1189,34 @@ return 0.0; } } - result = _tmp1_; + result = _tmp4_; return result; } gchar** dvb_settings_get_string_list (DVBSettings* self, const gchar* group_name, const gchar* key, int* result_length1, GError** error) { gchar** result = NULL; - gsize _tmp0_; - gchar** _tmp1_ = NULL; - gint _tmp2__length1; - gint __tmp2__size_; - gchar** _tmp3_; - gchar** _tmp2_; - gchar** _tmp4_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gsize _tmp3_; + gchar** _tmp4_ = NULL; + gchar** _tmp5_; + gint _tmp5__length1; + gint __tmp5__size_; + gchar** _tmp6_; + gint _tmp6__length1; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (group_name != NULL, NULL); g_return_val_if_fail (key != NULL, NULL); - _tmp1_ = g_key_file_get_string_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_); - _tmp3_ = _tmp1_; - _tmp2__length1 = _tmp0_; - __tmp2__size_ = _tmp2__length1; - _tmp2_ = _tmp3_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp4_ = g_key_file_get_string_list (_tmp0_, _tmp1_, _tmp2_, &_tmp3_, &_inner_error_); + _tmp5_ = _tmp4_; + _tmp5__length1 = _tmp3_; + __tmp5__size_ = _tmp5__length1; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -735,31 +1227,39 @@ return NULL; } } - _tmp4_ = _tmp2_; - *result_length1 = _tmp2__length1; - result = _tmp4_; + _tmp6_ = _tmp5_; + _tmp6__length1 = _tmp5__length1; + if (result_length1) { + *result_length1 = _tmp6__length1; + } + result = _tmp6_; return result; } gboolean* dvb_settings_get_boolean_list (DVBSettings* self, const gchar* group_name, const gchar* key, int* result_length1, GError** error) { gboolean* result = NULL; - gsize _tmp0_; - gboolean* _tmp1_ = NULL; - gint _tmp2__length1; - gint __tmp2__size_; - gboolean* _tmp3_; - gboolean* _tmp2_; - gboolean* _tmp4_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gsize _tmp3_; + gboolean* _tmp4_ = NULL; + gboolean* _tmp5_; + gint _tmp5__length1; + gint __tmp5__size_; + gboolean* _tmp6_; + gint _tmp6__length1; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (group_name != NULL, NULL); g_return_val_if_fail (key != NULL, NULL); - _tmp1_ = g_key_file_get_boolean_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_); - _tmp3_ = _tmp1_; - _tmp2__length1 = _tmp0_; - __tmp2__size_ = _tmp2__length1; - _tmp2_ = _tmp3_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp4_ = g_key_file_get_boolean_list (_tmp0_, _tmp1_, _tmp2_, &_tmp3_, &_inner_error_); + _tmp5_ = _tmp4_; + _tmp5__length1 = _tmp3_; + __tmp5__size_ = _tmp5__length1; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -770,31 +1270,39 @@ return NULL; } } - _tmp4_ = _tmp2_; - *result_length1 = _tmp2__length1; - result = _tmp4_; + _tmp6_ = _tmp5_; + _tmp6__length1 = _tmp5__length1; + if (result_length1) { + *result_length1 = _tmp6__length1; + } + result = _tmp6_; return result; } gint* dvb_settings_get_integer_list (DVBSettings* self, const gchar* group_name, const gchar* key, int* result_length1, GError** error) { gint* result = NULL; - gsize _tmp0_; - gint* _tmp1_ = NULL; - gint _tmp2__length1; - gint __tmp2__size_; - gint* _tmp3_; - gint* _tmp2_; - gint* _tmp4_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gsize _tmp3_; + gint* _tmp4_ = NULL; + gint* _tmp5_; + gint _tmp5__length1; + gint __tmp5__size_; + gint* _tmp6_; + gint _tmp6__length1; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (group_name != NULL, NULL); g_return_val_if_fail (key != NULL, NULL); - _tmp1_ = g_key_file_get_integer_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_); - _tmp3_ = _tmp1_; - _tmp2__length1 = _tmp0_; - __tmp2__size_ = _tmp2__length1; - _tmp2_ = _tmp3_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp4_ = g_key_file_get_integer_list (_tmp0_, _tmp1_, _tmp2_, &_tmp3_, &_inner_error_); + _tmp5_ = _tmp4_; + _tmp5__length1 = _tmp3_; + __tmp5__size_ = _tmp5__length1; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -805,31 +1313,39 @@ return NULL; } } - _tmp4_ = _tmp2_; - *result_length1 = _tmp2__length1; - result = _tmp4_; + _tmp6_ = _tmp5_; + _tmp6__length1 = _tmp5__length1; + if (result_length1) { + *result_length1 = _tmp6__length1; + } + result = _tmp6_; return result; } gdouble* dvb_settings_get_double_list (DVBSettings* self, const gchar* group_name, const gchar* key, int* result_length1, GError** error) { gdouble* result = NULL; - gsize _tmp0_; - gdouble* _tmp1_ = NULL; - gint _tmp2__length1; - gint __tmp2__size_; - gdouble* _tmp3_; - gdouble* _tmp2_; - gdouble* _tmp4_; + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gsize _tmp3_; + gdouble* _tmp4_ = NULL; + gdouble* _tmp5_; + gint _tmp5__length1; + gint __tmp5__size_; + gdouble* _tmp6_; + gint _tmp6__length1; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (group_name != NULL, NULL); g_return_val_if_fail (key != NULL, NULL); - _tmp1_ = g_key_file_get_double_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_); - _tmp3_ = _tmp1_; - _tmp2__length1 = _tmp0_; - __tmp2__size_ = _tmp2__length1; - _tmp2_ = _tmp3_; + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp4_ = g_key_file_get_double_list (_tmp0_, _tmp1_, _tmp2_, &_tmp3_, &_inner_error_); + _tmp5_ = _tmp4_; + _tmp5__length1 = _tmp3_; + __tmp5__size_ = _tmp5__length1; if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -840,75 +1356,150 @@ return NULL; } } - _tmp4_ = _tmp2_; - *result_length1 = _tmp2__length1; - result = _tmp4_; + _tmp6_ = _tmp5_; + _tmp6__length1 = _tmp5__length1; + if (result_length1) { + *result_length1 = _tmp6__length1; + } + result = _tmp6_; return result; } void dvb_settings_set_string (DVBSettings* self, const gchar* group_name, const gchar* key, const gchar* val, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); g_return_if_fail (val != NULL); - g_key_file_set_string (self->priv->keyfile, group_name, key, val); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + g_key_file_set_string (_tmp0_, _tmp1_, _tmp2_, _tmp3_); } void dvb_settings_set_boolean (DVBSettings* self, const gchar* group_name, const gchar* key, gboolean val, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gboolean _tmp3_; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); - g_key_file_set_boolean (self->priv->keyfile, group_name, key, val); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + g_key_file_set_boolean (_tmp0_, _tmp1_, _tmp2_, _tmp3_); } void dvb_settings_set_double (DVBSettings* self, const gchar* group_name, const gchar* key, gdouble val, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gdouble _tmp3_; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); - g_key_file_set_double (self->priv->keyfile, group_name, key, val); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + g_key_file_set_double (_tmp0_, _tmp1_, _tmp2_, _tmp3_); } void dvb_settings_set_integer (DVBSettings* self, const gchar* group_name, const gchar* key, gint val, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gint _tmp3_; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); - g_key_file_set_integer (self->priv->keyfile, group_name, key, val); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + g_key_file_set_integer (_tmp0_, _tmp1_, _tmp2_, _tmp3_); } void dvb_settings_set_string_list (DVBSettings* self, const gchar* group_name, const gchar* key, gchar** val, int val_length1, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gchar** _tmp3_; + gint _tmp3__length1; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); - g_key_file_set_string_list (self->priv->keyfile, group_name, key, (const gchar* const*) val, val_length1); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + _tmp3__length1 = val_length1; + g_key_file_set_string_list (_tmp0_, _tmp1_, _tmp2_, (const gchar* const*) _tmp3_, _tmp3__length1); } void dvb_settings_set_boolean_list (DVBSettings* self, const gchar* group_name, const gchar* key, gboolean* val, int val_length1, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gboolean* _tmp3_; + gint _tmp3__length1; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); - g_key_file_set_boolean_list (self->priv->keyfile, group_name, key, val, val_length1); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + _tmp3__length1 = val_length1; + g_key_file_set_boolean_list (_tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp3__length1); } void dvb_settings_set_double_list (DVBSettings* self, const gchar* group_name, const gchar* key, gdouble* val, int val_length1, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gdouble* _tmp3_; + gint _tmp3__length1; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); - g_key_file_set_double_list (self->priv->keyfile, group_name, key, val, val_length1); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + _tmp3__length1 = val_length1; + g_key_file_set_double_list (_tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp3__length1); } void dvb_settings_set_integer_list (DVBSettings* self, const gchar* group_name, const gchar* key, gint* val, int val_length1, GError** error) { + GKeyFile* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + gint* _tmp3_; + gint _tmp3__length1; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_if_fail (key != NULL); - g_key_file_set_integer_list (self->priv->keyfile, group_name, key, val, val_length1); + _tmp0_ = self->priv->keyfile; + _tmp1_ = group_name; + _tmp2_ = key; + _tmp3_ = val; + _tmp3__length1 = val_length1; + g_key_file_set_integer_list (_tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp3__length1); } @@ -928,24 +1519,27 @@ GObject * obj; GObjectClass * parent_class; DVBSettings * self; - GKeyFile* _tmp0_ = NULL; - GKeyFile* _tmp1_; + GKeyFile* _tmp0_; parent_class = G_OBJECT_CLASS (dvb_settings_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_SETTINGS (obj); _tmp0_ = g_key_file_new (); - _tmp1_ = _tmp0_; _g_key_file_free0 (self->priv->keyfile); - self->priv->keyfile = _tmp1_; + self->priv->keyfile = _tmp0_; return obj; } static void dvb_settings_class_init (DVBSettingsClass * klass) { + DVBLoggingLogManager* _tmp0_ = NULL; + DVBLoggingLogger* _tmp1_ = NULL; dvb_settings_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DVBSettingsPrivate)); G_OBJECT_CLASS (klass)->constructor = dvb_settings_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_settings_finalize; + _tmp0_ = dvb_logging_log_manager_getLogManager (); + _tmp1_ = dvb_logging_log_manager_getDefaultLogger (_tmp0_); + dvb_settings_log = _tmp1_; } @@ -974,4 +1568,22 @@ } +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + diff -Nru gnome-dvb-daemon-0.1.23/src/Settings.vala gnome-dvb-daemon-0.2.7/src/Settings.vala --- gnome-dvb-daemon-0.1.23/src/Settings.vala 2011-01-14 17:08:07.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Settings.vala 2011-09-22 20:08:40.000000000 +0000 @@ -18,10 +18,13 @@ */ using GLib; +using DVB.Logging; namespace DVB { public class Settings : GLib.Object { + + private static Logger log = LogManager.getLogManager().getDefaultLogger(); private static const string TIMERS_SECTION = "timers"; private static const string MARGIN_START = "margin_start"; @@ -33,6 +36,14 @@ private static const string STREAMING_SECTION = "streaming"; private static const string INTERFACE = "interface"; + private static const string DEVICE_SECTION_PREFIX = "device."; + private static const string DEVICE_NAME = "name"; + private static const string DEVICE_TYPE = "type"; + private static const string DEVICE_ADAPTER = "adapter"; + private static const string DEVICE_FRONTEND = "frontend"; + private static const string DEVICE_CHANNELS_FILE = "channels_file"; + private static const string DEVICE_RECORDINGS_DIR = "recordings_dir"; + private static const int DEFAULT_MARGIN_START = 5; private static const int DEFAULT_MARGIN_END = 5; private static const int DEFAULT_SCAN_INTERVAL = 30; @@ -58,7 +69,7 @@ try { val = this.get_integer (EPG_SECTION, SCAN_INTERVAL); } catch (KeyFileError e) { - warning ("%s", e.message); + log.warning ("%s", e.message); val = DEFAULT_SCAN_INTERVAL; } return val * 60; @@ -69,7 +80,7 @@ try { start_margin = this.get_integer (TIMERS_SECTION, MARGIN_START); } catch (KeyFileError e) { - warning ("%s", e.message); + log.warning ("%s", e.message); start_margin = DEFAULT_MARGIN_START; } return start_margin; @@ -80,7 +91,7 @@ try { end_margin = this.get_integer (TIMERS_SECTION, MARGIN_END); } catch (KeyFileError e) { - warning ("%s", e.message); + log.warning ("%s", e.message); end_margin = DEFAULT_MARGIN_END; } return end_margin; @@ -91,12 +102,43 @@ try { val = this.get_string (STREAMING_SECTION, INTERFACE); } catch (KeyFileError e) { - warning ("%s", e.message); + log.warning ("%s", e.message); val = DEFAULT_INTERFACE; } return val; } + public Gee.List get_fake_devices () { + Gee.List devices = new Gee.ArrayList (); + string[] groups = this.keyfile.get_groups (); + foreach (string group in groups) { + if (group.has_prefix (DEVICE_SECTION_PREFIX)) { + try { + Device dev = this.get_device (group); + devices.add (dev); + } catch (KeyFileError e) { + log.warning ("%s", e.message); + } + } + } + return devices; + } + + private Device get_device (string group) throws KeyFileError { + string name = this.get_string (group, DEVICE_NAME); + int adapter = this.get_integer (group, DEVICE_ADAPTER); + int frontend = this.get_integer (group, DEVICE_FRONTEND); + + string typestr = this.get_string (group, DEVICE_TYPE); + AdapterType type = Device.get_type_from_string (typestr); + + File channels = File.new_for_path (this.get_string (group, DEVICE_CHANNELS_FILE)); + File rec_dir = File.new_for_path (this.get_string (group, DEVICE_RECORDINGS_DIR)); + + return Device.new_set_type (adapter, frontend, channels, rec_dir, + name, type); + } + public File get_settings_file () { File config_dir = File.new_for_path ( Environment.get_user_config_dir ()); @@ -114,7 +156,7 @@ try { stream = settings_file.create (0, null); } catch (Error e) { - critical ("Could not create file %s: %s", + log.error ("Could not create file %s: %s", settings_file.get_path (), e.message); return false; } @@ -122,7 +164,7 @@ try { stream.write (DEFAULT_SETTINGS.data); } catch (Error e) { - critical ("Could not write to file %s: %s", + log.error ("Could not write to file %s: %s", settings_file.get_path (), e.message); success = false; } @@ -130,7 +172,7 @@ try { stream.close (null); } catch (Error e) { - critical ("%s", e.message); + log.error ("%s", e.message); success = false; } } @@ -139,10 +181,10 @@ try { keyfile.load_from_file (settings_file.get_path (), 0); } catch (KeyFileError e) { - critical ("Could not load settings: %s", e.message); + log.error ("Could not load settings: %s", e.message); success = false; } catch (FileError e) { - critical ("Could not load settings: %s", e.message); + log.error ("Could not load settings: %s", e.message); success = false; } } @@ -157,7 +199,7 @@ try { stream = settings_file.replace (null, true, 0, null); } catch (Error e) { - critical ("Could not replace file %s: %s", + log.error ("Could not replace file %s: %s", settings_file.get_path (), e.message); return false; } @@ -169,7 +211,7 @@ try { stream.write_all (data.data, null); } catch (Error e) { - critical ("Could not write to file %s: %s", + log.error ("Could not write to file %s: %s", settings_file.get_path (), e.message); return false; } @@ -178,7 +220,7 @@ try { stream.close (null); } catch (Error e) { - critical ("%s", e.message); + log.error ("%s", e.message); } return false; diff -Nru gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialChannel.c gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialChannel.c --- gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialChannel.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialChannel.c 2011-09-29 18:32:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* TerrestrialChannel.c generated by valac 0.11.3, the Vala compiler +/* TerrestrialChannel.c generated by valac 0.14.0, the Vala compiler * generated from TerrestrialChannel.vala, do not modify */ /* @@ -180,6 +180,9 @@ DVB_TERRESTRIAL_CHANNEL_GUARD_INTERVAL, DVB_TERRESTRIAL_CHANNEL_HIERARCHY }; +DVBTerrestrialChannel* dvb_terrestrial_channel_new (guint group_id); +DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type, guint group_id); +DVBChannel* dvb_channel_construct (GType object_type, guint group_id); DVBTerrestrialChannel* dvb_terrestrial_channel_new_without_schedule (void); DVBTerrestrialChannel* dvb_terrestrial_channel_construct_without_schedule (GType object_type); DVBChannel* dvb_channel_construct_without_schedule (GType object_type); @@ -199,9 +202,6 @@ guint dvb_channel_get_VideoPID (DVBChannel* self); gchar* dvb_channel_get_audio_pids_string (DVBChannel* self); guint dvb_channel_get_Sid (DVBChannel* self); -DVBTerrestrialChannel* dvb_terrestrial_channel_new (void); -DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type); -DVBChannel* dvb_channel_construct (GType object_type); void dvb_terrestrial_channel_set_Inversion (DVBTerrestrialChannel* self, DVBDvbSrcInversion value); void dvb_terrestrial_channel_set_Bandwidth (DVBTerrestrialChannel* self, DVBDvbSrcBandwidth value); void dvb_terrestrial_channel_set_CodeRateHP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value); @@ -215,6 +215,20 @@ static void _vala_dvb_terrestrial_channel_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type, guint group_id) { + DVBTerrestrialChannel * self = NULL; + guint _tmp0_; + _tmp0_ = group_id; + self = (DVBTerrestrialChannel*) dvb_channel_construct (object_type, _tmp0_); + return self; +} + + +DVBTerrestrialChannel* dvb_terrestrial_channel_new (guint group_id) { + return dvb_terrestrial_channel_construct (DVB_TYPE_TERRESTRIAL_CHANNEL, group_id); +} + + DVBTerrestrialChannel* dvb_terrestrial_channel_construct_without_schedule (GType object_type) { DVBTerrestrialChannel * self = NULL; self = (DVBTerrestrialChannel*) dvb_channel_construct_without_schedule (object_type); @@ -229,190 +243,272 @@ static void dvb_terrestrial_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source) { DVBTerrestrialChannel * self; - guint _tmp0_; + GstElement* _tmp0_; + DVBDvbSrcModulation _tmp1_; + GstElement* _tmp2_; + DVBDvbSrcTransmissionMode _tmp3_; + GstElement* _tmp4_; + DVBDvbSrcCodeRate _tmp5_; + GstElement* _tmp6_; + DVBDvbSrcCodeRate _tmp7_; + GstElement* _tmp8_; + DVBDvbSrcGuard _tmp9_; + GstElement* _tmp10_; + DVBDvbSrcBandwidth _tmp11_; + GstElement* _tmp12_; + guint _tmp13_; + guint _tmp14_; + GstElement* _tmp15_; + DVBDvbSrcHierarchy _tmp16_; + GstElement* _tmp17_; + DVBDvbSrcInversion _tmp18_; self = (DVBTerrestrialChannel*) base; g_return_if_fail (source != NULL); - g_object_set ((GObject*) source, "modulation", self->priv->_Constellation, NULL); - g_object_set ((GObject*) source, "trans-mode", self->priv->_TransmissionMode, NULL); - g_object_set ((GObject*) source, "code-rate-hp", self->priv->_CodeRateHP, NULL); - g_object_set ((GObject*) source, "code-rate-lp", self->priv->_CodeRateLP, NULL); - g_object_set ((GObject*) source, "guard", self->priv->_GuardInterval, NULL); - g_object_set ((GObject*) source, "bandwidth", self->priv->_Bandwidth, NULL); - _tmp0_ = dvb_channel_get_Frequency ((DVBChannel*) self); - g_object_set ((GObject*) source, "frequency", _tmp0_, NULL); - g_object_set ((GObject*) source, "hierarchy", self->priv->_Hierarchy, NULL); - g_object_set ((GObject*) source, "inversion", self->priv->_Inversion, NULL); + _tmp0_ = source; + _tmp1_ = self->priv->_Constellation; + g_object_set ((GObject*) _tmp0_, "modulation", _tmp1_, NULL); + _tmp2_ = source; + _tmp3_ = self->priv->_TransmissionMode; + g_object_set ((GObject*) _tmp2_, "trans-mode", _tmp3_, NULL); + _tmp4_ = source; + _tmp5_ = self->priv->_CodeRateHP; + g_object_set ((GObject*) _tmp4_, "code-rate-hp", _tmp5_, NULL); + _tmp6_ = source; + _tmp7_ = self->priv->_CodeRateLP; + g_object_set ((GObject*) _tmp6_, "code-rate-lp", _tmp7_, NULL); + _tmp8_ = source; + _tmp9_ = self->priv->_GuardInterval; + g_object_set ((GObject*) _tmp8_, "guard", _tmp9_, NULL); + _tmp10_ = source; + _tmp11_ = self->priv->_Bandwidth; + g_object_set ((GObject*) _tmp10_, "bandwidth", _tmp11_, NULL); + _tmp12_ = source; + _tmp13_ = dvb_channel_get_Frequency ((DVBChannel*) self); + _tmp14_ = _tmp13_; + g_object_set ((GObject*) _tmp12_, "frequency", _tmp14_, NULL); + _tmp15_ = source; + _tmp16_ = self->priv->_Hierarchy; + g_object_set ((GObject*) _tmp15_, "hierarchy", _tmp16_, NULL); + _tmp17_ = source; + _tmp18_ = self->priv->_Inversion; + g_object_set ((GObject*) _tmp17_, "inversion", _tmp18_, NULL); } static gchar* dvb_terrestrial_channel_real_to_string (DVBChannel* base) { DVBTerrestrialChannel * self; gchar* result = NULL; - const gchar* _tmp0_ = NULL; - guint _tmp1_; - const gchar* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; - const gchar* _tmp4_ = NULL; + const gchar* _tmp0_; + const gchar* _tmp1_; + guint _tmp2_; + guint _tmp3_; + DVBDvbSrcInversion _tmp4_; const gchar* _tmp5_ = NULL; - const gchar* _tmp6_ = NULL; + DVBDvbSrcBandwidth _tmp6_; const gchar* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; + DVBDvbSrcCodeRate _tmp8_; const gchar* _tmp9_ = NULL; - guint _tmp10_; - gchar* _tmp11_ = NULL; - gchar* _tmp12_; - guint _tmp13_; - gchar* _tmp14_ = NULL; - gchar* _tmp15_; + DVBDvbSrcCodeRate _tmp10_; + const gchar* _tmp11_ = NULL; + DVBDvbSrcModulation _tmp12_; + const gchar* _tmp13_ = NULL; + DVBDvbSrcTransmissionMode _tmp14_; + const gchar* _tmp15_ = NULL; + DVBDvbSrcGuard _tmp16_; + const gchar* _tmp17_ = NULL; + DVBDvbSrcHierarchy _tmp18_; + const gchar* _tmp19_ = NULL; + guint _tmp20_; + guint _tmp21_; + gchar* _tmp22_ = NULL; + gchar* _tmp23_; + guint _tmp24_; + guint _tmp25_; + gchar* _tmp26_ = NULL; + gchar* _tmp27_; self = (DVBTerrestrialChannel*) base; - _tmp0_ = dvb_channel_get_Name (DVB_CHANNEL (self)); - _tmp1_ = dvb_channel_get_Frequency (DVB_CHANNEL (self)); - _tmp2_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_INVERSION, (gint) self->priv->_Inversion); - _tmp3_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_BANDWIDTH, (gint) self->priv->_Bandwidth); - _tmp4_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) self->priv->_CodeRateHP); - _tmp5_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) self->priv->_CodeRateLP); - _tmp6_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_MODULATION, (gint) self->priv->_Constellation); - _tmp7_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, (gint) self->priv->_TransmissionMode); - _tmp8_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_GUARD, (gint) self->priv->_GuardInterval); - _tmp9_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_HIERARCHY, (gint) self->priv->_Hierarchy); - _tmp10_ = dvb_channel_get_VideoPID (DVB_CHANNEL (self)); - _tmp11_ = dvb_channel_get_audio_pids_string (DVB_CHANNEL (self)); - _tmp12_ = _tmp11_; - _tmp13_ = dvb_channel_get_Sid (DVB_CHANNEL (self)); - _tmp14_ = g_strdup_printf ("%s:%u:%s:%s:%s:%s:%s:%s:%s:%s:%u:%s:%u", _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_, _tmp7_, _tmp8_, _tmp9_, _tmp10_, _tmp12_, _tmp13_); - result = (_tmp15_ = _tmp14_, _g_free0 (_tmp12_), _tmp15_); + _tmp0_ = dvb_channel_get_Name ((DVBChannel*) self); + _tmp1_ = _tmp0_; + _tmp2_ = dvb_channel_get_Frequency ((DVBChannel*) self); + _tmp3_ = _tmp2_; + _tmp4_ = self->priv->_Inversion; + _tmp5_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_INVERSION, (gint) _tmp4_); + _tmp6_ = self->priv->_Bandwidth; + _tmp7_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_BANDWIDTH, (gint) _tmp6_); + _tmp8_ = self->priv->_CodeRateHP; + _tmp9_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp8_); + _tmp10_ = self->priv->_CodeRateLP; + _tmp11_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) _tmp10_); + _tmp12_ = self->priv->_Constellation; + _tmp13_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_MODULATION, (gint) _tmp12_); + _tmp14_ = self->priv->_TransmissionMode; + _tmp15_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, (gint) _tmp14_); + _tmp16_ = self->priv->_GuardInterval; + _tmp17_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_GUARD, (gint) _tmp16_); + _tmp18_ = self->priv->_Hierarchy; + _tmp19_ = dvb_utils_get_nick_from_enum (DVB_TYPE_DVB_SRC_HIERARCHY, (gint) _tmp18_); + _tmp20_ = dvb_channel_get_VideoPID ((DVBChannel*) self); + _tmp21_ = _tmp20_; + _tmp22_ = dvb_channel_get_audio_pids_string ((DVBChannel*) self); + _tmp23_ = _tmp22_; + _tmp24_ = dvb_channel_get_Sid ((DVBChannel*) self); + _tmp25_ = _tmp24_; + _tmp26_ = g_strdup_printf ("%s:%u:%s:%s:%s:%s:%s:%s:%s:%s:%u:%s:%u", _tmp1_, _tmp3_, _tmp5_, _tmp7_, _tmp9_, _tmp11_, _tmp13_, _tmp15_, _tmp17_, _tmp19_, _tmp21_, _tmp23_, _tmp25_); + _tmp27_ = _tmp26_; + _g_free0 (_tmp23_); + result = _tmp27_; return result; } -DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type) { - DVBTerrestrialChannel * self = NULL; - self = (DVBTerrestrialChannel*) dvb_channel_construct (object_type); - return self; -} - - -DVBTerrestrialChannel* dvb_terrestrial_channel_new (void) { - return dvb_terrestrial_channel_construct (DVB_TYPE_TERRESTRIAL_CHANNEL); -} - - DVBDvbSrcInversion dvb_terrestrial_channel_get_Inversion (DVBTerrestrialChannel* self) { DVBDvbSrcInversion result; + DVBDvbSrcInversion _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Inversion; + _tmp0_ = self->priv->_Inversion; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_Inversion (DVBTerrestrialChannel* self, DVBDvbSrcInversion value) { + DVBDvbSrcInversion _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Inversion = value; + _tmp0_ = value; + self->priv->_Inversion = _tmp0_; g_object_notify ((GObject *) self, "Inversion"); } DVBDvbSrcBandwidth dvb_terrestrial_channel_get_Bandwidth (DVBTerrestrialChannel* self) { DVBDvbSrcBandwidth result; + DVBDvbSrcBandwidth _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Bandwidth; + _tmp0_ = self->priv->_Bandwidth; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_Bandwidth (DVBTerrestrialChannel* self, DVBDvbSrcBandwidth value) { + DVBDvbSrcBandwidth _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Bandwidth = value; + _tmp0_ = value; + self->priv->_Bandwidth = _tmp0_; g_object_notify ((GObject *) self, "Bandwidth"); } DVBDvbSrcCodeRate dvb_terrestrial_channel_get_CodeRateHP (DVBTerrestrialChannel* self) { DVBDvbSrcCodeRate result; + DVBDvbSrcCodeRate _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_CodeRateHP; + _tmp0_ = self->priv->_CodeRateHP; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_CodeRateHP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value) { + DVBDvbSrcCodeRate _tmp0_; g_return_if_fail (self != NULL); - self->priv->_CodeRateHP = value; + _tmp0_ = value; + self->priv->_CodeRateHP = _tmp0_; g_object_notify ((GObject *) self, "CodeRateHP"); } DVBDvbSrcCodeRate dvb_terrestrial_channel_get_CodeRateLP (DVBTerrestrialChannel* self) { DVBDvbSrcCodeRate result; + DVBDvbSrcCodeRate _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_CodeRateLP; + _tmp0_ = self->priv->_CodeRateLP; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_CodeRateLP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value) { + DVBDvbSrcCodeRate _tmp0_; g_return_if_fail (self != NULL); - self->priv->_CodeRateLP = value; + _tmp0_ = value; + self->priv->_CodeRateLP = _tmp0_; g_object_notify ((GObject *) self, "CodeRateLP"); } DVBDvbSrcModulation dvb_terrestrial_channel_get_Constellation (DVBTerrestrialChannel* self) { DVBDvbSrcModulation result; + DVBDvbSrcModulation _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Constellation; + _tmp0_ = self->priv->_Constellation; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_Constellation (DVBTerrestrialChannel* self, DVBDvbSrcModulation value) { + DVBDvbSrcModulation _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Constellation = value; + _tmp0_ = value; + self->priv->_Constellation = _tmp0_; g_object_notify ((GObject *) self, "Constellation"); } DVBDvbSrcTransmissionMode dvb_terrestrial_channel_get_TransmissionMode (DVBTerrestrialChannel* self) { DVBDvbSrcTransmissionMode result; + DVBDvbSrcTransmissionMode _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_TransmissionMode; + _tmp0_ = self->priv->_TransmissionMode; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_TransmissionMode (DVBTerrestrialChannel* self, DVBDvbSrcTransmissionMode value) { + DVBDvbSrcTransmissionMode _tmp0_; g_return_if_fail (self != NULL); - self->priv->_TransmissionMode = value; + _tmp0_ = value; + self->priv->_TransmissionMode = _tmp0_; g_object_notify ((GObject *) self, "TransmissionMode"); } DVBDvbSrcGuard dvb_terrestrial_channel_get_GuardInterval (DVBTerrestrialChannel* self) { DVBDvbSrcGuard result; + DVBDvbSrcGuard _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_GuardInterval; + _tmp0_ = self->priv->_GuardInterval; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_GuardInterval (DVBTerrestrialChannel* self, DVBDvbSrcGuard value) { + DVBDvbSrcGuard _tmp0_; g_return_if_fail (self != NULL); - self->priv->_GuardInterval = value; + _tmp0_ = value; + self->priv->_GuardInterval = _tmp0_; g_object_notify ((GObject *) self, "GuardInterval"); } DVBDvbSrcHierarchy dvb_terrestrial_channel_get_Hierarchy (DVBTerrestrialChannel* self) { DVBDvbSrcHierarchy result; + DVBDvbSrcHierarchy _tmp0_; g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Hierarchy; + _tmp0_ = self->priv->_Hierarchy; + result = _tmp0_; return result; } void dvb_terrestrial_channel_set_Hierarchy (DVBTerrestrialChannel* self, DVBDvbSrcHierarchy value) { + DVBDvbSrcHierarchy _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Hierarchy = value; + _tmp0_ = value; + self->priv->_Hierarchy = _tmp0_; g_object_notify ((GObject *) self, "Hierarchy"); } diff -Nru gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialChannel.vala gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialChannel.vala --- gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialChannel.vala 2010-05-26 16:23:49.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialChannel.vala 2011-09-29 20:27:47.000000000 +0000 @@ -32,6 +32,10 @@ public DvbSrcGuard GuardInterval {get; set;} public DvbSrcHierarchy Hierarchy {get; set;} + public TerrestrialChannel (uint group_id) { + base (group_id); + } + public TerrestrialChannel.without_schedule () { Channel.without_schedule (); } @@ -49,7 +53,7 @@ } public override string to_string () { - return "%s:%u:%s:%s:%s:%s:%s:%s:%s:%s:%u:%s:%u".printf(base.Name, base.Frequency, + return "%s:%u:%s:%s:%s:%s:%s:%s:%s:%s:%u:%s:%u".printf(this.Name, this.Frequency, Utils.get_nick_from_enum (typeof(DvbSrcInversion), this.Inversion), Utils.get_nick_from_enum (typeof(DvbSrcBandwidth), @@ -66,7 +70,7 @@ this.GuardInterval), Utils.get_nick_from_enum (typeof(DvbSrcHierarchy), this.Hierarchy), - base.VideoPID, base.get_audio_pids_string (), base.Sid); + this.VideoPID, this.get_audio_pids_string (), this.Sid); } } diff -Nru gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialScanner.c gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialScanner.c --- gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialScanner.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialScanner.c 2011-09-22 12:34:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* TerrestrialScanner.c generated by valac 0.11.3, the Vala compiler +/* TerrestrialScanner.c generated by valac 0.14.0, the Vala compiler * generated from TerrestrialScanner.vala, do not modify */ /* @@ -22,29 +22,13 @@ #include #include -#include -#include +#include #include #include -#include -#include -#include -#include #include +#include -#define DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER (dvb_id_bus_terrestrial_scanner_get_type ()) -#define DVB_ID_BUS_TERRESTRIAL_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, DVBIDBusTerrestrialScanner)) -#define DVB_IS_ID_BUS_TERRESTRIAL_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER)) -#define DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, DVBIDBusTerrestrialScannerIface)) - -typedef struct _DVBIDBusTerrestrialScanner DVBIDBusTerrestrialScanner; -typedef struct _DVBIDBusTerrestrialScannerIface DVBIDBusTerrestrialScannerIface; -typedef struct _DBusObjectVTable _DBusObjectVTable; -#define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _DVBIDBusTerrestrialScannerDBusProxy DVBIDBusTerrestrialScannerDBusProxy; -typedef DBusGProxyClass DVBIDBusTerrestrialScannerDBusProxyClass; - #define DVB_TYPE_SCANNER (dvb_scanner_get_type ()) #define DVB_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCANNER, DVBScanner)) #define DVB_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SCANNER, DVBScannerClass)) @@ -86,6 +70,16 @@ typedef struct _DVBChannelList DVBChannelList; typedef struct _DVBChannelListClass DVBChannelListClass; +#define DVB_TYPE_ID_BUS_SCANNER (dvb_id_bus_scanner_get_type ()) +#define DVB_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScanner)) +#define DVB_IS_ID_BUS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_ID_BUS_SCANNER)) +#define DVB_ID_BUS_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_TYPE_ID_BUS_SCANNER, DVBIDBusScannerIface)) + +typedef struct _DVBIDBusScanner DVBIDBusScanner; +typedef struct _DVBIDBusScannerIface DVBIDBusScannerIface; + +#define DVB_TYPE_ID_BUS_SCANNER_PROXY (dvb_id_bus_scanner_proxy_get_type ()) + #define DVB_TYPE_TERRESTRIAL_SCANNER (dvb_terrestrial_scanner_get_type ()) #define DVB_TERRESTRIAL_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_TERRESTRIAL_SCANNER, DVBTerrestrialScanner)) #define DVB_TERRESTRIAL_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_TERRESTRIAL_SCANNER, DVBTerrestrialScannerClass)) @@ -106,6 +100,7 @@ typedef struct _DVBDevice DVBDevice; typedef struct _DVBDeviceClass DVBDeviceClass; +#define _g_free0(var) (var = (g_free (var), NULL)) #define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) #define DVB_TYPE_DVB_SRC_BANDWIDTH (dvb_dvb_src_bandwidth_get_type ()) @@ -134,25 +129,6 @@ #define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -struct _DVBIDBusTerrestrialScannerIface { - GTypeInterface parent_iface; - void (*Run) (DVBIDBusTerrestrialScanner* self, GError** error); - void (*Destroy) (DVBIDBusTerrestrialScanner* self, GError** error); - gboolean (*WriteAllChannelsToFile) (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error); - gboolean (*WriteChannelsToFile) (DVBIDBusTerrestrialScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); - void (*AddScanningData) (DVBIDBusTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard, GError** error); - gboolean (*AddScanningDataFromFile) (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error); -}; - -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -struct _DVBIDBusTerrestrialScannerDBusProxy { - DBusGProxy parent_instance; - gboolean disposed; -}; - struct _DVBScanner { GObject parent_instance; DVBScannerPrivate * priv; @@ -172,6 +148,16 @@ void (*add_scanning_data_from_string) (DVBScanner* self, const gchar* line); }; +struct _DVBIDBusScannerIface { + GTypeInterface parent_iface; + void (*Run) (DVBIDBusScanner* self, GError** error); + void (*Destroy) (DVBIDBusScanner* self, GError** error); + gboolean (*WriteAllChannelsToFile) (DVBIDBusScanner* self, const gchar* path, GError** error); + gboolean (*WriteChannelsToFile) (DVBIDBusScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); + gboolean (*AddScanningData) (DVBIDBusScanner* self, GHashTable* data, GError** error); + gboolean (*AddScanningDataFromFile) (DVBIDBusScanner* self, const gchar* path, GError** error); +}; + struct _DVBTerrestrialScanner { DVBScanner parent_instance; DVBTerrestrialScannerPrivate * priv; @@ -241,70 +227,23 @@ static gpointer dvb_terrestrial_scanner_parent_class = NULL; -static DVBIDBusTerrestrialScannerIface* dvb_terrestrial_scanner_dvb_id_bus_terrestrial_scanner_parent_iface = NULL; +static DVBIDBusScannerIface* dvb_terrestrial_scanner_dvb_id_bus_scanner_parent_iface = NULL; -DVBIDBusTerrestrialScanner* dvb_id_bus_terrestrial_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); -GType dvb_id_bus_terrestrial_scanner_get_type (void) G_GNUC_CONST; -void dvb_id_bus_terrestrial_scanner_Run (DVBIDBusTerrestrialScanner* self, GError** error); -void dvb_id_bus_terrestrial_scanner_Destroy (DVBIDBusTerrestrialScanner* self, GError** error); -gboolean dvb_id_bus_terrestrial_scanner_WriteAllChannelsToFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error); -gboolean dvb_id_bus_terrestrial_scanner_WriteChannelsToFile (DVBIDBusTerrestrialScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); -void dvb_id_bus_terrestrial_scanner_AddScanningData (DVBIDBusTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard, GError** error); -gboolean dvb_id_bus_terrestrial_scanner_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error); -static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -void dvb_id_bus_terrestrial_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_id_bus_terrestrial_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_id_bus_terrestrial_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_introspect (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_property_get_all (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_Run (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_Destroy (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_WriteAllChannelsToFile (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_WriteChannelsToFile (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_AddScanningData (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_dvb_id_bus_terrestrial_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, DBusConnection* _connection); -static void _dbus_dvb_id_bus_terrestrial_scanner_finished (GObject* _sender, DBusConnection* _connection); -static void _dbus_dvb_id_bus_terrestrial_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, DBusConnection* _connection); -static void _dbus_dvb_id_bus_terrestrial_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, DBusConnection* _connection); -GType dvb_id_bus_terrestrial_scanner_dbus_proxy_get_type (void) G_GNUC_CONST; -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_frequency_scanned (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_finished (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_channel_added (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_frontend_stats (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); -DBusHandlerResult dvb_id_bus_terrestrial_scanner_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data); -enum { - DVB_ID_BUS_TERRESTRIAL_SCANNER_DBUS_PROXY_DUMMY_PROPERTY -}; -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_Run (DVBIDBusTerrestrialScanner* self, GError** error); -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_Destroy (DVBIDBusTerrestrialScanner* self, GError** error); -static gboolean dvb_id_bus_terrestrial_scanner_dbus_proxy_WriteAllChannelsToFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error); -static gboolean dvb_id_bus_terrestrial_scanner_dbus_proxy_WriteChannelsToFile (DVBIDBusTerrestrialScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error); -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_AddScanningData (DVBIDBusTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard, GError** error); -static gboolean dvb_id_bus_terrestrial_scanner_dbus_proxy_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error); -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_dvb_id_bus_terrestrial_scanner__interface_init (DVBIDBusTerrestrialScannerIface* iface); -static void _vala_dvb_id_bus_terrestrial_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_dvb_id_bus_terrestrial_scanner_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); GType dvb_scanner_get_type (void) G_GNUC_CONST; GType dvb_scanned_item_get_type (void) G_GNUC_CONST; GType dvb_channel_get_type (void) G_GNUC_CONST; GType dvb_channel_list_get_type (void) G_GNUC_CONST; +GType dvb_id_bus_scanner_proxy_get_type (void) G_GNUC_CONST; +guint dvb_id_bus_scanner_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error); +GType dvb_id_bus_scanner_get_type (void) G_GNUC_CONST; GType dvb_terrestrial_scanner_get_type (void) G_GNUC_CONST; enum { DVB_TERRESTRIAL_SCANNER_DUMMY_PROPERTY }; -void dvb_terrestrial_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_terrestrial_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_terrestrial_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_terrestrial_scanner_introspect (DVBTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message); GType dvb_device_get_type (void) G_GNUC_CONST; DVBTerrestrialScanner* dvb_terrestrial_scanner_new (DVBDevice* device); DVBTerrestrialScanner* dvb_terrestrial_scanner_construct (GType object_type, DVBDevice* device); -static void dvb_terrestrial_scanner_real_AddScanningData (DVBIDBusTerrestrialScanner* base, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard, GError** error); +static gboolean dvb_terrestrial_scanner_real_AddScanningData (DVBIDBusScanner* base, GHashTable* data, GError** error); static inline void dvb_terrestrial_scanner_add_scanning_data (DVBTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); static void dvb_terrestrial_scanner_real_add_scanning_data_from_string (DVBScanner* base, const gchar* line); @@ -349,2170 +288,234 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); static gint _vala_array_length (gpointer array); -static const DBusObjectPathVTable _dvb_id_bus_terrestrial_scanner_dbus_path_vtable = {_dvb_id_bus_terrestrial_scanner_dbus_unregister, dvb_id_bus_terrestrial_scanner_dbus_message}; -static const _DBusObjectVTable _dvb_id_bus_terrestrial_scanner_dbus_vtable = {dvb_id_bus_terrestrial_scanner_dbus_register_object}; -static const DBusObjectPathVTable _dvb_terrestrial_scanner_dbus_path_vtable = {_dvb_terrestrial_scanner_dbus_unregister, dvb_terrestrial_scanner_dbus_message}; -static const _DBusObjectVTable _dvb_terrestrial_scanner_dbus_vtable = {dvb_terrestrial_scanner_dbus_register_object}; - -void dvb_id_bus_terrestrial_scanner_Run (DVBIDBusTerrestrialScanner* self, GError** error) { - DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->Run (self, error); -} - -void dvb_id_bus_terrestrial_scanner_Destroy (DVBIDBusTerrestrialScanner* self, GError** error) { - DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->Destroy (self, error); -} - - -gboolean dvb_id_bus_terrestrial_scanner_WriteAllChannelsToFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error) { - return DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->WriteAllChannelsToFile (self, path, error); -} - - -gboolean dvb_id_bus_terrestrial_scanner_WriteChannelsToFile (DVBIDBusTerrestrialScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { - return DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, error); +DVBTerrestrialScanner* dvb_terrestrial_scanner_construct (GType object_type, DVBDevice* device) { + DVBTerrestrialScanner * self = NULL; + DVBDevice* _tmp0_; + g_return_val_if_fail (device != NULL, NULL); + _tmp0_ = device; + self = (DVBTerrestrialScanner*) g_object_new (object_type, "Device", _tmp0_, NULL); + return self; } -void dvb_id_bus_terrestrial_scanner_AddScanningData (DVBIDBusTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard, GError** error) { - DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->AddScanningData (self, frequency, hierarchy, bandwidth, transmode, code_rate_hp, code_rate_lp, constellation, guard, error); +DVBTerrestrialScanner* dvb_terrestrial_scanner_new (DVBDevice* device) { + return dvb_terrestrial_scanner_construct (DVB_TYPE_TERRESTRIAL_SCANNER, device); } /** - * @path: Path to file containing scanning data - * @returns: TRUE when the file has been parsed successfully - * - * Parses initial tuning data from a file as provided by dvb-apps - */ -gboolean dvb_id_bus_terrestrial_scanner_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error) { - return DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->AddScanningDataFromFile (self, path, error); -} - - -static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2); - register GMarshalFunc_VOID__UINT_UINT callback; - register GCClosure * cc; - register gpointer data1, data2; - cc = (GCClosure *) closure; - g_return_if_fail (n_param_values == 3); - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = param_values->data[0].v_pointer; - } else { - data1 = param_values->data[0].v_pointer; - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback); - callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), data2); -} - - -static void g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (gpointer data1, guint arg_1, guint arg_2, const char* arg_3, const char* arg_4, const char* arg_5, gboolean arg_6, gpointer data2); - register GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN callback; - register GCClosure * cc; - register gpointer data1, data2; - cc = (GCClosure *) closure; - g_return_if_fail (n_param_values == 7); - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = param_values->data[0].v_pointer; - } else { - data1 = param_values->data[0].v_pointer; - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback); - callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), g_value_get_string (param_values + 3), g_value_get_string (param_values + 4), g_value_get_string (param_values + 5), g_value_get_boolean (param_values + 6), data2); -} - - -static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE) (gpointer data1, gdouble arg_1, gdouble arg_2, gpointer data2); - register GMarshalFunc_VOID__DOUBLE_DOUBLE callback; - register GCClosure * cc; - register gpointer data1, data2; - cc = (GCClosure *) closure; - g_return_if_fail (n_param_values == 3); - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = param_values->data[0].v_pointer; - } else { - data1 = param_values->data[0].v_pointer; - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__DOUBLE_DOUBLE) (marshal_data ? marshal_data : cc->callback); - callback (data1, g_value_get_double (param_values + 1), g_value_get_double (param_values + 2), data2); -} - - -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - const _DBusObjectVTable * vtable; - vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable")); - if (vtable) { - vtable->register_object (connection, path, object); - } else { - g_warning ("Object does not implement any D-Bus interface"); - } -} - - -static void _vala_dbus_unregister_object (gpointer connection, GObject* object) { - char* path; - path = g_object_steal_data ((GObject*) object, "dbus_object_path"); - dbus_connection_unregister_object_path (connection, path); - g_free (path); -} - - -void _dvb_id_bus_terrestrial_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_introspect (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); - } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_property_get_all (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter, reply_iter, subiter; - char* interface_name; - const char* _tmp0_; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &reply_iter); - dbus_message_iter_get_basic (&iter, &_tmp0_); - dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp0_); - if (strcmp (interface_name, "org.gnome.DVB.Scanner.Terrestrial") == 0) { - dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_ARRAY, "{sv}", &subiter); - dbus_message_iter_close_container (&reply_iter, &subiter); - } else { - dbus_message_unref (reply); - reply = NULL; - } - g_free (interface_name); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_Run (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dvb_id_bus_terrestrial_scanner_Run (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_Destroy (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dvb_id_bus_terrestrial_scanner_Destroy (self, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_WriteAllChannelsToFile (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* path = NULL; - const char* _tmp1_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp2_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp1_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp1_); - result = dvb_id_bus_terrestrial_scanner_WriteAllChannelsToFile (self, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (path); - _tmp2_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp2_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_WriteChannelsToFile (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - guint* channel_sids = NULL; - int channel_sids_length1; - guint* _tmp3_; - int _tmp3__length; - int _tmp3__size; - int _tmp3__length1; - DBusMessageIter _tmp4_; - gchar* path = NULL; - const char* _tmp6_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp7_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "aus")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - channel_sids_length1 = 0; - _tmp3_ = g_new (guint, 5); - _tmp3__length = 0; - _tmp3__size = 4; - _tmp3__length1 = 0; - dbus_message_iter_recurse (&iter, &_tmp4_); - for (; dbus_message_iter_get_arg_type (&_tmp4_); _tmp3__length1++) { - dbus_uint32_t _tmp5_; - if (_tmp3__size == _tmp3__length) { - _tmp3__size = 2 * _tmp3__size; - _tmp3_ = g_renew (guint, _tmp3_, _tmp3__size + 1); - } - dbus_message_iter_get_basic (&_tmp4_, &_tmp5_); - dbus_message_iter_next (&_tmp4_); - _tmp3_[_tmp3__length++] = _tmp5_; - } - channel_sids_length1 = _tmp3__length1; - dbus_message_iter_next (&iter); - channel_sids = _tmp3_; - dbus_message_iter_get_basic (&iter, &_tmp6_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp6_); - result = dvb_id_bus_terrestrial_scanner_WriteChannelsToFile (self, channel_sids, channel_sids_length1, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - channel_sids = (g_free (channel_sids), NULL); - _g_free0 (path); - _tmp7_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp7_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_AddScanningData (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; + * See enums in MpegTsEnums + */ +static gboolean dvb_terrestrial_scanner_real_AddScanningData (DVBIDBusScanner* base, GHashTable* data, GError** error) { + DVBTerrestrialScanner * self; + gboolean result = FALSE; guint frequency = 0U; - dbus_uint32_t _tmp8_; guint hierarchy = 0U; - dbus_uint32_t _tmp9_; guint bandwidth = 0U; - dbus_uint32_t _tmp10_; + guint guard = 0U; gchar* transmode = NULL; - const char* _tmp11_; gchar* code_rate_hp = NULL; - const char* _tmp12_; gchar* code_rate_lp = NULL; - const char* _tmp13_; gchar* constellation = NULL; - const char* _tmp14_; - guint guard = 0U; - dbus_uint32_t _tmp15_; - DBusMessage* reply; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "uuussssu")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp8_); - dbus_message_iter_next (&iter); - frequency = _tmp8_; - dbus_message_iter_get_basic (&iter, &_tmp9_); - dbus_message_iter_next (&iter); - hierarchy = _tmp9_; - dbus_message_iter_get_basic (&iter, &_tmp10_); - dbus_message_iter_next (&iter); - bandwidth = _tmp10_; - dbus_message_iter_get_basic (&iter, &_tmp11_); - dbus_message_iter_next (&iter); - transmode = g_strdup (_tmp11_); - dbus_message_iter_get_basic (&iter, &_tmp12_); - dbus_message_iter_next (&iter); - code_rate_hp = g_strdup (_tmp12_); - dbus_message_iter_get_basic (&iter, &_tmp13_); - dbus_message_iter_next (&iter); - code_rate_lp = g_strdup (_tmp13_); - dbus_message_iter_get_basic (&iter, &_tmp14_); - dbus_message_iter_next (&iter); - constellation = g_strdup (_tmp14_); - dbus_message_iter_get_basic (&iter, &_tmp15_); - dbus_message_iter_next (&iter); - guard = _tmp15_; - dvb_id_bus_terrestrial_scanner_AddScanningData (self, frequency, hierarchy, bandwidth, transmode, code_rate_hp, code_rate_lp, constellation, guard, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (transmode); - _g_free0 (code_rate_hp); - _g_free0 (code_rate_lp); - _g_free0 (constellation); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -static DBusHandlerResult _dbus_dvb_id_bus_terrestrial_scanner_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - GError* error; - gchar* path = NULL; - const char* _tmp16_; - gboolean result; - DBusMessage* reply; - dbus_bool_t _tmp17_; - error = NULL; - if (strcmp (dbus_message_get_signature (message), "s")) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp16_); - dbus_message_iter_next (&iter); - path = g_strdup (_tmp16_); - result = dvb_id_bus_terrestrial_scanner_AddScanningDataFromFile (self, path, &error); - if (error) { - if (error->domain == DBUS_GERROR) { - switch (error->code) { - case DBUS_GERROR_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Failed", error->message); - break; - case DBUS_GERROR_NO_MEMORY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoMemory", error->message); - break; - case DBUS_GERROR_SERVICE_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.ServiceUnknown", error->message); - break; - case DBUS_GERROR_NAME_HAS_NO_OWNER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NameHasNoOwner", error->message); - break; - case DBUS_GERROR_NO_REPLY: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoReply", error->message); - break; - case DBUS_GERROR_IO_ERROR: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.IOError", error->message); - break; - case DBUS_GERROR_BAD_ADDRESS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.BadAddress", error->message); - break; - case DBUS_GERROR_NOT_SUPPORTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NotSupported", error->message); - break; - case DBUS_GERROR_LIMITS_EXCEEDED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.LimitsExceeded", error->message); - break; - case DBUS_GERROR_ACCESS_DENIED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AccessDenied", error->message); - break; - case DBUS_GERROR_AUTH_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AuthFailed", error->message); - break; - case DBUS_GERROR_NO_SERVER: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoServer", error->message); - break; - case DBUS_GERROR_TIMEOUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Timeout", error->message); - break; - case DBUS_GERROR_NO_NETWORK: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.NoNetwork", error->message); - break; - case DBUS_GERROR_ADDRESS_IN_USE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.AddressInUse", error->message); - break; - case DBUS_GERROR_DISCONNECTED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Disconnected", error->message); - break; - case DBUS_GERROR_INVALID_ARGS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidArgs", error->message); - break; - case DBUS_GERROR_FILE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileNotFound", error->message); - break; - case DBUS_GERROR_FILE_EXISTS: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.FileExists", error->message); - break; - case DBUS_GERROR_UNKNOWN_METHOD: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnknownMethod", error->message); - break; - case DBUS_GERROR_TIMED_OUT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.TimedOut", error->message); - break; - case DBUS_GERROR_MATCH_RULE_NOT_FOUND: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleNotFound", error->message); - break; - case DBUS_GERROR_MATCH_RULE_INVALID: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.MatchRuleInvalid", error->message); - break; - case DBUS_GERROR_SPAWN_EXEC_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ExecFailed", error->message); - break; - case DBUS_GERROR_SPAWN_FORK_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ForkFailed", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_EXITED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildExited", error->message); - break; - case DBUS_GERROR_SPAWN_CHILD_SIGNALED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.ChildSignaled", error->message); - break; - case DBUS_GERROR_SPAWN_FAILED: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.Spawn.Failed", error->message); - break; - case DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.UnixProcessIdUnknown", error->message); - break; - case DBUS_GERROR_INVALID_SIGNATURE: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidSignature", error->message); - break; - case DBUS_GERROR_INVALID_FILE_CONTENT: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.InvalidFileContent", error->message); - break; - case DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", error->message); - break; - case DBUS_GERROR_REMOTE_EXCEPTION: - reply = dbus_message_new_error (message, "org.freedesktop.DBus.Error.RemoteException", error->message); - break; - } - } - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - _g_free0 (path); - _tmp17_ = result; - dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &_tmp17_); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - - -DBusHandlerResult dvb_id_bus_terrestrial_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_introspect (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Properties", "GetAll")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_property_get_all (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Terrestrial", "Run")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_Run (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Terrestrial", "Destroy")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_Destroy (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Terrestrial", "WriteAllChannelsToFile")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_WriteAllChannelsToFile (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Terrestrial", "WriteChannelsToFile")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_WriteChannelsToFile (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Terrestrial", "AddScanningData")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_AddScanningData (object, connection, message); - } else if (dbus_message_is_method_call (message, "org.gnome.DVB.Scanner.Terrestrial", "AddScanningDataFromFile")) { - result = _dbus_dvb_id_bus_terrestrial_scanner_AddScanningDataFromFile (object, connection, message); - } - if (result == DBUS_HANDLER_RESULT_HANDLED) { + GVariant* _var = NULL; + GHashTable* _tmp0_; + gconstpointer _tmp1_ = NULL; + GVariant* _tmp2_; + GVariant* _tmp3_; + guint32 _tmp4_ = 0U; + GHashTable* _tmp5_; + gconstpointer _tmp6_ = NULL; + GVariant* _tmp7_; + GVariant* _tmp8_; + guint32 _tmp9_ = 0U; + GHashTable* _tmp10_; + gconstpointer _tmp11_ = NULL; + GVariant* _tmp12_; + GVariant* _tmp13_; + guint32 _tmp14_ = 0U; + GHashTable* _tmp15_; + gconstpointer _tmp16_ = NULL; + GVariant* _tmp17_; + GVariant* _tmp18_; + const gchar* _tmp19_ = NULL; + gchar* _tmp20_; + GHashTable* _tmp21_; + gconstpointer _tmp22_ = NULL; + GVariant* _tmp23_; + GVariant* _tmp24_; + const gchar* _tmp25_ = NULL; + gchar* _tmp26_; + GHashTable* _tmp27_; + gconstpointer _tmp28_ = NULL; + GVariant* _tmp29_; + GVariant* _tmp30_; + const gchar* _tmp31_ = NULL; + gchar* _tmp32_; + GHashTable* _tmp33_; + gconstpointer _tmp34_ = NULL; + GVariant* _tmp35_; + GVariant* _tmp36_; + const gchar* _tmp37_ = NULL; + gchar* _tmp38_; + GHashTable* _tmp39_; + gconstpointer _tmp40_ = NULL; + GVariant* _tmp41_; + GVariant* _tmp42_; + guint32 _tmp43_ = 0U; + guint _tmp44_; + guint _tmp45_; + guint _tmp46_; + const gchar* _tmp47_; + const gchar* _tmp48_; + const gchar* _tmp49_; + const gchar* _tmp50_; + guint _tmp51_; + self = (DVBTerrestrialScanner*) base; + g_return_val_if_fail (data != NULL, FALSE); + _tmp0_ = data; + _tmp1_ = g_hash_table_lookup (_tmp0_, "frequency"); + _var = (GVariant*) _tmp1_; + _tmp2_ = _var; + if (_tmp2_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); return result; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -} - - -static void _dbus_dvb_id_bus_terrestrial_scanner_frequency_scanned (GObject* _sender, guint frequency, guint freq_left, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp18_; - dbus_uint32_t _tmp19_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Terrestrial", "FrequencyScanned"); - dbus_message_iter_init_append (_message, &_iter); - _tmp18_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp18_); - _tmp19_ = freq_left; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp19_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_terrestrial_scanner_finished (GObject* _sender, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Terrestrial", "Finished"); - dbus_message_iter_init_append (_message, &_iter); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_terrestrial_scanner_channel_added (GObject* _sender, guint frequency, guint sid, const gchar* name, const gchar* network, const gchar* type, gboolean scrambled, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - dbus_uint32_t _tmp20_; - dbus_uint32_t _tmp21_; - const char* _tmp22_; - const char* _tmp23_; - const char* _tmp24_; - dbus_bool_t _tmp25_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Terrestrial", "ChannelAdded"); - dbus_message_iter_init_append (_message, &_iter); - _tmp20_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp20_); - _tmp21_ = sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp21_); - _tmp22_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp22_); - _tmp23_ = network; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp23_); - _tmp24_ = type; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp24_); - _tmp25_ = scrambled; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_BOOLEAN, &_tmp25_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -static void _dbus_dvb_id_bus_terrestrial_scanner_frontend_stats (GObject* _sender, gdouble signal_strength, gdouble signal_noise_ratio, DBusConnection* _connection) { - const char * _path; - DBusMessage *_message; - DBusMessageIter _iter; - double _tmp26_; - double _tmp27_; - _path = g_object_get_data (_sender, "dbus_object_path"); - _message = dbus_message_new_signal (_path, "org.gnome.DVB.Scanner.Terrestrial", "FrontendStats"); - dbus_message_iter_init_append (_message, &_iter); - _tmp26_ = signal_strength; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_DOUBLE, &_tmp26_); - _tmp27_ = signal_noise_ratio; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_DOUBLE, &_tmp27_); - dbus_connection_send (_connection, _message, NULL); - dbus_message_unref (_message); -} - - -void dvb_id_bus_terrestrial_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_id_bus_terrestrial_scanner_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); - } - g_signal_connect (object, "frequency-scanned", (GCallback) _dbus_dvb_id_bus_terrestrial_scanner_frequency_scanned, connection); - g_signal_connect (object, "finished", (GCallback) _dbus_dvb_id_bus_terrestrial_scanner_finished, connection); - g_signal_connect (object, "channel-added", (GCallback) _dbus_dvb_id_bus_terrestrial_scanner_channel_added, connection); - g_signal_connect (object, "frontend-stats", (GCallback) _dbus_dvb_id_bus_terrestrial_scanner_frontend_stats, connection); -} - - -static void dvb_id_bus_terrestrial_scanner_base_init (DVBIDBusTerrestrialScannerIface * iface) { - static gboolean initialized = FALSE; - if (!initialized) { - initialized = TRUE; - g_signal_new ("frequency_scanned", DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); - g_signal_new ("finished", DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - g_signal_new ("channel_added", DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_STRING_STRING_STRING_BOOLEAN, G_TYPE_NONE, 6, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); - g_signal_new ("frontend_stats", DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); - g_type_set_qdata (DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_id_bus_terrestrial_scanner_dbus_vtable)); - } -} - - -GType dvb_id_bus_terrestrial_scanner_get_type (void) { - static volatile gsize dvb_id_bus_terrestrial_scanner_type_id__volatile = 0; - if (g_once_init_enter (&dvb_id_bus_terrestrial_scanner_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusTerrestrialScannerIface), (GBaseInitFunc) dvb_id_bus_terrestrial_scanner_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType dvb_id_bus_terrestrial_scanner_type_id; - dvb_id_bus_terrestrial_scanner_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBIDBusTerrestrialScanner", &g_define_type_info, 0); - g_type_interface_add_prerequisite (dvb_id_bus_terrestrial_scanner_type_id, G_TYPE_OBJECT); - g_type_set_qdata (dvb_id_bus_terrestrial_scanner_type_id, g_quark_from_string ("ValaDBusInterfaceProxyType"), &dvb_id_bus_terrestrial_scanner_dbus_proxy_get_type); - g_once_init_leave (&dvb_id_bus_terrestrial_scanner_type_id__volatile, dvb_id_bus_terrestrial_scanner_type_id); - } - return dvb_id_bus_terrestrial_scanner_type_id__volatile; -} - - -G_DEFINE_TYPE_EXTENDED (DVBIDBusTerrestrialScannerDBusProxy, dvb_id_bus_terrestrial_scanner_dbus_proxy, DBUS_TYPE_G_PROXY, 0, G_IMPLEMENT_INTERFACE (DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, dvb_id_bus_terrestrial_scanner_dbus_proxy_dvb_id_bus_terrestrial_scanner__interface_init) ); -DVBIDBusTerrestrialScanner* dvb_id_bus_terrestrial_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path) { - DVBIDBusTerrestrialScanner* self; - self = g_object_new (dvb_id_bus_terrestrial_scanner_dbus_proxy_get_type (), "connection", connection, "name", name, "path", path, "interface", "org.gnome.DVB.Scanner.Terrestrial", NULL); - return self; -} - - -static GObject* dvb_id_bus_terrestrial_scanner_dbus_proxy_construct (GType gtype, guint n_properties, GObjectConstructParam* properties) { - GObject* self; - DBusGConnection *connection; - char* path; - char* filter; - self = G_OBJECT_CLASS (dvb_id_bus_terrestrial_scanner_dbus_proxy_parent_class)->constructor (gtype, n_properties, properties); - g_object_get (self, "connection", &connection, NULL); - g_object_get (self, "path", &path, NULL); - dbus_connection_add_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_terrestrial_scanner_dbus_proxy_filter, self, NULL); - filter = g_strdup_printf ("type='signal',path='%s'", path); - dbus_bus_add_match (dbus_g_connection_get_connection (connection), filter, NULL); - dbus_g_connection_unref (connection); - g_free (path); - g_free (filter); - return self; -} - - -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_frequency_scanned (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint frequency = 0U; - dbus_uint32_t _tmp59_; - guint freq_left = 0U; - dbus_uint32_t _tmp60_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uu")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp59_); - dbus_message_iter_next (&iter); - frequency = _tmp59_; - dbus_message_iter_get_basic (&iter, &_tmp60_); - dbus_message_iter_next (&iter); - freq_left = _tmp60_; - g_signal_emit_by_name (self, "frequency-scanned", frequency, freq_left); -} - - -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_finished (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "")) { - return; - } - dbus_message_iter_init (message, &iter); - g_signal_emit_by_name (self, "finished"); -} - - -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_channel_added (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - guint frequency = 0U; - dbus_uint32_t _tmp61_; - guint sid = 0U; - dbus_uint32_t _tmp62_; - gchar* name = NULL; - const char* _tmp63_; - gchar* network = NULL; - const char* _tmp64_; - gchar* type = NULL; - const char* _tmp65_; - gboolean scrambled = FALSE; - dbus_bool_t _tmp66_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "uusssb")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp61_); - dbus_message_iter_next (&iter); - frequency = _tmp61_; - dbus_message_iter_get_basic (&iter, &_tmp62_); - dbus_message_iter_next (&iter); - sid = _tmp62_; - dbus_message_iter_get_basic (&iter, &_tmp63_); - dbus_message_iter_next (&iter); - name = g_strdup (_tmp63_); - dbus_message_iter_get_basic (&iter, &_tmp64_); - dbus_message_iter_next (&iter); - network = g_strdup (_tmp64_); - dbus_message_iter_get_basic (&iter, &_tmp65_); - dbus_message_iter_next (&iter); - type = g_strdup (_tmp65_); - dbus_message_iter_get_basic (&iter, &_tmp66_); - dbus_message_iter_next (&iter); - scrambled = _tmp66_; - g_signal_emit_by_name (self, "channel-added", frequency, sid, name, network, type, scrambled); - _g_free0 (name); - _g_free0 (network); - _g_free0 (type); -} - - -static void _dbus_handle_dvb_id_bus_terrestrial_scanner_frontend_stats (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessageIter iter; - gdouble signal_strength = 0.0; - double _tmp67_; - gdouble signal_noise_ratio = 0.0; - double _tmp68_; - DBusMessage* reply; - if (strcmp (dbus_message_get_signature (message), "dd")) { - return; - } - dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp67_); - dbus_message_iter_next (&iter); - signal_strength = _tmp67_; - dbus_message_iter_get_basic (&iter, &_tmp68_); - dbus_message_iter_next (&iter); - signal_noise_ratio = _tmp68_; - g_signal_emit_by_name (self, "frontend-stats", signal_strength, signal_noise_ratio); -} - - -DBusHandlerResult dvb_id_bus_terrestrial_scanner_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data) { - if (dbus_message_has_path (message, dbus_g_proxy_get_path (user_data))) { - if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Terrestrial", "FrequencyScanned")) { - _dbus_handle_dvb_id_bus_terrestrial_scanner_frequency_scanned (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Terrestrial", "Finished")) { - _dbus_handle_dvb_id_bus_terrestrial_scanner_finished (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Terrestrial", "ChannelAdded")) { - _dbus_handle_dvb_id_bus_terrestrial_scanner_channel_added (user_data, connection, message); - } else if (dbus_message_is_signal (message, "org.gnome.DVB.Scanner.Terrestrial", "FrontendStats")) { - _dbus_handle_dvb_id_bus_terrestrial_scanner_frontend_stats (user_data, connection, message); - } - } - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - - -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_dispose (GObject* self) { - DBusGConnection *connection; - if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - return; - } - ((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed = TRUE; - g_object_get (self, "connection", &connection, NULL); - dbus_connection_remove_filter (dbus_g_connection_get_connection (connection), dvb_id_bus_terrestrial_scanner_dbus_proxy_filter, self); - G_OBJECT_CLASS (dvb_id_bus_terrestrial_scanner_dbus_proxy_parent_class)->dispose (self); -} - - -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_class_init (DVBIDBusTerrestrialScannerDBusProxyClass* klass) { - G_OBJECT_CLASS (klass)->constructor = dvb_id_bus_terrestrial_scanner_dbus_proxy_construct; - G_OBJECT_CLASS (klass)->dispose = dvb_id_bus_terrestrial_scanner_dbus_proxy_dispose; - G_OBJECT_CLASS (klass)->get_property = _vala_dvb_id_bus_terrestrial_scanner_dbus_proxy_get_property; - G_OBJECT_CLASS (klass)->set_property = _vala_dvb_id_bus_terrestrial_scanner_dbus_proxy_set_property; -} - - -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_init (DVBIDBusTerrestrialScannerDBusProxy* self) { -} - - -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_Run (DVBIDBusTerrestrialScanner* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Terrestrial", "Run"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp69_; - _edomain = DBUS_GERROR; - _tmp69_ = _dbus_error.name + 27; - if (strcmp (_tmp69_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp69_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp69_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp69_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp69_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp69_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp69_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp69_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp69_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp69_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp69_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp69_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp69_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp69_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp69_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp69_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp69_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp69_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp69_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp69_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp69_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp69_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp69_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp69_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp69_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp69_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp69_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp69_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp69_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp69_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp69_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp69_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp69_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return; - } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); -} - - -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_Destroy (DVBIDBusTerrestrialScanner* self, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Terrestrial", "Destroy"); - dbus_message_iter_init_append (_message, &_iter); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp70_; - _edomain = DBUS_GERROR; - _tmp70_ = _dbus_error.name + 27; - if (strcmp (_tmp70_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp70_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp70_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp70_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp70_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp70_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp70_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp70_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp70_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp70_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp70_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp70_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp70_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp70_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp70_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp70_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp70_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp70_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp70_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp70_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp70_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp70_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp70_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp70_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp70_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp70_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp70_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp70_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp70_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp70_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp70_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp70_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp70_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return; - } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); -} - - -static gboolean dvb_id_bus_terrestrial_scanner_dbus_proxy_WriteAllChannelsToFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp71_; - gboolean _result; - dbus_bool_t _tmp72_; - if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Terrestrial", "WriteAllChannelsToFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp71_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp71_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp73_; - _edomain = DBUS_GERROR; - _tmp73_ = _dbus_error.name + 27; - if (strcmp (_tmp73_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp73_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp73_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp73_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp73_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp73_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp73_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp73_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp73_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp73_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp73_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp73_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp73_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp73_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp73_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp73_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp73_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp73_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp73_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp73_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp73_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp73_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp73_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp73_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp73_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp73_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp73_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp73_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp73_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp73_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp73_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp73_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp73_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp72_); - dbus_message_iter_next (&_iter); - _result = _tmp72_; - dbus_message_unref (_reply); - return _result; -} - - -static gboolean dvb_id_bus_terrestrial_scanner_dbus_proxy_WriteChannelsToFile (DVBIDBusTerrestrialScanner* self, guint* channel_sids, int channel_sids_length1, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - guint* _tmp74_; - DBusMessageIter _tmp75_; - int _tmp76_; - const char* _tmp78_; - gboolean _result; - dbus_bool_t _tmp79_; - if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Terrestrial", "WriteChannelsToFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp74_ = channel_sids; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "u", &_tmp75_); - for (_tmp76_ = 0; _tmp76_ < channel_sids_length1; _tmp76_++) { - dbus_uint32_t _tmp77_; - _tmp77_ = *_tmp74_; - dbus_message_iter_append_basic (&_tmp75_, DBUS_TYPE_UINT32, &_tmp77_); - _tmp74_++; - } - dbus_message_iter_close_container (&_iter, &_tmp75_); - _tmp78_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp78_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp80_; - _edomain = DBUS_GERROR; - _tmp80_ = _dbus_error.name + 27; - if (strcmp (_tmp80_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp80_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp80_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp80_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp80_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp80_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp80_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp80_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp80_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp80_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp80_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp80_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp80_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp80_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp80_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp80_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp80_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp80_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp80_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp80_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp80_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp80_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp80_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp80_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp80_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp80_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp80_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp80_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp80_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp80_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp80_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp80_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp80_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; - } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp79_); - dbus_message_iter_next (&_iter); - _result = _tmp79_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_AddScanningData (DVBIDBusTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - dbus_uint32_t _tmp81_; - dbus_uint32_t _tmp82_; - dbus_uint32_t _tmp83_; - const char* _tmp84_; - const char* _tmp85_; - const char* _tmp86_; - const char* _tmp87_; - dbus_uint32_t _tmp88_; - if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Terrestrial", "AddScanningData"); - dbus_message_iter_init_append (_message, &_iter); - _tmp81_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp81_); - _tmp82_ = hierarchy; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp82_); - _tmp83_ = bandwidth; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp83_); - _tmp84_ = transmode; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp84_); - _tmp85_ = code_rate_hp; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp85_); - _tmp86_ = code_rate_lp; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp86_); - _tmp87_ = constellation; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp87_); - _tmp88_ = guard; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp88_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp89_; - _edomain = DBUS_GERROR; - _tmp89_ = _dbus_error.name + 27; - if (strcmp (_tmp89_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp89_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp89_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp89_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp89_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp89_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp89_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp89_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp89_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp89_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp89_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp89_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp89_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp89_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp89_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp89_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp89_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp89_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp89_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp89_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp89_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp89_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp89_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp89_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp89_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp89_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp89_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp89_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp89_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp89_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp89_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp89_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp89_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return; - } - if (strcmp (dbus_message_get_signature (_reply), "")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return; - } - dbus_message_iter_init (_reply, &_iter); - dbus_message_unref (_reply); -} - - -static gboolean dvb_id_bus_terrestrial_scanner_dbus_proxy_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* self, const gchar* path, GError** error) { - DBusError _dbus_error; - DBusGConnection *_connection; - DBusMessage *_message, *_reply; - DBusMessageIter _iter; - const char* _tmp90_; - gboolean _result; - dbus_bool_t _tmp91_; - if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "%s", "Connection is closed"); - return FALSE; - } - _message = dbus_message_new_method_call (dbus_g_proxy_get_bus_name ((DBusGProxy*) self), dbus_g_proxy_get_path ((DBusGProxy*) self), "org.gnome.DVB.Scanner.Terrestrial", "AddScanningDataFromFile"); - dbus_message_iter_init_append (_message, &_iter); - _tmp90_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp90_); - g_object_get (self, "connection", &_connection, NULL); - dbus_error_init (&_dbus_error); - _reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (_connection), _message, -1, &_dbus_error); - dbus_g_connection_unref (_connection); - dbus_message_unref (_message); - if (dbus_error_is_set (&_dbus_error)) { - GQuark _edomain = 0; - gint _ecode = 0; - if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp92_; - _edomain = DBUS_GERROR; - _tmp92_ = _dbus_error.name + 27; - if (strcmp (_tmp92_, "Failed") == 0) { - _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp92_, "NoMemory") == 0) { - _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp92_, "ServiceUnknown") == 0) { - _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp92_, "NameHasNoOwner") == 0) { - _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp92_, "NoReply") == 0) { - _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp92_, "IOError") == 0) { - _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp92_, "BadAddress") == 0) { - _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp92_, "NotSupported") == 0) { - _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp92_, "LimitsExceeded") == 0) { - _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp92_, "AccessDenied") == 0) { - _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp92_, "AuthFailed") == 0) { - _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp92_, "NoServer") == 0) { - _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp92_, "Timeout") == 0) { - _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp92_, "NoNetwork") == 0) { - _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp92_, "AddressInUse") == 0) { - _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp92_, "Disconnected") == 0) { - _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp92_, "InvalidArgs") == 0) { - _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp92_, "FileNotFound") == 0) { - _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp92_, "FileExists") == 0) { - _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp92_, "UnknownMethod") == 0) { - _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp92_, "TimedOut") == 0) { - _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp92_, "MatchRuleNotFound") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp92_, "MatchRuleInvalid") == 0) { - _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp92_, "Spawn.ExecFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp92_, "Spawn.ForkFailed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp92_, "Spawn.ChildExited") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp92_, "Spawn.ChildSignaled") == 0) { - _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp92_, "Spawn.Failed") == 0) { - _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp92_, "UnixProcessIdUnknown") == 0) { - _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp92_, "InvalidSignature") == 0) { - _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp92_, "InvalidFileContent") == 0) { - _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp92_, "SELinuxSecurityContextUnknown") == 0) { - _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp92_, "RemoteException") == 0) { - _ecode = DBUS_GERROR_REMOTE_EXCEPTION; - } - } - g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); - dbus_error_free (&_dbus_error); - return FALSE; + _tmp3_ = _var; + _tmp4_ = g_variant_get_uint32 (_tmp3_); + frequency = (guint) _tmp4_; + _tmp5_ = data; + _tmp6_ = g_hash_table_lookup (_tmp5_, "hierarchy"); + _var = (GVariant*) _tmp6_; + _tmp7_ = _var; + if (_tmp7_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + return result; } - if (strcmp (dbus_message_get_signature (_reply), "b")) { - g_set_error (error, DBUS_GERROR, DBUS_GERROR_INVALID_SIGNATURE, "Invalid signature, expected \"%s\", got \"%s\"", "b", dbus_message_get_signature (_reply)); - dbus_message_unref (_reply); - return FALSE; + _tmp8_ = _var; + _tmp9_ = g_variant_get_uint32 (_tmp8_); + hierarchy = (guint) _tmp9_; + _tmp10_ = data; + _tmp11_ = g_hash_table_lookup (_tmp10_, "bandwidth"); + _var = (GVariant*) _tmp11_; + _tmp12_ = _var; + if (_tmp12_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + return result; } - dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp91_); - dbus_message_iter_next (&_iter); - _result = _tmp91_; - dbus_message_unref (_reply); - return _result; -} - - -static void dvb_id_bus_terrestrial_scanner_dbus_proxy_dvb_id_bus_terrestrial_scanner__interface_init (DVBIDBusTerrestrialScannerIface* iface) { - iface->Run = dvb_id_bus_terrestrial_scanner_dbus_proxy_Run; - iface->Destroy = dvb_id_bus_terrestrial_scanner_dbus_proxy_Destroy; - iface->WriteAllChannelsToFile = dvb_id_bus_terrestrial_scanner_dbus_proxy_WriteAllChannelsToFile; - iface->WriteChannelsToFile = dvb_id_bus_terrestrial_scanner_dbus_proxy_WriteChannelsToFile; - iface->AddScanningData = dvb_id_bus_terrestrial_scanner_dbus_proxy_AddScanningData; - iface->AddScanningDataFromFile = dvb_id_bus_terrestrial_scanner_dbus_proxy_AddScanningDataFromFile; -} - - -static void _vala_dvb_id_bus_terrestrial_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { -} - - -static void _vala_dvb_id_bus_terrestrial_scanner_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { -} - - -void _dvb_terrestrial_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { -} - - -static DBusHandlerResult _dbus_dvb_terrestrial_scanner_introspect (DVBTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { - DBusMessage* reply; - DBusMessageIter iter; - GString* xml_data; - char** children; - int i; - reply = dbus_message_new_method_return (message); - dbus_message_iter_init_append (reply, &iter); - xml_data = g_string_new ("\n"); - g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); - dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children); - for (i = 0; children[i]; i++) { - g_string_append_printf (xml_data, "\n", children[i]); + _tmp13_ = _var; + _tmp14_ = g_variant_get_uint32 (_tmp13_); + bandwidth = (guint) _tmp14_; + _tmp15_ = data; + _tmp16_ = g_hash_table_lookup (_tmp15_, "transmission-mode"); + _var = (GVariant*) _tmp16_; + _tmp17_ = _var; + if (_tmp17_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + return result; } - dbus_free_string_array (children); - g_string_append (xml_data, "\n"); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str); - g_string_free (xml_data, TRUE); - if (reply) { - dbus_connection_send (connection, reply, NULL); - dbus_message_unref (reply); - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + _tmp18_ = _var; + _tmp19_ = g_variant_get_string (_tmp18_, NULL); + _tmp20_ = g_strdup (_tmp19_); + _g_free0 (transmode); + transmode = _tmp20_; + _tmp21_ = data; + _tmp22_ = g_hash_table_lookup (_tmp21_, "code-rate-hp"); + _var = (GVariant*) _tmp22_; + _tmp23_ = _var; + if (_tmp23_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + return result; } -} - - -DBusHandlerResult dvb_terrestrial_scanner_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { - DBusHandlerResult result; - result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) { - result = _dbus_dvb_terrestrial_scanner_introspect (object, connection, message); + _tmp24_ = _var; + _tmp25_ = g_variant_get_string (_tmp24_, NULL); + _tmp26_ = g_strdup (_tmp25_); + _g_free0 (code_rate_hp); + code_rate_hp = _tmp26_; + _tmp27_ = data; + _tmp28_ = g_hash_table_lookup (_tmp27_, "code-rate-lp"); + _var = (GVariant*) _tmp28_; + _tmp29_ = _var; + if (_tmp29_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + return result; } - if (result == DBUS_HANDLER_RESULT_HANDLED) { + _tmp30_ = _var; + _tmp31_ = g_variant_get_string (_tmp30_, NULL); + _tmp32_ = g_strdup (_tmp31_); + _g_free0 (code_rate_lp); + code_rate_lp = _tmp32_; + _tmp33_ = data; + _tmp34_ = g_hash_table_lookup (_tmp33_, "constellation"); + _var = (GVariant*) _tmp34_; + _tmp35_ = _var; + if (_tmp35_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); return result; - } else if (dvb_id_bus_terrestrial_scanner_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) { - return DBUS_HANDLER_RESULT_HANDLED; - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } -} - - -void dvb_terrestrial_scanner_dbus_register_object (DBusConnection* connection, const char* path, void* object) { - if (!g_object_get_data (object, "dbus_object_path")) { - g_object_set_data (object, "dbus_object_path", g_strdup (path)); - dbus_connection_register_object_path (connection, path, &_dvb_terrestrial_scanner_dbus_path_vtable, object); - g_object_weak_ref (object, _vala_dbus_unregister_object, connection); + _tmp36_ = _var; + _tmp37_ = g_variant_get_string (_tmp36_, NULL); + _tmp38_ = g_strdup (_tmp37_); + _g_free0 (constellation); + constellation = _tmp38_; + _tmp39_ = data; + _tmp40_ = g_hash_table_lookup (_tmp39_, "guard-interval"); + _var = (GVariant*) _tmp40_; + _tmp41_ = _var; + if (_tmp41_ == NULL) { + result = FALSE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + return result; } - dvb_id_bus_terrestrial_scanner_dbus_register_object (connection, path, object); -} - - -DVBTerrestrialScanner* dvb_terrestrial_scanner_construct (GType object_type, DVBDevice* device) { - DVBTerrestrialScanner * self = NULL; - g_return_val_if_fail (device != NULL, NULL); - self = (DVBTerrestrialScanner*) g_object_new (object_type, "Device", device, NULL); - return self; -} - - -DVBTerrestrialScanner* dvb_terrestrial_scanner_new (DVBDevice* device) { - return dvb_terrestrial_scanner_construct (DVB_TYPE_TERRESTRIAL_SCANNER, device); -} - - -/** - * See enums in MpegTsEnums - */ -static void dvb_terrestrial_scanner_real_AddScanningData (DVBIDBusTerrestrialScanner* base, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard, GError** error) { - DVBTerrestrialScanner * self; - self = (DVBTerrestrialScanner*) base; - g_return_if_fail (transmode != NULL); - g_return_if_fail (code_rate_hp != NULL); - g_return_if_fail (code_rate_lp != NULL); - g_return_if_fail (constellation != NULL); - dvb_terrestrial_scanner_add_scanning_data (self, frequency, hierarchy, bandwidth, transmode, code_rate_hp, code_rate_lp, constellation, guard); + _tmp42_ = _var; + _tmp43_ = g_variant_get_uint32 (_tmp42_); + guard = (guint) _tmp43_; + _tmp44_ = frequency; + _tmp45_ = hierarchy; + _tmp46_ = bandwidth; + _tmp47_ = transmode; + _tmp48_ = code_rate_hp; + _tmp49_ = code_rate_lp; + _tmp50_ = constellation; + _tmp51_ = guard; + dvb_terrestrial_scanner_add_scanning_data (self, _tmp44_, _tmp45_, _tmp46_, _tmp47_, _tmp48_, _tmp49_, _tmp50_, _tmp51_); + result = TRUE; + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + return result; } @@ -2522,114 +525,254 @@ static inline void dvb_terrestrial_scanner_add_scanning_data (DVBTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard) { - GstStructure* _tmp0_ = NULL; + guint _tmp0_; + guint _tmp1_; + guint _tmp2_; + const gchar* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + const gchar* _tmp6_; + guint _tmp7_; + GstStructure* _tmp8_; GstStructure* tuning_params; - GstStructure* _tmp1_; + GstStructure* _tmp9_; g_return_if_fail (self != NULL); g_return_if_fail (transmode != NULL); g_return_if_fail (code_rate_hp != NULL); g_return_if_fail (code_rate_lp != NULL); g_return_if_fail (constellation != NULL); - _tmp0_ = gst_structure_new ("tuning_params", "frequency", G_TYPE_UINT, frequency, "hierarchy", G_TYPE_UINT, hierarchy, "bandwidth", G_TYPE_UINT, bandwidth, "transmission-mode", G_TYPE_STRING, transmode, "code-rate-hp", G_TYPE_STRING, code_rate_hp, "code-rate-lp", G_TYPE_STRING, code_rate_lp, "constellation", G_TYPE_STRING, constellation, "guard-interval", G_TYPE_UINT, guard, NULL); - tuning_params = _tmp0_; - _tmp1_ = _gst_structure_copy0 (tuning_params); - dvb_scanner_add_structure_to_scan (DVB_SCANNER (self), _tmp1_); + _tmp0_ = frequency; + _tmp1_ = hierarchy; + _tmp2_ = bandwidth; + _tmp3_ = transmode; + _tmp4_ = code_rate_hp; + _tmp5_ = code_rate_lp; + _tmp6_ = constellation; + _tmp7_ = guard; + _tmp8_ = gst_structure_new ("tuning_params", "frequency", G_TYPE_UINT, _tmp0_, "hierarchy", G_TYPE_UINT, _tmp1_, "bandwidth", G_TYPE_UINT, _tmp2_, "transmission-mode", G_TYPE_STRING, _tmp3_, "code-rate-hp", G_TYPE_STRING, _tmp4_, "code-rate-lp", G_TYPE_STRING, _tmp5_, "constellation", G_TYPE_STRING, _tmp6_, "guard-interval", G_TYPE_UINT, _tmp7_, NULL); + tuning_params = _tmp8_; + _tmp9_ = _gst_structure_copy0 (tuning_params); + dvb_scanner_add_structure_to_scan (DVB_SCANNER (self), _tmp9_); _gst_structure_free0 (tuning_params); } +static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) { + gint result = 0; + gint _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_ = NULL; + gchar* _result_; + gchar* _tmp3_; + g_return_val_if_fail (self != NULL, 0); + g_return_val_if_fail (needle != NULL, 0); + _tmp0_ = start_index; + _tmp1_ = needle; + _tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_); + _result_ = _tmp2_; + _tmp3_ = _result_; + if (_tmp3_ != NULL) { + gchar* _tmp4_; + _tmp4_ = _result_; + result = (gint) (_tmp4_ - ((gchar*) self)); + return result; + } else { + result = -1; + return result; + } +} + + static void dvb_terrestrial_scanner_real_add_scanning_data_from_string (DVBScanner* base, const gchar* line) { DVBTerrestrialScanner * self; - gchar** _tmp0_; - gchar** _tmp1_ = NULL; + const gchar* _tmp0_; + gchar** _tmp1_; + gchar** _tmp2_ = NULL; + gchar** cols; gint cols_length1; gint _cols_size_; - gchar** _tmp2_; - gchar** cols; - gint _tmp3_; + gchar** _tmp3_; + gint _tmp3__length1; + gchar** _tmp4_; + gint _tmp4__length1; + const gchar* _tmp5_; + gint _tmp6_ = 0; guint freq; guint hierarchy; - gchar** _tmp4_; - gchar** _tmp5_ = NULL; - gchar** _tmp6_; - gint _tmp6__length1; - gchar* _tmp7_; - gchar* _tmp8_; + gchar** _tmp7_; + gint _tmp7__length1; + const gchar* _tmp8_; + gchar** _tmp13_; + gint _tmp13__length1; + const gchar* _tmp14_; + gchar** _tmp15_; + gchar** _tmp16_ = NULL; + gchar** _tmp17_; + gint _tmp17__length1; + const gchar* _tmp18_; + gchar* _tmp19_; + gchar* _tmp20_; gchar* bandwidth_str; - gint _tmp9_; + const gchar* _tmp21_; + gint _tmp22_ = 0; guint bandwidth; - gchar* _tmp10_; + gchar** _tmp23_; + gint _tmp23__length1; + const gchar* _tmp24_; + gchar* _tmp25_; gchar* transmode; - gchar* _tmp11_; + gchar** _tmp26_; + gint _tmp26__length1; + const gchar* _tmp27_; + gchar* _tmp28_; gchar* code_rate_hp; - gchar* _tmp12_; + gchar** _tmp29_; + gint _tmp29__length1; + const gchar* _tmp30_; + gchar* _tmp31_; gchar* code_rate_lp; - gchar* _tmp13_; + gchar** _tmp32_; + gint _tmp32__length1; + const gchar* _tmp33_; + gchar* _tmp34_; gchar* constellation; guint guard = 0U; - const gchar* _tmp14_ = NULL; + gchar** _tmp35_; + gint _tmp35__length1; + const gchar* _tmp36_; + gint _tmp37_ = 0; + guint _tmp48_; + guint _tmp49_; + guint _tmp50_; + const gchar* _tmp51_; + const gchar* _tmp52_; + const gchar* _tmp53_; + const gchar* _tmp54_; + guint _tmp55_; self = (DVBTerrestrialScanner*) base; g_return_if_fail (line != NULL); - _tmp1_ = _tmp0_ = g_regex_split_simple ("\\s+", line, 0, 0); - _tmp2_ = _tmp1_; - cols_length1 = _vala_array_length (_tmp0_); - _cols_size_ = cols_length1; + _tmp0_ = line; + _tmp2_ = _tmp1_ = g_regex_split_simple ("\\s+", _tmp0_, 0, 0); cols = _tmp2_; - if (cols_length1 < 9) { + cols_length1 = _vala_array_length (_tmp1_); + _cols_size_ = cols_length1; + _tmp3_ = cols; + _tmp3__length1 = cols_length1; + if (_tmp3__length1 < 9) { cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); return; } - _tmp3_ = atoi (cols[1]); - freq = (guint) _tmp3_; + _tmp4_ = cols; + _tmp4__length1 = cols_length1; + _tmp5_ = _tmp4_[1]; + _tmp6_ = atoi (_tmp5_); + freq = (guint) _tmp6_; hierarchy = (guint) 0; - if (g_strcmp0 (cols[8], "1") == 0) { + _tmp7_ = cols; + _tmp7__length1 = cols_length1; + _tmp8_ = _tmp7_[8]; + if (g_strcmp0 (_tmp8_, "1") == 0) { hierarchy = (guint) 1; } else { - if (g_strcmp0 (cols[8], "2") == 0) { + gchar** _tmp9_; + gint _tmp9__length1; + const gchar* _tmp10_; + _tmp9_ = cols; + _tmp9__length1 = cols_length1; + _tmp10_ = _tmp9_[8]; + if (g_strcmp0 (_tmp10_, "2") == 0) { hierarchy = (guint) 2; } else { - if (g_strcmp0 (cols[8], "4") == 0) { + gchar** _tmp11_; + gint _tmp11__length1; + const gchar* _tmp12_; + _tmp11_ = cols; + _tmp11__length1 = cols_length1; + _tmp12_ = _tmp11_[8]; + if (g_strcmp0 (_tmp12_, "4") == 0) { hierarchy = (guint) 3; } } } - _tmp5_ = _tmp4_ = g_strsplit (cols[2], "MHz", 0); - _tmp6_ = _tmp5_; - _tmp6__length1 = _vala_array_length (_tmp4_); - _tmp7_ = g_strdup (_tmp6_[0]); - bandwidth_str = (_tmp8_ = _tmp7_, _tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL), _tmp8_); - _tmp9_ = atoi (bandwidth_str); - bandwidth = (guint) _tmp9_; - _tmp10_ = g_strdup (cols[6]); - transmode = _tmp10_; - _tmp11_ = g_strdup (cols[3]); - code_rate_hp = _tmp11_; - _tmp12_ = g_strdup (cols[4]); - code_rate_lp = _tmp12_; - _tmp13_ = g_strdup (cols[5]); - constellation = _tmp13_; - _tmp14_ = strstr (cols[7], "/"); - if (_tmp14_ == NULL) { + _tmp13_ = cols; + _tmp13__length1 = cols_length1; + _tmp14_ = _tmp13_[2]; + _tmp16_ = _tmp15_ = g_strsplit (_tmp14_, "MHz", 0); + _tmp17_ = _tmp16_; + _tmp17__length1 = _vala_array_length (_tmp15_); + _tmp18_ = _tmp17_[0]; + _tmp19_ = g_strdup (_tmp18_); + _tmp20_ = _tmp19_; + _tmp17_ = (_vala_array_free (_tmp17_, _tmp17__length1, (GDestroyNotify) g_free), NULL); + bandwidth_str = _tmp20_; + _tmp21_ = bandwidth_str; + _tmp22_ = atoi (_tmp21_); + bandwidth = (guint) _tmp22_; + _tmp23_ = cols; + _tmp23__length1 = cols_length1; + _tmp24_ = _tmp23_[6]; + _tmp25_ = g_strdup (_tmp24_); + transmode = _tmp25_; + _tmp26_ = cols; + _tmp26__length1 = cols_length1; + _tmp27_ = _tmp26_[3]; + _tmp28_ = g_strdup (_tmp27_); + code_rate_hp = _tmp28_; + _tmp29_ = cols; + _tmp29__length1 = cols_length1; + _tmp30_ = _tmp29_[4]; + _tmp31_ = g_strdup (_tmp30_); + code_rate_lp = _tmp31_; + _tmp32_ = cols; + _tmp32__length1 = cols_length1; + _tmp33_ = _tmp32_[5]; + _tmp34_ = g_strdup (_tmp33_); + constellation = _tmp34_; + _tmp35_ = cols; + _tmp35__length1 = cols_length1; + _tmp36_ = _tmp35_[7]; + _tmp37_ = string_index_of (_tmp36_, "/", 0); + if (_tmp37_ == (-1)) { guard = (guint) 0; } else { - gchar** _tmp15_; - gchar** _tmp16_ = NULL; - gchar** _tmp17_; - gint _tmp17__length1; - gchar* _tmp18_; - gchar* _tmp19_; + gchar** _tmp38_; + gint _tmp38__length1; + const gchar* _tmp39_; + gchar** _tmp40_; + gchar** _tmp41_ = NULL; + gchar** _tmp42_; + gint _tmp42__length1; + const gchar* _tmp43_; + gchar* _tmp44_; + gchar* _tmp45_; gchar* guard_str; - gint _tmp20_; - _tmp16_ = _tmp15_ = g_strsplit (cols[7], "/", 0); - _tmp17_ = _tmp16_; - _tmp17__length1 = _vala_array_length (_tmp15_); - _tmp18_ = g_strdup (_tmp17_[1]); - guard_str = (_tmp19_ = _tmp18_, _tmp17_ = (_vala_array_free (_tmp17_, _tmp17__length1, (GDestroyNotify) g_free), NULL), _tmp19_); - _tmp20_ = atoi (guard_str); - guard = (guint) _tmp20_; + const gchar* _tmp46_; + gint _tmp47_ = 0; + _tmp38_ = cols; + _tmp38__length1 = cols_length1; + _tmp39_ = _tmp38_[7]; + _tmp41_ = _tmp40_ = g_strsplit (_tmp39_, "/", 0); + _tmp42_ = _tmp41_; + _tmp42__length1 = _vala_array_length (_tmp40_); + _tmp43_ = _tmp42_[1]; + _tmp44_ = g_strdup (_tmp43_); + _tmp45_ = _tmp44_; + _tmp42_ = (_vala_array_free (_tmp42_, _tmp42__length1, (GDestroyNotify) g_free), NULL); + guard_str = _tmp45_; + _tmp46_ = guard_str; + _tmp47_ = atoi (_tmp46_); + guard = (guint) _tmp47_; _g_free0 (guard_str); } - dvb_terrestrial_scanner_add_scanning_data (self, freq, hierarchy, bandwidth, transmode, code_rate_hp, code_rate_lp, constellation, guard); + _tmp48_ = freq; + _tmp49_ = hierarchy; + _tmp50_ = bandwidth; + _tmp51_ = transmode; + _tmp52_ = code_rate_hp; + _tmp53_ = code_rate_lp; + _tmp54_ = constellation; + _tmp55_ = guard; + dvb_terrestrial_scanner_add_scanning_data (self, _tmp48_, _tmp49_, _tmp50_, _tmp51_, _tmp52_, _tmp53_, _tmp54_, _tmp55_); _g_free0 (constellation); _g_free0 (code_rate_lp); _g_free0 (code_rate_hp); @@ -2641,62 +784,80 @@ static void dvb_terrestrial_scanner_real_prepare (DVBScanner* base) { DVBTerrestrialScanner * self; - GstElement* _tmp0_ = NULL; + GstElement* _tmp0_; + GstElement* _tmp1_ = NULL; GstElement* dvbsrc; + const GstStructure* _tmp2_; guint bandwidth = 0U; - guint _tmp1_; - DVBDvbSrcBandwidth _tmp2_; + const GstStructure* _tmp3_; + guint _tmp4_ = 0U; + DVBDvbSrcBandwidth _tmp5_ = 0; guint hierarchy = 0U; - guint _tmp3_; - DVBDvbSrcHierarchy _tmp4_; - const gchar* _tmp5_ = NULL; - gchar* _tmp6_; - gchar* constellation; - DVBDvbSrcModulation _tmp7_; - const gchar* _tmp8_ = NULL; - DVBDvbSrcCodeRate _tmp9_; + const GstStructure* _tmp6_; + guint _tmp7_ = 0U; + DVBDvbSrcHierarchy _tmp8_ = 0; + const GstStructure* _tmp9_; const gchar* _tmp10_ = NULL; - DVBDvbSrcCodeRate _tmp11_; - guint guard = 0U; - guint _tmp12_; - DVBDvbSrcGuard _tmp13_; + gchar* _tmp11_; + gchar* constellation; + DVBDvbSrcModulation _tmp12_ = 0; + const GstStructure* _tmp13_; const gchar* _tmp14_ = NULL; - gchar* _tmp15_; + DVBDvbSrcCodeRate _tmp15_ = 0; + const GstStructure* _tmp16_; + const gchar* _tmp17_ = NULL; + DVBDvbSrcCodeRate _tmp18_ = 0; + guint guard = 0U; + const GstStructure* _tmp19_; + guint _tmp20_ = 0U; + DVBDvbSrcGuard _tmp21_ = 0; + const GstStructure* _tmp22_; + const gchar* _tmp23_ = NULL; + gchar* _tmp24_; gchar* transmode; - DVBDvbSrcTransmissionMode _tmp16_; + DVBDvbSrcTransmissionMode _tmp25_ = 0; self = (DVBTerrestrialScanner*) base; - g_debug ("TerrestrialScanner.vala:136: Setting up pipeline for DVB-T scan"); - _tmp0_ = gst_bin_get_by_name (GST_BIN (DVB_SCANNER (self)->pipeline), "dvbsrc"); - dvbsrc = _tmp0_; - dvb_scanner_set_uint_property (dvbsrc, DVB_SCANNER (self)->current_tuning_params, "frequency"); - gst_structure_get_uint (((DVBScanner*) self)->current_tuning_params, "bandwidth", &_tmp1_); - bandwidth = _tmp1_; - _tmp2_ = dvb_get_bandwidth_val (bandwidth); - g_object_set ((GObject*) dvbsrc, "bandwidth", _tmp2_, NULL); - gst_structure_get_uint (((DVBScanner*) self)->current_tuning_params, "hierarchy", &_tmp3_); - hierarchy = _tmp3_; - _tmp4_ = dvb_get_hierarchy_val (hierarchy); - g_object_set ((GObject*) dvbsrc, "hierarchy", _tmp4_, NULL); - _tmp5_ = gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "constellation"); - _tmp6_ = g_strdup (_tmp5_); - constellation = _tmp6_; - _tmp7_ = dvb_get_modulation_val (constellation); - g_object_set ((GObject*) dvbsrc, "modulation", _tmp7_, NULL); - _tmp8_ = gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "code-rate-hp"); - _tmp9_ = dvb_get_code_rate_val (_tmp8_); - g_object_set ((GObject*) dvbsrc, "code-rate-hp", _tmp9_, NULL); - _tmp10_ = gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "code-rate-lp"); - _tmp11_ = dvb_get_code_rate_val (_tmp10_); - g_object_set ((GObject*) dvbsrc, "code-rate-lp", _tmp11_, NULL); - gst_structure_get_uint (((DVBScanner*) self)->current_tuning_params, "guard-interval", &_tmp12_); - guard = _tmp12_; - _tmp13_ = dvb_get_guard_interval_val (guard); - g_object_set ((GObject*) dvbsrc, "guard", _tmp13_, NULL); - _tmp14_ = gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "transmission-mode"); - _tmp15_ = g_strdup (_tmp14_); - transmode = _tmp15_; - _tmp16_ = dvb_get_transmission_mode_val (transmode); - g_object_set ((GObject*) dvbsrc, "trans-mode", _tmp16_, NULL); + g_debug ("TerrestrialScanner.vala:146: Setting up pipeline for DVB-T scan"); + _tmp0_ = DVB_SCANNER (self)->pipeline; + _tmp1_ = gst_bin_get_by_name (GST_BIN (_tmp0_), "dvbsrc"); + dvbsrc = _tmp1_; + _tmp2_ = DVB_SCANNER (self)->current_tuning_params; + dvb_scanner_set_uint_property (dvbsrc, _tmp2_, "frequency"); + _tmp3_ = ((DVBScanner*) self)->current_tuning_params; + gst_structure_get_uint (_tmp3_, "bandwidth", &_tmp4_); + bandwidth = _tmp4_; + _tmp5_ = dvb_get_bandwidth_val (bandwidth); + g_object_set ((GObject*) dvbsrc, "bandwidth", _tmp5_, NULL); + _tmp6_ = ((DVBScanner*) self)->current_tuning_params; + gst_structure_get_uint (_tmp6_, "hierarchy", &_tmp7_); + hierarchy = _tmp7_; + _tmp8_ = dvb_get_hierarchy_val (hierarchy); + g_object_set ((GObject*) dvbsrc, "hierarchy", _tmp8_, NULL); + _tmp9_ = ((DVBScanner*) self)->current_tuning_params; + _tmp10_ = gst_structure_get_string (_tmp9_, "constellation"); + _tmp11_ = g_strdup (_tmp10_); + constellation = _tmp11_; + _tmp12_ = dvb_get_modulation_val (constellation); + g_object_set ((GObject*) dvbsrc, "modulation", _tmp12_, NULL); + _tmp13_ = ((DVBScanner*) self)->current_tuning_params; + _tmp14_ = gst_structure_get_string (_tmp13_, "code-rate-hp"); + _tmp15_ = dvb_get_code_rate_val (_tmp14_); + g_object_set ((GObject*) dvbsrc, "code-rate-hp", _tmp15_, NULL); + _tmp16_ = ((DVBScanner*) self)->current_tuning_params; + _tmp17_ = gst_structure_get_string (_tmp16_, "code-rate-lp"); + _tmp18_ = dvb_get_code_rate_val (_tmp17_); + g_object_set ((GObject*) dvbsrc, "code-rate-lp", _tmp18_, NULL); + _tmp19_ = ((DVBScanner*) self)->current_tuning_params; + gst_structure_get_uint (_tmp19_, "guard-interval", &_tmp20_); + guard = _tmp20_; + _tmp21_ = dvb_get_guard_interval_val (guard); + g_object_set ((GObject*) dvbsrc, "guard", _tmp21_, NULL); + _tmp22_ = ((DVBScanner*) self)->current_tuning_params; + _tmp23_ = gst_structure_get_string (_tmp22_, "transmission-mode"); + _tmp24_ = g_strdup (_tmp23_); + transmode = _tmp24_; + _tmp25_ = dvb_get_transmission_mode_val (transmode); + g_object_set ((GObject*) dvbsrc, "trans-mode", _tmp25_, NULL); _g_free0 (transmode); _g_free0 (constellation); _gst_object_unref0 (dvbsrc); @@ -2707,14 +868,16 @@ DVBTerrestrialScanner * self; DVBScannedItem* result = NULL; guint freq = 0U; - guint _tmp0_; - DVBScannedItem* _tmp1_ = NULL; + const GstStructure* _tmp0_; + guint _tmp1_ = 0U; + DVBScannedItem* _tmp2_; self = (DVBTerrestrialScanner*) base; g_return_val_if_fail (structure != NULL, NULL); - gst_structure_get_uint (structure, "frequency", &_tmp0_); - freq = _tmp0_; - _tmp1_ = dvb_scanned_item_new (freq); - result = _tmp1_; + _tmp0_ = structure; + gst_structure_get_uint (_tmp0_, "frequency", &_tmp1_); + freq = _tmp1_; + _tmp2_ = dvb_scanned_item_new (freq); + result = _tmp2_; return result; } @@ -2722,7 +885,7 @@ static DVBChannel* dvb_terrestrial_scanner_real_get_new_channel (DVBScanner* base) { DVBTerrestrialScanner * self; DVBChannel* result = NULL; - DVBTerrestrialChannel* _tmp0_ = NULL; + DVBTerrestrialChannel* _tmp0_; self = (DVBTerrestrialScanner*) base; _tmp0_ = dvb_terrestrial_channel_new_without_schedule (); result = (DVBChannel*) _tmp0_; @@ -2737,71 +900,121 @@ static void dvb_terrestrial_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel) { DVBTerrestrialScanner * self; - DVBTerrestrialChannel* _tmp0_; + DVBChannel* _tmp0_; + DVBChannel* _tmp1_; + DVBTerrestrialChannel* _tmp2_; DVBTerrestrialChannel* tc; + DVBTerrestrialChannel* _tmp3_; guint freq = 0U; - guint _tmp1_; + const GstStructure* _tmp4_; + guint _tmp5_ = 0U; + DVBTerrestrialChannel* _tmp6_; + guint _tmp7_; guint bandwidth = 0U; - guint _tmp2_; - DVBDvbSrcBandwidth _tmp3_; + const GstStructure* _tmp8_; + guint _tmp9_ = 0U; + DVBTerrestrialChannel* _tmp10_; + guint _tmp11_; + DVBDvbSrcBandwidth _tmp12_ = 0; guint hierarchy = 0U; - guint _tmp4_; - DVBDvbSrcHierarchy _tmp5_; - const gchar* _tmp6_ = NULL; - gchar* _tmp7_; + const GstStructure* _tmp13_; + guint _tmp14_ = 0U; + DVBTerrestrialChannel* _tmp15_; + guint _tmp16_; + DVBDvbSrcHierarchy _tmp17_ = 0; + const GstStructure* _tmp18_; + const gchar* _tmp19_ = NULL; + gchar* _tmp20_; gchar* constellation; - DVBDvbSrcModulation _tmp8_; - const gchar* _tmp9_ = NULL; - DVBDvbSrcCodeRate _tmp10_; - const gchar* _tmp11_ = NULL; - DVBDvbSrcCodeRate _tmp12_; + DVBTerrestrialChannel* _tmp21_; + const gchar* _tmp22_; + DVBDvbSrcModulation _tmp23_ = 0; + DVBTerrestrialChannel* _tmp24_; + const GstStructure* _tmp25_; + const gchar* _tmp26_ = NULL; + DVBDvbSrcCodeRate _tmp27_ = 0; + DVBTerrestrialChannel* _tmp28_; + const GstStructure* _tmp29_; + const gchar* _tmp30_ = NULL; + DVBDvbSrcCodeRate _tmp31_ = 0; guint guard = 0U; - guint _tmp13_; - DVBDvbSrcGuard _tmp14_; - const gchar* _tmp15_ = NULL; - gchar* _tmp16_; + const GstStructure* _tmp32_; + guint _tmp33_ = 0U; + DVBTerrestrialChannel* _tmp34_; + guint _tmp35_; + DVBDvbSrcGuard _tmp36_ = 0; + const GstStructure* _tmp37_; + const gchar* _tmp38_ = NULL; + gchar* _tmp39_; gchar* transmode; - DVBDvbSrcTransmissionMode _tmp17_; + DVBTerrestrialChannel* _tmp40_; + const gchar* _tmp41_; + DVBDvbSrcTransmissionMode _tmp42_ = 0; self = (DVBTerrestrialScanner*) base; g_return_if_fail (delivery != NULL); g_return_if_fail (channel != NULL); - if (!DVB_IS_TERRESTRIAL_CHANNEL (channel)) { + _tmp0_ = channel; + if (!DVB_IS_TERRESTRIAL_CHANNEL (_tmp0_)) { return; } - _tmp0_ = _g_object_ref0 (DVB_TERRESTRIAL_CHANNEL (channel)); - tc = _tmp0_; - dvb_terrestrial_channel_set_Inversion (tc, DVB_DVB_SRC_INVERSION_INVERSION_AUTO); - gst_structure_get_uint (delivery, "frequency", &_tmp1_); - freq = _tmp1_; - dvb_channel_set_Frequency ((DVBChannel*) tc, freq); - gst_structure_get_uint (delivery, "bandwidth", &_tmp2_); - bandwidth = _tmp2_; - _tmp3_ = dvb_get_bandwidth_val (bandwidth); - dvb_terrestrial_channel_set_Bandwidth (tc, _tmp3_); - gst_structure_get_uint (delivery, "hierarchy", &_tmp4_); - hierarchy = _tmp4_; - _tmp5_ = dvb_get_hierarchy_val (hierarchy); - dvb_terrestrial_channel_set_Hierarchy (tc, _tmp5_); - _tmp6_ = gst_structure_get_string (delivery, "constellation"); - _tmp7_ = g_strdup (_tmp6_); - constellation = _tmp7_; - _tmp8_ = dvb_get_modulation_val (constellation); - dvb_terrestrial_channel_set_Constellation (tc, _tmp8_); - _tmp9_ = gst_structure_get_string (delivery, "code-rate-hp"); - _tmp10_ = dvb_get_code_rate_val (_tmp9_); - dvb_terrestrial_channel_set_CodeRateHP (tc, _tmp10_); - _tmp11_ = gst_structure_get_string (delivery, "code-rate-lp"); - _tmp12_ = dvb_get_code_rate_val (_tmp11_); - dvb_terrestrial_channel_set_CodeRateLP (tc, _tmp12_); - gst_structure_get_uint (delivery, "guard-interval", &_tmp13_); - guard = _tmp13_; - _tmp14_ = dvb_get_guard_interval_val (guard); - dvb_terrestrial_channel_set_GuardInterval (tc, _tmp14_); - _tmp15_ = gst_structure_get_string (delivery, "transmission-mode"); - _tmp16_ = g_strdup (_tmp15_); - transmode = _tmp16_; - _tmp17_ = dvb_get_transmission_mode_val (transmode); - dvb_terrestrial_channel_set_TransmissionMode (tc, _tmp17_); + _tmp1_ = channel; + _tmp2_ = _g_object_ref0 (DVB_TERRESTRIAL_CHANNEL (_tmp1_)); + tc = _tmp2_; + _tmp3_ = tc; + dvb_terrestrial_channel_set_Inversion (_tmp3_, DVB_DVB_SRC_INVERSION_INVERSION_AUTO); + _tmp4_ = delivery; + gst_structure_get_uint (_tmp4_, "frequency", &_tmp5_); + freq = _tmp5_; + _tmp6_ = tc; + _tmp7_ = freq; + dvb_channel_set_Frequency ((DVBChannel*) _tmp6_, _tmp7_); + _tmp8_ = delivery; + gst_structure_get_uint (_tmp8_, "bandwidth", &_tmp9_); + bandwidth = _tmp9_; + _tmp10_ = tc; + _tmp11_ = bandwidth; + _tmp12_ = dvb_get_bandwidth_val (_tmp11_); + dvb_terrestrial_channel_set_Bandwidth (_tmp10_, _tmp12_); + _tmp13_ = delivery; + gst_structure_get_uint (_tmp13_, "hierarchy", &_tmp14_); + hierarchy = _tmp14_; + _tmp15_ = tc; + _tmp16_ = hierarchy; + _tmp17_ = dvb_get_hierarchy_val (_tmp16_); + dvb_terrestrial_channel_set_Hierarchy (_tmp15_, _tmp17_); + _tmp18_ = delivery; + _tmp19_ = gst_structure_get_string (_tmp18_, "constellation"); + _tmp20_ = g_strdup (_tmp19_); + constellation = _tmp20_; + _tmp21_ = tc; + _tmp22_ = constellation; + _tmp23_ = dvb_get_modulation_val (_tmp22_); + dvb_terrestrial_channel_set_Constellation (_tmp21_, _tmp23_); + _tmp24_ = tc; + _tmp25_ = delivery; + _tmp26_ = gst_structure_get_string (_tmp25_, "code-rate-hp"); + _tmp27_ = dvb_get_code_rate_val (_tmp26_); + dvb_terrestrial_channel_set_CodeRateHP (_tmp24_, _tmp27_); + _tmp28_ = tc; + _tmp29_ = delivery; + _tmp30_ = gst_structure_get_string (_tmp29_, "code-rate-lp"); + _tmp31_ = dvb_get_code_rate_val (_tmp30_); + dvb_terrestrial_channel_set_CodeRateLP (_tmp28_, _tmp31_); + _tmp32_ = delivery; + gst_structure_get_uint (_tmp32_, "guard-interval", &_tmp33_); + guard = _tmp33_; + _tmp34_ = tc; + _tmp35_ = guard; + _tmp36_ = dvb_get_guard_interval_val (_tmp35_); + dvb_terrestrial_channel_set_GuardInterval (_tmp34_, _tmp36_); + _tmp37_ = delivery; + _tmp38_ = gst_structure_get_string (_tmp37_, "transmission-mode"); + _tmp39_ = g_strdup (_tmp38_); + transmode = _tmp39_; + _tmp40_ = tc; + _tmp41_ = transmode; + _tmp42_ = dvb_get_transmission_mode_val (_tmp41_); + dvb_terrestrial_channel_set_TransmissionMode (_tmp40_, _tmp42_); _g_free0 (transmode); _g_free0 (constellation); _g_object_unref0 (tc); @@ -2815,18 +1028,17 @@ DVB_SCANNER_CLASS (klass)->get_scanned_item = dvb_terrestrial_scanner_real_get_scanned_item; DVB_SCANNER_CLASS (klass)->get_new_channel = dvb_terrestrial_scanner_real_get_new_channel; DVB_SCANNER_CLASS (klass)->add_values_from_structure_to_channel = dvb_terrestrial_scanner_real_add_values_from_structure_to_channel; - g_type_set_qdata (DVB_TYPE_TERRESTRIAL_SCANNER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_terrestrial_scanner_dbus_vtable)); } -static void dvb_terrestrial_scanner_dvb_id_bus_terrestrial_scanner_interface_init (DVBIDBusTerrestrialScannerIface * iface) { - dvb_terrestrial_scanner_dvb_id_bus_terrestrial_scanner_parent_iface = g_type_interface_peek_parent (iface); - iface->AddScanningData = (void (*)(DVBIDBusTerrestrialScanner* ,guint ,guint ,guint ,const gchar* ,const gchar* ,const gchar* ,const gchar* ,guint ,GError**)) dvb_terrestrial_scanner_real_AddScanningData; - iface->Run = (void (*)(DVBIDBusTerrestrialScanner* ,GError**)) dvb_scanner_Run; - iface->Destroy = (void (*)(DVBIDBusTerrestrialScanner* ,GError**)) dvb_scanner_Destroy; - iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusTerrestrialScanner* ,const gchar* ,GError**)) dvb_scanner_WriteAllChannelsToFile; - iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusTerrestrialScanner* ,guint* ,int ,const gchar* ,GError**)) dvb_scanner_WriteChannelsToFile; - iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusTerrestrialScanner* ,const gchar* ,GError**)) dvb_scanner_AddScanningDataFromFile; +static void dvb_terrestrial_scanner_dvb_id_bus_scanner_interface_init (DVBIDBusScannerIface * iface) { + dvb_terrestrial_scanner_dvb_id_bus_scanner_parent_iface = g_type_interface_peek_parent (iface); + iface->AddScanningData = (gboolean (*)(DVBIDBusScanner*, GHashTable*, GError**)) dvb_terrestrial_scanner_real_AddScanningData; + iface->Run = (void (*)(DVBIDBusScanner*, GError**)) dvb_scanner_Run; + iface->Destroy = (void (*)(DVBIDBusScanner*, GError**)) dvb_scanner_Destroy; + iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusScanner*, const gchar*, GError**)) dvb_scanner_WriteAllChannelsToFile; + iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusScanner*, guint*, int, const gchar*, GError**)) dvb_scanner_WriteChannelsToFile; + iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusScanner*, const gchar*, GError**)) dvb_scanner_AddScanningDataFromFile; } @@ -2838,10 +1050,10 @@ static volatile gsize dvb_terrestrial_scanner_type_id__volatile = 0; if (g_once_init_enter (&dvb_terrestrial_scanner_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBTerrestrialScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_terrestrial_scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBTerrestrialScanner), 0, (GInstanceInitFunc) dvb_terrestrial_scanner_instance_init, NULL }; - static const GInterfaceInfo dvb_id_bus_terrestrial_scanner_info = { (GInterfaceInitFunc) dvb_terrestrial_scanner_dvb_id_bus_terrestrial_scanner_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo dvb_id_bus_scanner_info = { (GInterfaceInitFunc) dvb_terrestrial_scanner_dvb_id_bus_scanner_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; GType dvb_terrestrial_scanner_type_id; dvb_terrestrial_scanner_type_id = g_type_register_static (DVB_TYPE_SCANNER, "DVBTerrestrialScanner", &g_define_type_info, 0); - g_type_add_interface_static (dvb_terrestrial_scanner_type_id, DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER, &dvb_id_bus_terrestrial_scanner_info); + g_type_add_interface_static (dvb_terrestrial_scanner_type_id, DVB_TYPE_ID_BUS_SCANNER, &dvb_id_bus_scanner_info); g_once_init_leave (&dvb_terrestrial_scanner_type_id__volatile, dvb_terrestrial_scanner_type_id); } return dvb_terrestrial_scanner_type_id__volatile; diff -Nru gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialScanner.vala gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialScanner.vala --- gnome-dvb-daemon-0.1.23/src/Terrestrial/TerrestrialScanner.vala 2010-12-05 13:02:00.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Terrestrial/TerrestrialScanner.vala 2011-04-19 20:46:24.000000000 +0000 @@ -20,41 +20,8 @@ using GLib; namespace DVB { - - [DBus (name = "org.gnome.DVB.Scanner.Terrestrial")] - public interface IDBusTerrestrialScanner : GLib.Object { - - public abstract signal void frequency_scanned (uint frequency, uint freq_left); - public abstract signal void finished (); - public abstract signal void channel_added (uint frequency, uint sid, - string name, string network, string type, bool scrambled); - public abstract signal void frontend_stats (double signal_strength, - double signal_noise_ratio); - - public abstract void Run () throws DBus.Error; - public abstract void Destroy () throws DBus.Error; - public abstract bool WriteAllChannelsToFile (string path) throws DBus.Error; - public abstract bool WriteChannelsToFile (uint[] channel_sids, string path) throws DBus.Error; - - public abstract void AddScanningData (uint frequency, - uint hierarchy, // 0-3 - uint bandwidth, // 0, 6, 7, 8 - string transmode, // "2k", "8k" - string code_rate_hp, // "1/2", "2/3", "3/4", ..., "8/9" - string code_rate_lp, - string constellation, // QPSK, QAM16, QAM64 - uint guard) throws DBus.Error; // 4, 8, 16, 32 - - /** - * @path: Path to file containing scanning data - * @returns: TRUE when the file has been parsed successfully - * - * Parses initial tuning data from a file as provided by dvb-apps - */ - public abstract bool AddScanningDataFromFile (string path) throws DBus.Error; - } - - public class TerrestrialScanner : Scanner, IDBusTerrestrialScanner { + + public class TerrestrialScanner : Scanner, IDBusScanner { public TerrestrialScanner (DVB.Device device) { Object (Device: device); @@ -63,17 +30,60 @@ /** * See enums in MpegTsEnums */ - public void AddScanningData (uint frequency, uint hierarchy, - uint bandwidth, string transmode, string code_rate_hp, - string code_rate_lp, string constellation, uint guard) - throws DBus.Error + public bool AddScanningData (GLib.HashTable data) + throws DBusError { - - this.add_scanning_data (frequency, hierarchy, - bandwidth, transmode, code_rate_hp, - code_rate_lp, constellation, guard); + uint frequency, hierarchy, bandwidth, guard; + string transmode, code_rate_hp, code_rate_lp, constellation; + + unowned Variant _var; + + _var = data.lookup ("frequency"); + if (_var == null) + return false; + frequency = _var.get_uint32 (); + + _var = data.lookup ("hierarchy"); + if (_var == null) + return false; + hierarchy = _var.get_uint32 (); + + _var = data.lookup ("bandwidth"); + if (_var == null) + return false; + bandwidth = _var.get_uint32 (); + + _var = data.lookup ("transmission-mode"); + if (_var == null) + return false; + transmode = _var.get_string (); + + _var = data.lookup ("code-rate-hp"); + if (_var == null) + return false; + code_rate_hp = _var.get_string (); + + _var = data.lookup ("code-rate-lp"); + if (_var == null) + return false; + code_rate_lp = _var.get_string (); + + _var = data.lookup ("constellation"); + if (_var == null) + return false; + constellation = _var.get_string (); + + _var = data.lookup ("guard-interval"); + if (_var == null) + return false; + guard = _var.get_uint32 (); + + this.add_scanning_data (frequency, hierarchy, + bandwidth, transmode, code_rate_hp, + code_rate_lp, constellation, guard); + return true; } - + private inline void add_scanning_data (uint frequency, uint hierarchy, uint bandwidth, string transmode, string code_rate_hp, string code_rate_lp, string constellation, uint guard) { @@ -101,7 +111,7 @@ return; } - uint freq = (uint)cols[1].to_int (); + uint freq = (uint)int.parse (cols[1]); uint hierarchy = 0; if (cols[8] == "1") { @@ -113,18 +123,18 @@ } string bandwidth_str = cols[2].split("MHz")[0]; - uint bandwidth = (uint)bandwidth_str.to_int (); + uint bandwidth = (uint)int.parse (bandwidth_str); string transmode = cols[6]; string code_rate_hp = cols[3]; string code_rate_lp = cols[4]; string constellation = cols[5]; uint guard; - if (cols[7].str ("/") == null) { + if (cols[7].index_of ("/") == -1) { guard = 0; } else { string guard_str = cols[7].split("/")[1]; - guard = (uint)guard_str.to_int (); + guard = (uint)int.parse (guard_str); } this.add_scanning_data (freq, hierarchy, diff -Nru gnome-dvb-daemon-0.1.23/src/Timer.c gnome-dvb-daemon-0.2.7/src/Timer.c --- gnome-dvb-daemon-0.1.23/src/Timer.c 2011-01-12 17:30:52.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Timer.c 2011-09-22 12:34:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* Timer.c generated by valac 0.11.3, the Vala compiler +/* Timer.c generated by valac 0.14.0, the Vala compiler * generated from Timer.vala, do not modify */ /* @@ -241,11 +241,27 @@ DVBTimer* dvb_timer_construct (GType object_type, guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration) { DVBTimer * self = NULL; + guint32 _tmp0_; + DVBChannel* _tmp1_; + guint _tmp2_; + gint _tmp3_; + gint _tmp4_; + gint _tmp5_; + gint _tmp6_; + gint _tmp7_; g_return_val_if_fail (channel != NULL, NULL); - self = (DVBTimer*) g_object_new (object_type, "Id", id, "Channel", channel, NULL); + _tmp0_ = id; + _tmp1_ = channel; + self = (DVBTimer*) g_object_new (object_type, "Id", _tmp0_, "Channel", _tmp1_, NULL); dvb_timer_set_EventID (self, (guint) 0); - dvb_timer_set_Duration (self, duration); - dvb_timer_set_start_time (self, year, month, day, hour, minute); + _tmp2_ = duration; + dvb_timer_set_Duration (self, _tmp2_); + _tmp3_ = year; + _tmp4_ = month; + _tmp5_ = day; + _tmp6_ = hour; + _tmp7_ = minute; + dvb_timer_set_start_time (self, _tmp3_, _tmp4_, _tmp5_, _tmp6_, _tmp7_); return self; } @@ -256,11 +272,20 @@ void dvb_timer_set_start_time (DVBTimer* self, gint year, gint month, gint day, gint hour, gint minute) { - struct tm _tmp0_ = {0}; - struct tm _tmp1_ = {0}; + gint _tmp0_; + gint _tmp1_; + gint _tmp2_; + gint _tmp3_; + gint _tmp4_; + struct tm _tmp5_ = {0}; g_return_if_fail (self != NULL); - _tmp1_ = (dvb_utils_create_time (year, month, day, hour, minute, 0, &_tmp0_), _tmp0_); - self->priv->starttime = _tmp1_; + _tmp0_ = year; + _tmp1_ = month; + _tmp2_ = day; + _tmp3_ = hour; + _tmp4_ = minute; + dvb_utils_create_time (_tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, 0, &_tmp5_); + self->priv->starttime = _tmp5_; dvb_timer_update_epg_event (self); } @@ -275,47 +300,73 @@ gboolean dvb_timer_conflicts_with (DVBTimer* self, DVBTimer* t2) { gboolean result = FALSE; - time_t _tmp0_; + time_t _tmp0_ = 0; time_t this_start; - time_t _tmp1_; + DVBTimer* _tmp1_; + time_t _tmp2_ = 0; time_t other_start; - DVBChannel* _tmp2_; - DVBChannel* t1_c; DVBChannel* _tmp3_; + DVBChannel* _tmp4_; + DVBChannel* t1_c; + DVBTimer* _tmp5_; + DVBChannel* _tmp6_; + DVBChannel* _tmp7_; DVBChannel* t2_c; - gboolean _tmp4_; + DVBChannel* _tmp8_; + DVBChannel* _tmp9_; + gboolean _tmp10_ = FALSE; + time_t _tmp11_; + time_t _tmp12_; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (t2 != NULL, FALSE); _tmp0_ = dvb_timer_get_start_time_timestamp (self); this_start = _tmp0_; - _tmp1_ = dvb_timer_get_start_time_timestamp (t2); - other_start = _tmp1_; - _tmp2_ = _g_object_ref0 (self->priv->_Channel); - t1_c = _tmp2_; - _tmp3_ = _g_object_ref0 (t2->priv->_Channel); - t2_c = _tmp3_; - _tmp4_ = dvb_channel_on_same_transport_stream (t1_c, t2_c); - if (_tmp4_) { + _tmp1_ = t2; + _tmp2_ = dvb_timer_get_start_time_timestamp (_tmp1_); + other_start = _tmp2_; + _tmp3_ = self->priv->_Channel; + _tmp4_ = _g_object_ref0 (_tmp3_); + t1_c = _tmp4_; + _tmp5_ = t2; + _tmp6_ = _tmp5_->priv->_Channel; + _tmp7_ = _g_object_ref0 (_tmp6_); + t2_c = _tmp7_; + _tmp8_ = t1_c; + _tmp9_ = t2_c; + _tmp10_ = dvb_channel_on_same_transport_stream (_tmp8_, _tmp9_); + if (_tmp10_) { result = FALSE; _g_object_unref0 (t2_c); _g_object_unref0 (t1_c); return result; } - if (this_start <= other_start) { - time_t _tmp5_; + _tmp11_ = this_start; + _tmp12_ = other_start; + if (_tmp11_ <= _tmp12_) { + time_t _tmp13_ = 0; time_t this_end; - _tmp5_ = dvb_timer_get_end_time_timestamp (self); - this_end = _tmp5_; - result = this_end > other_start; + time_t _tmp14_; + time_t _tmp15_; + _tmp13_ = dvb_timer_get_end_time_timestamp (self); + this_end = _tmp13_; + _tmp14_ = this_end; + _tmp15_ = other_start; + result = _tmp14_ > _tmp15_; _g_object_unref0 (t2_c); _g_object_unref0 (t1_c); return result; } else { - time_t _tmp6_; + DVBTimer* _tmp16_; + time_t _tmp17_ = 0; time_t other_end; - _tmp6_ = dvb_timer_get_end_time_timestamp (t2); - other_end = _tmp6_; - result = other_end > this_start; + time_t _tmp18_; + time_t _tmp19_; + _tmp16_ = t2; + _tmp17_ = dvb_timer_get_end_time_timestamp (_tmp16_); + other_end = _tmp17_; + _tmp18_ = other_end; + _tmp19_ = this_start; + result = _tmp18_ > _tmp19_; _g_object_unref0 (t2_c); _g_object_unref0 (t1_c); return result; @@ -335,32 +386,45 @@ */ DVBOverlapType dvb_timer_get_overlap_local (DVBTimer* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration) { DVBOverlapType result = 0; - time_t _tmp0_; + time_t _tmp0_ = 0; time_t this_start; - time_t _tmp1_; + time_t _tmp1_ = 0; time_t this_end; - struct tm _tmp2_ = {0}; - struct tm _tmp3_ = {0}; + guint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_; + guint _tmp6_; + struct tm _tmp7_ = {0}; struct tm other_time; - time_t _tmp4_; + time_t _tmp8_ = 0; time_t other_start; - time_t _tmp5_; + gint _tmp9_; + guint _tmp10_; + time_t _tmp11_ = 0; time_t other_end; - DVBOverlapType _tmp6_; + DVBOverlapType _tmp12_ = 0; g_return_val_if_fail (self != NULL, 0); _tmp0_ = dvb_timer_get_start_time_timestamp (self); this_start = _tmp0_; _tmp1_ = dvb_timer_get_end_time_timestamp (self); this_end = _tmp1_; - _tmp3_ = (dvb_utils_create_time ((gint) start_year, (gint) start_month, (gint) start_day, (gint) start_hour, (gint) start_minute, 0, &_tmp2_), _tmp2_); - other_time = _tmp3_; - _tmp4_ = mktime (&other_time); - other_start = _tmp4_; - other_time.tm_min = other_time.tm_min + ((gint) duration); - _tmp5_ = mktime (&other_time); - other_end = _tmp5_; - _tmp6_ = dvb_timer_get_overlap (this_start, this_end, other_start, other_end); - result = _tmp6_; + _tmp2_ = start_year; + _tmp3_ = start_month; + _tmp4_ = start_day; + _tmp5_ = start_hour; + _tmp6_ = start_minute; + dvb_utils_create_time ((gint) _tmp2_, (gint) _tmp3_, (gint) _tmp4_, (gint) _tmp5_, (gint) _tmp6_, 0, &_tmp7_); + other_time = _tmp7_; + _tmp8_ = mktime (&other_time); + other_start = _tmp8_; + _tmp9_ = other_time.tm_min; + _tmp10_ = duration; + other_time.tm_min = _tmp9_ + ((gint) _tmp10_); + _tmp11_ = mktime (&other_time); + other_end = _tmp11_; + _tmp12_ = dvb_timer_get_overlap (this_start, this_end, other_start, other_end); + result = _tmp12_; return result; } @@ -370,44 +434,73 @@ */ DVBOverlapType dvb_timer_get_overlap_utc (DVBTimer* self, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration) { DVBOverlapType result = 0; - time_t _tmp0_; + time_t _tmp0_ = 0; time_t this_start; - time_t _tmp1_; + time_t _tmp1_ = 0; time_t this_end; - struct tm _tmp2_ = {0}; - struct tm _tmp3_ = {0}; + guint _tmp2_; + guint _tmp3_; + guint _tmp4_; + guint _tmp5_; + guint _tmp6_; + struct tm _tmp7_ = {0}; struct tm other_time; - time_t _tmp4_; + struct tm _tmp8_; + time_t _tmp9_ = 0; time_t other_start; - time_t _tmp5_; + gint _tmp10_; + guint _tmp11_; + struct tm _tmp12_; + time_t _tmp13_ = 0; time_t other_end; - DVBOverlapType _tmp6_; + DVBOverlapType _tmp14_ = 0; g_return_val_if_fail (self != NULL, 0); _tmp0_ = dvb_timer_get_start_time_timestamp (self); this_start = _tmp0_; _tmp1_ = dvb_timer_get_end_time_timestamp (self); this_end = _tmp1_; - _tmp3_ = (dvb_utils_create_time ((gint) start_year, (gint) start_month, (gint) start_day, (gint) start_hour, (gint) start_minute, 0, &_tmp2_), _tmp2_); - other_time = _tmp3_; - _tmp4_ = timegm (&other_time); - other_start = _tmp4_; - other_time.tm_min = other_time.tm_min + ((gint) duration); - _tmp5_ = timegm (&other_time); - other_end = _tmp5_; - _tmp6_ = dvb_timer_get_overlap (this_start, this_end, other_start, other_end); - result = _tmp6_; + _tmp2_ = start_year; + _tmp3_ = start_month; + _tmp4_ = start_day; + _tmp5_ = start_hour; + _tmp6_ = start_minute; + dvb_utils_create_time ((gint) _tmp2_, (gint) _tmp3_, (gint) _tmp4_, (gint) _tmp5_, (gint) _tmp6_, 0, &_tmp7_); + other_time = _tmp7_; + _tmp8_ = other_time; + _tmp9_ = timegm (&_tmp8_); + other_start = _tmp9_; + _tmp10_ = other_time.tm_min; + _tmp11_ = duration; + other_time.tm_min = _tmp10_ + ((gint) _tmp11_); + _tmp12_ = other_time; + _tmp13_ = timegm (&_tmp12_); + other_end = _tmp13_; + _tmp14_ = dvb_timer_get_overlap (this_start, this_end, other_start, other_end); + result = _tmp14_; return result; } static DVBOverlapType dvb_timer_get_overlap (time_t this_start, time_t this_end, time_t other_start, time_t other_end) { DVBOverlapType result = 0; - if (this_start <= other_start) { - if (this_end <= other_start) { + time_t _tmp0_; + time_t _tmp1_; + _tmp0_ = this_start; + _tmp1_ = other_start; + if (_tmp0_ <= _tmp1_) { + time_t _tmp2_; + time_t _tmp3_; + _tmp2_ = this_end; + _tmp3_ = other_start; + if (_tmp2_ <= _tmp3_) { result = DVB_OVERLAP_TYPE_NONE; return result; } else { - if (this_end >= other_end) { + time_t _tmp4_; + time_t _tmp5_; + _tmp4_ = this_end; + _tmp5_ = other_end; + if (_tmp4_ >= _tmp5_) { result = DVB_OVERLAP_TYPE_COMPLETE; return result; } else { @@ -416,11 +509,19 @@ } } } else { - if (this_end <= other_end) { + time_t _tmp6_; + time_t _tmp7_; + _tmp6_ = this_end; + _tmp7_ = other_end; + if (_tmp6_ <= _tmp7_) { result = DVB_OVERLAP_TYPE_PARTIAL; return result; } else { - if (this_start < other_end) { + time_t _tmp8_; + time_t _tmp9_; + _tmp8_ = this_start; + _tmp9_ = other_end; + if (_tmp8_ < _tmp9_) { result = DVB_OVERLAP_TYPE_PARTIAL; return result; } else { @@ -436,41 +537,69 @@ * Add the specified amount of minutes to the starting time */ void dvb_timer_add_to_start_time (DVBTimer* self, gint minutes) { + gint _tmp0_; + gint _tmp1_; g_return_if_fail (self != NULL); - self->priv->starttime.tm_min = self->priv->starttime.tm_min + minutes; + _tmp0_ = self->priv->starttime.tm_min; + _tmp1_ = minutes; + self->priv->starttime.tm_min = _tmp0_ + _tmp1_; mktime (&self->priv->starttime); } guint* dvb_timer_get_start_time (DVBTimer* self, int* result_length1) { guint* result = NULL; - guint* _tmp0_ = NULL; + struct tm _tmp0_; + gint _tmp1_; + struct tm _tmp2_; + gint _tmp3_; + struct tm _tmp4_; + gint _tmp5_; + struct tm _tmp6_; + gint _tmp7_; + struct tm _tmp8_; + gint _tmp9_; + guint* _tmp10_ = NULL; + guint* start; gint start_length1; gint _start_size_; - guint* _tmp1_; - guint* start; - guint* _tmp2_; + guint* _tmp11_; + gint _tmp11__length1; g_return_val_if_fail (self != NULL, NULL); - _tmp0_ = g_new0 (guint, 5); - _tmp0_[0] = (guint) (self->priv->starttime.tm_year + 1900); - _tmp0_[1] = (guint) (self->priv->starttime.tm_mon + 1); - _tmp0_[2] = (guint) self->priv->starttime.tm_mday; - _tmp0_[3] = (guint) self->priv->starttime.tm_hour; - _tmp0_[4] = (guint) self->priv->starttime.tm_min; - _tmp1_ = _tmp0_; + _tmp0_ = self->priv->starttime; + _tmp1_ = _tmp0_.tm_year; + _tmp2_ = self->priv->starttime; + _tmp3_ = _tmp2_.tm_mon; + _tmp4_ = self->priv->starttime; + _tmp5_ = _tmp4_.tm_mday; + _tmp6_ = self->priv->starttime; + _tmp7_ = _tmp6_.tm_hour; + _tmp8_ = self->priv->starttime; + _tmp9_ = _tmp8_.tm_min; + _tmp10_ = g_new0 (guint, 5); + _tmp10_[0] = (guint) (_tmp1_ + 1900); + _tmp10_[1] = (guint) (_tmp3_ + 1); + _tmp10_[2] = (guint) _tmp5_; + _tmp10_[3] = (guint) _tmp7_; + _tmp10_[4] = (guint) _tmp9_; + start = _tmp10_; start_length1 = 5; _start_size_ = start_length1; - start = _tmp1_; - _tmp2_ = start; - *result_length1 = start_length1; - result = _tmp2_; + _tmp11_ = start; + _tmp11__length1 = start_length1; + if (result_length1) { + *result_length1 = _tmp11__length1; + } + result = _tmp11_; return result; } void dvb_timer_get_start_time_time (DVBTimer* self, struct tm* result) { + struct tm _tmp0_; g_return_if_fail (self != NULL); - *result = self->priv->starttime; + _tmp0_ = self->priv->starttime; + *result = _tmp0_; return; } @@ -487,25 +616,48 @@ guint* dvb_timer_get_end_time (DVBTimer* self, int* result_length1) { guint* result = NULL; - time_t _tmp0_; + time_t _tmp0_ = 0; struct tm _tmp1_ = {0}; - struct tm _tmp2_ = {0}; struct tm l; - guint* _tmp3_ = NULL; - guint* _tmp4_; + struct tm _tmp2_; + gint _tmp3_; + struct tm _tmp4_; + gint _tmp5_; + struct tm _tmp6_; + gint _tmp7_; + struct tm _tmp8_; + gint _tmp9_; + struct tm _tmp10_; + gint _tmp11_; + guint* _tmp12_ = NULL; + guint* _tmp13_; + gint _tmp13__length1; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = dvb_timer_get_end_time_timestamp (self); - _tmp2_ = (g_time_local (_tmp0_, &_tmp1_), _tmp1_); - l = _tmp2_; - _tmp3_ = g_new0 (guint, 5); - _tmp3_[0] = (guint) (l.tm_year + 1900); - _tmp3_[1] = (guint) (l.tm_mon + 1); - _tmp3_[2] = (guint) l.tm_mday; - _tmp3_[3] = (guint) l.tm_hour; - _tmp3_[4] = (guint) l.tm_min; - _tmp4_ = _tmp3_; - *result_length1 = 5; - result = _tmp4_; + g_time_local (_tmp0_, &_tmp1_); + l = _tmp1_; + _tmp2_ = l; + _tmp3_ = _tmp2_.tm_year; + _tmp4_ = l; + _tmp5_ = _tmp4_.tm_mon; + _tmp6_ = l; + _tmp7_ = _tmp6_.tm_mday; + _tmp8_ = l; + _tmp9_ = _tmp8_.tm_hour; + _tmp10_ = l; + _tmp11_ = _tmp10_.tm_min; + _tmp12_ = g_new0 (guint, 5); + _tmp12_[0] = (guint) (_tmp3_ + 1900); + _tmp12_[1] = (guint) (_tmp5_ + 1); + _tmp12_[2] = (guint) _tmp7_; + _tmp12_[3] = (guint) _tmp9_; + _tmp12_[4] = (guint) _tmp11_; + _tmp13_ = _tmp12_; + _tmp13__length1 = 5; + if (result_length1) { + *result_length1 = _tmp13__length1; + } + result = _tmp13_; return result; } @@ -520,18 +672,22 @@ time_t localtime; gboolean _tmp1_ = FALSE; time_t _tmp2_; + time_t _tmp3_ = 0; + gboolean _tmp5_; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = time (NULL); localtime = _tmp0_; - _tmp2_ = mktime (&self->priv->starttime); - if ((localtime - _tmp2_) >= 0) { - gboolean _tmp3_; - _tmp3_ = dvb_timer_has_expired (self); - _tmp1_ = !_tmp3_; + _tmp2_ = localtime; + _tmp3_ = mktime (&self->priv->starttime); + if ((_tmp2_ - _tmp3_) >= ((time_t) 0)) { + gboolean _tmp4_ = FALSE; + _tmp4_ = dvb_timer_has_expired (self); + _tmp1_ = !_tmp4_; } else { _tmp1_ = FALSE; } - result = _tmp1_; + _tmp5_ = _tmp1_; + result = _tmp5_; return result; } @@ -543,44 +699,90 @@ gboolean result = FALSE; time_t _tmp0_; struct tm _tmp1_ = {0}; - struct tm _tmp2_ = {0}; struct tm localtime; - time_t _tmp3_; - struct tm _tmp4_ = {0}; - struct tm _tmp5_ = {0}; + time_t _tmp2_ = 0; + struct tm _tmp3_ = {0}; struct tm endtime; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; gboolean _tmp6_ = FALSE; gboolean _tmp7_ = FALSE; - gboolean _tmp8_ = FALSE; - gboolean _tmp9_ = FALSE; + struct tm _tmp8_; + gint _tmp9_; + struct tm _tmp10_; + gint _tmp11_; + gboolean _tmp16_; + gboolean _tmp21_; + gboolean _tmp26_; + gboolean _tmp31_; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = time (NULL); - _tmp2_ = (g_time_local (_tmp0_, &_tmp1_), _tmp1_); - localtime = _tmp2_; - _tmp3_ = dvb_timer_get_end_time_timestamp (self); - _tmp5_ = (g_time_local (_tmp3_, &_tmp4_), _tmp4_); - endtime = _tmp5_; - if (endtime.tm_year == localtime.tm_year) { - _tmp9_ = endtime.tm_mon == localtime.tm_mon; + g_time_local (_tmp0_, &_tmp1_); + localtime = _tmp1_; + _tmp2_ = dvb_timer_get_end_time_timestamp (self); + g_time_local (_tmp2_, &_tmp3_); + endtime = _tmp3_; + _tmp8_ = endtime; + _tmp9_ = _tmp8_.tm_year; + _tmp10_ = localtime; + _tmp11_ = _tmp10_.tm_year; + if (_tmp9_ == _tmp11_) { + struct tm _tmp12_; + gint _tmp13_; + struct tm _tmp14_; + gint _tmp15_; + _tmp12_ = endtime; + _tmp13_ = _tmp12_.tm_mon; + _tmp14_ = localtime; + _tmp15_ = _tmp14_.tm_mon; + _tmp7_ = _tmp13_ == _tmp15_; } else { - _tmp9_ = FALSE; + _tmp7_ = FALSE; } - if (_tmp9_) { - _tmp8_ = endtime.tm_mday == localtime.tm_mday; + _tmp16_ = _tmp7_; + if (_tmp16_) { + struct tm _tmp17_; + gint _tmp18_; + struct tm _tmp19_; + gint _tmp20_; + _tmp17_ = endtime; + _tmp18_ = _tmp17_.tm_mday; + _tmp19_ = localtime; + _tmp20_ = _tmp19_.tm_mday; + _tmp6_ = _tmp18_ == _tmp20_; } else { - _tmp8_ = FALSE; + _tmp6_ = FALSE; } - if (_tmp8_) { - _tmp7_ = endtime.tm_hour == localtime.tm_hour; + _tmp21_ = _tmp6_; + if (_tmp21_) { + struct tm _tmp22_; + gint _tmp23_; + struct tm _tmp24_; + gint _tmp25_; + _tmp22_ = endtime; + _tmp23_ = _tmp22_.tm_hour; + _tmp24_ = localtime; + _tmp25_ = _tmp24_.tm_hour; + _tmp5_ = _tmp23_ == _tmp25_; } else { - _tmp7_ = FALSE; + _tmp5_ = FALSE; } - if (_tmp7_) { - _tmp6_ = endtime.tm_min == localtime.tm_min; + _tmp26_ = _tmp5_; + if (_tmp26_) { + struct tm _tmp27_; + gint _tmp28_; + struct tm _tmp29_; + gint _tmp30_; + _tmp27_ = endtime; + _tmp28_ = _tmp27_.tm_min; + _tmp29_ = localtime; + _tmp30_ = _tmp29_.tm_min; + _tmp4_ = _tmp28_ == _tmp30_; } else { - _tmp6_ = FALSE; + _tmp4_ = FALSE; } - result = _tmp6_; + _tmp31_ = _tmp4_; + result = _tmp31_; return result; } @@ -592,7 +794,7 @@ gboolean result = FALSE; time_t _tmp0_; time_t current_time; - time_t _tmp1_; + time_t _tmp1_ = 0; time_t end_time; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = time (NULL); @@ -606,23 +808,37 @@ gchar* dvb_timer_to_string (DVBTimer* self) { gchar* result = NULL; - gint _tmp0_; + gint _tmp0_ = 0; guint* _tmp1_ = NULL; + guint* start; gint start_length1; gint _start_size_; - guint* _tmp2_; - guint* start; + DVBChannel* _tmp2_; guint _tmp3_; - gchar* _tmp4_ = NULL; + guint _tmp4_; + guint _tmp5_; + guint _tmp6_; + guint _tmp7_; + guint _tmp8_; + guint _tmp9_; + guint _tmp10_; + gchar* _tmp11_ = NULL; g_return_val_if_fail (self != NULL, NULL); _tmp1_ = dvb_timer_get_start_time (self, &_tmp0_); - _tmp2_ = _tmp1_; + start = _tmp1_; start_length1 = _tmp0_; _start_size_ = start_length1; - start = _tmp2_; - _tmp3_ = dvb_channel_get_Sid (self->priv->_Channel); - _tmp4_ = g_strdup_printf ("channel: %u, start: %04u-%02u-%02u %02u:%02u, duration: %u", _tmp3_, start[0], start[1], start[2], start[3], start[4], self->priv->_Duration); - result = _tmp4_; + _tmp2_ = self->priv->_Channel; + _tmp3_ = dvb_channel_get_Sid (_tmp2_); + _tmp4_ = _tmp3_; + _tmp5_ = start[0]; + _tmp6_ = start[1]; + _tmp7_ = start[2]; + _tmp8_ = start[3]; + _tmp9_ = start[4]; + _tmp10_ = self->priv->_Duration; + _tmp11_ = g_strdup_printf ("channel: %u, start: %04u-%02u-%02u %02u:%02u, duration: %u", _tmp4_, _tmp5_, _tmp6_, _tmp7_, _tmp8_, _tmp9_, _tmp10_); + result = _tmp11_; start = (g_free (start), NULL); return result; } @@ -632,24 +848,37 @@ * Check if we can find an EPG event belonging to this recording */ static void dvb_timer_update_epg_event (DVBTimer* self) { - DVBSchedule* _tmp0_ = NULL; + DVBChannel* _tmp0_; DVBSchedule* _tmp1_; + DVBSchedule* _tmp2_; + DVBSchedule* _tmp3_; DVBSchedule* schedule; - struct tm _tmp2_ = {0}; - struct tm _tmp3_ = {0}; - DVBEvent* _tmp4_ = NULL; + DVBSchedule* _tmp4_; + struct tm _tmp5_ = {0}; + guint _tmp6_; + DVBEvent* _tmp7_ = NULL; DVBEvent* event; + DVBEvent* _tmp8_; g_return_if_fail (self != NULL); - _tmp0_ = dvb_channel_get_Schedule (self->priv->_Channel); - _tmp1_ = _g_object_ref0 (_tmp0_); - schedule = _tmp1_; - _tmp3_ = (dvb_timer_get_start_time_time (self, &_tmp2_), _tmp2_); - _tmp4_ = dvb_schedule_get_event_around (schedule, &_tmp3_, self->priv->_Duration); - event = _tmp4_; - if (event == NULL) { + _tmp0_ = self->priv->_Channel; + _tmp1_ = dvb_channel_get_Schedule (_tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = _g_object_ref0 (_tmp2_); + schedule = _tmp3_; + _tmp4_ = schedule; + dvb_timer_get_start_time_time (self, &_tmp5_); + _tmp6_ = self->priv->_Duration; + _tmp7_ = dvb_schedule_get_event_around (_tmp4_, &_tmp5_, _tmp6_); + event = _tmp7_; + _tmp8_ = event; + if (_tmp8_ == NULL) { dvb_timer_set_EventID (self, (guint) 0); } else { - dvb_timer_set_EventID (self, event->id); + DVBEvent* _tmp9_; + guint _tmp10_; + _tmp9_ = event; + _tmp10_ = _tmp9_->id; + dvb_timer_set_EventID (self, _tmp10_); } _dvb_event_unref0 (event); _g_object_unref0 (schedule); @@ -657,53 +886,83 @@ static time_t dvb_timer_get_end_time_timestamp (DVBTimer* self) { - time_t result; - struct tm _tmp0_ = {0}; - struct tm _tmp1_ = {0}; + time_t result = 0; + struct tm _tmp0_; + gint _tmp1_; + struct tm _tmp2_; + gint _tmp3_; + struct tm _tmp4_; + gint _tmp5_; + struct tm _tmp6_; + gint _tmp7_; + struct tm _tmp8_; + gint _tmp9_; + struct tm _tmp10_ = {0}; struct tm t; - time_t _tmp2_; - _tmp1_ = (dvb_utils_create_time (self->priv->starttime.tm_year + 1900, self->priv->starttime.tm_mon + 1, self->priv->starttime.tm_mday, self->priv->starttime.tm_hour, self->priv->starttime.tm_min, 0, &_tmp0_), _tmp0_); - t = _tmp1_; - t.tm_min = t.tm_min + ((gint) self->priv->_Duration); - _tmp2_ = mktime (&t); - result = _tmp2_; + gint _tmp11_; + guint _tmp12_; + time_t _tmp13_ = 0; + g_return_val_if_fail (self != NULL, 0); + _tmp0_ = self->priv->starttime; + _tmp1_ = _tmp0_.tm_year; + _tmp2_ = self->priv->starttime; + _tmp3_ = _tmp2_.tm_mon; + _tmp4_ = self->priv->starttime; + _tmp5_ = _tmp4_.tm_mday; + _tmp6_ = self->priv->starttime; + _tmp7_ = _tmp6_.tm_hour; + _tmp8_ = self->priv->starttime; + _tmp9_ = _tmp8_.tm_min; + dvb_utils_create_time (_tmp1_ + 1900, _tmp3_ + 1, _tmp5_, _tmp7_, _tmp9_, 0, &_tmp10_); + t = _tmp10_; + _tmp11_ = t.tm_min; + _tmp12_ = self->priv->_Duration; + t.tm_min = _tmp11_ + ((gint) _tmp12_); + _tmp13_ = mktime (&t); + result = _tmp13_; return result; } static time_t dvb_timer_get_start_time_timestamp (DVBTimer* self) { - time_t result; + time_t result = 0; struct tm _tmp0_ = {0}; - struct tm _tmp1_ = {0}; struct tm t; - time_t _tmp2_; - _tmp1_ = (dvb_timer_get_start_time_time (self, &_tmp0_), _tmp0_); - t = _tmp1_; - _tmp2_ = mktime (&t); - result = _tmp2_; + time_t _tmp1_ = 0; + g_return_val_if_fail (self != NULL, 0); + dvb_timer_get_start_time_time (self, &_tmp0_); + t = _tmp0_; + _tmp1_ = mktime (&t); + result = _tmp1_; return result; } guint32 dvb_timer_get_Id (DVBTimer* self) { guint32 result; + guint32 _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Id; + _tmp0_ = self->priv->_Id; + result = _tmp0_; return result; } static void dvb_timer_set_Id (DVBTimer* self, guint32 value) { + guint32 _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Id = value; + _tmp0_ = value; + self->priv->_Id = _tmp0_; g_object_notify ((GObject *) self, "Id"); } DVBChannel* dvb_timer_get_Channel (DVBTimer* self) { DVBChannel* result; + DVBChannel* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_Channel; + _tmp0_ = self->priv->_Channel; + result = _tmp0_; return result; } @@ -712,8 +971,8 @@ DVBChannel* _tmp0_; DVBChannel* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _g_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _g_object_ref0 (_tmp0_); _g_object_unref0 (self->priv->_Channel); self->priv->_Channel = _tmp1_; g_object_notify ((GObject *) self, "Channel"); @@ -722,23 +981,29 @@ guint dvb_timer_get_Duration (DVBTimer* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_Duration; + _tmp0_ = self->priv->_Duration; + result = _tmp0_; return result; } void dvb_timer_set_Duration (DVBTimer* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_Duration = value; + _tmp0_ = value; + self->priv->_Duration = _tmp0_; g_object_notify ((GObject *) self, "Duration"); } GstElement* dvb_timer_get_sink (DVBTimer* self) { GstElement* result; + GstElement* _tmp0_; g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_sink; + _tmp0_ = self->priv->_sink; + result = _tmp0_; return result; } @@ -752,8 +1017,8 @@ GstElement* _tmp0_; GstElement* _tmp1_; g_return_if_fail (self != NULL); - _tmp0_ = _gst_object_ref0 (value); - _tmp1_ = _tmp0_; + _tmp0_ = value; + _tmp1_ = _gst_object_ref0 (_tmp0_); _gst_object_unref0 (self->priv->_sink); self->priv->_sink = _tmp1_; g_object_notify ((GObject *) self, "sink"); @@ -762,15 +1027,19 @@ guint dvb_timer_get_EventID (DVBTimer* self) { guint result; + guint _tmp0_; g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_EventID; + _tmp0_ = self->priv->_EventID; + result = _tmp0_; return result; } void dvb_timer_set_EventID (DVBTimer* self, guint value) { + guint _tmp0_; g_return_if_fail (self != NULL); - self->priv->_EventID = value; + _tmp0_ = value; + self->priv->_EventID = _tmp0_; g_object_notify ((GObject *) self, "EventID"); } diff -Nru gnome-dvb-daemon-0.1.23/src/Utils.c gnome-dvb-daemon-0.2.7/src/Utils.c --- gnome-dvb-daemon-0.1.23/src/Utils.c 2011-01-14 17:00:40.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Utils.c 2011-09-29 20:16:44.000000000 +0000 @@ -1,4 +1,4 @@ -/* Utils.c generated by valac 0.11.3, the Vala compiler +/* Utils.c generated by valac 0.14.0, the Vala compiler * generated from Utils.vala, do not modify */ /* @@ -26,25 +26,36 @@ #include #include #include -#include -#include + +#define DVB_LOGGING_TYPE_LOGGER (dvb_logging_logger_get_type ()) +#define DVB_LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLogger)) +#define DVB_LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) +#define DVB_LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_LOGGING_TYPE_LOGGER)) +#define DVB_LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_LOGGING_TYPE_LOGGER, DVBLoggingLoggerClass)) + +typedef struct _DVBLoggingLogger DVBLoggingLogger; +typedef struct _DVBLoggingLoggerClass DVBLoggingLoggerClass; #define _g_type_class_unref0(var) ((var == NULL) ? NULL : (var = (g_type_class_unref (var), NULL))) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) #define __g_slist_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL))) #define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) +extern DVBLoggingLogger* main_log; #define DVB_UTILS_NAME_ATTRS G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_STANDARD_NAME #define DVB_UTILS_READ_ATTRS G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_ACCESS_CAN_READ const gchar* dvb_utils_get_nick_from_enum (GType enumtype, gint val); +GType dvb_logging_logger_get_type (void) G_GNUC_CONST; +void dvb_logging_logger_error (DVBLoggingLogger* self, const gchar* format, ...); gboolean dvb_utils_get_value_by_name_from_enum (GType enumtype, const gchar* name, gint* evalue); const gchar* dvb_utils_get_name_by_value_from_enum (GType enumtype, gint val); void dvb_utils_mkdirs (GFile* directory, GError** error); +void dvb_logging_logger_debug (DVBLoggingLogger* self, const gchar* format, ...); static void _g_object_unref0_ (gpointer var); static void _g_slist_free__g_object_unref0_ (GSList* self); gchar* dvb_utils_remove_nonalphanums (const gchar* text); @@ -53,29 +64,52 @@ void dvb_utils_create_utc_time (gint year, gint month, gint day, gint hour, gint minute, gint second, struct tm* result); gboolean dvb_utils_is_readable_file (GFile* file); void dvb_utils_delete_dir_recursively (GFile* dir, GError** error); -DBusGConnection* dvb_utils_get_dbus_connection (void); time_t dvb_utils_t_max (time_t a, time_t b); time_t dvb_utils_t_min (time_t a, time_t b); glong dvb_utils_strdiff (const gchar* a, const gchar* b, glong* unmatched); +void dvb_utils_dbus_own_name (const gchar* service_name, GBusAcquiredCallback cb, void* cb_target); +void dvb_logging_logger_info (DVBLoggingLogger* self, const gchar* format, ...); +static void __lambda0_ (void); +static void ___lambda0__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self); +static void __lambda1_ (void); +static void ___lambda1__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self); +void dvb_utils_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* conn, const gchar* object_path, gconstpointer obj); +static guint _vala_g_dbus_connection_register_object (GType type, void* object, GDBusConnection* connection, const gchar* path, GError** error); inline const gchar* dvb_utils_get_nick_from_enum (GType enumtype, gint val) { const gchar* result = NULL; - GTypeClass* _tmp0_ = NULL; + GType _tmp0_; + GTypeClass* _tmp1_ = NULL; GEnumClass* eclass; - GEnumValue* _tmp1_ = NULL; + GEnumClass* _tmp2_; + gint _tmp3_; + GEnumValue* _tmp4_ = NULL; GEnumValue* eval; - _tmp0_ = g_type_class_ref (enumtype); - eclass = (GEnumClass*) _tmp0_; - _tmp1_ = g_enum_get_value (eclass, val); - eval = _tmp1_; - if (eval == NULL) { - g_critical ("Utils.vala:32: Enum has no value %d", val); + GEnumValue* _tmp5_; + _tmp0_ = enumtype; + _tmp1_ = g_type_class_ref (_tmp0_); + eclass = (GEnumClass*) _tmp1_; + _tmp2_ = eclass; + _tmp3_ = val; + _tmp4_ = g_enum_get_value (_tmp2_, _tmp3_); + eval = _tmp4_; + _tmp5_ = eval; + if (_tmp5_ == NULL) { + DVBLoggingLogger* _tmp6_; + gint _tmp7_; + _tmp6_ = main_log; + _tmp7_ = val; + dvb_logging_logger_error (_tmp6_, "Utils.vala:32: Enum has no value %d", _tmp7_); result = NULL; _g_type_class_unref0 (eclass); return result; } else { - result = (*eval).value_nick; + GEnumValue* _tmp8_; + const gchar* _tmp9_; + _tmp8_ = eval; + _tmp9_ = (*_tmp8_).value_nick; + result = _tmp9_; _g_type_class_unref0 (eclass); return result; } @@ -84,58 +118,91 @@ inline gboolean dvb_utils_get_value_by_name_from_enum (GType enumtype, const gchar* name, gint* evalue) { - gint _evalue = 0; + gint _vala_evalue = 0; gboolean result = FALSE; - GTypeClass* _tmp0_ = NULL; + GType _tmp0_; + GTypeClass* _tmp1_ = NULL; GEnumClass* enumclass; - GEnumValue* _tmp1_ = NULL; + GEnumClass* _tmp2_; + const gchar* _tmp3_; + GEnumValue* _tmp4_ = NULL; GEnumValue* eval; + GEnumValue* _tmp5_; g_return_val_if_fail (name != NULL, FALSE); - _tmp0_ = g_type_class_ref (enumtype); - enumclass = (GEnumClass*) _tmp0_; - _tmp1_ = g_enum_get_value_by_name (enumclass, name); - eval = _tmp1_; - if (eval == NULL) { - g_critical ("Utils.vala:44: Enum has no member named %s", name); + _tmp0_ = enumtype; + _tmp1_ = g_type_class_ref (_tmp0_); + enumclass = (GEnumClass*) _tmp1_; + _tmp2_ = enumclass; + _tmp3_ = name; + _tmp4_ = g_enum_get_value_by_name (_tmp2_, _tmp3_); + eval = _tmp4_; + _tmp5_ = eval; + if (_tmp5_ == NULL) { + DVBLoggingLogger* _tmp6_; + const gchar* _tmp7_; + _tmp6_ = main_log; + _tmp7_ = name; + dvb_logging_logger_error (_tmp6_, "Utils.vala:44: Enum has no member named %s", _tmp7_); + _vala_evalue = 0; result = FALSE; _g_type_class_unref0 (enumclass); if (evalue) { - *evalue = _evalue; + *evalue = _vala_evalue; } return result; } else { - _evalue = (*eval).value; + GEnumValue* _tmp8_; + gint _tmp9_; + _tmp8_ = eval; + _tmp9_ = (*_tmp8_).value; + _vala_evalue = _tmp9_; result = TRUE; _g_type_class_unref0 (enumclass); if (evalue) { - *evalue = _evalue; + *evalue = _vala_evalue; } return result; } _g_type_class_unref0 (enumclass); if (evalue) { - *evalue = _evalue; + *evalue = _vala_evalue; } } inline const gchar* dvb_utils_get_name_by_value_from_enum (GType enumtype, gint val) { const gchar* result = NULL; - GTypeClass* _tmp0_ = NULL; + GType _tmp0_; + GTypeClass* _tmp1_ = NULL; GEnumClass* enumclass; - GEnumValue* _tmp1_ = NULL; + GEnumClass* _tmp2_; + gint _tmp3_; + GEnumValue* _tmp4_ = NULL; GEnumValue* eval; - _tmp0_ = g_type_class_ref (enumtype); - enumclass = (GEnumClass*) _tmp0_; - _tmp1_ = g_enum_get_value (enumclass, val); - eval = _tmp1_; - if (eval == NULL) { - g_critical ("Utils.vala:57: Enum has no value %d", val); + GEnumValue* _tmp5_; + _tmp0_ = enumtype; + _tmp1_ = g_type_class_ref (_tmp0_); + enumclass = (GEnumClass*) _tmp1_; + _tmp2_ = enumclass; + _tmp3_ = val; + _tmp4_ = g_enum_get_value (_tmp2_, _tmp3_); + eval = _tmp4_; + _tmp5_ = eval; + if (_tmp5_ == NULL) { + DVBLoggingLogger* _tmp6_; + gint _tmp7_; + _tmp6_ = main_log; + _tmp7_ = val; + dvb_logging_logger_error (_tmp6_, "Utils.vala:58: Enum has no value %d", _tmp7_); result = NULL; _g_type_class_unref0 (enumclass); return result; } else { - result = (*eval).value_name; + GEnumValue* _tmp8_; + const gchar* _tmp9_; + _tmp8_ = eval; + _tmp9_ = (*_tmp8_).value_name; + result = _tmp9_; _g_type_class_unref0 (enumclass); return result; } @@ -162,48 +229,64 @@ void dvb_utils_mkdirs (GFile* directory, GError** error) { GSList* create_dirs; GFile* _tmp0_; + GFile* _tmp1_; GFile* current_dir; + GSList* _tmp9_; GError * _inner_error_ = NULL; g_return_if_fail (directory != NULL); create_dirs = NULL; - _tmp0_ = _g_object_ref0 (directory); - current_dir = _tmp0_; + _tmp0_ = directory; + _tmp1_ = _g_object_ref0 (_tmp0_); + current_dir = _tmp1_; while (TRUE) { - gboolean _tmp1_; GFile* _tmp2_; - GFile* _tmp3_ = NULL; - GFile* _tmp4_; - if (!(current_dir != NULL)) { + GFile* _tmp3_; + gboolean _tmp4_ = FALSE; + GFile* _tmp5_; + GFile* _tmp6_; + GFile* _tmp7_; + GFile* _tmp8_ = NULL; + _tmp2_ = current_dir; + if (!(_tmp2_ != NULL)) { break; } - _tmp1_ = g_file_query_exists (current_dir, NULL); - if (_tmp1_) { + _tmp3_ = current_dir; + _tmp4_ = g_file_query_exists (_tmp3_, NULL); + if (_tmp4_) { break; } - _tmp2_ = _g_object_ref0 (current_dir); - create_dirs = g_slist_prepend (create_dirs, _tmp2_); - _tmp3_ = g_file_get_parent (current_dir); - _tmp4_ = _tmp3_; + _tmp5_ = current_dir; + _tmp6_ = _g_object_ref0 (_tmp5_); + create_dirs = g_slist_prepend (create_dirs, _tmp6_); + _tmp7_ = current_dir; + _tmp8_ = g_file_get_parent (_tmp7_); _g_object_unref0 (current_dir); - current_dir = _tmp4_; + current_dir = _tmp8_; } + _tmp9_ = create_dirs; { - GSList* dir_collection; - GSList* dir_it; - dir_collection = create_dirs; + GSList* dir_collection = NULL; + GSList* dir_it = NULL; + dir_collection = _tmp9_; for (dir_it = dir_collection; dir_it != NULL; dir_it = dir_it->next) { - GFile* _tmp5_; - GFile* dir; - _tmp5_ = _g_object_ref0 ((GFile*) dir_it->data); - dir = _tmp5_; + GFile* _tmp10_; + GFile* dir = NULL; + _tmp10_ = _g_object_ref0 ((GFile*) dir_it->data); + dir = _tmp10_; { - gchar* _tmp6_ = NULL; - gchar* _tmp7_; - _tmp6_ = g_file_get_path (dir); - _tmp7_ = _tmp6_; - g_debug ("Utils.vala:75: Creating %s", _tmp7_); - _g_free0 (_tmp7_); - g_file_make_directory (dir, NULL, &_inner_error_); + DVBLoggingLogger* _tmp11_; + GFile* _tmp12_; + gchar* _tmp13_ = NULL; + gchar* _tmp14_; + GFile* _tmp15_; + _tmp11_ = main_log; + _tmp12_ = dir; + _tmp13_ = g_file_get_path (_tmp12_); + _tmp14_ = _tmp13_; + dvb_logging_logger_debug (_tmp11_, "Utils.vala:76: Creating %s", _tmp14_); + _g_free0 (_tmp14_); + _tmp15_ = dir; + g_file_make_directory (_tmp15_, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (dir); @@ -222,84 +305,102 @@ gchar* dvb_utils_remove_nonalphanums (const gchar* text) { gchar* result = NULL; - GRegex* regex; - GRegex* _tmp0_ = NULL; - GRegex* _tmp1_; - GRegex* _tmp2_; - gchar* new_text; - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - gchar* _tmp6_; + GRegex* regex = NULL; + gchar* new_text = NULL; GError * _inner_error_ = NULL; g_return_val_if_fail (text != NULL, NULL); - regex = NULL; - _tmp0_ = g_regex_new ("[^-_\\.a-zA-Z0-9]", 0, 0, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch186_g_regex_error; + { + GRegex* _tmp0_; + GRegex* _tmp1_; + _tmp0_ = g_regex_new ("[^-_\\.a-zA-Z0-9]", 0, 0, &_inner_error_); + _tmp1_ = _tmp0_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch198_g_regex_error; + } + _g_regex_unref0 (regex); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_regex_unref0 (regex); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + regex = _tmp1_; } - _tmp2_ = _tmp1_; - _g_regex_unref0 (regex); - regex = _tmp2_; - goto __finally186; - __catch186_g_regex_error: + goto __finally198; + __catch198_g_regex_error: { - GError * e; - gchar* _tmp3_; + GError* e = NULL; + DVBLoggingLogger* _tmp2_; + GError* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + gchar* _tmp6_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Utils.vala:85: RegexError: %s", e->message); - _tmp3_ = g_strdup (text); - result = _tmp3_; + _tmp2_ = main_log; + _tmp3_ = e; + _tmp4_ = _tmp3_->message; + dvb_logging_logger_error (_tmp2_, "Utils.vala:86: RegexError: %s", _tmp4_); + _tmp5_ = text; + _tmp6_ = g_strdup (_tmp5_); + result = _tmp6_; _g_error_free0 (e); _g_regex_unref0 (regex); return result; } - __finally186: + __finally198: if (_inner_error_ != NULL) { _g_regex_unref0 (regex); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return NULL; } - new_text = NULL; - _tmp4_ = g_regex_replace_literal (regex, text, (gssize) (-1), 0, "_", 0, &_inner_error_); - _tmp5_ = _tmp4_; - if (_inner_error_ != NULL) { - if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch187_g_regex_error; + { + GRegex* _tmp7_; + const gchar* _tmp8_; + gchar* _tmp9_ = NULL; + gchar* _tmp10_; + _tmp7_ = regex; + _tmp8_ = text; + _tmp9_ = g_regex_replace_literal (_tmp7_, _tmp8_, (gssize) (-1), 0, "_", 0, &_inner_error_); + _tmp10_ = _tmp9_; + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_REGEX_ERROR) { + goto __catch199_g_regex_error; + } + _g_free0 (new_text); + _g_regex_unref0 (regex); + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } _g_free0 (new_text); - _g_regex_unref0 (regex); - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; + new_text = _tmp10_; } - _tmp6_ = _tmp5_; - _g_free0 (new_text); - new_text = _tmp6_; - goto __finally187; - __catch187_g_regex_error: + goto __finally199; + __catch199_g_regex_error: { - GError * e; - gchar* _tmp7_; + GError* e = NULL; + DVBLoggingLogger* _tmp11_; + GError* _tmp12_; + const gchar* _tmp13_; + const gchar* _tmp14_; + gchar* _tmp15_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Utils.vala:93: RegexError: %s", e->message); - _tmp7_ = g_strdup (text); - result = _tmp7_; + _tmp11_ = main_log; + _tmp12_ = e; + _tmp13_ = _tmp12_->message; + dvb_logging_logger_error (_tmp11_, "Utils.vala:94: RegexError: %s", _tmp13_); + _tmp14_ = text; + _tmp15_ = g_strdup (_tmp14_); + result = _tmp15_; _g_error_free0 (e); _g_free0 (new_text); _g_regex_unref0 (regex); return result; } - __finally187: + __finally199: if (_inner_error_ != NULL) { _g_free0 (new_text); _g_regex_unref0 (regex); @@ -317,19 +418,29 @@ * @returns: Difference in seconds */ inline time_t dvb_utils_difftime (struct tm* t1, struct tm* t2) { - time_t result; - time_t _tmp0_; + time_t result = 0; + time_t _tmp0_ = 0; time_t ts1; - time_t _tmp1_; + time_t _tmp1_ = 0; time_t ts2; + time_t _tmp2_; + time_t _tmp3_; time_t diff; + time_t _tmp4_; + g_return_val_if_fail (t1 != NULL, 0); + g_return_val_if_fail (t2 != NULL, 0); _tmp0_ = mktime (t1); ts1 = _tmp0_; _tmp1_ = mktime (t2); ts2 = _tmp1_; - diff = ts1 - ts2; - if (diff < 0) { - result = (-1) * diff; + _tmp2_ = ts1; + _tmp3_ = ts2; + diff = _tmp2_ - _tmp3_; + _tmp4_ = diff; + if (_tmp4_ < ((time_t) 0)) { + time_t _tmp5_; + _tmp5_ = diff; + result = (-1) * _tmp5_; return result; } else { result = diff; @@ -357,45 +468,78 @@ gboolean _tmp2_ = FALSE; gboolean _tmp3_ = FALSE; gboolean _tmp4_ = FALSE; - time_t _tmp5_; - struct tm _tmp6_ = {0}; - struct tm _tmp7_ = {0}; + gint _tmp5_; + gboolean _tmp7_; + gboolean _tmp9_; + gboolean _tmp11_; + gboolean _tmp13_; + gboolean _tmp15_; + time_t _tmp16_; + struct tm _tmp17_ = {0}; struct tm t; - if (year >= 1900) { - _tmp4_ = month >= 1; + gint _tmp18_; + gint _tmp19_; + gint _tmp20_; + gint _tmp21_; + gint _tmp22_; + gint _tmp23_; + _tmp5_ = year; + if (_tmp5_ >= 1900) { + gint _tmp6_; + _tmp6_ = month; + _tmp4_ = _tmp6_ >= 1; } else { _tmp4_ = FALSE; } - if (_tmp4_) { - _tmp3_ = day >= 1; + _tmp7_ = _tmp4_; + if (_tmp7_) { + gint _tmp8_; + _tmp8_ = day; + _tmp3_ = _tmp8_ >= 1; } else { _tmp3_ = FALSE; } - if (_tmp3_) { - _tmp2_ = hour >= 0; + _tmp9_ = _tmp3_; + if (_tmp9_) { + gint _tmp10_; + _tmp10_ = hour; + _tmp2_ = _tmp10_ >= 0; } else { _tmp2_ = FALSE; } - if (_tmp2_) { - _tmp1_ = minute >= 0; + _tmp11_ = _tmp2_; + if (_tmp11_) { + gint _tmp12_; + _tmp12_ = minute; + _tmp1_ = _tmp12_ >= 0; } else { _tmp1_ = FALSE; } - if (_tmp1_) { - _tmp0_ = second >= 0; + _tmp13_ = _tmp1_; + if (_tmp13_) { + gint _tmp14_; + _tmp14_ = second; + _tmp0_ = _tmp14_ >= 0; } else { _tmp0_ = FALSE; } - g_assert (_tmp0_); - _tmp5_ = time (NULL); - _tmp7_ = (g_time_local (_tmp5_, &_tmp6_), _tmp6_); - t = _tmp7_; - t.tm_year = year - 1900; - t.tm_mon = month - 1; - t.tm_mday = day; - t.tm_hour = hour; - t.tm_min = minute; - t.tm_sec = second; + _tmp15_ = _tmp0_; + g_assert (_tmp15_); + _tmp16_ = time (NULL); + g_time_local (_tmp16_, &_tmp17_); + t = _tmp17_; + _tmp18_ = year; + t.tm_year = _tmp18_ - 1900; + _tmp19_ = month; + t.tm_mon = _tmp19_ - 1; + _tmp20_ = day; + t.tm_mday = _tmp20_; + _tmp21_ = hour; + t.tm_hour = _tmp21_; + _tmp22_ = minute; + t.tm_min = _tmp22_; + _tmp23_ = second; + t.tm_sec = _tmp23_; *result = t; return; } @@ -420,45 +564,78 @@ gboolean _tmp2_ = FALSE; gboolean _tmp3_ = FALSE; gboolean _tmp4_ = FALSE; - time_t _tmp5_; - struct tm _tmp6_ = {0}; - struct tm _tmp7_ = {0}; + gint _tmp5_; + gboolean _tmp7_; + gboolean _tmp9_; + gboolean _tmp11_; + gboolean _tmp13_; + gboolean _tmp15_; + time_t _tmp16_; + struct tm _tmp17_ = {0}; struct tm t; - if (year >= 1900) { - _tmp4_ = month >= 1; + gint _tmp18_; + gint _tmp19_; + gint _tmp20_; + gint _tmp21_; + gint _tmp22_; + gint _tmp23_; + _tmp5_ = year; + if (_tmp5_ >= 1900) { + gint _tmp6_; + _tmp6_ = month; + _tmp4_ = _tmp6_ >= 1; } else { _tmp4_ = FALSE; } - if (_tmp4_) { - _tmp3_ = day >= 1; + _tmp7_ = _tmp4_; + if (_tmp7_) { + gint _tmp8_; + _tmp8_ = day; + _tmp3_ = _tmp8_ >= 1; } else { _tmp3_ = FALSE; } - if (_tmp3_) { - _tmp2_ = hour >= 0; + _tmp9_ = _tmp3_; + if (_tmp9_) { + gint _tmp10_; + _tmp10_ = hour; + _tmp2_ = _tmp10_ >= 0; } else { _tmp2_ = FALSE; } - if (_tmp2_) { - _tmp1_ = minute >= 0; + _tmp11_ = _tmp2_; + if (_tmp11_) { + gint _tmp12_; + _tmp12_ = minute; + _tmp1_ = _tmp12_ >= 0; } else { _tmp1_ = FALSE; } - if (_tmp1_) { - _tmp0_ = second >= 0; + _tmp13_ = _tmp1_; + if (_tmp13_) { + gint _tmp14_; + _tmp14_ = second; + _tmp0_ = _tmp14_ >= 0; } else { _tmp0_ = FALSE; } - g_assert (_tmp0_); - _tmp5_ = time (NULL); - _tmp7_ = (g_time_gm (_tmp5_, &_tmp6_), _tmp6_); - t = _tmp7_; - t.tm_year = year - 1900; - t.tm_mon = month - 1; - t.tm_mday = day; - t.tm_hour = hour; - t.tm_min = minute; - t.tm_sec = second; + _tmp15_ = _tmp0_; + g_assert (_tmp15_); + _tmp16_ = time (NULL); + g_time_gm (_tmp16_, &_tmp17_); + t = _tmp17_; + _tmp18_ = year; + t.tm_year = _tmp18_ - 1900; + _tmp19_ = month; + t.tm_mon = _tmp19_ - 1; + _tmp20_ = day; + t.tm_mday = _tmp20_; + _tmp21_ = hour; + t.tm_hour = _tmp21_; + _tmp22_ = minute; + t.tm_min = _tmp22_; + _tmp23_ = second; + t.tm_sec = _tmp23_; t.tm_isdst = -1; *result = t; return; @@ -467,62 +644,81 @@ gboolean dvb_utils_is_readable_file (GFile* file) { gboolean result = FALSE; - GFileInfo* info; - GFileInfo* _tmp0_ = NULL; - GFileInfo* _tmp1_; - GFileInfo* _tmp2_; - GFileType _tmp3_; - gboolean _tmp6_; + GFileInfo* info = NULL; + GFileInfo* _tmp6_; + GFileType _tmp7_ = 0; + GFileInfo* _tmp12_; + gboolean _tmp13_ = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (file != NULL, FALSE); - info = NULL; - _tmp0_ = g_file_query_info (file, DVB_UTILS_READ_ATTRS, 0, NULL, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch188_g_error; + { + GFile* _tmp0_; + GFileInfo* _tmp1_ = NULL; + GFileInfo* _tmp2_; + _tmp0_ = file; + _tmp1_ = g_file_query_info (_tmp0_, DVB_UTILS_READ_ATTRS, 0, NULL, &_inner_error_); + _tmp2_ = _tmp1_; + if (_inner_error_ != NULL) { + goto __catch200_g_error; + } + _g_object_unref0 (info); + info = _tmp2_; } - _tmp2_ = _tmp1_; - _g_object_unref0 (info); - info = _tmp2_; - goto __finally188; - __catch188_g_error: + goto __finally200; + __catch200_g_error: { - GError * e; + GError* e = NULL; + DVBLoggingLogger* _tmp3_; + GError* _tmp4_; + const gchar* _tmp5_; e = _inner_error_; _inner_error_ = NULL; - g_critical ("Utils.vala:162: Could not retrieve attributes: %s", e->message); + _tmp3_ = main_log; + _tmp4_ = e; + _tmp5_ = _tmp4_->message; + dvb_logging_logger_error (_tmp3_, "Utils.vala:163: Could not retrieve attributes: %s", _tmp5_); result = FALSE; _g_error_free0 (e); _g_object_unref0 (info); return result; } - __finally188: + __finally200: if (_inner_error_ != NULL) { _g_object_unref0 (info); g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); g_clear_error (&_inner_error_); return FALSE; } - _tmp3_ = g_file_info_get_file_type (info); - if (_tmp3_ != G_FILE_TYPE_REGULAR) { - gchar* _tmp4_ = NULL; - gchar* _tmp5_; - _tmp4_ = g_file_get_path (file); - _tmp5_ = _tmp4_; - g_critical ("Utils.vala:167: %s is not a regular file", _tmp5_); - _g_free0 (_tmp5_); + _tmp6_ = info; + _tmp7_ = g_file_info_get_file_type (_tmp6_); + if (_tmp7_ != G_FILE_TYPE_REGULAR) { + DVBLoggingLogger* _tmp8_; + GFile* _tmp9_; + gchar* _tmp10_ = NULL; + gchar* _tmp11_; + _tmp8_ = main_log; + _tmp9_ = file; + _tmp10_ = g_file_get_path (_tmp9_); + _tmp11_ = _tmp10_; + dvb_logging_logger_error (_tmp8_, "Utils.vala:168: %s is not a regular file", _tmp11_); + _g_free0 (_tmp11_); result = FALSE; _g_object_unref0 (info); return result; } - _tmp6_ = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ); - if (!_tmp6_) { - gchar* _tmp7_ = NULL; - gchar* _tmp8_; - _tmp7_ = g_file_get_path (file); - _tmp8_ = _tmp7_; - g_critical ("Utils.vala:172: Cannot read %s", _tmp8_); - _g_free0 (_tmp8_); + _tmp12_ = info; + _tmp13_ = g_file_info_get_attribute_boolean (_tmp12_, G_FILE_ATTRIBUTE_ACCESS_CAN_READ); + if (!_tmp13_) { + DVBLoggingLogger* _tmp14_; + GFile* _tmp15_; + gchar* _tmp16_ = NULL; + gchar* _tmp17_; + _tmp14_ = main_log; + _tmp15_ = file; + _tmp16_ = g_file_get_path (_tmp15_); + _tmp17_ = _tmp16_; + dvb_logging_logger_error (_tmp14_, "Utils.vala:173: Cannot read %s", _tmp17_); + _g_free0 (_tmp17_); result = FALSE; _g_object_unref0 (info); return result; @@ -534,63 +730,78 @@ void dvb_utils_delete_dir_recursively (GFile* dir, GError** error) { - GFileEnumerator* files; - GFileEnumerator* _tmp0_ = NULL; - GFileEnumerator* _tmp1_; + GFileEnumerator* files = NULL; + GFile* _tmp0_; + GFileEnumerator* _tmp1_ = NULL; GFileEnumerator* _tmp2_; - GFileInfo* childinfo; - gchar* _tmp11_ = NULL; - gchar* _tmp12_; + GFileEnumerator* _tmp3_; + GFileInfo* childinfo = NULL; + DVBLoggingLogger* _tmp21_; + GFile* _tmp22_; + gchar* _tmp23_ = NULL; + gchar* _tmp24_; + GFile* _tmp25_; GError * _inner_error_ = NULL; g_return_if_fail (dir != NULL); - files = NULL; - _tmp0_ = g_file_enumerate_children (dir, DVB_UTILS_NAME_ATTRS, 0, NULL, &_inner_error_); - _tmp1_ = _tmp0_; + _tmp0_ = dir; + _tmp1_ = g_file_enumerate_children (_tmp0_, DVB_UTILS_NAME_ATTRS, 0, NULL, &_inner_error_); + _tmp2_ = _tmp1_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (files); return; } - _tmp2_ = _tmp1_; _g_object_unref0 (files); files = _tmp2_; - if (files == NULL) { + _tmp3_ = files; + if (_tmp3_ == NULL) { _g_object_unref0 (files); return; } - childinfo = NULL; while (TRUE) { - GFileInfo* _tmp3_ = NULL; - GFileInfo* _tmp4_; - GFileInfo* _tmp5_; - guint32 _tmp6_; + GFileEnumerator* _tmp4_; + GFileInfo* _tmp5_ = NULL; + GFileInfo* _tmp6_; + GFileInfo* _tmp7_; + GFileInfo* _tmp8_; + guint32 _tmp9_ = 0U; guint32 type; - const gchar* _tmp7_ = NULL; - GFile* _tmp8_ = NULL; + GFile* _tmp10_; + GFileInfo* _tmp11_; + const gchar* _tmp12_ = NULL; + GFile* _tmp13_ = NULL; GFile* child; - _tmp3_ = g_file_enumerator_next_file (files, NULL, &_inner_error_); - _tmp4_ = _tmp3_; + guint32 _tmp14_; + _tmp4_ = files; + _tmp5_ = g_file_enumerator_next_file (_tmp4_, NULL, &_inner_error_); + _tmp6_ = _tmp5_; if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (childinfo); _g_object_unref0 (files); return; } - _tmp5_ = _tmp4_; _g_object_unref0 (childinfo); - childinfo = _tmp5_; - if (!(childinfo != NULL)) { + childinfo = _tmp6_; + _tmp7_ = childinfo; + if (!(_tmp7_ != NULL)) { break; } - _tmp6_ = g_file_info_get_attribute_uint32 (childinfo, G_FILE_ATTRIBUTE_STANDARD_TYPE); - type = _tmp6_; - _tmp7_ = g_file_info_get_name (childinfo); - _tmp8_ = g_file_get_child (dir, _tmp7_); - child = _tmp8_; - switch (type) { + _tmp8_ = childinfo; + _tmp9_ = g_file_info_get_attribute_uint32 (_tmp8_, G_FILE_ATTRIBUTE_STANDARD_TYPE); + type = _tmp9_; + _tmp10_ = dir; + _tmp11_ = childinfo; + _tmp12_ = g_file_info_get_name (_tmp11_); + _tmp13_ = g_file_get_child (_tmp10_, _tmp12_); + child = _tmp13_; + _tmp14_ = type; + switch (_tmp14_) { case G_FILE_TYPE_DIRECTORY: { - dvb_utils_delete_dir_recursively (child, &_inner_error_); + GFile* _tmp15_; + _tmp15_ = child; + dvb_utils_delete_dir_recursively (_tmp15_, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (child); @@ -602,13 +813,19 @@ } case G_FILE_TYPE_REGULAR: { - gchar* _tmp9_ = NULL; - gchar* _tmp10_; - _tmp9_ = g_file_get_path (child); - _tmp10_ = _tmp9_; - g_debug ("Utils.vala:197: Deleting file %s", _tmp10_); - _g_free0 (_tmp10_); - g_file_delete (child, NULL, &_inner_error_); + DVBLoggingLogger* _tmp16_; + GFile* _tmp17_; + gchar* _tmp18_ = NULL; + gchar* _tmp19_; + GFile* _tmp20_; + _tmp16_ = main_log; + _tmp17_ = child; + _tmp18_ = g_file_get_path (_tmp17_); + _tmp19_ = _tmp18_; + dvb_logging_logger_debug (_tmp16_, "Utils.vala:198: Deleting file %s", _tmp19_); + _g_free0 (_tmp19_); + _tmp20_ = child; + g_file_delete (_tmp20_, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (child); @@ -618,14 +835,19 @@ } break; } + default: + break; } _g_object_unref0 (child); } - _tmp11_ = g_file_get_path (dir); - _tmp12_ = _tmp11_; - g_debug ("Utils.vala:203: Deleting directory %s", _tmp12_); - _g_free0 (_tmp12_); - g_file_delete (dir, NULL, &_inner_error_); + _tmp21_ = main_log; + _tmp22_ = dir; + _tmp23_ = g_file_get_path (_tmp22_); + _tmp24_ = _tmp23_; + dvb_logging_logger_debug (_tmp21_, "Utils.vala:204: Deleting directory %s", _tmp24_); + _g_free0 (_tmp24_); + _tmp25_ = dir; + g_file_delete (_tmp25_, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (childinfo); @@ -637,133 +859,253 @@ } -inline DBusGConnection* dvb_utils_get_dbus_connection (void) { - DBusGConnection* result = NULL; - DBusGConnection* conn; - DBusGConnection* _tmp0_ = NULL; - DBusGConnection* _tmp1_; - DBusGConnection* _tmp2_; - GError * _inner_error_ = NULL; - conn = NULL; - _tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); - _tmp1_ = _tmp0_; - if (_inner_error_ != NULL) { - goto __catch189_g_error; - } - _tmp2_ = _tmp1_; - _dbus_g_connection_unref0 (conn); - conn = _tmp2_; - goto __finally189; - __catch189_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - g_critical ("Utils.vala:212: Could not get D-Bus session bus: %s", e->message); - result = NULL; - _g_error_free0 (e); - _dbus_g_connection_unref0 (conn); - return result; - } - __finally189: - if (_inner_error_ != NULL) { - _dbus_g_connection_unref0 (conn); - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; - } - result = conn; - return result; -} - - time_t dvb_utils_t_max (time_t a, time_t b) { - time_t result; - time_t _tmp0_; - if (a < b) { - _tmp0_ = b; + time_t result = 0; + time_t _tmp0_ = 0; + time_t _tmp1_; + time_t _tmp2_; + time_t _tmp5_; + _tmp1_ = a; + _tmp2_ = b; + if (_tmp1_ < _tmp2_) { + time_t _tmp3_; + _tmp3_ = b; + _tmp0_ = _tmp3_; } else { - _tmp0_ = a; + time_t _tmp4_; + _tmp4_ = a; + _tmp0_ = _tmp4_; } - result = _tmp0_; + _tmp5_ = _tmp0_; + result = _tmp5_; return result; } time_t dvb_utils_t_min (time_t a, time_t b) { - time_t result; - time_t _tmp0_; - if (a < b) { - _tmp0_ = a; + time_t result = 0; + time_t _tmp0_ = 0; + time_t _tmp1_; + time_t _tmp2_; + time_t _tmp5_; + _tmp1_ = a; + _tmp2_ = b; + if (_tmp1_ < _tmp2_) { + time_t _tmp3_; + _tmp3_ = a; + _tmp0_ = _tmp3_; } else { - _tmp0_ = b; + time_t _tmp4_; + _tmp4_ = b; + _tmp0_ = _tmp4_; } - result = _tmp0_; + _tmp5_ = _tmp0_; + result = _tmp5_; return result; } static gchar string_get (const gchar* self, glong index) { gchar result = '\0'; + glong _tmp0_; + gchar _tmp1_; g_return_val_if_fail (self != NULL, '\0'); - result = ((gchar*) self)[index]; + _tmp0_ = index; + _tmp1_ = ((gchar*) self)[_tmp0_]; + result = _tmp1_; return result; } glong dvb_utils_strdiff (const gchar* a, const gchar* b, glong* unmatched) { - glong _unmatched = 0L; + glong _vala_unmatched = 0L; glong result = 0L; - gint _tmp0_; - glong len_a; + const gchar* _tmp0_; gint _tmp1_; + gint _tmp2_; + glong len_a; + const gchar* _tmp3_; + gint _tmp4_; + gint _tmp5_; glong len_b; glong max = 0L; + glong _tmp6_; + glong _tmp7_; glong diff; g_return_val_if_fail (a != NULL, 0L); g_return_val_if_fail (b != NULL, 0L); - _tmp0_ = strlen (a); - len_a = (glong) _tmp0_; - _tmp1_ = strlen (b); - len_b = (glong) _tmp1_; - if (len_a < len_b) { - max = len_b; - _unmatched = len_b - len_a; + _tmp0_ = a; + _tmp1_ = strlen (_tmp0_); + _tmp2_ = _tmp1_; + len_a = (glong) _tmp2_; + _tmp3_ = b; + _tmp4_ = strlen (_tmp3_); + _tmp5_ = _tmp4_; + len_b = (glong) _tmp5_; + _tmp6_ = len_a; + _tmp7_ = len_b; + if (_tmp6_ < _tmp7_) { + glong _tmp8_; + glong _tmp9_; + glong _tmp10_; + _tmp8_ = len_b; + max = _tmp8_; + _tmp9_ = len_b; + _tmp10_ = len_a; + _vala_unmatched = _tmp9_ - _tmp10_; } else { - max = len_a; - _unmatched = len_a - len_b; + glong _tmp11_; + glong _tmp12_; + glong _tmp13_; + _tmp11_ = len_a; + max = _tmp11_; + _tmp12_ = len_a; + _tmp13_ = len_b; + _vala_unmatched = _tmp12_ - _tmp13_; } diff = (glong) 0; { gint i; i = 0; { - gboolean _tmp2_; - _tmp2_ = TRUE; + gboolean _tmp14_; + _tmp14_ = TRUE; while (TRUE) { - gchar _tmp3_; - gchar _tmp4_; - if (!_tmp2_) { - i++; + gboolean _tmp15_; + gint _tmp17_; + glong _tmp18_; + const gchar* _tmp19_; + gint _tmp20_; + gchar _tmp21_ = '\0'; + const gchar* _tmp22_; + gint _tmp23_; + gchar _tmp24_ = '\0'; + _tmp15_ = _tmp14_; + if (!_tmp15_) { + gint _tmp16_; + _tmp16_ = i; + i = _tmp16_ + 1; } - _tmp2_ = FALSE; - if (!(i < max)) { + _tmp14_ = FALSE; + _tmp17_ = i; + _tmp18_ = max; + if (!(((glong) _tmp17_) < _tmp18_)) { break; } - _tmp3_ = string_get (a, (glong) i); - _tmp4_ = string_get (b, (glong) i); - if (_tmp3_ != _tmp4_) { - diff++; + _tmp19_ = a; + _tmp20_ = i; + _tmp21_ = string_get (_tmp19_, (glong) _tmp20_); + _tmp22_ = b; + _tmp23_ = i; + _tmp24_ = string_get (_tmp22_, (glong) _tmp23_); + if (_tmp21_ != _tmp24_) { + glong _tmp25_; + _tmp25_ = diff; + diff = _tmp25_ + 1; } } } } result = diff; if (unmatched) { - *unmatched = _unmatched; + *unmatched = _vala_unmatched; } return result; } +static void __lambda0_ (void) { +} + + +static void ___lambda0__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) { + __lambda0_ (); +} + + +static void __lambda1_ (void) { + g_warning ("Utils.vala:244: Could not acquire name"); +} + + +static void ___lambda1__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) { + __lambda1_ (); +} + + +void dvb_utils_dbus_own_name (const gchar* service_name, GBusAcquiredCallback cb, void* cb_target) { + DVBLoggingLogger* _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + GBusAcquiredCallback _tmp3_; + void* _tmp3__target; + g_return_if_fail (service_name != NULL); + _tmp0_ = main_log; + _tmp1_ = service_name; + dvb_logging_logger_info (_tmp0_, "Utils.vala:240: Creating D-Bus service %s", _tmp1_); + _tmp2_ = service_name; + _tmp3_ = cb; + _tmp3__target = cb_target; + g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, _tmp2_, G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((_tmp3_ == NULL) ? NULL : g_cclosure_new ((GCallback) _tmp3_, _tmp3__target, NULL)), (GClosure*) ((___lambda0__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda0__gbus_name_acquired_callback, NULL, NULL)), (GClosure*) ((___lambda1__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda1__gbus_name_lost_callback, NULL, NULL))); +} + + +static guint _vala_g_dbus_connection_register_object (GType type, void* object, GDBusConnection* connection, const gchar* path, GError** error) { + void *func; + func = g_type_get_qdata (type, g_quark_from_static_string ("vala-dbus-register-object")); + if (!func) { + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "The specified type does not support D-Bus registration"); + return 0; + } + return ((guint (*) (void *, GDBusConnection *, const gchar *, GError **)) func) (object, connection, path, error); +} + + +inline void dvb_utils_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* conn, const gchar* object_path, gconstpointer obj) { + GError * _inner_error_ = NULL; + g_return_if_fail (conn != NULL); + g_return_if_fail (object_path != NULL); + { + GDBusConnection* _tmp0_; + const gchar* _tmp1_; + gconstpointer _tmp2_; + _tmp0_ = conn; + _tmp1_ = object_path; + _tmp2_ = obj; + _vala_g_dbus_connection_register_object (t_type, _tmp2_, _tmp0_, _tmp1_, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == G_IO_ERROR) { + goto __catch201_g_io_error; + } + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } + } + goto __finally201; + __catch201_g_io_error: + { + GError* e = NULL; + DVBLoggingLogger* _tmp3_; + const gchar* _tmp4_; + GError* _tmp5_; + const gchar* _tmp6_; + e = _inner_error_; + _inner_error_ = NULL; + _tmp3_ = main_log; + _tmp4_ = object_path; + _tmp5_ = e; + _tmp6_ = _tmp5_->message; + dvb_logging_logger_error (_tmp3_, "Utils.vala:251: Could not register object '%s': %s", _tmp4_, _tmp6_); + _g_error_free0 (e); + } + __finally201: + if (_inner_error_ != NULL) { + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return; + } +} + + diff -Nru gnome-dvb-daemon-0.1.23/src/Utils.vala gnome-dvb-daemon-0.2.7/src/Utils.vala --- gnome-dvb-daemon-0.1.23/src/Utils.vala 2011-01-05 12:48:30.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/src/Utils.vala 2011-09-29 20:27:47.000000000 +0000 @@ -29,7 +29,7 @@ unowned EnumValue? eval = eclass.get_value (val); if (eval == null) { - critical ("Enum has no value %d", val); + Main.log.error ("Enum has no value %d", val); return null; } else { return eval.value_nick; @@ -41,7 +41,8 @@ unowned EnumValue? eval = enumclass.get_value_by_name (name); if (eval == null) { - critical ("Enum has no member named %s", name); + Main.log.error ("Enum has no member named %s", name); + evalue = 0; return false; } else { evalue = eval.value; @@ -54,7 +55,7 @@ unowned EnumValue? eval = enumclass.get_value (val); if (eval == null) { - critical ("Enum has no value %d", val); + Main.log.error ("Enum has no value %d", val); return null; } else { return eval.value_name; @@ -72,7 +73,7 @@ } foreach (File dir in create_dirs) { - debug ("Creating %s", dir.get_path ()); + Main.log.debug ("Creating %s", dir.get_path ()); dir.make_directory (null); } } @@ -82,7 +83,7 @@ try { regex = new Regex ("[^-_\\.a-zA-Z0-9]", 0, 0); } catch (RegexError e) { - critical ("RegexError: %s", e.message); + Main.log.error ("RegexError: %s", e.message); return text; } @@ -90,7 +91,7 @@ try { new_text = regex.replace_literal (text, -1, 0, "_", 0); } catch (RegexError e) { - critical ("RegexError: %s", e.message); + Main.log.error ("RegexError: %s", e.message); return text; } @@ -159,17 +160,17 @@ try { info = file.query_info (READ_ATTRS, 0, null); } catch (Error e) { - critical ("Could not retrieve attributes: %s", e.message); + Main.log.error ("Could not retrieve attributes: %s", e.message); return false; } if (info.get_file_type () != FileType.REGULAR) { - critical ("%s is not a regular file", file.get_path ()); + Main.log.error ("%s is not a regular file", file.get_path ()); return false; } if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) { - critical ("Cannot read %s", file.get_path ()); + Main.log.error ("Cannot read %s", file.get_path ()); return false; } @@ -194,27 +195,16 @@ break; case FileType.REGULAR: - debug ("Deleting file %s", child.get_path ()); + Main.log.debug ("Deleting file %s", child.get_path ()); child.delete (null); break; } } - debug ("Deleting directory %s", dir.get_path ()); + Main.log.debug ("Deleting directory %s", dir.get_path ()); dir.delete (null); } - public static inline DBus.Connection? get_dbus_connection () { - DBus.Connection conn; - try { - conn = DBus.Bus.get (DBus.BusType.SESSION); - } catch (Error e) { - critical ("Could not get D-Bus session bus: %s", e.message); - return null; - } - return conn; - } - public static time_t t_max (time_t a, time_t b) { return (a < b) ? b : a; } @@ -246,4 +236,20 @@ return diff; } + public static void dbus_own_name (string service_name, BusAcquiredCallback cb) { + Main.log.info ("Creating D-Bus service %s", service_name); + Bus.own_name (BusType.SESSION, service_name, BusNameOwnerFlags.NONE, + cb, + () => {}, + () => warning ("Could not acquire name")); + } + + public static inline void dbus_register_object (DBusConnection conn, string object_path, T obj) { + try { + conn.register_object (object_path, obj); + } catch (IOError e) { + Main.log.error ("Could not register object '%s': %s", object_path, e.message); + } + } + } diff -Nru gnome-dvb-daemon-0.1.23/vapi/cstuff.c gnome-dvb-daemon-0.2.7/vapi/cstuff.c --- gnome-dvb-daemon-0.1.23/vapi/cstuff.c 2011-01-14 17:22:27.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/vapi/cstuff.c 2011-04-17 10:51:56.000000000 +0000 @@ -74,6 +74,9 @@ } for (iter = ifap; iter; iter = iter->ifa_next) { + if (iter->ifa_addr == NULL) + continue; + family = iter->ifa_addr->sa_family; if (family == AF_INET) { /* IPv4 only */ errnum = getnameinfo (iter->ifa_addr, sizeof(struct sockaddr_in), diff -Nru gnome-dvb-daemon-0.1.23/vapi/cutils.vapi gnome-dvb-daemon-0.2.7/vapi/cutils.vapi --- gnome-dvb-daemon-0.1.23/vapi/cutils.vapi 2011-01-14 16:07:05.000000000 +0000 +++ gnome-dvb-daemon-0.2.7/vapi/cutils.vapi 2011-04-19 21:18:36.000000000 +0000 @@ -26,9 +26,6 @@ public static SignalHandler connect (int signum, SignalHandler handler); } - [CCode (cname = "g_log_default_handler", cheader_filename = "glib.h")] - public static void log_default_handler (string? log_domain, GLib.LogLevelFlags log_levels, string message, void* data); - [CCode (cname = "gst_bus_add_watch_context", cheader_filename = "cstuff.h")] public static uint gst_bus_add_watch_context (Gst.Bus bus, Gst.BusFunc func, GLib.MainContext context);